pi-agent-ide 0.1.1 → 0.2.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 (670) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +11 -5
  3. package/dist/chunk-266RH77Z.js +1 -0
  4. package/dist/chunk-2SKAED2I.js +2 -0
  5. package/dist/chunk-2ZMYT6ZC.js +1 -0
  6. package/dist/chunk-34ZQTTU2.js +2 -0
  7. package/dist/chunk-3H2EU7VQ.js +0 -0
  8. package/dist/chunk-3YK4XMWB.js +0 -0
  9. package/dist/chunk-476MR2QB.js +1 -0
  10. package/dist/chunk-4KQOODGE.js +13 -0
  11. package/dist/chunk-4SQQKEVD.js +16 -0
  12. package/dist/chunk-52BM6J6I.js +6 -0
  13. package/dist/chunk-5A25RATC.js +3 -0
  14. package/dist/chunk-5BWUVAR4.js +1 -0
  15. package/dist/chunk-6DN7NO7L.js +1 -0
  16. package/dist/chunk-6SMFVLTY.js +1 -0
  17. package/dist/chunk-7NDBZ4WX.js +1 -0
  18. package/dist/chunk-AP7Z3VWC.js +1 -0
  19. package/dist/chunk-BYWAG6X3.js +6 -0
  20. package/dist/chunk-DEP55R35.js +1 -0
  21. package/dist/chunk-E2RESHYR.js +1 -0
  22. package/dist/chunk-E4SECPF4.js +1 -0
  23. package/dist/chunk-EEH4WYI7.js +1 -0
  24. package/dist/chunk-EI7MMDWY.js +1 -0
  25. package/dist/chunk-ERVMDQGX.js +1 -0
  26. package/dist/chunk-EW2KVKCN.js +2 -0
  27. package/dist/chunk-F6SESI3P.js +4 -0
  28. package/dist/chunk-GTK5AREE.js +2 -0
  29. package/dist/chunk-HOBTFFQR.js +1 -0
  30. package/dist/chunk-IMVCVPMP.js +3 -0
  31. package/dist/chunk-IOCABSRL.js +1 -0
  32. package/dist/chunk-JASLOB2X.js +1 -0
  33. package/dist/chunk-JMVDFOTQ.js +1 -0
  34. package/dist/chunk-K4ZMRDEI.js +0 -0
  35. package/dist/chunk-KINKBPPX.js +1 -0
  36. package/dist/chunk-KNMWCDDK.js +7 -0
  37. package/dist/chunk-KP37XTDI.js +1 -0
  38. package/dist/chunk-KYVOMBO5.js +1 -0
  39. package/dist/chunk-KZBAJFCV.js +1 -0
  40. package/dist/chunk-LFV6G5Z3.js +1 -0
  41. package/dist/chunk-MB6VVVAF.js +2 -0
  42. package/dist/chunk-MBUXFKIW.js +3 -0
  43. package/dist/chunk-MTTKFJV6.js +1 -0
  44. package/dist/chunk-NI2NK4JU.js +1 -0
  45. package/dist/chunk-NNCZYO4Q.js +0 -0
  46. package/dist/chunk-OBWZ5RYN.js +1 -0
  47. package/dist/chunk-OIL6BB2S.js +33 -0
  48. package/dist/chunk-ORAPGW7W.js +1 -0
  49. package/dist/chunk-OVUYPHDE.js +1 -0
  50. package/dist/chunk-PETQCA7G.js +1 -0
  51. package/dist/chunk-PODWLGNO.js +6 -0
  52. package/dist/chunk-QNZVPFSP.js +3 -0
  53. package/dist/chunk-QW5O42QJ.js +2 -0
  54. package/dist/chunk-SJYDLHEF.js +108 -0
  55. package/dist/chunk-SSZB66C3.js +3 -0
  56. package/dist/chunk-STUZZM5B.js +1 -0
  57. package/dist/chunk-T2RPMEM2.js +1 -0
  58. package/dist/chunk-TG6H6EOI.js +1 -0
  59. package/dist/chunk-TNWYEXFG.js +1 -0
  60. package/dist/chunk-U4D6FT66.js +1 -0
  61. package/dist/chunk-VCCMVQXU.js +1 -0
  62. package/dist/chunk-VFBLX4TG.js +1 -0
  63. package/dist/chunk-VSP2QQPQ.js +2 -0
  64. package/dist/chunk-VUNCBASK.js +10 -0
  65. package/dist/chunk-VWVLBOMU.js +8 -0
  66. package/dist/chunk-W3XYKJ5H.js +1 -0
  67. package/dist/chunk-XGUAL3CA.js +1 -0
  68. package/dist/chunk-XNXQYPVT.js +10 -0
  69. package/dist/chunk-YHUTTZC6.js +2 -0
  70. package/dist/chunk-YPHXLAQF.js +1 -0
  71. package/dist/chunk-YQTLJ5ZV.js +58 -0
  72. package/dist/chunk-ZC65Z3CK.js +1 -0
  73. package/dist/entry-0.js +1 -0
  74. package/dist/entry-1.js +1 -0
  75. package/dist/entry-10.js +1 -0
  76. package/dist/entry-11.js +1 -0
  77. package/dist/entry-12.js +1 -0
  78. package/dist/entry-13.js +1 -0
  79. package/dist/entry-14.js +1 -0
  80. package/dist/entry-16.js +1 -0
  81. package/dist/entry-17.js +1 -0
  82. package/dist/entry-18.js +1 -0
  83. package/dist/entry-19.js +1 -0
  84. package/dist/entry-2.js +1 -0
  85. package/dist/entry-20.js +1 -0
  86. package/dist/entry-21.js +1 -0
  87. package/dist/entry-22.js +1 -0
  88. package/dist/entry-23.js +1 -0
  89. package/dist/entry-24.js +1 -0
  90. package/dist/entry-25.js +1 -0
  91. package/dist/entry-26.js +1 -0
  92. package/dist/entry-27.js +1 -0
  93. package/dist/entry-28.js +1 -0
  94. package/dist/entry-29.js +1 -0
  95. package/dist/entry-3.js +1 -0
  96. package/dist/entry-30.js +1 -0
  97. package/dist/entry-31.js +1 -0
  98. package/dist/entry-32.js +1 -0
  99. package/dist/entry-33.js +1 -0
  100. package/dist/entry-34.js +1 -0
  101. package/dist/entry-35.js +1 -0
  102. package/dist/entry-36.js +1 -0
  103. package/dist/entry-37.js +1 -0
  104. package/dist/entry-38.js +1 -0
  105. package/dist/entry-39.js +1 -0
  106. package/dist/entry-4.js +1 -0
  107. package/dist/entry-40.js +1 -0
  108. package/dist/entry-41.js +1 -0
  109. package/dist/entry-42.js +1 -0
  110. package/dist/entry-43.js +1 -0
  111. package/dist/entry-44.js +1 -0
  112. package/dist/entry-45.js +1 -0
  113. package/dist/entry-46.js +1 -0
  114. package/dist/entry-47.js +1 -0
  115. package/dist/entry-48.js +1 -0
  116. package/dist/entry-49.js +1 -0
  117. package/dist/entry-5.js +1 -0
  118. package/dist/entry-50.js +1 -0
  119. package/dist/entry-51.js +1 -0
  120. package/dist/entry-52.js +1 -0
  121. package/dist/entry-53.js +0 -0
  122. package/dist/entry-54.js +1 -0
  123. package/dist/entry-55.js +0 -0
  124. package/dist/entry-56.js +1 -0
  125. package/dist/entry-57.js +1 -0
  126. package/dist/entry-58.js +1 -0
  127. package/dist/entry-59.js +1 -0
  128. package/dist/entry-6.js +1 -0
  129. package/dist/entry-60.js +1 -0
  130. package/dist/entry-61.js +1 -0
  131. package/dist/entry-62.js +0 -0
  132. package/dist/entry-63.js +1 -0
  133. package/dist/entry-64.js +0 -0
  134. package/dist/entry-65.js +1 -0
  135. package/dist/entry-66.js +1 -0
  136. package/dist/entry-67.js +1 -0
  137. package/dist/entry-68.js +1 -0
  138. package/dist/entry-69.js +1 -0
  139. package/dist/entry-7.js +1 -0
  140. package/dist/entry-70.js +1 -0
  141. package/dist/entry-71.js +1 -0
  142. package/dist/entry-72.js +1 -0
  143. package/dist/entry-73.js +1 -0
  144. package/dist/entry-74.js +1 -0
  145. package/dist/entry-75.js +1 -0
  146. package/dist/entry-76.js +1 -0
  147. package/dist/entry-77.js +1 -0
  148. package/dist/entry-78.js +1 -0
  149. package/dist/entry-79.js +1 -0
  150. package/dist/entry-8.js +1 -0
  151. package/dist/entry-9.js +1 -0
  152. package/dist/pi-agent-ide.js +13 -0
  153. package/docs/architecture.md +21 -17
  154. package/docs/configuration.md +149 -52
  155. package/docs/development.md +105 -5
  156. package/docs/extensions.md +64 -4
  157. package/docs/generated/tool-catalog/css.md +7 -6
  158. package/docs/generated/tool-catalog/html.md +6 -5
  159. package/docs/generated/tool-catalog/javascript.md +8 -6
  160. package/docs/generated/tool-catalog/json.md +7 -6
  161. package/docs/generated/tool-catalog/markdown.md +6 -5
  162. package/docs/generated/tool-catalog/toml.md +6 -5
  163. package/docs/generated/tool-catalog/typescript.md +8 -6
  164. package/docs/generated/tool-catalog/yaml.md +6 -5
  165. package/docs/tools.md +88 -6
  166. package/node_modules/pi-agent-doctor/package.json +8 -5
  167. package/node_modules/pi-agent-doctor/runtime/entry-16.js +1 -0
  168. package/node_modules/pi-agent-doctor/runtime/entry-17.js +1 -0
  169. package/node_modules/pi-agent-doctor/runtime/entry-18.js +1 -0
  170. package/node_modules/pi-agent-doctor/runtime/entry-19.js +1 -0
  171. package/node_modules/pi-agent-doctor/src/executable.ts +33 -0
  172. package/node_modules/pi-agent-doctor/src/plugin-protocol.ts +30 -4
  173. package/node_modules/pi-agent-filesystem/index.ts +4 -3
  174. package/node_modules/pi-agent-filesystem/package.json +7 -7
  175. package/node_modules/pi-agent-filesystem/runtime/entry-20.js +2 -0
  176. package/node_modules/pi-agent-filesystem-image/package.json +4 -4
  177. package/node_modules/pi-agent-filesystem-image/runtime/entry-21.js +2 -0
  178. package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
  179. package/node_modules/pi-agent-filesystem-pdf/runtime/entry-22.js +2 -0
  180. package/node_modules/pi-agent-filesystem-text/package.json +4 -4
  181. package/node_modules/pi-agent-filesystem-text/runtime/entry-23.js +2 -0
  182. package/node_modules/pi-agent-ide-ast/package.json +11 -10
  183. package/node_modules/pi-agent-ide-ast/runtime/entry-24.js +1 -0
  184. package/node_modules/pi-agent-ide-ast/runtime/entry-25.js +2 -0
  185. package/node_modules/pi-agent-ide-ast/src/api/scope.ts +1 -1
  186. package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +1 -1
  187. package/node_modules/pi-agent-ide-ast/src/doctor-plugin.ts +25 -0
  188. package/node_modules/pi-agent-ide-ast/src/extension.ts +13 -5
  189. package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +6 -0
  190. package/node_modules/pi-agent-ide-changes/index.ts +6 -2
  191. package/node_modules/pi-agent-ide-changes/package.json +8 -7
  192. package/node_modules/pi-agent-ide-changes/runtime/entry-26.js +1 -0
  193. package/node_modules/pi-agent-ide-changes/runtime/entry-27.js +2 -0
  194. package/node_modules/pi-agent-ide-changes/src/change-anchor.ts +6 -0
  195. package/node_modules/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
  196. package/node_modules/pi-agent-ide-changes/src/changes/change-service.ts +1 -1
  197. package/node_modules/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -0
  198. package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +1 -1
  199. package/node_modules/pi-agent-ide-changes/src/doctor-plugin.ts +31 -1
  200. package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -0
  201. package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +7 -0
  202. package/node_modules/pi-agent-ide-formatter/package.json +4 -4
  203. package/node_modules/pi-agent-ide-formatter/runtime/entry-28.js +2 -0
  204. package/node_modules/pi-agent-ide-formatter/src/catalog.ts +34 -0
  205. package/node_modules/pi-agent-ide-formatter/src/doctor-plugin.ts +115 -63
  206. package/node_modules/pi-agent-ide-formatter/src/registry.ts +71 -28
  207. package/node_modules/pi-agent-ide-languages/package.json +3 -3
  208. package/node_modules/pi-agent-ide-languages/runtime/entry-29.js +2 -0
  209. package/node_modules/pi-agent-ide-lint/index.ts +30 -155
  210. package/node_modules/pi-agent-ide-lint/package.json +8 -7
  211. package/node_modules/pi-agent-ide-lint/runtime/entry-30.js +2 -0
  212. package/node_modules/pi-agent-ide-lint/src/catalog.ts +14 -2
  213. package/node_modules/pi-agent-ide-lint/src/command-linter.ts +60 -4
  214. package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +3 -1
  215. package/node_modules/pi-agent-ide-lint/src/doctor-plugin.ts +115 -64
  216. package/node_modules/pi-agent-ide-lint/src/registry.ts +72 -27
  217. package/node_modules/pi-agent-ide-lsp/index.ts +35 -134
  218. package/node_modules/pi-agent-ide-lsp/package.json +9 -8
  219. package/node_modules/pi-agent-ide-lsp/runtime/entry-31.js +2 -0
  220. package/node_modules/pi-agent-ide-lsp/src/code-view-resolvers.ts +1 -1
  221. package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +113 -0
  222. package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +108 -53
  223. package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +94 -27
  224. package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +2 -1
  225. package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +76 -0
  226. package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostics.ts +137 -144
  227. package/node_modules/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +2 -2
  228. package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +9 -32
  229. package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +86 -50
  230. package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +1 -0
  231. package/node_modules/pi-agent-ide-lsp/src/lsp/types.ts +8 -6
  232. package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +5 -5
  233. package/node_modules/pi-agent-image/package.json +3 -3
  234. package/node_modules/pi-agent-image/runtime/entry-32.js +1 -0
  235. package/node_modules/pi-agent-invariant/package.json +12 -0
  236. package/node_modules/pi-agent-invariant/runtime/entry-33.js +1 -0
  237. package/node_modules/pi-agent-pdf/package.json +3 -3
  238. package/node_modules/pi-agent-pdf/runtime/entry-34.js +1 -0
  239. package/node_modules/pi-agent-pdf/src/pdf-converter.ts +3 -2
  240. package/node_modules/pi-agent-read/package.json +11 -9
  241. package/node_modules/pi-agent-read/runtime/entry-35.js +1 -0
  242. package/node_modules/pi-agent-read/runtime/entry-36.js +1 -0
  243. package/node_modules/pi-agent-read/runtime/entry-37.js +1 -0
  244. package/node_modules/pi-agent-read/runtime/entry-38.js +1 -0
  245. package/node_modules/pi-agent-read/runtime/entry-39.js +2 -0
  246. package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
  247. package/node_modules/pi-agent-read/src/api/tools/read.ts +113 -2
  248. package/node_modules/pi-agent-read/src/core/extension.ts +19 -0
  249. package/node_modules/pi-agent-read/src/core/read-core.ts +85 -13
  250. package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +26 -10
  251. package/node_modules/pi-agent-read/src/core/tools/read/persisted-result.ts +72 -0
  252. package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +102 -12
  253. package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +27 -3
  254. package/node_modules/pi-agent-read/src/core/tools/read/views.ts +29 -0
  255. package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +532 -46
  256. package/node_modules/pi-agent-resource/package.json +5 -2
  257. package/node_modules/pi-agent-resource/runtime/entry-40.js +1 -0
  258. package/node_modules/pi-agent-resource/src/content-conversion/content-converter.ts +1 -1
  259. package/node_modules/pi-agent-resource/src/content-conversion/content-host.ts +1 -1
  260. package/node_modules/pi-agent-resource/src/content-conversion/content-runner.ts +1 -1
  261. package/node_modules/pi-agent-resource/src/content-conversion/validation.ts +1 -1
  262. package/node_modules/pi-agent-search/package.json +7 -6
  263. package/node_modules/pi-agent-search/runtime/entry-41.js +1 -0
  264. package/node_modules/pi-agent-search/runtime/entry-42.js +1 -0
  265. package/node_modules/pi-agent-search/runtime/entry-43.js +1 -0
  266. package/node_modules/pi-agent-search/runtime/entry-44.js +2 -0
  267. package/node_modules/pi-agent-search/src/api/search.ts +4 -0
  268. package/node_modules/pi-agent-search/src/core/extension.ts +99 -27
  269. package/node_modules/pi-agent-search/src/core/search-config.ts +98 -0
  270. package/node_modules/pi-agent-search/src/core/search-core.ts +32 -28
  271. package/node_modules/pi-agent-search/src/core/search-timeout.ts +54 -0
  272. package/node_modules/pi-agent-search-text/index.ts +53 -3
  273. package/node_modules/pi-agent-search-text/package.json +9 -9
  274. package/node_modules/pi-agent-search-text/runtime/entry-45.js +2 -0
  275. package/node_modules/pi-agent-search-text/runtime/entry-46.js +1 -0
  276. package/node_modules/pi-agent-search-text/src/doctor-plugin.ts +20 -1
  277. package/node_modules/pi-agent-search-text/src/persisted-result.ts +56 -0
  278. package/node_modules/pi-agent-search-text/src/resolvers.ts +36 -34
  279. package/node_modules/pi-agent-search-text/src/search-query.ts +254 -71
  280. package/node_modules/pi-agent-search-text/src/search-recipe.ts +68 -0
  281. package/node_modules/pi-agent-search-text/src/search-renderer.ts +71 -117
  282. package/node_modules/pi-agent-search-text/src/search-result.ts +1 -0
  283. package/node_modules/pi-agent-search-text/src/search-session.ts +276 -110
  284. package/node_modules/pi-agent-text/package.json +6 -3
  285. package/node_modules/pi-agent-text/runtime/entry-47.js +1 -0
  286. package/node_modules/pi-agent-text/src/index.ts +23 -0
  287. package/node_modules/pi-agent-text/src/stored-text.ts +14 -0
  288. package/node_modules/pi-agent-text/src/text-anchor.ts +160 -16
  289. package/node_modules/pi-agent-text/src/text-document.ts +26 -5
  290. package/node_modules/pi-agent-text/src/text-target.ts +105 -0
  291. package/node_modules/pi-agent-text-anchor-constant/package.json +7 -4
  292. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-48.js +2 -0
  293. package/node_modules/pi-agent-text-anchor-constant/src/resolver.ts +6 -0
  294. package/node_modules/pi-agent-text-anchor-exact/index.ts +34 -0
  295. package/node_modules/pi-agent-text-anchor-exact/package.json +27 -0
  296. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-49.js +1 -0
  297. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-50.js +2 -0
  298. package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +230 -0
  299. package/node_modules/pi-agent-text-anchor-exact/src/config.ts +159 -0
  300. package/node_modules/pi-agent-text-anchor-exact/src/fuzzy-worker.ts +100 -0
  301. package/node_modules/pi-agent-text-anchor-exact/src/recovery.ts +151 -0
  302. package/node_modules/pi-agent-text-anchor-line-hash/index.ts +8 -2
  303. package/node_modules/pi-agent-text-anchor-line-hash/package.json +10 -6
  304. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-51.js +1 -0
  305. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-52.js +2 -0
  306. package/node_modules/pi-agent-text-anchor-line-hash/src/anchor.ts +32 -1
  307. package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +20 -12
  308. package/node_modules/pi-agent-text-editor/package.json +22 -21
  309. package/node_modules/pi-agent-text-editor/runtime/entry-53.js +1 -0
  310. package/node_modules/pi-agent-text-editor/runtime/entry-54.js +1 -0
  311. package/node_modules/pi-agent-text-editor/runtime/entry-55.js +1 -0
  312. package/node_modules/pi-agent-text-editor/runtime/entry-56.js +1 -0
  313. package/node_modules/pi-agent-text-editor/runtime/entry-57.js +1 -0
  314. package/node_modules/pi-agent-text-editor/runtime/entry-58.js +1 -0
  315. package/node_modules/pi-agent-text-editor/runtime/entry-59.js +1 -0
  316. package/node_modules/pi-agent-text-editor/runtime/entry-60.js +1 -0
  317. package/node_modules/pi-agent-text-editor/runtime/entry-61.js +1 -0
  318. package/node_modules/pi-agent-text-editor/runtime/entry-62.js +1 -0
  319. package/node_modules/pi-agent-text-editor/runtime/entry-63.js +1 -0
  320. package/node_modules/pi-agent-text-editor/runtime/entry-64.js +1 -0
  321. package/node_modules/pi-agent-text-editor/runtime/entry-65.js +1 -0
  322. package/node_modules/pi-agent-text-editor/runtime/entry-66.js +1 -0
  323. package/node_modules/pi-agent-text-editor/runtime/entry-67.js +1 -0
  324. package/node_modules/pi-agent-text-editor/runtime/entry-68.js +2 -0
  325. package/node_modules/pi-agent-text-editor/src/api/anchor-inspection.ts +2 -0
  326. package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +1 -0
  327. package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +38 -0
  328. package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +30 -15
  329. package/node_modules/pi-agent-text-editor/src/api/text-selection-anchor.ts +10 -13
  330. package/node_modules/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
  331. package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +12 -5
  332. package/node_modules/pi-agent-text-editor/src/core/extension.ts +15 -1
  333. package/node_modules/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +14 -10
  334. package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +1 -1
  335. package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +3 -2
  336. package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -2
  337. package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +64 -0
  338. package/node_modules/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
  339. package/node_modules/pi-agent-text-editor/src/core/read-fragment-resolver.ts +83 -0
  340. package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +96 -8
  341. package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +4 -1
  342. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +1 -1
  343. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +194 -35
  344. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +43 -13
  345. package/node_modules/pi-agent-text-editor/src/core/text-editor-config.ts +95 -0
  346. package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +75 -5
  347. package/node_modules/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +7 -0
  348. package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +541 -130
  349. package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +5 -9
  350. package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/rendering.ts +2 -0
  351. package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +228 -6
  352. package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +50 -70
  353. package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +25 -26
  354. package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +30 -21
  355. package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +57 -71
  356. package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +30 -27
  357. package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -0
  358. package/node_modules/pi-agent-text-editor-argument-order/package.json +3 -3
  359. package/node_modules/pi-agent-text-editor-argument-order/runtime/entry-69.js +2 -0
  360. package/node_modules/pi-agent-text-editor-overwrite/index.ts +1 -1
  361. package/node_modules/pi-agent-text-editor-overwrite/package.json +4 -3
  362. package/node_modules/pi-agent-text-editor-overwrite/runtime/entry-70.js +2 -0
  363. package/node_modules/pi-agent-text-editor-renderer/index.ts +21 -1
  364. package/node_modules/pi-agent-text-editor-renderer/package.json +6 -3
  365. package/node_modules/pi-agent-text-editor-renderer/runtime/entry-71.js +2 -0
  366. package/node_modules/pi-agent-text-editor-renderer/src/animation-pressure.ts +50 -0
  367. package/node_modules/pi-agent-text-editor-renderer/src/config.ts +73 -0
  368. package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +1 -1
  369. package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +77 -22
  370. package/node_modules/pi-agent-text-editor-renderer/src/diff-theme.ts +1 -1
  371. package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +140 -24
  372. package/node_modules/pi-agent-text-editor-renderer/src/mutation-projection.ts +274 -43
  373. package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +33 -6
  374. package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +47 -0
  375. package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +7 -0
  376. package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +265 -105
  377. package/node_modules/pi-agent-text-editor-renderer/src/typing-interpolation.ts +96 -15
  378. package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +22 -6
  379. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -4
  380. package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-72.js +2 -0
  381. package/node_modules/pi-agent-tool-call-interception/package.json +5 -2
  382. package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +1 -0
  383. package/node_modules/pi-agent-tool-call-interception/src/index.ts +175 -32
  384. package/node_modules/pi-agent-tool-ui/package.json +15 -0
  385. package/node_modules/pi-agent-tool-ui/runtime/entry-74.js +1 -0
  386. package/node_modules/pi-agent-tool-ui/src/index.ts +318 -0
  387. package/node_modules/pi-agent-web/index.ts +16 -6
  388. package/node_modules/pi-agent-web/package.json +8 -6
  389. package/node_modules/pi-agent-web/runtime/entry-75.js +2 -0
  390. package/node_modules/pi-agent-web/src/browser-loader.ts +180 -0
  391. package/node_modules/pi-agent-web/src/doctor-plugin.ts +41 -0
  392. package/node_modules/pi-agent-web/src/resolver.ts +128 -24
  393. package/node_modules/pi-agent-web-html/package.json +6 -3
  394. package/node_modules/pi-agent-web-html/runtime/entry-76.js +2 -0
  395. package/node_modules/pi-agent-web-html/src/extract-readable-html.ts +19 -6
  396. package/node_modules/pi-agent-web-image/package.json +4 -4
  397. package/node_modules/pi-agent-web-image/runtime/entry-77.js +2 -0
  398. package/node_modules/pi-agent-web-pdf/package.json +4 -4
  399. package/node_modules/pi-agent-web-pdf/runtime/entry-78.js +2 -0
  400. package/node_modules/pi-agent-web-text/package.json +4 -4
  401. package/node_modules/pi-agent-web-text/runtime/entry-79.js +2 -0
  402. package/package.json +68 -54
  403. package/src/api/code-view.ts +4 -0
  404. package/src/api/connect-tip-provider.ts +49 -0
  405. package/src/api/plugin-protocol.ts +41 -2
  406. package/src/api/tips.ts +77 -0
  407. package/src/api/tool-config/formatters.json +215 -0
  408. package/src/api/tool-config/linters.json +257 -0
  409. package/src/api/tool-config/lsp-servers.json +275 -0
  410. package/src/api/tool-config.ts +217 -13
  411. package/src/api/toolchain.ts +0 -5
  412. package/src/code-view/diagnostic-view.ts +117 -26
  413. package/src/code-view/source-view.ts +1 -1
  414. package/src/composite/builtin-extensions.ts +12 -6
  415. package/src/composite/extensions-config.ts +137 -0
  416. package/src/composite/selection.ts +58 -3
  417. package/src/core/diagnostic-store.ts +244 -0
  418. package/src/core/extension.ts +40 -0
  419. package/src/core/ide-core.ts +48 -3
  420. package/src/doctor/config-writer.ts +1 -1
  421. package/src/doctor/core.ts +47 -0
  422. package/src/doctor/discovery.ts +10 -2
  423. package/src/doctor/extension.ts +12 -1
  424. package/src/doctor/inventory.ts +24 -6
  425. package/src/doctor/run.ts +68 -87
  426. package/src/doctor/tip-provider.ts +92 -0
  427. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +4 -3
  428. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  429. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
  430. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-21.js +2 -0
  431. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
  432. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-22.js +2 -0
  433. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
  434. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-23.js +2 -0
  435. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-20.js +2 -0
  436. package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +16 -6
  437. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -6
  438. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +6 -3
  439. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-76.js +2 -0
  440. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/extract-readable-html.ts +19 -6
  441. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
  442. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-77.js +2 -0
  443. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
  444. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-78.js +2 -0
  445. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
  446. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-79.js +2 -0
  447. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-75.js +2 -0
  448. package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/browser-loader.ts +180 -0
  449. package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/doctor-plugin.ts +41 -0
  450. package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +128 -24
  451. package/src/extensions/pi-agent-read/package.json +11 -9
  452. package/src/extensions/pi-agent-read/runtime/entry-35.js +1 -0
  453. package/src/extensions/pi-agent-read/runtime/entry-36.js +1 -0
  454. package/src/extensions/pi-agent-read/runtime/entry-37.js +1 -0
  455. package/src/extensions/pi-agent-read/runtime/entry-38.js +1 -0
  456. package/src/extensions/pi-agent-read/runtime/entry-39.js +2 -0
  457. package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
  458. package/src/extensions/pi-agent-read/src/api/tools/read.ts +113 -2
  459. package/src/extensions/pi-agent-read/src/core/extension.ts +19 -0
  460. package/src/extensions/pi-agent-read/src/core/read-core.ts +85 -13
  461. package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +26 -10
  462. package/src/extensions/pi-agent-read/src/core/tools/read/persisted-result.ts +72 -0
  463. package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +102 -12
  464. package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +27 -3
  465. package/src/extensions/pi-agent-read/src/core/tools/read/views.ts +29 -0
  466. package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +532 -46
  467. package/src/extensions/pi-agent-search/package.json +7 -6
  468. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +53 -3
  469. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +9 -9
  470. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-45.js +2 -0
  471. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-46.js +1 -0
  472. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/doctor-plugin.ts +20 -1
  473. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/persisted-result.ts +56 -0
  474. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +36 -34
  475. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-query.ts +254 -71
  476. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +68 -0
  477. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +71 -117
  478. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +1 -0
  479. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +276 -110
  480. package/src/extensions/pi-agent-search/runtime/entry-41.js +1 -0
  481. package/src/extensions/pi-agent-search/runtime/entry-42.js +1 -0
  482. package/src/extensions/pi-agent-search/runtime/entry-43.js +1 -0
  483. package/src/extensions/pi-agent-search/runtime/entry-44.js +2 -0
  484. package/src/extensions/pi-agent-search/src/api/search.ts +4 -0
  485. package/src/extensions/pi-agent-search/src/core/extension.ts +99 -27
  486. package/src/extensions/pi-agent-search/src/core/search-config.ts +98 -0
  487. package/src/extensions/pi-agent-search/src/core/search-core.ts +32 -28
  488. package/src/extensions/pi-agent-search/src/core/search-timeout.ts +54 -0
  489. package/src/extensions/pi-agent-text-editor/package.json +22 -21
  490. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +7 -4
  491. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-48.js +2 -0
  492. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/src/resolver.ts +6 -0
  493. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +34 -0
  494. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +27 -0
  495. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-49.js +1 -0
  496. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-50.js +2 -0
  497. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +230 -0
  498. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/config.ts +159 -0
  499. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/fuzzy-worker.ts +100 -0
  500. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/recovery.ts +151 -0
  501. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +8 -2
  502. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +10 -6
  503. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-51.js +1 -0
  504. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-52.js +2 -0
  505. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/anchor.ts +32 -1
  506. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +20 -12
  507. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/package.json +3 -3
  508. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-69.js +2 -0
  509. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.ts +1 -1
  510. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +4 -3
  511. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/runtime/entry-70.js +2 -0
  512. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +21 -1
  513. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -3
  514. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-71.js +2 -0
  515. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/animation-pressure.ts +50 -0
  516. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/config.ts +73 -0
  517. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +1 -1
  518. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +77 -22
  519. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-theme.ts +1 -1
  520. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +140 -24
  521. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-projection.ts +274 -43
  522. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +33 -6
  523. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +47 -0
  524. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +7 -0
  525. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +265 -105
  526. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/typing-interpolation.ts +96 -15
  527. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +22 -6
  528. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -4
  529. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-72.js +2 -0
  530. package/src/extensions/pi-agent-text-editor/runtime/entry-53.js +1 -0
  531. package/src/extensions/pi-agent-text-editor/runtime/entry-54.js +1 -0
  532. package/src/extensions/pi-agent-text-editor/runtime/entry-55.js +1 -0
  533. package/src/extensions/pi-agent-text-editor/runtime/entry-56.js +1 -0
  534. package/src/extensions/pi-agent-text-editor/runtime/entry-57.js +1 -0
  535. package/src/extensions/pi-agent-text-editor/runtime/entry-58.js +1 -0
  536. package/src/extensions/pi-agent-text-editor/runtime/entry-59.js +1 -0
  537. package/src/extensions/pi-agent-text-editor/runtime/entry-60.js +1 -0
  538. package/src/extensions/pi-agent-text-editor/runtime/entry-61.js +1 -0
  539. package/src/extensions/pi-agent-text-editor/runtime/entry-62.js +1 -0
  540. package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +1 -0
  541. package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +1 -0
  542. package/src/extensions/pi-agent-text-editor/runtime/entry-65.js +1 -0
  543. package/src/extensions/pi-agent-text-editor/runtime/entry-66.js +1 -0
  544. package/src/extensions/pi-agent-text-editor/runtime/entry-67.js +1 -0
  545. package/src/extensions/pi-agent-text-editor/runtime/entry-68.js +2 -0
  546. package/src/extensions/pi-agent-text-editor/src/api/anchor-inspection.ts +2 -0
  547. package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +1 -0
  548. package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +38 -0
  549. package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +30 -15
  550. package/src/extensions/pi-agent-text-editor/src/api/text-selection-anchor.ts +10 -13
  551. package/src/extensions/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
  552. package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +12 -5
  553. package/src/extensions/pi-agent-text-editor/src/core/extension.ts +15 -1
  554. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +14 -10
  555. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +1 -1
  556. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +3 -2
  557. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -2
  558. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +64 -0
  559. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
  560. package/src/extensions/pi-agent-text-editor/src/core/read-fragment-resolver.ts +83 -0
  561. package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +96 -8
  562. package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +4 -1
  563. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +1 -1
  564. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +194 -35
  565. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +43 -13
  566. package/src/extensions/pi-agent-text-editor/src/core/text-editor-config.ts +95 -0
  567. package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +75 -5
  568. package/src/extensions/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +7 -0
  569. package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +541 -130
  570. package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +5 -9
  571. package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/rendering.ts +2 -0
  572. package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +228 -6
  573. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +50 -70
  574. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +25 -26
  575. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +30 -21
  576. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +57 -71
  577. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +30 -27
  578. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -0
  579. package/src/pi-agent-ide.ts +15 -3
  580. package/src/plugins/pi-agent-ide-ast/package.json +11 -10
  581. package/src/plugins/pi-agent-ide-ast/runtime/entry-24.js +1 -0
  582. package/src/plugins/pi-agent-ide-ast/runtime/entry-25.js +2 -0
  583. package/src/plugins/pi-agent-ide-ast/src/api/scope.ts +1 -1
  584. package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +1 -1
  585. package/src/plugins/pi-agent-ide-ast/src/doctor-plugin.ts +25 -0
  586. package/src/plugins/pi-agent-ide-ast/src/extension.ts +13 -5
  587. package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +6 -0
  588. package/src/plugins/pi-agent-ide-changes/index.ts +6 -2
  589. package/src/plugins/pi-agent-ide-changes/package.json +8 -7
  590. package/src/plugins/pi-agent-ide-changes/runtime/entry-26.js +1 -0
  591. package/src/plugins/pi-agent-ide-changes/runtime/entry-27.js +2 -0
  592. package/src/plugins/pi-agent-ide-changes/src/change-anchor.ts +6 -0
  593. package/src/plugins/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
  594. package/src/plugins/pi-agent-ide-changes/src/changes/change-service.ts +1 -1
  595. package/src/plugins/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -0
  596. package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +1 -1
  597. package/src/plugins/pi-agent-ide-changes/src/doctor-plugin.ts +31 -1
  598. package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -0
  599. package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +7 -0
  600. package/src/plugins/pi-agent-ide-diagnostics/index.ts +1 -0
  601. package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +191 -0
  602. package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
  603. package/src/plugins/pi-agent-ide-formatter/runtime/entry-28.js +2 -0
  604. package/src/plugins/pi-agent-ide-formatter/src/catalog.ts +34 -0
  605. package/src/plugins/pi-agent-ide-formatter/src/doctor-plugin.ts +115 -63
  606. package/src/plugins/pi-agent-ide-formatter/src/registry.ts +71 -28
  607. package/src/plugins/pi-agent-ide-languages/package.json +3 -3
  608. package/src/plugins/pi-agent-ide-languages/runtime/entry-29.js +2 -0
  609. package/src/plugins/pi-agent-ide-lint/index.ts +30 -155
  610. package/src/plugins/pi-agent-ide-lint/package.json +8 -7
  611. package/src/plugins/pi-agent-ide-lint/runtime/entry-30.js +2 -0
  612. package/src/plugins/pi-agent-ide-lint/src/catalog.ts +14 -2
  613. package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +60 -4
  614. package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +3 -1
  615. package/src/plugins/pi-agent-ide-lint/src/doctor-plugin.ts +115 -64
  616. package/src/plugins/pi-agent-ide-lint/src/registry.ts +72 -27
  617. package/src/plugins/pi-agent-ide-lsp/index.ts +35 -134
  618. package/src/plugins/pi-agent-ide-lsp/package.json +9 -8
  619. package/src/plugins/pi-agent-ide-lsp/runtime/entry-31.js +2 -0
  620. package/src/plugins/pi-agent-ide-lsp/src/code-view-resolvers.ts +1 -1
  621. package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +113 -0
  622. package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +108 -53
  623. package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +94 -27
  624. package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +2 -1
  625. package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +76 -0
  626. package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostics.ts +137 -144
  627. package/src/plugins/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +2 -2
  628. package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +9 -32
  629. package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +86 -50
  630. package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +1 -0
  631. package/src/plugins/pi-agent-ide-lsp/src/lsp/types.ts +8 -6
  632. package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +5 -5
  633. package/src/post-edit/gate.ts +17 -141
  634. package/src/tips/core.ts +86 -0
  635. package/src/tips/extension.ts +115 -0
  636. package/src/tips/persistence.ts +225 -0
  637. package/src/tips/tip-callout.ts +77 -0
  638. package/src/toolchain/registry.ts +8 -23
  639. package/src/toolchain/types.ts +6 -74
  640. package/node_modules/pi-agent-search-semantic/index.ts +0 -97
  641. package/node_modules/pi-agent-search-semantic/package.json +0 -17
  642. package/node_modules/pi-agent-search-text/src/lucene-query-parser.d.ts +0 -20
  643. package/node_modules/pi-agent-search-web/index.ts +0 -82
  644. package/node_modules/pi-agent-search-web/package.json +0 -20
  645. package/node_modules/pi-agent-search-web/src/config.ts +0 -560
  646. package/node_modules/pi-agent-search-web/src/doctor-plugin.ts +0 -40
  647. package/node_modules/pi-agent-search-web/src/providers/duckduckgo-html.ts +0 -74
  648. package/node_modules/pi-agent-search-web/src/providers/endpoints.ts +0 -81
  649. package/node_modules/pi-agent-search-web/src/providers/request.ts +0 -427
  650. package/node_modules/pi-agent-search-web/src/providers/response.ts +0 -353
  651. package/node_modules/pi-agent-search-web/src/search-format.ts +0 -24
  652. package/node_modules/pi-agent-search-web/src/search.ts +0 -376
  653. package/node_modules/pi-agent-search-web/src/types.ts +0 -141
  654. package/src/composite/config.ts +0 -100
  655. package/src/extensions/pi-agent-search/plugins/pi-agent-search-semantic/index.ts +0 -97
  656. package/src/extensions/pi-agent-search/plugins/pi-agent-search-semantic/package.json +0 -17
  657. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/lucene-query-parser.d.ts +0 -20
  658. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/index.ts +0 -82
  659. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/package.json +0 -20
  660. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/config.ts +0 -560
  661. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/doctor-plugin.ts +0 -40
  662. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/duckduckgo-html.ts +0 -74
  663. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/endpoints.ts +0 -81
  664. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/request.ts +0 -427
  665. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/response.ts +0 -353
  666. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/search-format.ts +0 -24
  667. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/search.ts +0 -376
  668. package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/types.ts +0 -141
  669. package/src/toolchain/gate.ts +0 -305
  670. /package/{src/utils/required-value.ts → node_modules/pi-agent-invariant/src/index.ts} +0 -0
