pi-namespace-patch 1.3.0-namespace.1 → 1.5.0-namespace.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 (454) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/README.md +5 -5
  3. package/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +6 -0
  4. package/dist/bundle/chunks/azure-openai-responses-FSC6BAW3.js +2 -0
  5. package/dist/bundle/chunks/bedrock-converse-stream.js +12 -9
  6. package/dist/bundle/chunks/chunk-36QC74V4.js +2 -0
  7. package/dist/bundle/chunks/{chunk-RXG5KZNJ.js → chunk-3BE6TOTE.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-AKJ3ZOR3.js → chunk-3TGLJEWK.js} +1 -1
  9. package/dist/bundle/chunks/chunk-4EYXVSA5.js +129 -0
  10. package/dist/bundle/chunks/{chunk-S3GGRYIO.js → chunk-5AGIVGSV.js} +1 -1
  11. package/dist/bundle/chunks/{chunk-RH6M5TBT.js → chunk-62VOPMLK.js} +8 -7
  12. package/dist/bundle/chunks/{chunk-F5ZABL6Z.js → chunk-7CBJINYJ.js} +2 -2
  13. package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-7DDKXS2Q.js} +1 -1
  14. package/dist/bundle/chunks/chunk-7O7QKK6A.js +2 -0
  15. package/dist/bundle/chunks/chunk-AXIQEITU.js +1234 -0
  16. package/dist/bundle/chunks/{chunk-2LOB3CBH.js → chunk-B46VJEHW.js} +3 -3
  17. package/dist/bundle/chunks/chunk-C2WU32PX.js +2 -0
  18. package/dist/bundle/chunks/{chunk-H3QXYIF7.js → chunk-CF5GWZHW.js} +1 -1
  19. package/dist/bundle/chunks/chunk-CHWNPHIS.js +82 -0
  20. package/dist/bundle/chunks/chunk-EOO47QGR.js +2 -0
  21. package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
  22. package/dist/bundle/chunks/chunk-GN3QYODH.js +16 -0
  23. package/dist/bundle/chunks/{chunk-4L3WN2XY.js → chunk-JXWJOIH4.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-6CYCI3EJ.js → chunk-LVVZS2NO.js} +1 -1
  25. package/dist/bundle/chunks/chunk-NL4X6LBY.js +4 -0
  26. package/dist/bundle/chunks/chunk-NZY7EIPA.js +4 -0
  27. package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
  28. package/dist/bundle/chunks/{chunk-5GTPJSRI.js → chunk-R2EGYMOO.js} +3 -3
  29. package/dist/bundle/chunks/{chunk-ZBURYEWF.js → chunk-TMTOQ7H7.js} +1 -1
  30. package/dist/bundle/chunks/{chunk-22CYIUS4.js → chunk-UKVNB6C4.js} +1 -1
  31. package/dist/bundle/chunks/chunk-V6KH5QG4.js +9 -0
  32. package/dist/bundle/chunks/chunk-VOLAXWGI.js +2 -0
  33. package/dist/bundle/chunks/chunk-YZKQS34S.js +9 -0
  34. package/dist/bundle/chunks/{cli-SWM4FQ6V.js → cli-MCOUW5WS.js} +11 -9
  35. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-WLAFJSP6.js +2 -0
  36. package/dist/bundle/chunks/{easter-egg-3d-OX6RUCIS.js → easter-egg-3d-WMBNSJ4M.js} +1 -1
  37. package/dist/bundle/chunks/{execute-HXNYK3DM.js → execute-4CEBORGZ.js} +9 -3
  38. package/dist/bundle/chunks/github-copilot.js +1 -1
  39. package/dist/bundle/chunks/google-generative-ai-INGKNW72.js +2 -0
  40. package/dist/bundle/chunks/google-vertex-IBTX6MBF.js +2 -0
  41. package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
  42. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  43. package/dist/bundle/chunks/{jiti-loader-C3NU2SDH.js → jiti-loader-GL4HJFAD.js} +1 -1
  44. package/dist/bundle/chunks/{jiti-static-loader-E6ANQD5T.js → jiti-static-loader-2RCDI6B4.js} +1 -1
  45. package/dist/bundle/chunks/kimi-coding.js +1 -1
  46. package/dist/bundle/chunks/{lib-TEDK3E5I.js → lib-4AVRLBHM.js} +1 -1
  47. package/dist/bundle/chunks/{llama-cpp-classify-FYN623RH.js → llama-cpp-classify-V5U3QKXI.js} +2 -2
  48. package/dist/bundle/chunks/meta.js +1 -1
  49. package/dist/bundle/chunks/mistral-conversations-S4OWXIXQ.js +5 -0
  50. package/dist/bundle/chunks/{multipart-parser-SQ6GDJL7.js → multipart-parser-FMGQ7342.js} +1 -1
  51. package/dist/bundle/chunks/{node-TWVVAGPO.js → node-AUOGOBCN.js} +1 -1
  52. package/dist/bundle/chunks/{node-N5BSDOA5.js → node-KCMANYC2.js} +1 -1
  53. package/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +10 -0
  54. package/dist/bundle/chunks/openai-completions-EJNYB6IX.js +7 -0
  55. package/dist/bundle/chunks/{openai-decisions-WVPMQ4JD.js → openai-decisions-IXI34BYG.js} +1 -1
  56. package/dist/bundle/chunks/openai-responses-MD3562FB.js +4 -0
  57. package/dist/bundle/chunks/openrouter-images-PISKSFMS.js +2 -0
  58. package/dist/bundle/chunks/pi-messages-NORUKF4E.js +8 -0
  59. package/dist/bundle/chunks/radius.js +1 -1
  60. package/dist/bundle/chunks/{runtime-366HE7CW.js → runtime-FQB7RU7U.js} +1 -1
  61. package/dist/bundle/chunks/{src-UK77SYZE.js → src-QKGKDFSU.js} +1 -1
  62. package/dist/bundle/chunks/typesafe-system-one-CHVC2UUI.js +2 -0
  63. package/dist/bundle/chunks/virtual-modules-ZVUPOVM4.js +2 -0
  64. package/dist/bundle/cli-runtime.js +1 -1
  65. package/dist/bundle/index.js +1 -1
  66. package/dist/bundle/rpc-entry.js +1 -1
  67. package/dist/cli/args.d.ts.map +1 -1
  68. package/dist/cli/args.js +8 -7
  69. package/dist/cli/args.js.map +1 -1
  70. package/dist/config.d.ts +10 -0
  71. package/dist/config.d.ts.map +1 -1
  72. package/dist/config.js +24 -5
  73. package/dist/config.js.map +1 -1
  74. package/dist/core/agent-session-runtime.js +3 -3
  75. package/dist/core/agent-session-runtime.js.map +1 -1
  76. package/dist/core/agent-session.d.ts +11 -2
  77. package/dist/core/agent-session.d.ts.map +1 -1
  78. package/dist/core/agent-session.js +60 -13
  79. package/dist/core/agent-session.js.map +1 -1
  80. package/dist/core/bug-report.d.ts +4 -4
  81. package/dist/core/client-identity.d.ts +8 -0
  82. package/dist/core/client-identity.d.ts.map +1 -0
  83. package/dist/core/client-identity.js +15 -0
  84. package/dist/core/client-identity.js.map +1 -0
  85. package/dist/core/compaction/branch-summarization.d.ts +4 -2
  86. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  87. package/dist/core/compaction/branch-summarization.js +17 -6
  88. package/dist/core/compaction/branch-summarization.js.map +1 -1
  89. package/dist/core/compaction/compaction.d.ts +2 -2
  90. package/dist/core/compaction/compaction.d.ts.map +1 -1
  91. package/dist/core/compaction/compaction.js +20 -15
  92. package/dist/core/compaction/compaction.js.map +1 -1
  93. package/dist/core/exec.d.ts +9 -1
  94. package/dist/core/exec.d.ts.map +1 -1
  95. package/dist/core/exec.js +104 -60
  96. package/dist/core/exec.js.map +1 -1
  97. package/dist/core/export-html/index.d.ts.map +1 -1
  98. package/dist/core/export-html/index.js +2 -0
  99. package/dist/core/export-html/index.js.map +1 -1
  100. package/dist/core/export-html/template.css +9 -0
  101. package/dist/core/export-html/template.html +1 -0
  102. package/dist/core/export-html/template.js +167 -46
  103. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  104. package/dist/core/export-html/tool-renderer.js +3 -0
  105. package/dist/core/export-html/tool-renderer.js.map +1 -1
  106. package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  107. package/dist/core/export-html/vendor/marked.min.js +30 -29
  108. package/dist/core/extensions/index.d.ts +1 -1
  109. package/dist/core/extensions/index.d.ts.map +1 -1
  110. package/dist/core/extensions/index.js.map +1 -1
  111. package/dist/core/extensions/loader.d.ts.map +1 -1
  112. package/dist/core/extensions/loader.js +10 -6
  113. package/dist/core/extensions/loader.js.map +1 -1
  114. package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
  115. package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
  116. package/dist/core/extensions/pi-ai-extension-view.js +22 -0
  117. package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
  118. package/dist/core/extensions/types.d.ts +27 -4
  119. package/dist/core/extensions/types.d.ts.map +1 -1
  120. package/dist/core/extensions/types.js.map +1 -1
  121. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  122. package/dist/core/extensions/virtual-modules.js +11 -7
  123. package/dist/core/extensions/virtual-modules.js.map +1 -1
  124. package/dist/core/mcp-servers.d.ts +11 -4
  125. package/dist/core/mcp-servers.d.ts.map +1 -1
  126. package/dist/core/mcp-servers.js +15 -5
  127. package/dist/core/mcp-servers.js.map +1 -1
  128. package/dist/core/model-config.d.ts +1783 -1219
  129. package/dist/core/model-config.d.ts.map +1 -1
  130. package/dist/core/model-config.js +50 -27
  131. package/dist/core/model-config.js.map +1 -1
  132. package/dist/core/model-resolver.d.ts.map +1 -1
  133. package/dist/core/model-resolver.js +23 -17
  134. package/dist/core/model-resolver.js.map +1 -1
  135. package/dist/core/model-runtime.d.ts.map +1 -1
  136. package/dist/core/model-runtime.js +6 -3
  137. package/dist/core/model-runtime.js.map +1 -1
  138. package/dist/core/package-manager.d.ts +14 -0
  139. package/dist/core/package-manager.d.ts.map +1 -1
  140. package/dist/core/package-manager.js +165 -51
  141. package/dist/core/package-manager.js.map +1 -1
  142. package/dist/core/pi-ai-schemas.d.ts +163 -0
  143. package/dist/core/pi-ai-schemas.d.ts.map +1 -0
  144. package/dist/core/pi-ai-schemas.js +21 -0
  145. package/dist/core/pi-ai-schemas.js.map +1 -0
  146. package/dist/core/pi-manifest.d.ts +1 -0
  147. package/dist/core/pi-manifest.d.ts.map +1 -1
  148. package/dist/core/pi-manifest.js +4 -0
  149. package/dist/core/pi-manifest.js.map +1 -1
  150. package/dist/core/project-trust.js +1 -1
  151. package/dist/core/project-trust.js.map +1 -1
  152. package/dist/core/provider-composer.d.ts +2 -1
  153. package/dist/core/provider-composer.d.ts.map +1 -1
  154. package/dist/core/provider-composer.js +7 -3
  155. package/dist/core/provider-composer.js.map +1 -1
  156. package/dist/core/resource-loader.d.ts +4 -1
  157. package/dist/core/resource-loader.d.ts.map +1 -1
  158. package/dist/core/resource-loader.js +39 -24
  159. package/dist/core/resource-loader.js.map +1 -1
  160. package/dist/core/sdk.d.ts.map +1 -1
  161. package/dist/core/sdk.js +11 -10
  162. package/dist/core/sdk.js.map +1 -1
  163. package/dist/core/session-manager.d.ts +7 -0
  164. package/dist/core/session-manager.d.ts.map +1 -1
  165. package/dist/core/session-manager.js +32 -13
  166. package/dist/core/session-manager.js.map +1 -1
  167. package/dist/core/settings-manager.d.ts +2 -0
  168. package/dist/core/settings-manager.d.ts.map +1 -1
  169. package/dist/core/settings-manager.js +11 -0
  170. package/dist/core/settings-manager.js.map +1 -1
  171. package/dist/core/settings-schema.d.ts +4 -2
  172. package/dist/core/settings-schema.d.ts.map +1 -1
  173. package/dist/core/settings-schema.js +8 -1
  174. package/dist/core/settings-schema.js.map +1 -1
  175. package/dist/core/skills.d.ts.map +1 -1
  176. package/dist/core/skills.js +6 -14
  177. package/dist/core/skills.js.map +1 -1
  178. package/dist/core/slash-commands.js +2 -2
  179. package/dist/core/slash-commands.js.map +1 -1
  180. package/dist/core/source-info.d.ts +9 -0
  181. package/dist/core/source-info.d.ts.map +1 -1
  182. package/dist/core/source-info.js +13 -0
  183. package/dist/core/source-info.js.map +1 -1
  184. package/dist/core/system-prompt.d.ts.map +1 -1
  185. package/dist/core/system-prompt.js +5 -6
  186. package/dist/core/system-prompt.js.map +1 -1
  187. package/dist/core/tools/bash.d.ts +2 -2
  188. package/dist/core/tools/bash.d.ts.map +1 -1
  189. package/dist/core/tools/bash.js.map +1 -1
  190. package/dist/core/tools/edit.d.ts +3 -3
  191. package/dist/core/tools/edit.d.ts.map +1 -1
  192. package/dist/core/tools/edit.js +2 -4
  193. package/dist/core/tools/edit.js.map +1 -1
  194. package/dist/core/tools/find.d.ts +2 -2
  195. package/dist/core/tools/find.d.ts.map +1 -1
  196. package/dist/core/tools/find.js.map +1 -1
  197. package/dist/core/tools/grep.d.ts +2 -2
  198. package/dist/core/tools/grep.d.ts.map +1 -1
  199. package/dist/core/tools/grep.js +4 -2
  200. package/dist/core/tools/grep.js.map +1 -1
  201. package/dist/core/tools/ls.d.ts +2 -2
  202. package/dist/core/tools/ls.d.ts.map +1 -1
  203. package/dist/core/tools/ls.js.map +1 -1
  204. package/dist/core/tools/read.d.ts +2 -2
  205. package/dist/core/tools/read.d.ts.map +1 -1
  206. package/dist/core/tools/read.js.map +1 -1
  207. package/dist/core/tools/render-utils.d.ts.map +1 -1
  208. package/dist/core/tools/render-utils.js +2 -7
  209. package/dist/core/tools/render-utils.js.map +1 -1
  210. package/dist/core/tools/renderers/write.d.ts.map +1 -1
  211. package/dist/core/tools/renderers/write.js +19 -19
  212. package/dist/core/tools/renderers/write.js.map +1 -1
  213. package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
  214. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  215. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  216. package/dist/core/tools/write.d.ts +2 -2
  217. package/dist/core/tools/write.d.ts.map +1 -1
  218. package/dist/core/tools/write.js.map +1 -1
  219. package/dist/core/trust-manager.d.ts.map +1 -1
  220. package/dist/core/trust-manager.js +14 -8
  221. package/dist/core/trust-manager.js.map +1 -1
  222. package/dist/core/usage-totals.d.ts.map +1 -1
  223. package/dist/core/usage-totals.js +2 -0
  224. package/dist/core/usage-totals.js.map +1 -1
  225. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  226. package/dist/extensions/codemode/execute.js +99 -24
  227. package/dist/extensions/codemode/execute.js.map +1 -1
  228. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  229. package/dist/extensions/codemode/renderer.js +6 -2
  230. package/dist/extensions/codemode/renderer.js.map +1 -1
  231. package/dist/extensions/codemode/tool.d.ts +2 -1
  232. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  233. package/dist/extensions/codemode/tool.js +33 -8
  234. package/dist/extensions/codemode/tool.js.map +1 -1
  235. package/dist/extensions/llama/ui.d.ts.map +1 -1
  236. package/dist/extensions/llama/ui.js +16 -4
  237. package/dist/extensions/llama/ui.js.map +1 -1
  238. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  239. package/dist/extensions/mcp/cli.js +34 -8
  240. package/dist/extensions/mcp/cli.js.map +1 -1
  241. package/dist/extensions/mcp/config.d.ts.map +1 -1
  242. package/dist/extensions/mcp/config.js +3 -2
  243. package/dist/extensions/mcp/config.js.map +1 -1
  244. package/dist/extensions/mcp/oauth.d.ts +1 -1
  245. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  246. package/dist/extensions/mcp/oauth.js +36 -13
  247. package/dist/extensions/mcp/oauth.js.map +1 -1
  248. package/dist/extensions/mcp/ui.d.ts +1 -0
  249. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  250. package/dist/extensions/mcp/ui.js +33 -24
  251. package/dist/extensions/mcp/ui.js.map +1 -1
  252. package/dist/extensions/tool-search/tool.d.ts +21 -6
  253. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  254. package/dist/extensions/tool-search/tool.js +104 -36
  255. package/dist/extensions/tool-search/tool.js.map +1 -1
  256. package/dist/index.d.ts +2 -2
  257. package/dist/index.d.ts.map +1 -1
  258. package/dist/index.js.map +1 -1
  259. package/dist/main.d.ts.map +1 -1
  260. package/dist/main.js +15 -8
  261. package/dist/main.js.map +1 -1
  262. package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
  263. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  264. package/dist/modes/interactive/components/assistant-message.js +45 -21
  265. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  266. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  267. package/dist/modes/interactive/components/config-selector.js +4 -17
  268. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  269. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  270. package/dist/modes/interactive/components/custom-editor.js +7 -0
  271. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  272. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  273. package/dist/modes/interactive/components/custom-entry.js +2 -1
  274. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  275. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  276. package/dist/modes/interactive/components/custom-message.js +2 -1
  277. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  278. package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
  279. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  280. package/dist/modes/interactive/components/extension-editor.js +4 -0
  281. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  282. package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
  283. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  284. package/dist/modes/interactive/components/login-dialog.js +105 -10
  285. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  286. package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
  287. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
  288. package/dist/modes/interactive/components/markdown-transform.js +3 -2
  289. package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
  290. package/dist/modes/interactive/components/model-selector.d.ts +1 -0
  291. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  292. package/dist/modes/interactive/components/model-selector.js +17 -6
  293. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  294. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
  295. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  296. package/dist/modes/interactive/components/oauth-selector.js +13 -4
  297. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  298. package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
  299. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  300. package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
  301. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  302. package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
  303. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  304. package/dist/modes/interactive/components/session-selector-search.js +86 -22
  305. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  306. package/dist/modes/interactive/components/session-selector.d.ts +2 -1
  307. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  308. package/dist/modes/interactive/components/session-selector.js +16 -24
  309. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  310. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  311. package/dist/modes/interactive/components/settings-submenu.js +2 -0
  312. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  313. package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
  314. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  315. package/dist/modes/interactive/components/tool-execution.js +14 -2
  316. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  317. package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
  318. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  319. package/dist/modes/interactive/components/tree-selector.js +5 -6
  320. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  321. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
  322. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  323. package/dist/modes/interactive/components/user-message-selector.js +9 -1
  324. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  325. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  326. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  327. package/dist/modes/interactive/components/user-message.js +6 -2
  328. package/dist/modes/interactive/components/user-message.js.map +1 -1
  329. package/dist/modes/interactive/external-editor.d.ts +1 -0
  330. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  331. package/dist/modes/interactive/external-editor.js +16 -4
  332. package/dist/modes/interactive/external-editor.js.map +1 -1
  333. package/dist/modes/interactive/interactive-mode.d.ts +16 -15
  334. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  335. package/dist/modes/interactive/interactive-mode.js +221 -153
  336. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  337. package/dist/modes/interactive/model-search.d.ts +10 -0
  338. package/dist/modes/interactive/model-search.d.ts.map +1 -1
  339. package/dist/modes/interactive/model-search.js +21 -0
  340. package/dist/modes/interactive/model-search.js.map +1 -1
  341. package/dist/modes/interactive/theme/theme.d.ts +10 -0
  342. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  343. package/dist/modes/interactive/theme/theme.js +31 -23
  344. package/dist/modes/interactive/theme/theme.js.map +1 -1
  345. package/dist/package-manager-cli.d.ts.map +1 -1
  346. package/dist/package-manager-cli.js +57 -5
  347. package/dist/package-manager-cli.js.map +1 -1
  348. package/dist/utils/ansi.d.ts.map +1 -1
  349. package/dist/utils/ansi.js +5 -2
  350. package/dist/utils/ansi.js.map +1 -1
  351. package/dist/utils/clipboard-command.d.ts.map +1 -1
  352. package/dist/utils/clipboard-command.js +7 -0
  353. package/dist/utils/clipboard-command.js.map +1 -1
  354. package/dist/utils/git.d.ts +1 -1
  355. package/dist/utils/git.d.ts.map +1 -1
  356. package/dist/utils/git.js.map +1 -1
  357. package/dist/utils/image-resize-core.d.ts.map +1 -1
  358. package/dist/utils/image-resize-core.js +5 -3
  359. package/dist/utils/image-resize-core.js.map +1 -1
  360. package/dist/utils/open-browser.d.ts.map +1 -1
  361. package/dist/utils/open-browser.js +4 -1
  362. package/dist/utils/open-browser.js.map +1 -1
  363. package/dist/utils/paths.d.ts +17 -0
  364. package/dist/utils/paths.d.ts.map +1 -1
  365. package/dist/utils/paths.js +42 -1
  366. package/dist/utils/paths.js.map +1 -1
  367. package/dist/utils/pi-user-agent.d.ts +1 -0
  368. package/dist/utils/pi-user-agent.d.ts.map +1 -1
  369. package/dist/utils/pi-user-agent.js +3 -2
  370. package/dist/utils/pi-user-agent.js.map +1 -1
  371. package/dist/utils/shell.d.ts.map +1 -1
  372. package/dist/utils/shell.js +59 -13
  373. package/dist/utils/shell.js.map +1 -1
  374. package/dist/utils/syntax-highlight.d.ts +5 -0
  375. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  376. package/dist/utils/syntax-highlight.js +7 -0
  377. package/dist/utils/syntax-highlight.js.map +1 -1
  378. package/dist/utils/tools-manager.d.ts.map +1 -1
  379. package/dist/utils/tools-manager.js +34 -38
  380. package/dist/utils/tools-manager.js.map +1 -1
  381. package/docs/cli.md +21 -11
  382. package/docs/codemode.md +2 -2
  383. package/docs/compaction.md +3 -3
  384. package/docs/custom-provider.md +55 -1
  385. package/docs/docs.json +4 -0
  386. package/docs/environment-variables.md +3 -0
  387. package/docs/extensions.md +3222 -152
  388. package/docs/keybindings.md +1 -1
  389. package/docs/llama-cpp.md +23 -12
  390. package/docs/mcp.md +6 -4
  391. package/docs/message-types.md +1 -1
  392. package/docs/models-configuration.md +196 -0
  393. package/docs/models.md +21 -5
  394. package/docs/packages.md +24 -0
  395. package/docs/quickstart.md +7 -3
  396. package/docs/sessions.md +11 -3
  397. package/docs/settings.md +6 -5
  398. package/docs/slash-commands.md +3 -2
  399. package/docs/terminal-setup.md +3 -1
  400. package/docs/tmux.md +6 -0
  401. package/docs/tui.md +72 -0
  402. package/docs/windows.md +43 -2
  403. package/examples/extensions/README.md +2 -1
  404. package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
  405. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  406. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  407. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  408. package/examples/extensions/debug-provider.ts +2 -2
  409. package/examples/extensions/gondolin/package-lock.json +19 -29
  410. package/examples/extensions/gondolin/package.json +2 -2
  411. package/examples/extensions/preset.ts +2 -0
  412. package/examples/extensions/reload-runtime.ts +17 -5
  413. package/examples/extensions/todo.ts +7 -0
  414. package/examples/extensions/tools.ts +2 -0
  415. package/examples/extensions/with-deps/package-lock.json +2 -2
  416. package/examples/extensions/with-deps/package.json +1 -1
  417. package/examples/tsconfig.json +180 -0
  418. package/package.json +14 -14
  419. package/schemas/models.schema.json +119 -65
  420. package/schemas/settings.schema.json +17 -0
  421. package/dist/bundle/chunks/anthropic-messages-UIH6DSZT.js +0 -6
  422. package/dist/bundle/chunks/azure-openai-responses-KZZFKCXW.js +0 -2
  423. package/dist/bundle/chunks/chunk-2JW42LFQ.js +0 -2
  424. package/dist/bundle/chunks/chunk-3ZATHNCK.js +0 -9
  425. package/dist/bundle/chunks/chunk-6MWTY2OB.js +0 -130
  426. package/dist/bundle/chunks/chunk-DOST5PQW.js +0 -82
  427. package/dist/bundle/chunks/chunk-GDR5JFDJ.js +0 -4
  428. package/dist/bundle/chunks/chunk-H2VI33AU.js +0 -1220
  429. package/dist/bundle/chunks/chunk-HACVPRBJ.js +0 -11
  430. package/dist/bundle/chunks/chunk-ITZNWD4K.js +0 -2
  431. package/dist/bundle/chunks/chunk-PYGXRV27.js +0 -7
  432. package/dist/bundle/chunks/chunk-TEPMHNKQ.js +0 -2
  433. package/dist/bundle/chunks/chunk-UCKJ6OH5.js +0 -11
  434. package/dist/bundle/chunks/chunk-WJUNYZC5.js +0 -2
  435. package/dist/bundle/chunks/chunk-XIX7LUWI.js +0 -2
  436. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +0 -2
  437. package/dist/bundle/chunks/google-generative-ai-KJOKBJM3.js +0 -2
  438. package/dist/bundle/chunks/google-vertex-VCLZ36OB.js +0 -2
  439. package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +0 -13
  440. package/dist/bundle/chunks/mistral-conversations-AMQJ43DD.js +0 -5
  441. package/dist/bundle/chunks/openai-codex-responses-ZYGHVE5B.js +0 -10
  442. package/dist/bundle/chunks/openai-completions-BGCEXFAB.js +0 -7
  443. package/dist/bundle/chunks/openai-responses-KCCCXI3B.js +0 -3
  444. package/dist/bundle/chunks/openrouter-images-DUPG5DZO.js +0 -2
  445. package/dist/bundle/chunks/pi-messages-V27DSLVC.js +0 -8
  446. package/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +0 -2
  447. package/dist/bundle/chunks/virtual-modules-ZXBODXVN.js +0 -2
  448. package/dist/core/provider-attribution.d.ts +0 -4
  449. package/dist/core/provider-attribution.d.ts.map +0 -1
  450. package/dist/core/provider-attribution.js +0 -72
  451. package/dist/core/provider-attribution.js.map +0 -1
  452. package/examples/extensions/sandbox/index.ts +0 -321
  453. package/examples/extensions/sandbox/package-lock.json +0 -92
  454. package/examples/extensions/sandbox/package.json +0 -19
