pi-agent-ide 0.2.0 → 0.2.1

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 (326) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/chunk-2XYXV5HS.js +4 -0
  3. package/dist/{chunk-YQTLJ5ZV.js → chunk-6XQQBKPE.js} +1 -1
  4. package/dist/{chunk-VUNCBASK.js → chunk-KH5KPBCR.js} +3 -3
  5. package/dist/chunk-L4FA6OD4.js +1 -0
  6. package/dist/chunk-LGN7EJYR.js +13 -0
  7. package/dist/chunk-MTQSGWZJ.js +1 -0
  8. package/dist/chunk-N34ATN52.js +1 -0
  9. package/dist/{chunk-52BM6J6I.js → chunk-NXHPO7ER.js} +3 -3
  10. package/dist/{chunk-QW5O42QJ.js → chunk-OFHVDY4Q.js} +1 -1
  11. package/dist/{chunk-E4SECPF4.js → chunk-ONWUJXUR.js} +1 -1
  12. package/dist/chunk-QZANC2IG.js +1 -0
  13. package/dist/{chunk-QNZVPFSP.js → chunk-SMSIT3CE.js} +1 -1
  14. package/dist/{chunk-KP37XTDI.js → chunk-UTTW55S2.js} +1 -1
  15. package/dist/chunk-VEJGSURY.js +8 -0
  16. package/dist/chunk-WZI4YC2O.js +1 -0
  17. package/dist/{chunk-5A25RATC.js → chunk-ZIHEF6K3.js} +3 -3
  18. package/dist/entry-0.js +1 -1
  19. package/dist/entry-18.js +1 -1
  20. package/dist/entry-19.js +1 -1
  21. package/dist/entry-20.js +1 -1
  22. package/dist/entry-21.js +1 -1
  23. package/dist/entry-22.js +1 -1
  24. package/dist/entry-23.js +1 -1
  25. package/dist/entry-24.js +1 -1
  26. package/dist/entry-25.js +1 -1
  27. package/dist/entry-26.js +1 -1
  28. package/dist/entry-27.js +1 -1
  29. package/dist/entry-28.js +1 -1
  30. package/dist/entry-29.js +1 -1
  31. package/dist/entry-30.js +1 -1
  32. package/dist/entry-31.js +1 -1
  33. package/dist/entry-32.js +1 -1
  34. package/dist/entry-33.js +1 -1
  35. package/dist/entry-34.js +1 -1
  36. package/dist/entry-35.js +1 -1
  37. package/dist/entry-36.js +1 -1
  38. package/dist/entry-37.js +1 -1
  39. package/dist/entry-38.js +1 -1
  40. package/dist/entry-39.js +1 -1
  41. package/dist/entry-4.js +1 -1
  42. package/dist/entry-40.js +1 -1
  43. package/dist/entry-41.js +1 -1
  44. package/dist/entry-42.js +1 -1
  45. package/dist/entry-43.js +1 -1
  46. package/dist/entry-44.js +1 -1
  47. package/dist/entry-45.js +1 -1
  48. package/dist/entry-46.js +1 -1
  49. package/dist/entry-47.js +1 -1
  50. package/dist/entry-48.js +1 -1
  51. package/dist/entry-49.js +1 -1
  52. package/dist/entry-50.js +1 -1
  53. package/dist/entry-51.js +1 -1
  54. package/dist/entry-52.js +1 -1
  55. package/dist/entry-53.js +1 -0
  56. package/dist/entry-54.js +0 -1
  57. package/dist/entry-55.js +1 -0
  58. package/dist/entry-56.js +0 -1
  59. package/dist/entry-57.js +1 -1
  60. package/dist/entry-58.js +1 -1
  61. package/dist/entry-59.js +1 -1
  62. package/dist/entry-60.js +1 -1
  63. package/dist/entry-61.js +1 -1
  64. package/dist/entry-62.js +1 -0
  65. package/dist/entry-63.js +0 -1
  66. package/dist/entry-64.js +1 -0
  67. package/dist/entry-65.js +0 -1
  68. package/dist/entry-66.js +1 -1
  69. package/dist/entry-67.js +1 -1
  70. package/dist/entry-68.js +1 -1
  71. package/dist/entry-69.js +1 -1
  72. package/dist/entry-70.js +1 -1
  73. package/dist/entry-71.js +1 -1
  74. package/dist/entry-72.js +1 -1
  75. package/dist/entry-73.js +1 -1
  76. package/dist/entry-74.js +1 -1
  77. package/dist/entry-75.js +1 -1
  78. package/dist/entry-76.js +1 -1
  79. package/dist/entry-77.js +1 -1
  80. package/dist/entry-78.js +1 -1
  81. package/dist/entry-79.js +1 -1
  82. package/dist/entry-80.js +1 -0
  83. package/dist/pi-agent-ide.js +12 -12
  84. package/docs/configuration.md +32 -1
  85. package/docs/generated/tool-catalog/cmake.md +5 -5
  86. package/docs/generated/tool-catalog/csharp.md +5 -5
  87. package/docs/generated/tool-catalog/css.md +7 -7
  88. package/docs/generated/tool-catalog/dart.md +9 -0
  89. package/docs/generated/tool-catalog/dockerfile.md +5 -5
  90. package/docs/generated/tool-catalog/elixir.md +9 -0
  91. package/docs/generated/tool-catalog/html.md +7 -6
  92. package/docs/generated/tool-catalog/index.md +9 -0
  93. package/docs/generated/tool-catalog/javascript.md +8 -8
  94. package/docs/generated/tool-catalog/json.md +7 -7
  95. package/docs/generated/tool-catalog/julia.md +8 -0
  96. package/docs/generated/tool-catalog/kotlin.md +6 -5
  97. package/docs/generated/tool-catalog/markdown.md +6 -6
  98. package/docs/generated/tool-catalog/powershell.md +9 -0
  99. package/docs/generated/tool-catalog/python.md +6 -6
  100. package/docs/generated/tool-catalog/r.md +9 -0
  101. package/docs/generated/tool-catalog/scala.md +9 -0
  102. package/docs/generated/tool-catalog/svelte.md +9 -0
  103. package/docs/generated/tool-catalog/typescript.md +9 -8
  104. package/docs/generated/tool-catalog/vue.md +9 -0
  105. package/docs/generated/tool-catalog/yaml.md +6 -6
  106. package/docs/generated/tool-catalog/zig.md +9 -0
  107. package/node_modules/pi-agent-doctor/package.json +10 -3
  108. package/node_modules/pi-agent-doctor/runtime/entry-20.js +1 -0
  109. package/node_modules/pi-agent-doctor/src/catalog.ts +27 -1
  110. package/node_modules/pi-agent-doctor/src/evidence.ts +118 -0
  111. package/node_modules/pi-agent-doctor/src/executable.ts +63 -17
  112. package/node_modules/pi-agent-filesystem/package.json +7 -7
  113. package/node_modules/pi-agent-filesystem-image/package.json +4 -4
  114. package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
  115. package/node_modules/pi-agent-filesystem-text/package.json +4 -4
  116. package/node_modules/pi-agent-filesystem-text/runtime/entry-24.js +2 -0
  117. package/node_modules/pi-agent-ide-ast/package.json +11 -11
  118. package/node_modules/pi-agent-ide-ast/runtime/entry-25.js +0 -1
  119. package/node_modules/pi-agent-ide-ast/runtime/entry-26.js +2 -0
  120. package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +3 -0
  121. package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +3 -0
  122. package/node_modules/pi-agent-ide-changes/package.json +8 -8
  123. package/node_modules/pi-agent-ide-changes/runtime/entry-27.js +0 -1
  124. package/node_modules/pi-agent-ide-formatter/package.json +4 -4
  125. package/node_modules/pi-agent-ide-formatter/src/catalog.ts +131 -13
  126. package/node_modules/pi-agent-ide-formatter/src/registry.ts +20 -8
  127. package/node_modules/pi-agent-ide-languages/package.json +3 -3
  128. package/node_modules/pi-agent-ide-languages/src/languages.ts +15 -0
  129. package/node_modules/pi-agent-ide-lint/package.json +8 -8
  130. package/node_modules/pi-agent-ide-lint/src/catalog.ts +196 -39
  131. package/node_modules/pi-agent-ide-lint/src/command-linter.ts +23 -3
  132. package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +73 -33
  133. package/node_modules/pi-agent-ide-lint/src/registry.ts +20 -8
  134. package/node_modules/pi-agent-ide-lsp/package.json +9 -9
  135. package/node_modules/pi-agent-ide-lsp/runtime/entry-32.js +2 -0
  136. package/node_modules/pi-agent-ide-lsp/src/catalog.ts +161 -7
  137. package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +3 -6
  138. package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
  139. package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +154 -11
  140. package/node_modules/pi-agent-ide-lsp/src/lsp/file-watchers.ts +88 -0
  141. package/node_modules/pi-agent-ide-lsp/src/lsp/initialization-options.ts +14 -0
  142. package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +8 -4
  143. package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +69 -34
  144. package/node_modules/pi-agent-ide-lsp/src/lsp/transport-writer.ts +24 -0
  145. package/node_modules/pi-agent-ide-lsp/src/lsp/types.ts +5 -0
  146. package/node_modules/pi-agent-image/package.json +3 -3
  147. package/node_modules/pi-agent-invariant/package.json +2 -2
  148. package/node_modules/pi-agent-pdf/package.json +3 -3
  149. package/node_modules/pi-agent-read/package.json +11 -11
  150. package/node_modules/pi-agent-read/runtime/entry-39.js +0 -1
  151. package/node_modules/pi-agent-read/runtime/entry-40.js +2 -0
  152. package/node_modules/pi-agent-resource/package.json +2 -2
  153. package/node_modules/pi-agent-search/package.json +7 -7
  154. package/node_modules/pi-agent-search/runtime/entry-44.js +0 -1
  155. package/node_modules/pi-agent-search-text/package.json +9 -9
  156. package/node_modules/pi-agent-search-text/runtime/entry-46.js +1 -0
  157. package/node_modules/pi-agent-text/package.json +3 -3
  158. package/node_modules/pi-agent-text/runtime/entry-48.js +1 -0
  159. package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
  160. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
  161. package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
  162. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-50.js +0 -1
  163. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
  164. package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
  165. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-52.js +0 -1
  166. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
  167. package/node_modules/pi-agent-text-editor/package.json +22 -22
  168. package/node_modules/pi-agent-text-editor/runtime/entry-68.js +0 -1
  169. package/node_modules/pi-agent-text-editor-argument-order/package.json +3 -3
  170. package/node_modules/pi-agent-text-editor-overwrite/package.json +4 -4
  171. package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
  172. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
  173. package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +2 -0
  174. package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
  175. package/node_modules/pi-agent-tool-ui/package.json +2 -2
  176. package/node_modules/pi-agent-tool-ui/runtime/entry-75.js +1 -0
  177. package/node_modules/pi-agent-web/package.json +7 -7
  178. package/node_modules/pi-agent-web-html/package.json +3 -3
  179. package/node_modules/pi-agent-web-image/package.json +4 -4
  180. package/node_modules/pi-agent-web-pdf/package.json +4 -4
  181. package/node_modules/pi-agent-web-text/package.json +4 -4
  182. package/node_modules/pi-agent-web-text/runtime/entry-80.js +2 -0
  183. package/package.json +35 -35
  184. package/src/api/tool-config/formatters.json +70 -12
  185. package/src/api/tool-config/linters.json +148 -66
  186. package/src/api/tool-config/lsp-servers.json +142 -7
  187. package/src/api/tool-config.ts +56 -24
  188. package/src/code-view/diagnostic-view.ts +14 -10
  189. package/src/doctor/config-writer.ts +14 -1
  190. package/src/doctor/discovery.ts +13 -68
  191. package/src/doctor/run.ts +33 -1
  192. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  193. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
  194. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
  195. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
  196. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-24.js +2 -0
  197. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-21.js +2 -0
  198. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
  199. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
  200. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
  201. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
  202. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
  203. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-80.js +2 -0
  204. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +2 -0
  205. package/src/extensions/pi-agent-read/package.json +11 -11
  206. package/src/extensions/pi-agent-read/runtime/entry-39.js +0 -1
  207. package/src/extensions/pi-agent-read/runtime/entry-40.js +2 -0
  208. package/src/extensions/pi-agent-search/package.json +7 -7
  209. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +9 -9
  210. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-46.js +1 -0
  211. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-47.js +1 -0
  212. package/src/extensions/pi-agent-search/runtime/entry-44.js +0 -1
  213. package/src/extensions/pi-agent-search/runtime/entry-45.js +2 -0
  214. package/src/extensions/pi-agent-text-editor/package.json +22 -22
  215. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
  216. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
  217. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
  218. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-50.js +0 -1
  219. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
  220. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
  221. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-52.js +0 -1
  222. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
  223. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/package.json +3 -3
  224. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +4 -4
  225. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
  226. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
  227. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +2 -0
  228. package/src/extensions/pi-agent-text-editor/runtime/entry-68.js +0 -1
  229. package/src/extensions/pi-agent-text-editor/runtime/entry-69.js +2 -0
  230. package/src/plugins/pi-agent-ide-ast/package.json +11 -11
  231. package/src/plugins/pi-agent-ide-ast/runtime/entry-25.js +0 -1
  232. package/src/plugins/pi-agent-ide-ast/runtime/entry-26.js +2 -0
  233. package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +3 -0
  234. package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +3 -0
  235. package/src/plugins/pi-agent-ide-changes/package.json +8 -8
  236. package/src/plugins/pi-agent-ide-changes/runtime/entry-27.js +0 -1
  237. package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +8 -0
  238. package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
  239. package/src/plugins/pi-agent-ide-formatter/src/catalog.ts +131 -13
  240. package/src/plugins/pi-agent-ide-formatter/src/registry.ts +20 -8
  241. package/src/plugins/pi-agent-ide-languages/package.json +3 -3
  242. package/src/plugins/pi-agent-ide-languages/src/languages.ts +15 -0
  243. package/src/plugins/pi-agent-ide-lint/package.json +8 -8
  244. package/src/plugins/pi-agent-ide-lint/src/catalog.ts +196 -39
  245. package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +23 -3
  246. package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +73 -33
  247. package/src/plugins/pi-agent-ide-lint/src/registry.ts +20 -8
  248. package/src/plugins/pi-agent-ide-lsp/package.json +9 -9
  249. package/src/plugins/pi-agent-ide-lsp/runtime/entry-32.js +2 -0
  250. package/src/plugins/pi-agent-ide-lsp/src/catalog.ts +161 -7
  251. package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +3 -6
  252. package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
  253. package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +154 -11
  254. package/src/plugins/pi-agent-ide-lsp/src/lsp/file-watchers.ts +88 -0
  255. package/src/plugins/pi-agent-ide-lsp/src/lsp/initialization-options.ts +14 -0
  256. package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +8 -4
  257. package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +69 -34
  258. package/src/plugins/pi-agent-ide-lsp/src/lsp/transport-writer.ts +24 -0
  259. package/src/plugins/pi-agent-ide-lsp/src/lsp/types.ts +5 -0
  260. package/src/toolchain/types.ts +2 -0
  261. package/dist/chunk-476MR2QB.js +0 -1
  262. package/dist/chunk-4KQOODGE.js +0 -13
  263. package/dist/chunk-7NDBZ4WX.js +0 -1
  264. package/dist/chunk-AP7Z3VWC.js +0 -1
  265. package/dist/chunk-TNWYEXFG.js +0 -1
  266. package/dist/chunk-U4D6FT66.js +0 -1
  267. package/dist/chunk-VWVLBOMU.js +0 -8
  268. package/node_modules/pi-agent-filesystem/runtime/entry-20.js +0 -2
  269. package/node_modules/pi-agent-ide-ast/runtime/entry-24.js +0 -1
  270. package/node_modules/pi-agent-ide-changes/runtime/entry-26.js +0 -1
  271. package/node_modules/pi-agent-image/runtime/entry-32.js +0 -1
  272. package/node_modules/pi-agent-resource/runtime/entry-40.js +0 -1
  273. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-48.js +0 -2
  274. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-49.js +0 -1
  275. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-51.js +0 -1
  276. package/node_modules/pi-agent-text-editor/runtime/entry-53.js +0 -1
  277. package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +0 -1
  278. package/node_modules/pi-agent-web/runtime/entry-75.js +0 -2
  279. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-21.js +0 -2
  280. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-20.js +0 -2
  281. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-76.js +0 -2
  282. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-75.js +0 -2
  283. package/src/extensions/pi-agent-read/runtime/entry-35.js +0 -1
  284. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-45.js +0 -2
  285. package/src/extensions/pi-agent-search/runtime/entry-41.js +0 -1
  286. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-48.js +0 -2
  287. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-49.js +0 -1
  288. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-51.js +0 -1
  289. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-69.js +0 -2
  290. package/src/extensions/pi-agent-text-editor/runtime/entry-53.js +0 -1
  291. package/src/plugins/pi-agent-ide-ast/runtime/entry-24.js +0 -1
  292. package/src/plugins/pi-agent-ide-changes/runtime/entry-26.js +0 -1
  293. /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-21.js +0 -0
  294. /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-22.js +0 -0
  295. /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-23.js +0 -0
  296. /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-28.js +0 -0
  297. /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-29.js +0 -0
  298. /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-30.js +0 -0
  299. /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-31.js +0 -0
  300. /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-33.js +0 -0
  301. /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-34.js +0 -0
  302. /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-35.js +0 -0
  303. /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-41.js +0 -0
  304. /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-45.js +0 -0
  305. /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-47.js +0 -0
  306. /package/node_modules/{pi-agent-text-editor-argument-order → pi-agent-text-editor}/runtime/entry-69.js +0 -0
  307. /package/node_modules/{pi-agent-text-editor-overwrite → pi-agent-text-editor-argument-order}/runtime/entry-70.js +0 -0
  308. /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor-overwrite}/runtime/entry-71.js +0 -0
  309. /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-72.js +0 -0
  310. /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-74.js +0 -0
  311. /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-76.js +0 -0
  312. /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-77.js +0 -0
  313. /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-78.js +0 -0
  314. /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-79.js +0 -0
  315. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-22.js +0 -0
  316. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-23.js +0 -0
  317. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-77.js +0 -0
  318. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-78.js +0 -0
  319. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-79.js +0 -0
  320. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-overwrite → pi-agent-text-editor-argument-order}/runtime/entry-70.js +0 -0
  321. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-renderer → pi-agent-text-editor-overwrite}/runtime/entry-71.js +0 -0
  322. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-72.js +0 -0
  323. /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-28.js +0 -0
  324. /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-29.js +0 -0
  325. /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-30.js +0 -0
  326. /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-31.js +0 -0