@@ -1,72 +1,168 @@
1
1
  # Configuration
2
2
 
3
- Pi Agent IDE enables every built-in extension by default. A user config can disable built-ins that are not useful in a particular setup.
3
+ Pi Agent IDE enables every built-in extension by default. Project and global config files can disable built-ins by their stable IDs and turn on built-ins that are off by default.
4
4
 
5
- ## Config file
5
+ ## Config files
6
6
 
7
- Create:
7
+ Pi Agent IDE reads these optional files:
8
8
 
9
9
  ```text
10
- ~/.pi/agent/pi-agent-ide.json
10
+ <project>/.pi/pi-agent-ide/extensions.json
11
+ ~/.pi/agent/pi-agent-ide/extensions.json
12
+ <project>/.pi/pi-agent-ide/search.json
13
+ ~/.pi/agent/pi-agent-ide/search.json
11
14
  ```
12
15
 
16
+ For `extensions.json`, the project file is read first and the global file is also applied. The lists are merged: if either file disables an ID, that extension stays disabled; `enabled` works the same way for extensions that are off by default.
17
+
13
18
  Example:
14
19
 
15
20
  ```json
16
21
  {
17
- "disabledExtensions": ["search.semantic", "ide.lsp"]
22
+ "enabled": ["editor.argument-order"]
18
23
  }
19
24
  ```