package/docs/tui.md CHANGED
@@ -65,6 +65,78 @@ Regular mode leaves mouse input to the terminal because the terminal owns scroll
65
65
 
66
66
  `ctx.ui.custom()` temporarily gives one component control of the interactive area and resolves when that component calls the supplied completion callback.
67
67
 
68
+ ### Build a minimal custom screen
69
+
70
+ This complete extension shows the custom-component lifecycle: render within the supplied width, use injected keybindings, invalidate cached output after state changes, request a render, and finish through `done()`.
71
+
72
+ ```typescript
73
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
74
+ import { truncateToWidth } from "@earendil-works/pi-tui";
75
+
76
+ export default function (pi: ExtensionAPI) {
77
+ pi.registerCommand("pick-target", {
78
+ description: "Pick a deployment target",
79
+ handler: async (_args, ctx) => {
80
+ if (ctx.mode !== "tui") {
81
+ ctx.ui.notify("pick-target requires interactive mode", "error");
82
+ return;
83
+ }
84
+
85
+ const choices = ["development", "staging", "production"];
86
+ const selected = await ctx.ui.custom<string | undefined>((tui, theme, keybindings, done) => {
87
+ let selectedIndex = 0;
88
+ let cachedWidth: number | undefined;
89
+ let cachedLines: string[] | undefined;
90
+
91
+ const invalidate = () => {
92
+ cachedWidth = undefined;
93
+ cachedLines = undefined;
94
+ };
95
+
96
+ return {
97
+ render(width: number): string[] {
98
+ if (cachedLines && cachedWidth === width) return cachedLines;
99
+
100
+ cachedWidth = width;
101
+ cachedLines = [
102
+ theme.fg("accent", "Choose a deployment target"),
103
+ ...choices.map((choice, index) => `${index === selectedIndex ? "> " : " "}${choice}`),
104
+ theme.fg("dim", "up/down move, enter selects, escape cancels"),
105
+ ].map((line) => truncateToWidth(line, width));
106
+ return cachedLines;
107
+ },
108
+ handleInput(data: string): void {
109
+ if (keybindings.matches(data, "tui.select.up")) {
110
+ selectedIndex = (selectedIndex - 1 + choices.length) % choices.length;
111
+ } else if (keybindings.matches(data, "tui.select.down")) {
112
+ selectedIndex = (selectedIndex + 1) % choices.length;
113
+ } else if (keybindings.matches(data, "tui.select.confirm")) {
114
+ done(choices[selectedIndex]);
115
+ return;
116
+ } else if (keybindings.matches(data, "tui.select.cancel")) {
117
+ done(undefined);
118
+ return;
119
+ } else {
120
+ return;
121
+ }
122
+
123
+ invalidate();
124
+ tui.requestRender();
125
+ },
126
+ invalidate,
127
+ };
128
+ });
129
+
130
+ if (selected) ctx.ui.notify(`Selected ${selected}`, "info");
131
+ },
132
+ });
133
+ }
134
+ ```
135
+
136
+ This component does not display a text cursor, so it does not need `Focusable`. A component containing `Input` or `Editor` must implement `Focusable` and propagate its `focused` value to that child.
137
+
138
+ Custom components do not report pi as waiting for the user, because `ctx.ui.custom()` also hosts loaders and other non-blocking UI. When an inline component waits for an answer, pass `blocked: { kind: "question", message: "Pick a color" }` so terminals that support [program status](terminal-setup.md#program-status) show pi as blocked while the component is visible. `kind` is `"question"`, `"permission"`, or `"auth"`. Overlays ignore this option.
139
+
68
140
  Pass `overlay: true` to draw above existing content. Overlay options control size, anchors, offsets, margins, and responsive visibility. An overlay handle can change focus or temporarily hide and show the overlay with `setHidden()` while the interaction remains active.
69
141
 
70
142
  Focused overlays retain input ownership across ordinary renders. If another component should receive input while an overlay remains visible, explicitly release or redirect focus through the handle.
package/docs/windows.md CHANGED
@@ -19,8 +19,9 @@ For most native Windows users, installing [Git for Windows](https://git-scm.com/
19
19
  Pi resolves Bash in this order:
20
20
 
21
21
  1. `shellPath` from `~/.pi/agent/settings.json`
22
- 2. Git Bash under `Program Files` or `Program Files (x86)`
23
- 3. `bash.exe` on `PATH`, including Cygwin, MSYS2, or legacy WSL Bash
22
+ 2. Git Bash at `%ProgramFiles%\Git\bin\bash.exe`
23
+ 3. Git Bash at `%ProgramFiles(x86)%\Git\bin\bash.exe`
24
+ 4. `bash.exe` on `PATH`, including Cygwin, MSYS2, or legacy WSL Bash
24
25
 
25
26
  Start Pi and enter this command to verify the shell:
26
27
 
@@ -34,6 +35,13 @@ If Pi cannot find Bash, it reports the locations it checked. Install Git for Win
34
35
 
35
36
  The optional `powershell` tool runs commands through `pwsh.exe` when available, then falls back to Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
36
37
 
38
+ PowerShell discovery checks these locations in order:
39
+
40
+ 1. `pwsh.exe` on `PATH`
41
+ 2. `%ProgramFiles%\PowerShell\7\pwsh.exe`
42
+ 3. `powershell.exe` on `PATH`
43
+ 4. `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`
44
+
37
45
  To replace the model-facing `bash` tool with `powershell`, add this to `~/.pi/agent/settings.json`:
38
46
 
39
47
  ```json
@@ -48,6 +56,12 @@ Restart Pi, then ask it to run a harmless PowerShell command. The `!` and `!!` e
48
56
 
49
57
  See [Settings](settings.md#tools) for other tool combinations.
50
58
 
59
+ ## WSL
60
+
61
+ WSL path conversion on Windows and extra Git branch polling in WSL recognize `/mnt/<drive>`, not custom mount roots.
62
+
63
+ When using the legacy WSL `bash.exe` launcher from Windows, Pi sends commands over stdin to avoid command-line quoting problems.
64
+
51
65
  ## Use a custom Bash executable
52
66
 
53
67
  Set `shellPath` when Bash is installed somewhere Pi does not discover automatically:
@@ -62,6 +76,33 @@ JSON uses backslashes for escape sequences. When you write a Windows path with b
62
76
 
63
77
  See [Configure shell commands](shell-aliases.md) for command prefixes, aliases, and the complete shell-resolution behavior.
64
78
 
79
+ ## Choose a terminal
80
+
81
+ Windows terminals run Pi through a console host (conhost). Some bundle an up-to-date copy; others use the older one built into Windows, which has bugs that affect Pi.
82
+
83
+ We recommend [Windows Terminal](https://aka.ms/terminal). It always ships an up-to-date conhost, and Pi is best tested with it.
84
+
85
+ Last updated: October 2026.
86
+
87
+ | Terminal | Conhost | Status |
88
+ |---|---|---|
89
+ | [Windows Terminal](https://aka.ms/terminal) | Bundled, current | Recommended |
90
+ | [VS Code](https://code.visualstudio.com), [Tabby](https://tabby.sh), [WezTerm](https://wezterm.org) nightly | Bundled, current | Works |
91
+ | [Alacritty](https://alacritty.org) | Built-in, unless `conpty.dll` and `OpenConsole.exe` from Windows Terminal are next to `alacritty.exe` | Works only with those files |
92
+ | WezTerm 20240203 and older | Bundled, old | [Known issues](#known-issues) |
93
+ | Classic console (`cmd.exe` or PowerShell without Windows Terminal), mintty (Git Bash), ConEmu, Cmder, [Hyper](https://hyper.is), Windows OpenSSH | Built-in | [Known issues](#known-issues) |
94
+
65
95
  ## Configure Windows Terminal
66
96
 
67
97
  Windows Terminal reserves or rewrites some modified keys. See [Windows Terminal](terminal-setup.md#windows-terminal) to configure `Shift+Enter` and `Alt+Enter`, and [Keybindings](keybindings.md) for Pi's Windows and WSL shortcut defaults.
98
+
99
+ ## Known issues
100
+
101
+ These issues come from conhost. Microsoft has fixed them in its source, but has not said when the built-in conhost will get the fixes.
102
+
103
+ | Issue | Affects | Remedy |
104
+ |---|---|---|
105
+ | Switching from fullscreen to regular mode, or `Ctrl+G` from fullscreen, crashes the session ([#9186](https://github.com/earendil-works/pi/issues/9186), [microsoft/terminal#17515](https://github.com/microsoft/terminal/issues/17515)) | Built-in conhost | Use a terminal with a current conhost, or start Pi with `--tui-mode regular` |
106
+ | Text such as `;0;rgb:0000/0000/0000` appears in the prompt, and BEL opens the external editor ([#10256](https://github.com/earendil-works/pi/issues/10256)) | Built-in conhost behind another terminal: mintty, Windows OpenSSH | Use a terminal with a current conhost |
107
+ | Fragments such as `79` or `55` appear in the prompt ([#10717](https://github.com/earendil-works/pi/issues/10717)) | WezTerm 20240203 | Use WezTerm nightly |
108
+ | In regular mode, each keystroke redraws the input line on a new row ([#6300](https://github.com/earendil-works/pi/issues/6300)) | Built-in conhost, classic console | Use fullscreen mode (the default), or a terminal with a current conhost |
@@ -23,9 +23,10 @@ cp permission-gate.ts ~/.pi/agent/extensions/
23
23
  | `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
24
24
  | `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
25
25
  | `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
26
- | `sandbox/` | OS-level sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config |
27
26
  | `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM |
28
27
 
28
+ For isolation setup and limitations, see [Run Pi in an isolated environment](../../docs/containerization.md).
29
+
29
30
  ### Custom Tools
30
31
 
31
32
  | Extension | Description |
@@ -42,7 +42,7 @@ import {
42
42
  type TextContent,
43
43
  type ThinkingContent,
44
44
  type Tool,
45
- type ToolCall,
45
+ ToolCallArgumentsStream,
46
46
  type ToolResultMessage,
47
47
  type TranscriptContext,
48
48
  } from "@earendil-works/pi-ai";
@@ -454,8 +454,9 @@ function streamCustomAnthropic(
454
454
  const anthropicStream = client.messages.stream({ ...params }, { signal: options?.signal });
455
455
  stream.push({ type: "start", partial: output });
456
456
 
457
- type Block = (ThinkingContent | TextContent | (ToolCall & { partialJson: string })) & { index: number };
458
- const blocks = output.content as Block[];
457
+ // Stream state per Anthropic block index, kept off the content blocks so it never reaches partial messages.
458
+ // ToolCallArgumentsStream reads each argument delta once and shows the arguments parsed so far.
459
+ const openBlocks = new Map<number, { contentIndex: number; arguments?: ToolCallArgumentsStream }>();
459
460
 
460
461
  for await (const event of anthropicStream) {
461
462
  if (event.type === "message_start") {
@@ -468,15 +469,12 @@ function streamCustomAnthropic(
468
469
  calculateCost(model, output.usage);
469
470
  } else if (event.type === "content_block_start") {
470
471
  if (event.content_block.type === "text") {
471
- output.content.push({ type: "text", text: "", index: event.index } as any);
472
+ output.content.push({ type: "text", text: "" });
473
+ openBlocks.set(event.index, { contentIndex: output.content.length - 1 });
472
474
  stream.push({ type: "text_start", contentIndex: output.content.length - 1, partial: output });
473
475
  } else if (event.content_block.type === "thinking") {
474
- output.content.push({
475
- type: "thinking",
476
- thinking: "",
477
- thinkingSignature: "",
478
- index: event.index,
479
- } as any);
476
+ output.content.push({ type: "thinking", thinking: "", thinkingSignature: "" });
477
+ openBlocks.set(event.index, { contentIndex: output.content.length - 1 });
480
478
  stream.push({ type: "thinking_start", contentIndex: output.content.length - 1, partial: output });
481
479
  } else if (event.content_block.type === "tool_use") {
482
480
  output.content.push({
@@ -484,15 +482,18 @@ function streamCustomAnthropic(
484
482
  id: event.content_block.id,
485
483
  name: isOAuth ? fromClaudeCodeName(event.content_block.name, tools) : event.content_block.name,
486
484
  arguments: {},
487
- partialJson: "",
488
- index: event.index,
489
- } as any);
485
+ });
486
+ openBlocks.set(event.index, {
487
+ contentIndex: output.content.length - 1,
488
+ arguments: new ToolCallArgumentsStream(),
489
+ });
490
490
  stream.push({ type: "toolcall_start", contentIndex: output.content.length - 1, partial: output });
491
491
  }
492
492
  } else if (event.type === "content_block_delta") {
493
- const index = blocks.findIndex((b) => b.index === event.index);
494
- const block = blocks[index];
495
- if (!block) continue;
493
+ const open = openBlocks.get(event.index);
494
+ if (!open) continue;
495
+ const index = open.contentIndex;
496
+ const block = output.content[index]!;
496
497
 
497
498
  if (event.delta.type === "text_delta" && block.type === "text") {
498
499
  block.text += event.delta.text;
@@ -505,11 +506,8 @@ function streamCustomAnthropic(
505
506
  delta: event.delta.thinking,
506
507
  partial: output,
507
508
  });
508
- } else if (event.delta.type === "input_json_delta" && block.type === "toolCall") {
509
- (block as any).partialJson += event.delta.partial_json;
510
- try {
511
- block.arguments = JSON.parse((block as any).partialJson);
512
- } catch {}
509
+ } else if (event.delta.type === "input_json_delta" && block.type === "toolCall" && open.arguments) {
510
+ block.arguments = open.arguments.append(event.delta.partial_json);
513
511
  stream.push({
514
512
  type: "toolcall_delta",
515
513
  contentIndex: index,
@@ -520,20 +518,19 @@ function streamCustomAnthropic(
520
518
  block.thinkingSignature = (block.thinkingSignature || "") + (event.delta as any).signature;
521
519
  }
522
520
  } else if (event.type === "content_block_stop") {
523
- const index = blocks.findIndex((b) => b.index === event.index);
524
- const block = blocks[index];
525
- if (!block) continue;
521
+ const open = openBlocks.get(event.index);
522
+ if (!open) continue;
523
+ openBlocks.delete(event.index);
524
+ const index = open.contentIndex;
525
+ const block = output.content[index]!;
526
526
 
527
- delete (block as any).index;
528
527
  if (block.type === "text") {
529
528
  stream.push({ type: "text_end", contentIndex: index, content: block.text, partial: output });
530
529
  } else if (block.type === "thinking") {
531
530
  stream.push({ type: "thinking_end", contentIndex: index, content: block.thinking, partial: output });
532
- } else if (block.type === "toolCall") {
533
- try {
534
- block.arguments = JSON.parse((block as any).partialJson);
535
- } catch {}
536
- delete (block as any).partialJson;
531
+ } else if (block.type === "toolCall" && open.arguments) {
532
+ // One full parse of the complete text; malformed arguments are reported in `argumentsError`.
533
+ Object.assign(block, open.arguments.finish());
537
534
  stream.push({ type: "toolcall_end", contentIndex: index, toolCall: block, partial: output });
538
535
  }
539
536
  } else if (event.type === "message_delta") {
@@ -563,7 +560,6 @@ function streamCustomAnthropic(
563
560
  stream.push({ type: "done", reason: output.stopReason, message: output });
564
561
  stream.end();
565
562
  } catch (error) {
566
- for (const block of output.content) delete (block as any).index;
567
563
  output.stopReason = options?.signal?.aborted ? "aborted" : "error";
568
564
  output.errorMessage = error instanceof Error ? error.message : JSON.stringify(error);
569
565
  stream.push({ type: "error", reason: output.stopReason, error: output });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "1.3.0",
9
+ "version": "1.5.0",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "1.3.0",
4
+ "version": "1.5.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "1.3.0",
4
+ "version": "1.5.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -6,7 +6,7 @@
6
6
  * as expandable custom entries.
7
7
  */
8
8
 
9
- import { type ExtensionAPI, keyHint } from "@earendil-works/pi-coding-agent";
9
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
10
10
  import { Box, Text } from "@earendil-works/pi-tui";
11
11
 
12
12
  const ENTRY_TYPE = "debug-provider-events";
@@ -24,7 +24,7 @@ export default function (pi: ExtensionAPI) {
24
24
  let activeEvents: unknown[] | undefined;
25
25
  let completedEntry: ProviderDebugEntry | undefined;
26
26
 
27
- pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded }, theme) => {
27
+ pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded, keyHint }, theme) => {
28
28
  const data = entry.data;
29
29
  if (!data) return new Text(theme.fg("warning", "[provider debug] Missing event data"), 0, 0);
30
30
 
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "1.3.0",
9
+ "version": "1.5.0",
10
10
  "dependencies": {
11
- "@earendil-works/gondolin": "0.12.0"
11
+ "@earendil-works/gondolin": "0.14.0"
12
12
  }
13
13
  },
14
14
  "node_modules/@cto.af/wtf8": {
@@ -21,31 +21,30 @@
21
21
  }
22
22
  },
23
23
  "node_modules/@earendil-works/gondolin": {
24
- "version": "0.12.0",
25
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.12.0.tgz",
26
- "integrity": "sha512-BXbvzQKb5QmxY5NtthRDONJTu7+IDKbzqWGrJyyNXMP7N681Tx0Q9TK8pK1ba8nUvYQTipNJyGZOsJfYiZll1A==",
24
+ "version": "0.14.0",
25
+ "resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.14.0.tgz",
26
+ "integrity": "sha512-MSw+EGcqFJeyKHdXEfm+nMRr74ytT4x8DGIohav0oPCHeVQAB9AajquM94cv2xqvIU3VDAaZZVC07IXsOY6OVQ==",
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
29
  "cbor2": "^2.3.0",
30
- "node-forge": "^1.3.3",
31
30
  "ssh2": "^1.17.0",
32
- "undici": "^6.21.0"
31
+ "undici": "^6.29.0"
33
32
  },
34
33
  "bin": {
35
34
  "gondolin": "dist/bin/gondolin.js"
36
35
  },
37
36
  "engines": {
38
- "node": ">=23.6.0"
37
+ "node": ">=22.19.0"
39
38
  },
40
39
  "optionalDependencies": {
41
- "@earendil-works/gondolin-krun-runner-darwin-arm64": "0.12.0",
42
- "@earendil-works/gondolin-krun-runner-linux-x64": "0.12.0"
40
+ "@earendil-works/gondolin-krun-runner-darwin-arm64": "0.14.0",
41
+ "@earendil-works/gondolin-krun-runner-linux-x64": "0.14.0"
43
42
  }
44
43
  },
45
44
  "node_modules/@earendil-works/gondolin-krun-runner-darwin-arm64": {
46
- "version": "0.12.0",
47
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.12.0.tgz",
48
- "integrity": "sha512-ftDlusht4PcT7Y3TuPrZIKrCXy3isiBTVMvlXYK0pcud2uXY6uwFTGeunYgP+8ND/60ddb+MImqbfmkcK8B84A==",
45
+ "version": "0.14.0",
46
+ "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.14.0.tgz",
47
+ "integrity": "sha512-fvuhz1CZPaEbmXC0luZoXd1obAb0bjaaGJz33Jo63bhMlosYunAahItakh7cU0dnTlNFzufOSnpGOPqtuYjnpQ==",
49
48
  "cpu": [
50
49
  "arm64"
51
50
  ],
@@ -59,9 +58,9 @@
59
58
  }
60
59
  },
61
60
  "node_modules/@earendil-works/gondolin-krun-runner-linux-x64": {
62
- "version": "0.12.0",
63
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.12.0.tgz",
64
- "integrity": "sha512-RRYsgwe2r5ApKmFNy469QgwnyjAHpAs9XANdWpTd9ol4iUYOY3sX7e0xIooAKxd+ktxGI4N/xRWicwGen3D/Ow==",
61
+ "version": "0.14.0",
62
+ "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.14.0.tgz",
63
+ "integrity": "sha512-91iw4smoOH/yOoAuQS6N2UZOxqSFwRhtk8rTyrokXBoWiWcveAzg4kHvnLcm40ZlNrWwzIDFrere4bkZeGDQcA==",
65
64
  "cpu": [
66
65
  "x64"
67
66
  ],
@@ -134,15 +133,6 @@
134
133
  "license": "MIT",
135
134
  "optional": true
136
135
  },
137
- "node_modules/node-forge": {
138
- "version": "1.4.0",
139
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
140
- "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
141
- "license": "(BSD-3-Clause OR GPL-2.0)",
142
- "engines": {
143
- "node": ">= 6.13.0"
144
- }
145
- },
146
136
  "node_modules/safer-buffer": {
147
137
  "version": "2.1.2",
148
138
  "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
@@ -173,9 +163,9 @@
173
163
  "license": "Unlicense"
174
164
  },
175
165
  "node_modules/undici": {
176
- "version": "6.26.0",
177
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz",
178
- "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==",
166
+ "version": "6.29.1",
167
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
168
+ "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
179
169
  "license": "MIT",
180
170
  "engines": {
181
171
  "node": ">=18.17"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "1.3.0",
4
+ "version": "1.5.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -14,6 +14,6 @@
14
14
  ]
15
15
  },
16
16
  "dependencies": {
17
- "@earendil-works/gondolin": "0.12.0"
17
+ "@earendil-works/gondolin": "0.14.0"
18
18
  }
19
19
  }
@@ -252,6 +252,8 @@ export default function presetExtension(pi: ExtensionAPI) {
252
252
  container.addChild(new DynamicBorder((str) => theme.fg("accent", str)));
253
253
 
254
254
  return {
255
+ // Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
256
+ capturesViewportInput: selectList.capturesViewportInput,
255
257
  render(width: number) {
256
258
  return container.render(width);
257
259
  },
@@ -2,7 +2,7 @@
2
2
  * Reload Runtime Extension
3
3
  *
4
4
  * Demonstrates ctx.reload() from ExtensionCommandContext and an LLM-callable
5
- * tool that queues a follow-up command to trigger reload.
5
+ * tool that requests a reload once the agent has settled.
6
6
  */
7
7
 
8
8
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
@@ -19,19 +19,31 @@ export default function (pi: ExtensionAPI) {
19
19
  },
20
20
  });
21
21
 
22
- // LLM-callable tool. Tools get ExtensionContext, so they cannot call ctx.reload() directly.
23
- // Instead, queue a follow-up user command that executes the command above.
22
+ // LLM-callable tool. Tools do not receive ExtensionCommandContext, so they cannot call
23
+ // ctx.reload(), and Pi cannot reload while the agent is running. The tool records the
24
+ // request and ends the run; the agent_settled handler then runs the command above.
25
+ let reloadRequested = false;
26
+
24
27
  pi.registerTool({
25
28
  name: "reload_runtime",
26
29
  label: "Reload Runtime",
27
30
  description: "Reload extensions, skills, prompts, themes, and context files",
28
31
  parameters: Type.Object({}),
29
32
  async execute() {
30
- pi.sendUserMessage("/reload-runtime", { deliverAs: "followUp" });
33
+ reloadRequested = true;
31
34
  return {
32
- content: [{ type: "text", text: "Queued /reload-runtime as a follow-up command." }],
35
+ content: [{ type: "text", text: "Reload requested. Pi reloads after this response." }],
33
36
  details: {},
37
+ terminate: true,
34
38
  };
35
39
  },
36
40
  });
41
+
42
+ pi.on("agent_settled", () => {
43
+ if (!reloadRequested) return;
44
+ reloadRequested = false;
45
+ // Sent from agent_settled, the command runs after every settled handler finishes, while
46
+ // the agent is idle. expandPromptTemplates dispatches it as a command, not as model input.
47
+ pi.sendUserMessage("/reload-runtime", { expandPromptTemplates: true });
48
+ });
37
49
  }
@@ -276,6 +276,13 @@ export default function (pi: ExtensionAPI) {
276
276
 
277
277
  case "clear":
278
278
  return new Text(theme.fg("success", "✓ ") + theme.fg("muted", "Cleared all todos"), 0, 0);
279
+
280
+ default:
281
+ return new Text(
282
+ result.content[0]?.type === "text" ? theme.fg("error", result.content[0].text) : "",
283
+ 0,
284
+ 0,
285
+ );
279
286
  }
280
287
  },
281
288
  });
@@ -117,6 +117,8 @@ export default function toolsExtension(pi: ExtensionAPI) {
117
117
  container.addChild(settingsList);
118
118
 
119
119
  const component = {
120
+ // Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
121
+ capturesViewportInput: settingsList.capturesViewportInput,
120
122
  render(width: number) {
121
123
  return container.render(width);
122
124
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "1.3.0",
9
+ "version": "1.5.0",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "1.3.0",
4
+ "version": "1.5.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",