@@ -0,0 +1,9 @@
1
+ # R
2
+
3
+ Detected extensions: `.r`.
4
+
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ------------------- | ------------------------------------ | ----------------------------------------------------------------- |
7
+ | formatter | `styler` | `.Rprofile`, `DESCRIPTION` | [Official docs](https://styler.r-lib.org/) |
8
+ | linter | `lintr` | `.lintr`, `DESCRIPTION` | [Official docs](https://lintr.r-lib.org/) |
9
+ | lsp | `r-language-server` | `DESCRIPTION`, `.lintr`, `.Rprofile` | [Official docs](https://github.com/REditorSupport/languageserver) |
@@ -0,0 +1,9 @@
1
+ # Scala
2
+
3
+ Detected extensions: `.scala`, `.sc`.
4
+
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ---------- | ------------------------------------ | -------------------------------------------------------- |
7
+ | formatter | `scalafmt` | `.scalafmt.conf` | [Official docs](https://scalameta.org/scalafmt/) |
8
+ | linter | `scalafix` | `.scalafix.conf` | [Official docs](https://scalacenter.github.io/scalafix/) |
9
+ | lsp | `metals` | `build.sbt`, `project.scala`, `.bsp` | [Official docs](https://scalameta.org/metals/) |
@@ -0,0 +1,9 @@
1
+ # Svelte
2
+
3
+ Detected extensions: `.svelte`.
4
+
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
8
+ | linter | `eslint` | `eslint.config.js`, `eslint.config.mjs`, `eslint.config.cjs`, `eslint.config.ts`, `eslint.config.mts`, `eslint.config.cts`, `.eslintrc`, `.eslintrc.json`, `.eslintrc.js`, `.eslintrc.cjs`, `.eslintrc.yaml`, `.eslintrc.yml` | [Official docs](https://eslint.org/docs/latest/) |
9
+ | lsp | `svelte-language-server` | `svelte.config.js`, `package.json` | [Official docs](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) |
@@ -2,11 +2,12 @@
2
2
 
3
3
  Detected extensions: `.ts`, `.tsx`, `.mts`, `.cts`.
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
- | 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) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [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`, `eslint.config.cjs`, `eslint.config.ts`, `eslint.config.mts`, `eslint.config.cts`, `.eslintrc`, `.eslintrc.json`, `.eslintrc.js`, `.eslintrc.cjs`, `.eslintrc.yaml`, `.eslintrc.yml` | [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 | `angular-language-server` | `angular.json` | [Official docs](https://github.com/angular/vscode-ng-language-service) |
13
+ | lsp | `typescript-language-server` | `tsconfig.json`, `jsconfig.json`, `package.json` | [Official docs](https://github.com/typescript-language-server/typescript-language-server) |
@@ -0,0 +1,9 @@
1
+ # Vue
2
+
3
+ Detected extensions: `.vue`.
4
+
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
8
+ | linter | `eslint` | `eslint.config.js`, `eslint.config.mjs`, `eslint.config.cjs`, `eslint.config.ts`, `eslint.config.mts`, `eslint.config.cts`, `.eslintrc`, `.eslintrc.json`, `.eslintrc.js`, `.eslintrc.cjs`, `.eslintrc.yaml`, `.eslintrc.yml` | [Official docs](https://eslint.org/docs/latest/) |
9
+ | lsp | `vue-typescript-language-server` | `tsconfig.json` | [Official docs](https://github.com/vuejs/language-tools/tree/master/packages/typescript-plugin) |
@@ -2,9 +2,9 @@
2
2
 
3
3
  Detected extensions: `.yaml`, `.yml`.
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 | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
9
- | linter | `yamllint` | `.yamllint`, `.yamllint.yml` | [Official docs](https://yamllint.readthedocs.io/) |
10
- | lsp | `yaml-language-server` | `.yamllint`, `package.json` | [Official docs](https://github.com/redhat-developer/yaml-language-server) |
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
7
+ | formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [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 | `yamllint` | `.yamllint`, `.yamllint.yml` | [Official docs](https://yamllint.readthedocs.io/) |
10
+ | lsp | `yaml-language-server` | `.yamllint`, `package.json` | [Official docs](https://github.com/redhat-developer/yaml-language-server) |
@@ -0,0 +1,9 @@
1
+ # Zig
2
+
3
+ Detected extensions: `.zig`, `.zon`.
4
+
5
+ | Kind | Tool | Detection | Documentation |
6
+ | --------- | --------------- | ---------------------------------------- | ---------------------------------------------------------- |
7
+ | formatter | `zig-format` | `build.zig`, `build.zig.zon`, `zls.json` | [Official docs](https://ziglang.org/documentation/master/) |
8
+ | linter | `zig-ast-check` | `build.zig`, `build.zig.zon`, `zls.json` | [Official docs](https://ziglang.org/documentation/master/) |
9
+ | lsp | `zls` | `build.zig`, `build.zig.zon`, `zls.json` | [Official docs](https://zigtools.org/zls/) |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-doctor",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -14,15 +14,22 @@
14
14
  "types": "./src/connect-plugin.ts",
15
15
  "default": "./runtime/entry-17.js"
16
16
  },
17
+ "./api/evidence": {
18
+ "types": "./src/evidence.ts",
19
+ "default": "./runtime/entry-18.js"
20
+ },
17
21
  "./api/executable": {
18
22
  "types": "./src/executable.ts",
19
- "default": "./runtime/entry-18.js"
23
+ "default": "./runtime/entry-19.js"
20
24
  },
21
25
  "./api/plugin-protocol": {
22
26
  "types": "./src/plugin-protocol.ts",
23
- "default": "./runtime/entry-19.js"
27
+ "default": "./runtime/entry-20.js"
24
28
  }
25
29
  },
30
+ "dependencies": {
31
+ "cross-spawn": "^7.0.6"
32
+ },
26
33
  "peerDependencies": {
27
34
  "@earendil-works/pi-coding-agent": "*"
28
35
  }
@@ -0,0 +1 @@
1
+ export * from "../../../dist/entry-20.js";
@@ -33,23 +33,49 @@ export interface ToolRecipe {
33
33
  readonly languages: readonly string[];
34
34
  readonly executables: readonly string[];
35
35
  readonly configFiles?: readonly string[];
36
+
37
+ /** Named TOML tables or JSON paths that identify a tool inside a shared config file. */
38
+ readonly configSections?: Readonly<Record<string, readonly string[]>>;
36
39
  readonly dependencies?: readonly string[];
37
40
  readonly documentation: string;
38
41
  readonly conflicts?: readonly string[];
39
42
  readonly formatter?: {
40
43
  readonly extensions: readonly string[];
44
+
45
+ /** Exact basenames accepted in addition to the file extensions. */
46
+ readonly fileNames?: readonly string[];
41
47
  readonly run: ProcessRecipe;
42
48
  readonly output: "in-place" | "stdout";
43
49
  };
44
50
  readonly linter?: {
45
51
  readonly extensions: readonly string[];
52
+
53
+ /** Exact basenames accepted in addition to the file extensions. */
54
+ readonly fileNames?: readonly string[];
46
55
  readonly check: ProcessRecipe;
47
56
  readonly fix?: ProcessRecipe;
48
- readonly diagnostics: { readonly format: string; readonly pattern?: string };
57
+ readonly diagnostics: {
58
+ readonly format: string;
59
+ readonly pattern?: string;
60
+ /** Native regex reporter column numbering, converted to one-based IDE positions. */
61
+ readonly columnBase?: 0 | 1;
62
+ };
49
63
  };
50
64
  readonly lsp?: {
51
65
  readonly command: readonly string[];
52
66
  readonly rootMarkers: readonly string[];
67
+
68
+ /** Limit selection to files below a matching native project marker. */
69
+ readonly requireRootMarker?: boolean;
70
+
71
+ /** Default language-server settings, sent through the LSP configuration protocol. */
72
+ readonly settings?: Readonly<Record<string, unknown>>;
73
+
74
+ /** Initialization data; string values can contain the {project} path placeholder. */
75
+ readonly initializationOptions?: Readonly<Record<string, unknown>>;
53
76
  readonly languageIds: Readonly<Record<string, readonly string[]>>;
77
+
78
+ /** Exact basenames grouped by LSP language ID. */
79
+ readonly fileNames?: Readonly<Record<string, readonly string[]>>;
54
80
  };
55
81
  }
@@ -0,0 +1,118 @@
1
+ import { access, readFile, readdir } from "node:fs/promises";
2
+ import path from "node:path";
3
+
4
+ import type { ToolRecipe } from "./catalog.js";
5
+
6
+ /** Native project evidence shared by Doctor and runtime tool selection. */
7
+ export interface RecipeEvidence {
8
+ readonly score: number;
9
+ readonly config?: string;
10
+ readonly dependency?: string;
11
+ }
12
+
13
+ /** Reads native config and declared dependencies without executing project code. */
14
+ export async function inspectRecipeEvidence(
15
+ cwd: string,
16
+ recipes: readonly ToolRecipe[],
17
+ ): Promise<ReadonlyMap<string, RecipeEvidence>> {
18
+ const cache = new Map<string, Promise<string | undefined>>();
19
+ const content = (file: string): Promise<string | undefined> => {
20
+ let pending = cache.get(file);
21
+ if (pending === undefined) {
22
+ pending = readFile(path.join(cwd, file), "utf8").catch(() => undefined);
23
+ cache.set(file, pending);
24
+ }
25
+ return pending;
26
+ };
27
+ const manifest = parseJson(await content("package.json"));
28
+ const dependencies = new Set<string>();
29
+ for (const key of [
30
+ "dependencies",
31
+ "devDependencies",
32
+ "peerDependencies",
33
+ "optionalDependencies",
34
+ ]) {
35
+ const section = manifest?.[key];
36
+ if (isRecord(section)) {
37
+ for (const name of Object.keys(section)) dependencies.add(name);
38
+ }
39
+ }
40
+ const entries = await Promise.all(
41
+ recipes.map(async (recipe) => {
42
+ let config: string | undefined;
43
+ for (const file of recipe.configFiles ?? []) {
44
+ if (await hasProjectMarker(cwd, file)) {
45
+ config = file;
46
+ break;
47
+ }
48
+ }
49
+ if (config === undefined) {
50
+ for (const [file, sections] of Object.entries(recipe.configSections ?? {})) {
51
+ const raw = await content(file);
52
+ if (raw === undefined) continue;
53
+ const json = file.endsWith(".json") ? parseJson(raw) : undefined;
54
+ if (
55
+ sections.some((section) =>
56
+ json === undefined
57
+ ? raw.split(/\r?\n/).some((line) => {
58
+ const table = /^\s*\[([^\]]+)\]/.exec(line)?.[1]?.trim();
59
+ return table === section || table?.startsWith(`${section}.`) === true;
60
+ })
61
+ : jsonSection(json, section) !== undefined,
62
+ )
63
+ ) {
64
+ config = file;
65
+ break;
66
+ }
67
+ }
68
+ }
69
+ const dependency = recipe.dependencies?.find((name) => dependencies.has(name));
70
+ return [
71
+ recipe.id,
72
+ {
73
+ score: (config === undefined ? 0 : 6) + (dependency === undefined ? 0 : 4),
74
+ ...(config !== undefined && { config }),
75
+ ...(dependency !== undefined && { dependency }),
76
+ },
77
+ ] as const;
78
+ }),
79
+ );
80
+ return new Map(entries);
81
+ }
82
+
83
+ /** Matches a root-relative native filename or glob, including named project files. */
84
+ export async function hasProjectMarker(cwd: string, marker: string): Promise<boolean> {
85
+ if (!marker.includes("*")) {
86
+ try {
87
+ await access(path.join(cwd, marker));
88
+ return true;
89
+ } catch {
90
+ return false;
91
+ }
92
+ }
93
+ try {
94
+ const names = await readdir(cwd);
95
+ return names.some((name) => path.matchesGlob(name, marker));
96
+ } catch {
97
+ return false;
98
+ }
99
+ }
100
+
101
+ function isRecord(value: unknown): value is Record<string, unknown> {
102
+ return typeof value === "object" && value !== null && !Array.isArray(value);
103
+ }
104
+
105
+ function parseJson(raw: string | undefined): Record<string, unknown> | undefined {
106
+ try {
107
+ const value: unknown = JSON.parse(raw ?? "");
108
+ return isRecord(value) ? value : undefined;
109
+ } catch {
110
+ return undefined;
111
+ }
112
+ }
113
+
114
+ function jsonSection(value: Record<string, unknown>, section: string): unknown {
115
+ let current: unknown = value;
116
+ for (const key of section.split(".")) current = isRecord(current) ? current[key] : undefined;
117
+ return current;
118
+ }
@@ -1,35 +1,81 @@
1
- import { spawn } from "node:child_process";
1
+ import spawn from "cross-spawn";
2
2
 
3
3
  import { constants } from "node:fs";
4
- import { access } from "node:fs/promises";
4
+ import { access, stat } from "node:fs/promises";
5
5
  import path from "node:path";
6
6
 
7
+ /** Common native project tool directories, in launch priority order. */
8
+ export function projectExecutableDirectories(cwd: string): readonly string[] {
9
+ const pythonBin = process.platform === "win32" ? "Scripts" : "bin";
10
+ return ["node_modules/.bin", `.venv/${pythonBin}`, `venv/${pythonBin}`, "vendor/bin"].map(
11
+ (directory) => path.resolve(cwd, directory),
12
+ );
13
+ }
14
+
15
+ /** Normalize case-insensitive Windows environment keys before merging launch overrides. */
16
+ export function normalizeProcessEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
17
+ if (process.platform !== "win32") return { ...environment };
18
+ return Object.fromEntries(
19
+ Object.entries(environment).map(([key, value]) => [key.toUpperCase(), value]),
20
+ );
21
+ }
22
+
23
+ /** Prepend native project tools while preserving the platform's PATH key rules. */
24
+ export function projectProcessEnvironment(
25
+ cwd: string,
26
+ environment: NodeJS.ProcessEnv,
27
+ ): NodeJS.ProcessEnv {
28
+ const effective = normalizeProcessEnvironment(environment);
29
+ effective.PATH = [...projectExecutableDirectories(cwd), effective.PATH]
30
+ .filter(Boolean)
31
+ .join(path.delimiter);
32
+ return effective;
33
+ }
34
+
7
35
  /** Returns whether an executable is available without starting it. */
8
36
  export async function isExecutableAvailable(
9
37
  command: string,
10
38
  cwd: string,
11
39
  environment: NodeJS.ProcessEnv,
12
40
  ): Promise<boolean> {
13
- const candidates =
41
+ const effective = projectProcessEnvironment(cwd, environment);
42
+ const locations =
14
43
  path.isAbsolute(command) || path.dirname(command) !== "."
15
44
  ? [path.resolve(cwd, command)]
16
- : [
17
- path.join(cwd, "node_modules", ".bin", command),
18
- ...(environment.PATH ?? "")
19
- .split(path.delimiter)
20
- .filter(Boolean)
21
- .map((directory) => path.join(directory, command)),
22
- ];
23
-
45
+ : (effective.PATH ?? "")
46
+ .split(path.delimiter)
47
+ .filter(Boolean)
48
+ .map((directory) =>
49
+ path.join(
50
+ process.platform === "win32" ? directory.replace(/^"|"$/gu, "") : directory,
51
+ command,
52
+ ),
53
+ );
54
+ const suffixes =
55
+ process.platform === "win32"
56
+ ? [
57
+ ...new Set(
58
+ (effective.PATHEXT ?? ".COM;.EXE;.BAT;.CMD")
59
+ .split(";")
60
+ .filter(Boolean)
61
+ .flatMap((suffix) => [suffix, suffix.toLowerCase()]),
62
+ ),
63
+ ]
64
+ : [];
65
+ const candidates = locations.flatMap((location) => [
66
+ location,
67
+ ...suffixes.map((suffix) => `${location}${suffix}`),
68
+ ]);
24
69
  for (const candidate of candidates) {
25
70
  try {
26
71
  await access(candidate, constants.X_OK);
72
+
73
+ if (!(await stat(candidate)).isFile()) continue;
27
74
  return true;
28
75
  } catch {
29
76
  // Try the next executable location.
30
77
  }
31
78
  }
32
-
33
79
  return false;
34
80
  }
35
81
 
@@ -48,7 +94,7 @@ export function probeExecutable(
48
94
  return new Promise((resolve) => {
49
95
  const child = spawn(command, arguments_, {
50
96
  cwd,
51
- env: environment,
97
+ env: projectProcessEnvironment(cwd, environment),
52
98
  stdio: ["ignore", "pipe", "pipe"],
53
99
  windowsHide: true,
54
100
  });
@@ -66,10 +112,10 @@ export function probeExecutable(
66
112
  resolve(ok ? { ok: true, detail } : { ok: false, detail });
67
113
  };
68
114
 
69
- child.stdout.setEncoding("utf8");
70
- child.stderr.setEncoding("utf8");
71
- child.stdout.on("data", (chunk: string) => (stdout += chunk));
72
- child.stderr.on("data", (chunk: string) => (stderr += chunk));
115
+ child.stdout?.setEncoding("utf8");
116
+ child.stderr?.setEncoding("utf8");
117
+ child.stdout?.on("data", (chunk: string) => (stdout += chunk));
118
+ child.stderr?.on("data", (chunk: string) => (stderr += chunk));
73
119
  child.once("error", (error) => finish(false, error.message));
74
120
  child.once("close", (code) => {
75
121
  const output = (stdout.trim() || stderr.trim()).split(/\r?\n/u)[0];
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-image": "0.2.0",
10
- "pi-agent-read": "0.2.0",
11
- "pi-agent-resource": "0.2.0",
12
- "pi-agent-text": "0.2.0",
13
- "pi-agent-text-editor": "0.2.0"
9
+ "pi-agent-image": "0.2.1",
10
+ "pi-agent-read": "0.2.1",
11
+ "pi-agent-resource": "0.2.1",
12
+ "pi-agent-text": "0.2.1",
13
+ "pi-agent-text-editor": "0.2.1"
14
14
  },
15
15
  "pi": {
16
16
  "extensions": [
17
- "./runtime/entry-20.js"
17
+ "./runtime/entry-21.js"
18
18
  ]
19
19
  },
20
20
  "peerDependencies": {
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-image",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#extension": "./index.ts"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-image": "0.2.0",
10
- "pi-agent-resource": "0.2.0"
9
+ "pi-agent-image": "0.2.1",
10
+ "pi-agent-resource": "0.2.1"
11
11
  },
12
12
  "pi": {
13
13
  "extensions": [
14
- "./runtime/entry-21.js"
14
+ "./runtime/entry-22.js"
15
15
  ]
16
16
  },
17
17
  "peerDependencies": {
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-pdf",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-pdf": "0.2.0",
7
- "pi-agent-resource": "0.2.0"
6
+ "pi-agent-pdf": "0.2.1",
7
+ "pi-agent-resource": "0.2.1"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
11
- "./runtime/entry-22.js"
11
+ "./runtime/entry-23.js"
12
12
  ]
13
13
  },
14
14
  "peerDependencies": {
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-text",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#extension": "./index.ts"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-resource": "0.2.0",
10
- "pi-agent-text": "0.2.0"
9
+ "pi-agent-resource": "0.2.1",
10
+ "pi-agent-text": "0.2.1"
11
11
  },
12
12
  "pi": {
13
13
  "extensions": [
14
- "./runtime/entry-23.js"
14
+ "./runtime/entry-24.js"
15
15
  ]
16
16
  },
17
17
  "peerDependencies": {
@@ -0,0 +1,2 @@
1
+ export * from "../../../dist/entry-24.js";
2
+ export { default } from "../../../dist/entry-24.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-ide-ast",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -8,19 +8,19 @@
8
8
  "exports": {
9
9
  "./api/scope": {
10
10
  "types": "./src/api/scope.ts",
11
- "default": "./runtime/entry-24.js"
11
+ "default": "./runtime/entry-25.js"
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
15
  "@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
16
16
  "@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
17
- "pi-agent-doctor": "0.2.0",
18
- "pi-agent-invariant": "0.2.0",
19
- "pi-agent-read": "0.2.0",
20
- "pi-agent-resource": "0.2.0",
21
- "pi-agent-search": "0.2.0",
22
- "pi-agent-text": "0.2.0",
23
- "pi-agent-text-editor": "0.2.0",
17
+ "pi-agent-doctor": "0.2.1",
18
+ "pi-agent-invariant": "0.2.1",
19
+ "pi-agent-read": "0.2.1",
20
+ "pi-agent-resource": "0.2.1",
21
+ "pi-agent-search": "0.2.1",
22
+ "pi-agent-text": "0.2.1",
23
+ "pi-agent-text-editor": "0.2.1",
24
24
  "tree-sitter-cpp": "^0.23.4",
25
25
  "tree-sitter-javascript": "^0.25.0",
26
26
  "tree-sitter-json": "^0.24.8",
@@ -31,11 +31,11 @@
31
31
  },
32
32
  "pi": {
33
33
  "extensions": [
34
- "./runtime/entry-25.js"
34
+ "./runtime/entry-26.js"
35
35
  ]
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@earendil-works/pi-coding-agent": "*",
39
- "pi-agent-ide": "0.2.0"
39
+ "pi-agent-ide": "0.2.1"
40
40
  }
41
41
  }
@@ -1,2 +1 @@
1
1
  export * from "../../../dist/entry-25.js";
2
- export { default } from "../../../dist/entry-25.js";
@@ -0,0 +1,2 @@
1
+ export * from "../../../dist/entry-26.js";
2
+ export { default } from "../../../dist/entry-26.js";
@@ -65,6 +65,9 @@ function grammarWasmPath(extension: string): string | undefined {
65
65
  }
66
66
 
67
67
  case ".c":
68
+ case ".cc":
69
+ case ".hh":
70
+ case ".hxx":
68
71
  case ".cpp":
69
72
  case ".cxx":
70
73
  case ".h":
@@ -25,6 +25,9 @@ const SUPPORTED_EXTENSIONS = new Set([
25
25
  ".py",
26
26
  ".rs",
27
27
  ".c",
28
+ ".cc",
29
+ ".hh",
30
+ ".hxx",
28
31
  ".cpp",
29
32
  ".cxx",
30
33
  ".h",