20
25
 
21
- Restart Pi or use `/reload` after changing the file.
26
+ `editor.argument-order` is off by default, so this config turns it on.
22
27
 
23
- ## Custom path
28
+ An explicit `disabled` entry always beats an explicit `enabled` entry for the same ID.
29
+ `enabled` matters only for built-ins marked as off by default; listing an always-on
30
+ extension there changes nothing. Enabling a default-off extension also enables its
31
+ default-off dependencies unless they are explicitly disabled.
24
32
 
25
- Set `PI_AGENT_IDE_CONFIG` to read another file:
33
+ A project config is useful for repository-specific choices. The global config applies to every project. When Pi uses a custom `PI_CODING_AGENT_DIR`, the global config follows that directory.
26
34
 
27
- ```bash
28
- PI_AGENT_IDE_CONFIG=./pi-agent-ide.json pi
35
+ Restart Pi or use `/reload` after changing extension selection. Search timeout settings are read for every search call.
36
+
37
+ ## Search timeout
38
+
39
+ The complete `search` call has a 30-second timeout by default. This covers resolver work and result formatting. When it expires, the active resolver is cancelled and the agent receives this error:
40
+
41
+ ```text
42
+ Search timed out after 30 seconds. Try a smaller path scope.
29
43
  ```
30
44
 
31
- Relative paths are resolved from the current working directory. When Pi uses a custom `PI_CODING_AGENT_DIR`, the default config path follows that directory.
45
+ Set a global timeout in `~/.pi/agent/pi-agent-ide/search.json`:
46
+
47
+ ```json
48
+ {
49
+ "timeoutMs": 30000
50
+ }
51
+ ```
52
+
53
+ A project can override it in `<project>/.pi/pi-agent-ide/search.json`. Set `timeoutMs` to `null` at either level to disable the timeout. A project value wins over the global value. Any numeric value must be a positive integer. Invalid search settings reject the search call and name the bad config file.
54
+
55
+ ## Tool configuration
56
+
57
+ Pi Agent IDE ships working formatter, linter, and LSP mappings. You do not need to copy them into each project. The commands are not bundled: Pi runs them through its current `PATH`.
58
+
59
+ You can replace built-in entries or add custom entries in either of these directories:
60
+
61
+ ```text
62
+ ~/.pi/agent/extensions/pi-agent-ide/
63
+ <project>/.pi/pi-agent-ide/
64
+ ```
65
+
66
+ Each directory can contain `formatters.json`, `linters.json`, and `lsp-servers.json`. All three layers use the same JSON schema. Pi resolves entries in this order:
67
+
68
+ 1. Project.
69
+ 2. Global.
70
+ 3. Built-in.
71
+
72
+ Entries merge by stable ID. A project entry replaces the whole global or built-in entry with the same ID. A global entry replaces the whole built-in entry. New IDs are allowed. When different IDs match the same file, the entry from the higher layer runs first. Invalid JSON or an invalid entry stops that tool category instead of silently using a lower layer; the other categories still load.
73
+
74
+ Use a global override for a nonstandard command shared by your projects. Use a project override when one repository needs different behavior. Existing files such as `.clang-format`, `eslint.config.js`, `pyproject.toml`, and `tsconfig.json` remain the source of formatting and lint rules.
75
+
76
+ Use direct argument arrays in tool commands. Available placeholders are `{file}`, `{relativeFile}`, `{fileDir}`, and `{project}`. Formatter output can be `in-place` or `stdout`. Linters have separate `check` and optional `fix` commands. See the [generated tool catalog](./generated/tool-catalog/index.md) for built-in IDs and commands.
77
+
78
+ When `PI_CODING_AGENT_DIR` is set, the global directory follows it as `<PI_CODING_AGENT_DIR>/extensions/pi-agent-ide/`. Restart Pi or use `/reload` after changing a configuration file.
79
+
80
+ ## Doctor
32
81
 
33
- ## Project setup
82
+ Run `/pi-agent-ide-doctor` to check the effective tools for the current project. Doctor uses the same layered entries as runtime. For each applicable entry it shows the stable ID, source layer, command, and real probe result. A missing or failing command is reported instead of falling back to a lower layer.
34
83
 
35
- Run `/pi-agent-ide-doctor` from a project directory. Doctor collects checks and setup recipes from the extensions that are loaded in the current Pi session. It detects project languages, existing native tool configs, installed executables, AST parsers, search providers, formatters, linters, and language servers.
84
+ Doctor can still suggest a project override when project evidence points to a better installed tool. It shows the report before changing anything. `--apply` writes only to `<project>/.pi/pi-agent-ide/`; it never changes the global directory or built-in files. `--agent` delegates remaining setup work, and `--no-apply` skips suggested writes.
36
85
 
37
- Doctor shows a report before it changes anything. After confirmation, generated tool mappings are stored in:
86
+ The project directory may also contain extension and editor settings:
38
87
 
39
88
  ```text
40
89
  .pi/pi-agent-ide/
90
+ ├── extensions.json
41
91
  ├── formatters.json
42
92
  ├── linters.json
43
- └── lsp-servers.json
93
+ ├── lsp-servers.json
94
+ ├── search.json
95
+ └── text-editor.json
44
96
  ```
45
97
 
46
- These files describe how Pi Agent IDE runs tools. Existing files such as `.clang-format`, `eslint.config.js`, `pyproject.toml`, and `tsconfig.json` remain the source of formatting and lint rules.
47
-
48
- Use direct argument arrays in tool commands. Available placeholders are `{file}`, `{relativeFile}`, `{fileDir}`, and `{project}`. Formatter output can be `in-place` or `stdout`. Linters have separate `check` and optional `fix` commands. See the [generated tool catalog](./generated/tool-catalog/index.md) for built-in recipes.
49
-
50
98
  Doctor can send a redacted report and the relevant contributed recipes to the agent when setup still needs work. It runs the checks again after that agent turn.
51
99
 
52
100
  For automation and tests, `/pi-agent-ide-doctor --apply` accepts suggested mappings without the dialog, `--agent` delegates the remaining work, and `--no-apply` skips deterministic config writes.
53
101
 
54
- ## Web search credentials
102
+ ### Browser web reads
103
+
104
+ Automatic browser fallback for HTTP(S) reads needs a system Chrome or Chromium executable. Pi Agent IDE checks common command names on `PATH` and common Linux install paths. Set an exact executable when discovery is not enough:
105
+
106
+ ```bash
107
+ export PI_AGENT_IDE_BROWSER_PATH=/path/to/chrome
108
+ ```
109
+
110
+ Doctor reports browser support as an optional warning. Direct HTTP(S) reads keep working when no browser is installed.
111
+
112
+ ### Doctor setup tip
113
+
114
+ At TUI startup, doctor performs a lightweight setup inspection. It uses project languages, native project configuration, installed executables, and the effective project → global → built-in tool selection. It does not start formatters, linters, language servers, or browsers merely to decide whether to show a tip.
115
+
116
+ No tip appears when built-in mappings already cover the project. Empty projects, unknown languages, and missing optional tools also stay quiet. A tip appears only for a concrete problem, such as an explicitly configured command that is unavailable, or for a supported installed tool that project evidence identifies as a useful change to the active selection. The tip names the detected items and points to `/pi-agent-ide-doctor` for the full report.
117
+
118
+ Each actionable state has its own stable fingerprint. The same state is shown once per project, while a materially different later problem can produce a new tip. Like other startup tips, it never enters model context. See [Startup tip provider](./extensions.md#startup-tip-provider) for the provider contract and persistence behavior.
119
+
120
+ ### Exact text recovery
55
121
 
56
- Project routing is read from `.pi/websearch.json`. Shared credentials can live in `~/.pi/agent/websearch.json`. Credential priority is:
122
+ Exact text anchors work without configuration. Optional recovery settings live in `.pi/pi-agent-ide/text-editor.json`:
57
123
 
58
- 1. provider environment variable;
59
- 2. global `~/.pi/agent/websearch.json`;
60
- 3. project `.pi/websearch.json`.
124
+ ```json
125
+ {
126
+ "recovery": {
127
+ "contextLines": 5,
128
+ "timeoutMs": 2000,
129
+ "exactText": {
130
+ "fuzzyEnabled": true,
131
+ "threshold": 0.8,
132
+ "exactCandidateLimit": 20,
133
+ "fuzzyCandidateLimit": 5,
134
+ "maxFileSizeMiB": 20,
135
+ "maxQuerySizeKiB": 1024,
136
+ "seedLimit": 3,
137
+ "blockLineVariance": 2
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ Missing fields use these defaults. Invalid values stop the editor from loading. Fuzzy recovery only returns candidates; it never applies an edit. The safe maxima are 100 exact candidates, 20 fuzzy candidates, 20 context lines, a 10-second timeout, a 100 MiB file, a 4 MiB query, 10 seed lines, and a block variance of 10 lines.
144
+
145
+ ### Diff view
146
+
147
+ Edit tool diffs show every diff row by default. The panel keeps completed rows visible and grows as the edit streams in. Set `renderer.diffView` to `"compact"` in `.pi/pi-agent-ide/text-editor.json` to choose a sliding window instead:
148
+
149
+ ```json
150
+ {
151
+ "renderer": {
152
+ "diffView": "compact"
153
+ }
154
+ }
155
+ ```
61
156
 
62
- Environment variables include `EXA_API_KEY`, `TAVILY_API_KEY`, `BRAVE_SEARCH_API_KEY`, `SERPER_API_KEY`, `PARALLEL_API_KEY`, `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `PERPLEXITY_API_KEY`, `XAI_API_KEY`, and provider-specific `PI_AGENT_IDE_SEARCH_<ID>_API_KEY` values. Doctor reports only whether a credential is available. It never prints the value.
157
+ `"full"` is the default and needs no configuration.
63
158
 
64
- ## Behavior
159
+ ## Extension config behavior
65
160
 
66
- - A missing config file means every built-in is enabled.
67
- - `disabledExtensions` must be an array of unique, non-empty IDs.
161
+ - A missing `extensions.json` means every built-in extension is enabled.
162
+ - `disabled` and `enabled` must each be an array of unique, non-empty extension IDs.
163
+ - The project and global lists are merged; a setting wins at either level.
68
164
  - Invalid JSON stops Pi Agent IDE from loading.
69
- - An unknown ID stops Pi Agent IDE from loading. This prevents a typo from silently leaving a module enabled.
165
+ - An unknown ID stops Pi Agent IDE from loading. This prevents a typo from silently leaving an extension enabled.
70
166
  - Disabling a core also disables built-ins that depend on it.
71
167
  - The config controls bundled extensions only. It does not disable external Pi extensions.
72
168
 
@@ -77,6 +173,7 @@ Environment variables include `EXA_API_KEY`, `TAVILY_API_KEY`, `BRAVE_SEARCH_API
77
173
  | ID | Contribution |
78
174
  | ----------------- | ------------------------------------------------ |
79
175
  | `ide.core` | IDE toolchain protocol |
176
+ | `ide.tips` | Passive startup-tip provider core |
80
177
  | `ide.doctor` | `/pi-agent-ide-doctor` and contribution protocol |
81
178
  | `ide.languages` | Project language definitions for doctor |
82
179
  | `read.core` | `read` tool and read plugin protocol |
@@ -86,34 +183,34 @@ Environment variables include `EXA_API_KEY`, `TAVILY_API_KEY`, `BRAVE_SEARCH_API
86
183
 
87
184
  ### Read
88
185
 
89
- | ID | Contribution |
90
- | ----------------------- | -------------------------------- |
91
- | `read.filesystem` | Filesystem Resource resolver |
92
- | `read.filesystem.image` | Filesystem image content |
93
- | `read.filesystem.pdf` | Filesystem PDF content |
94
- | `read.filesystem.text` | Filesystem text content |
95
- | `read.web` | HTTP and HTTPS Resource resolver |
96
- | `read.web.html` | Web HTML conversion |
97
- | `read.web.image` | Web image content |
98
- | `read.web.pdf` | Web PDF content |
99
- | `read.web.text` | Web text content |
186
+ | ID | Contribution |
187
+ | ----------------------- | ----------------------------------------- |
188
+ | `read.filesystem` | Filesystem Resource resolver |
189
+ | `read.filesystem.image` | Filesystem image content |
190
+ | `read.filesystem.pdf` | Filesystem PDF content |
191
+ | `read.filesystem.text` | Filesystem text content |
192
+ | `read.web` | Direct and browser-rendered web Resources |
193
+ | `read.web.html` | Web HTML conversion |
194
+ | `read.web.image` | Web image content |
195
+ | `read.web.pdf` | Web PDF content |
196
+ | `read.web.text` | Web text content |
100
197
 
101
198
  ### Search
102
199
 
103
- | ID | Contribution |
104
- | ----------------- | -------------------------- |
105
- | `search.text` | Local file and text search |
106
- | `search.semantic` | QMD semantic search |
107
- | `search.web` | Web search |
200
+ | ID | Contribution |
201
+ | ------------- | -------------------------- |
202
+ | `search.text` | Local file and text search |
108
203
 
109
204
  ### Editing and anchors
110
205
 
111
- | ID | Contribution |
112
- | ------------------------- | --------------------------------- |
113
- | `editor.anchor.constant` | `begin` and `end` anchors |
114
- | `editor.anchor.line-hash` | Snapshot-aware line anchors |
115
- | `editor.argument-order` | Stable mutation argument ordering |
116
- | `editor.stale-anchor` | Stale-anchor recovery behavior |
206
+ | ID | Contribution |
207
+ | ------------------------- | -------------------------------------------------- |
208
+ | `editor.anchor.constant` | `begin` and `end` anchors |
209
+ | `editor.anchor.line-hash` | Snapshot-aware line anchors |
210
+ | `editor.anchor.exact` | Unique exact text spans and recovery |
211
+ | `editor.argument-order` | Stable mutation argument ordering (off by default) |
212
+ | `editor.overwrite` | Full-file overwrite protection (off by default) |
213
+ | `editor.stale-anchor` | Stale-anchor recovery behavior |
117
214
 
118
215
  ### Code intelligence and feedback
119
216
 
@@ -127,7 +224,7 @@ Environment variables include `EXA_API_KEY`, `TAVILY_API_KEY`, `BRAVE_SEARCH_API
127
224
 
128
225
  ## Dependency examples
129
226
 
130
- Disabling `search.core` also disables `search.text`, `search.semantic`, `search.web`, and built-ins that contribute search behavior such as `ide.ast` and `ide.lsp`.
227
+ Disabling `search.core` also disables `search.text` and built-ins that contribute search behavior such as `ide.ast` and `ide.lsp`.
131
228
 
132
229
  Disabling `editor.core` also disables editor anchors, mutation rendering, writable filesystem support, and IDE plugins that require edit events.
133
230
 
@@ -24,11 +24,7 @@ pi --no-extensions -e .
24
24
 
25
25
  `--no-extensions` prevents an already installed copy from loading at the same time. Explicit `-e` extensions still load.
26
26
 
27
- Use a temporary config without changing your normal Pi setup:
28
-
29
- ```bash
30
- PI_AGENT_IDE_CONFIG=./pi-agent-ide.json pi --no-extensions -e .
31
- ```
27
+ Use the project config at `.pi/pi-agent-ide/extensions.json` to disable built-ins or turn on built-ins that are off by default for this checkout. A global config can be placed at `~/.pi/agent/pi-agent-ide/extensions.json`.
32
28
 
33
29
  ## Run modular mode
34
30
 
@@ -58,6 +54,63 @@ pnpm test:integration
58
54
 
59
55
  Integration tests use `pi-coding-agent-test`. They start real Pi processes with scripted model responses and preserve traces and terminal artifacts under `.tmp/test-runs/`.
60
56
 
57
+ ### Watch integration tests live
58
+
59
+ Use the project command to watch every test in one file:
60
+
61
+ ```bash
62
+ pnpm test:integration:live -- \
63
+ tests/integration/path/to/example.integration.test.ts
64
+ ```
65
+
66
+ Use the explicit named-test command when you only want one test:
67
+
68
+ ```bash
69
+ pnpm test:integration:live:test -- \
70
+ tests/integration/path/to/example.integration.test.ts \
71
+ "shows the expected result"
72
+ ```
73
+
74
+ Both commands repeat the test until you press `Ctrl+C`. They use the `gpt-5.6-sol-xhigh` stream profile and wait 1000 ms between runs.
75
+
76
+ Override either default after the file or test name:
77
+
78
+ ```bash
79
+ pnpm test:integration:live -- \
80
+ tests/integration/path/to/example.integration.test.ts \
81
+ --stream-profile gemini-3.5-flash \
82
+ --pause-ms 500
83
+ ```
84
+
85
+ Add `--once` for one run. Add `--delay-ms 17` to use a fixed delay instead of a stream profile.
86
+
87
+ VS Code provides two launch targets under **Run and Debug**:
88
+
89
+ - **Watch integration test file live** asks for a file and runs every test in it;
90
+ - **Watch named integration test live** also asks for the test name.
91
+
92
+ Both targets run the matching project command in the integrated terminal.
93
+
94
+ You can also call `pi-test` directly when you need full control over the wrapped test command:
95
+
96
+ ```bash
97
+ pnpm exec pi-test live \
98
+ --stream-profile gpt-5.6-sol-xhigh \
99
+ --pause-ms 1000 \
100
+ -- \
101
+ vitest run tests/integration/path/to/example.integration.test.ts \
102
+ -t "shows the expected result" \
103
+ --config vitest.integration.config.mjs
104
+ ```
105
+
106
+ Completed runs leave terminal records under `.tmp/test-runs/`. Replay a recorded case without running its tools again:
107
+
108
+ ```bash
109
+ pnpm exec pi-test replay ".tmp/test-runs/path/to/test/case"
110
+ ```
111
+
112
+ Use the exact artifact directory reported by the test run. Add `--play` to play the recorded terminal frames.
113
+
61
114
  Check package paths before committing:
62
115
 
63
116
  ```bash
@@ -76,6 +129,53 @@ The result is written to `.agents/tmp/public-package/`. The tarball contains the
76
129
 
77
130
  Only the `pi-agent-ide` tarball is intended for registry publication. The bundled package names are implementation details and are not published separately.
78
131
 
132
+ The release runs compiled JavaScript from `dist/`. Its public entrypoints share generated chunks, so the extension and plugins use the same runtime modules. Source files remain for TypeScript consumers and module-relative resources. Development still loads `src/pi-agent-ide.ts` directly. PDF, browser, and HTML extraction dependencies load on first use instead of during startup.
133
+
134
+ To check an installed tarball, create a clean directory outside the checkout and install it with production dependencies. Pass that directory (the parent of `node_modules`) to the package integration tests:
135
+
136
+ ```bash
137
+ PI_AGENT_IDE_TEST_INSTALLATION=/path/to/installation \
138
+ pnpm exec vitest run --config vitest.integration.config.mjs \
139
+ tests/integration/composite/release-runtime.integration.test.ts
140
+ ```
141
+
142
+ These checks exercise first-use resources, browser fallback against a local page, external plugins, reload, and prompt parity. They need a system Chrome or Chromium executable. The package-specific suite is skipped when no installation is supplied.
143
+
144
+ Compare baseline and candidate installations using the same Node and Pi versions:
145
+
146
+ ```bash
147
+ node scripts/measure-startup.ts \
148
+ /path/to/baseline/extension-entry \
149
+ /path/to/candidate/extension-entry \
150
+ .agents/tmp/startup-comparison
151
+ ```
152
+
153
+ Use the entry declared in each installed package's `pi.extensions`. The script records an initial run separately, then five interleaved fresh-process runs for each variant and Pi alone. It measures process-to-RPC-ready time, not TUI rendering or import time alone. `PI_COMMAND` can select the Pi executable. Startup Doctor hints run after session readiness and are cancelled when their session ends.
154
+
155
+ ## Install the current development runtime
156
+
157
+ The development checkout uses pnpm workspaces and includes test dependencies, so it is not the source for `pi install git`. The Git preview workflow builds an npm-compatible runtime tree from every pushed branch except `main` and `preview`, then publishes the latest successful build to the `preview` branch in the same repository. The preview tree has no development dependencies or `workspace:` ranges. If multiple branches are active at once, the most recent successful push wins.
158
+
159
+ Install it on a work machine with Pi and Node.js:
160
+
161
+ ```bash
162
+ pi install git:github.com/alexshpunt/pi-agent-ide-dev@preview
163
+ ```
164
+
165
+ For the private development repository, the SSH form is also supported:
166
+
167
+ ```bash
168
+ pi install git:git@github.com:alexshpunt/pi-agent-ide-dev@preview
169
+ ```
170
+
171
+ After the preview workflow publishes a newer snapshot, refresh the installed package:
172
+
173
+ ```bash
174
+ pi install git:github.com/alexshpunt/pi-agent-ide-dev@preview
175
+ ```
176
+
177
+ To build the runtime tree locally for inspection, run `pnpm package:git-preview`. The generated files are written to `.agents/tmp/git-preview/` and are not committed to the development branch.
178
+
79
179
  ## Evaluate agent behavior
80
180
 
81
181
  Unit and integration tests enforce behavior contracts. They do not show whether a tool helps an agent complete a task with fewer tokens or fewer mistakes.
@@ -13,6 +13,7 @@ When its target core is enabled, an external extension can load before or after
13
13
  | A writable source, anchor, mutation, guard, or renderer | `pi-agent-ide/api/text-editor`, `pi-agent-ide/api/text` |
14
14
  | A formatter, compiler, or linter | `pi-agent-ide/api/connect-plugin`, `pi-agent-ide/api/toolchain` |
15
15
  | Doctor language knowledge, setup recipe, or health check | `pi-agent-ide/api/connect-doctor-plugin`, `pi-agent-ide/api/doctor`, `pi-agent-ide/api/tool-catalog` |
16
+ | Startup tip provider | `pi-agent-ide/api/tips` |
16
17
 
17
18
  The internal packages are bundled into Pi Agent IDE and are not published separately. External extensions import their public contracts through the umbrella package.
18
19
 
@@ -143,6 +144,27 @@ A read Resource does not become writable automatically. Register a matching reso
143
144
 
144
145
  Read plugins can also add pipeline handlers, text presenters, and resolver-specific TUI renderers. See the [read plugin contract](https://github.com/alexshpunt/pi-agent-ide/blob/main/src/extensions/pi-agent-read/docs/plugins/plugin-protocol.md).
145
146
 
147
+ ## Typed text targets
148
+
149
+ Use the public typed target contract when one opaque value should select ranges in one or more text Resources. Import it from the umbrella text API:
150
+
151
+ ```ts
152
+ import type {
153
+ TextSelectionRange,
154
+ TextTarget,
155
+ TextTargetResolutionAttempt,
156
+ TextTargetResolver,
157
+ } from "pi-agent-ide/api/text";
158
+ ```
159
+
160
+ A `TextTarget` contains a non-empty Resource `source` and optional half-open character `ranges`. Positions use one-based lines and zero-based columns. When `ranges` is omitted, read synthesizes a first-line chunk, while the editor treats the source as the target scope. Set `linewise: true` only when a range represents complete lines and mutation tools should preserve whole-line behavior at file edges.
161
+
162
+ The resolver owns its value syntax and returns `not-handled`, `resolved`, `rejected`, or `failed`. Consumers validate the result and must not parse strings such as `SEARCH#...` themselves.
163
+
164
+ A read plugin registers this contract with `api.addTargetResolver({ resolver })`. The read core returns one ordered line chunk per selected range, with `offset` and `limit` applied to each chunk before the aggregate output cap.
165
+
166
+ An editor anchor registration can expose the same resolver through its `resources` field. This lets a value in `path`, `target`, or an anchor field supply Resource sources and ranges before mutation. The editor resolves compatible explicit anchors in every selected Resource and unions the ranges. It rejects incompatible Resource sets, overlaps, stale selections, and malformed results before writing.
167
+
146
168
  ## Anchor plugin
147
169
 
148
170
  Anchor resolvers recognize opaque values against the current text snapshot. This example adds a constant `middle` position.
@@ -244,7 +266,21 @@ export default function register(pi: ExtensionAPI): void | Promise<void> {
244
266
  }
245
267
  ```
246
268
 
247
- A real formatter should run its normal formatter command and report how many edits it applied. Compilers and linters return structured diagnostics with one-based line and column positions.
269
+ A real formatter runs inside the edit transaction and reports how many edits it applied. Only a compiler marked `syntaxOnly: true` may run before formatting. It must perform a fast parser check, not LSP or project/type analysis. Syntax errors skip formatting and keep the edit saved. A formatter can instead use its own parser to reject invalid text safely.
270
+
271
+ ### Background diagnostics
272
+
273
+ IDE API version 3 separates diagnostic producers from file-writing tools. Register a read-only source with `api.addDiagnosticSource({ id, diagnose })`. `diagnose(filePath, context)` receives the workspace, final file `content`, an abort `signal`, and a revision-bound `publish(report)` callback for later updates. Return a report with `status`, `diagnostics`, and an optional failure `reason`. Coordinates are one-based.
274
+
275
+ - `ready` means the source checked this text.
276
+ - `unversioned` means the server omitted its document version, so freshness cannot be proved.
277
+ - `unavailable` means the source could not check this file. This is not a clean result.
278
+
279
+ Honor cancellation and never apply fixes from a diagnostic source. The core rejects results for superseded edits and ended sessions. Sources run in a bounded background queue after formatting. LSP push-only and pull-capable servers use the same diagnostic state as command linters. Empty updates clear earlier diagnostics.
280
+
281
+ `api.readDiagnostics(filePath, { cwd })` returns `{ filePath, content, results }`. It detects external text changes, reuses completed current checks, and waits at most five seconds for pending checks. Results still running have `status: "pending"`. Each background check has a thirty-second deadline; an individual provider may have a shorter timeout. Missing and failed sources remain explicit.
282
+
283
+ Changed per-file counts enter the next model request as a hidden custom context message. Updates are combined before delivery, contain no diagnostic details, and do not start an idle agent. This delivery is context-only, not a persistent session message. The `diagnostics:` protocol and `diagnostics` view expose details when the agent requests them. Neither replaces project builds or tests.
248
284
 
249
285
  ## Doctor plugin
250
286
 
@@ -252,9 +288,33 @@ A plugin should register only the knowledge and checks it owns. Use `connectDoct
252
288
 
253
289
  Do not import another plugin's catalog or maintain a second central catalog. If your extension is disabled, its doctor contributions must disappear with it. Keep credentials out of findings and recipe data.
254
290
 
255
- ## Install and test your extension
291
+ ## Startup tip provider
292
+
293
+ Startup tips are optional and passive. A provider returns one tip for a session-start context, or `undefined` when it has nothing to show. Pi Agent IDE calls providers for the session-start lifecycle reason (`startup`, `reload`, `new`, `resume`, or `fork`) and appends at most one eligible tip to the TUI transcript when inspection finishes. Provider work does not block session readiness. Tips do not enter the model context or trigger an agent turn.
294
+
295
+ Shown tips are stored in the global Pi data directory at `pi-agent-ide/tips.json` (under `PI_CODING_AGENT_DIR`, or `~/.pi/agent` by default). The project path and provider ID are part of the stored identity, so each provider-owned tip is shown once per project. The claim is made atomically before rendering, which prevents concurrent Pi processes from displaying the same tip twice. If rendering fails, the claim is released so the tip can be retried. Unreadable or unwritable state is treated as empty and never blocks startup.
296
+
297
+ ```ts
298
+ import { connectTipProvider, TIP_API_VERSION, TIP_PROTOCOL } from "pi-agent-ide/api/tips";
256
299
 
257
- Try a local extension without installing it permanently:
300
+ export default function register(pi: ExtensionAPI): void | Promise<void> {
301
+ return connectTipProvider(pi, {
302
+ protocol: TIP_PROTOCOL,
303
+ apiVersion: TIP_API_VERSION,
304
+ id: "my-tips",
305
+ getTip: () => ({
306
+ id: "my-tips-first-run",
307
+ title: "Try the project check",
308
+ body: "Run the project check before opening a pull request.",
309
+ }),
310
+ });
311
+ }
312
+ ```
313
+
314
+ Providers should keep trigger decisions in `getTip`, avoid secrets in tip text, and never send the tip as an agent message.
315
+ Pass the supplied `context.signal` to cancellable work and stop when it is aborted. Pi Agent IDE cancels pending inspections when their session ends and ignores late results, including results from providers that do not honor cancellation.
316
+
317
+ ## Install and test your extension
258
318
 
259
319
  ```bash
260
320
  pi --no-extensions -e npm:pi-agent-ide -e ./index.ts
@@ -277,4 +337,4 @@ The repository's external plugin integration fixture is a small working example:
277
337
 
278
338
  An extension should depend on the public protocol it implements, not on another extension's internal files. Prefer one narrow contribution over a plugin that reaches into several registries without a clear reason.
279
339
 
280
- Do not add an external plugin ID to `disabledExtensions`. That setting controls only the built-ins shipped by Pi Agent IDE. Enable or disable your package through Pi's normal package and extension configuration.
340
+ Do not add an external plugin ID to `disabled`. That setting in `extensions.json` controls only the built-ins shipped by Pi Agent IDE. Enable or disable your package through Pi's normal package and extension configuration.
@@ -2,9 +2,10 @@
2
2
 
3
3
  Detected extensions: `.css`, `.scss`, `.sass`, `.less`.
4
4
 
5
- | Kind | Tool | Detection | Documentation |
6
- | --------- | ---------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------ |
7
- | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
- | formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
9
- | linter | `stylelint` | `stylelint.config.js`, `.stylelintrc.json` | [Official docs](https://stylelint.io/) |
10
- | lsp | `vscode-css-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-css-languageservice) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ---------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
+ | formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
9
+ | formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
10
+ | linter | `stylelint` | `stylelint.config.js`, `.stylelintrc.json` | [Official docs](https://stylelint.io/) |
11
+ | lsp | `vscode-css-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-css-languageservice) |
@@ -2,8 +2,9 @@
2
2
 
3
3
  Detected extensions: `.html`, `.htm`.
4
4
 
5
- | Kind | Tool | Detection | Documentation |
6
- | --------- | ----------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------- |
7
- | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
- | linter | `htmlhint` | `.htmlhintrc` | [Official docs](https://htmlhint.com/) |
9
- | lsp | `vscode-html-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-html-languageservice) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ----------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
+ | formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
9
+ | linter | `htmlhint` | `.htmlhintrc` | [Official docs](https://htmlhint.com/) |
10
+ | lsp | `vscode-html-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-html-languageservice) |
@@ -2,9 +2,11 @@
2
2
 
3
3
  Detected extensions: `.js`, `.jsx`, `.mjs`, `.cjs`.
4
4
 
5
- | Kind | Tool | Detection | Documentation |
6
- | --------- | ---------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
7
- | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
- | formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
9
- | linter | `eslint` | `eslint.config.js`, `eslint.config.mjs`, `.eslintrc.json` | [Official docs](https://eslint.org/docs/latest/) |
10
- | lsp | `typescript-language-server` | `tsconfig.json`, `jsconfig.json`, `package.json` | [Official docs](https://github.com/typescript-language-server/typescript-language-server) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ---------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
+ | formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
9
+ | formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
10
+ | linter | `eslint` | `eslint.config.js`, `eslint.config.mjs`, `.eslintrc.json` | [Official docs](https://eslint.org/docs/latest/) |
11
+ | linter | `oxlint` | `.oxlintrc.json`, `.oxlintrc.jsonc`, `oxlint.config.ts`, `oxlint.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/linter.html) |
12
+ | lsp | `typescript-language-server` | `tsconfig.json`, `jsconfig.json`, `package.json` | [Official docs](https://github.com/typescript-language-server/typescript-language-server) |
@@ -2,9 +2,10 @@
2
2
 
3
3
  Detected extensions: `.json`, `.jsonc`.
4
4
 
5
- | Kind | Tool | Detection | Documentation |
6
- | --------- | ----------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------- |
7
- | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
- | formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
9
- | linter | `jsonlint` | `package.json` | [Official docs](https://github.com/zaach/jsonlint) |
10
- | lsp | `vscode-json-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-json-languageservice) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ----------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
+ | formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
9
+ | formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
10
+ | linter | `jsonlint` | `package.json` | [Official docs](https://github.com/zaach/jsonlint) |
11
+ | lsp | `vscode-json-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-json-languageservice) |
@@ -2,8 +2,9 @@
2
2
 
3
3
  Detected extensions: `.md`, `.mdx`.
4
4
 
5
- | Kind | Tool | Detection | Documentation |
6
- | --------- | -------------- | ------------------------------------------------------- | ----------------------------------------------------------- |
7
- | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
- | linter | `markdownlint` | `.markdownlint.json`, `.markdownlint.yaml` | [Official docs](https://github.com/DavidAnson/markdownlint) |
9
- | lsp | `marksman` | `.marksman.toml` | [Official docs](https://github.com/artempyanykh/marksman) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | -------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | [Official docs](https://prettier.io/docs/) |
8
+ | formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
9
+ | linter | `markdownlint` | `.markdownlint.json`, `.markdownlint.yaml` | [Official docs](https://github.com/DavidAnson/markdownlint) |
10
+ | lsp | `marksman` | `.marksman.toml` | [Official docs](https://github.com/artempyanykh/marksman) |
@@ -2,8 +2,9 @@
2
2
 
3
3
  Detected extensions: `.toml`.
4
4
 
5
- | Kind | Tool | Detection | Documentation |
6
- | --------- | ------------- | ------------ | ------------------------------------------- |
7
- | formatter | `taplo` | `taplo.toml` | [Official docs](https://taplo.tamasfe.dev/) |
8
- | linter | `taplo-check` | `taplo.toml` | [Official docs](https://taplo.tamasfe.dev/) |
9
- | lsp | `taplo-lsp` | `taplo.toml` | [Official docs](https://taplo.tamasfe.dev/) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------- |
7
+ | formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
8
+ | formatter | `taplo` | `taplo.toml` | [Official docs](https://taplo.tamasfe.dev/) |
9
+ | linter | `taplo-check` | `taplo.toml` | [Official docs](https://taplo.tamasfe.dev/) |
10
+ | lsp | `taplo-lsp` | `taplo.toml` | [Official docs](https://taplo.tamasfe.dev/) |