pi-namespace-patch 1.4.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 (387) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +4 -4
  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 +7 -4
  6. package/dist/bundle/chunks/chunk-36QC74V4.js +2 -0
  7. package/dist/bundle/chunks/{chunk-FB6L7ZMV.js → chunk-3BE6TOTE.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-RWO6Q3KK.js → chunk-3TGLJEWK.js} +1 -1
  9. package/dist/bundle/chunks/chunk-4EYXVSA5.js +129 -0
  10. package/dist/bundle/chunks/{chunk-IUWY2KTF.js → chunk-62VOPMLK.js} +8 -7
  11. package/dist/bundle/chunks/chunk-7O7QKK6A.js +2 -0
  12. package/dist/bundle/chunks/chunk-AXIQEITU.js +1234 -0
  13. package/dist/bundle/chunks/{chunk-A45IWOC6.js → chunk-B46VJEHW.js} +2 -2
  14. package/dist/bundle/chunks/{chunk-TRERZKRC.js → chunk-C2WU32PX.js} +1 -1
  15. package/dist/bundle/chunks/chunk-CHWNPHIS.js +82 -0
  16. package/dist/bundle/chunks/{chunk-Z6I32PHA.js → chunk-EOO47QGR.js} +1 -1
  17. package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
  18. package/dist/bundle/chunks/{chunk-QSDU2SDK.js → chunk-GN3QYODH.js} +4 -4
  19. package/dist/bundle/chunks/chunk-NL4X6LBY.js +4 -0
  20. package/dist/bundle/chunks/chunk-NZY7EIPA.js +4 -0
  21. package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
  22. package/dist/bundle/chunks/{chunk-N43LRJ4N.js → chunk-R2EGYMOO.js} +3 -3
  23. package/dist/bundle/chunks/chunk-V6KH5QG4.js +9 -0
  24. package/dist/bundle/chunks/chunk-VOLAXWGI.js +2 -0
  25. package/dist/bundle/chunks/{chunk-RISAW7OQ.js → chunk-YZKQS34S.js} +2 -2
  26. package/dist/bundle/chunks/{cli-MIMUTM5L.js → cli-MCOUW5WS.js} +11 -9
  27. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-7J6REGDV.js → cloudflare-workers-ai-system-one-WLAFJSP6.js} +1 -1
  28. package/dist/bundle/chunks/{easter-egg-3d-RMLF7AC4.js → easter-egg-3d-WMBNSJ4M.js} +1 -1
  29. package/dist/bundle/chunks/{execute-MT7QEDSI.js → execute-4CEBORGZ.js} +1 -1
  30. package/dist/bundle/chunks/github-copilot.js +1 -1
  31. package/dist/bundle/chunks/{google-generative-ai-VPNFZDHO.js → google-generative-ai-INGKNW72.js} +1 -1
  32. package/dist/bundle/chunks/{google-vertex-ZFM23MQ4.js → google-vertex-IBTX6MBF.js} +1 -1
  33. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  34. package/dist/bundle/chunks/kimi-coding.js +1 -1
  35. package/dist/bundle/chunks/{llama-cpp-classify-U4EH6TAM.js → llama-cpp-classify-V5U3QKXI.js} +1 -1
  36. package/dist/bundle/chunks/meta.js +1 -1
  37. package/dist/bundle/chunks/mistral-conversations-S4OWXIXQ.js +5 -0
  38. package/dist/bundle/chunks/{openai-codex-responses-JQR3IK2C.js → openai-codex-responses-QAWLOQSN.js} +1 -1
  39. package/dist/bundle/chunks/openai-completions-EJNYB6IX.js +7 -0
  40. package/dist/bundle/chunks/{openai-decisions-MJYPUCLX.js → openai-decisions-IXI34BYG.js} +1 -1
  41. package/dist/bundle/chunks/{openai-responses-I2TBW7OL.js → openai-responses-MD3562FB.js} +1 -1
  42. package/dist/bundle/chunks/{openrouter-images-WBAVKHHY.js → openrouter-images-PISKSFMS.js} +1 -1
  43. package/dist/bundle/chunks/pi-messages-NORUKF4E.js +8 -0
  44. package/dist/bundle/chunks/radius.js +1 -1
  45. package/dist/bundle/chunks/{runtime-GJOZRI5I.js → runtime-FQB7RU7U.js} +1 -1
  46. package/dist/bundle/chunks/{typesafe-system-one-4C7ULOVP.js → typesafe-system-one-CHVC2UUI.js} +1 -1
  47. package/dist/bundle/chunks/virtual-modules-ZVUPOVM4.js +2 -0
  48. package/dist/bundle/cli-runtime.js +1 -1
  49. package/dist/bundle/index.js +1 -1
  50. package/dist/bundle/rpc-entry.js +1 -1
  51. package/dist/cli/args.d.ts.map +1 -1
  52. package/dist/cli/args.js +8 -7
  53. package/dist/cli/args.js.map +1 -1
  54. package/dist/config.d.ts +10 -0
  55. package/dist/config.d.ts.map +1 -1
  56. package/dist/config.js +24 -5
  57. package/dist/config.js.map +1 -1
  58. package/dist/core/agent-session-runtime.js +3 -3
  59. package/dist/core/agent-session-runtime.js.map +1 -1
  60. package/dist/core/agent-session.d.ts +6 -1
  61. package/dist/core/agent-session.d.ts.map +1 -1
  62. package/dist/core/agent-session.js +19 -1
  63. package/dist/core/agent-session.js.map +1 -1
  64. package/dist/core/bug-report.d.ts +4 -4
  65. package/dist/core/compaction/branch-summarization.d.ts +4 -2
  66. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  67. package/dist/core/compaction/branch-summarization.js +16 -4
  68. package/dist/core/compaction/branch-summarization.js.map +1 -1
  69. package/dist/core/exec.d.ts +9 -1
  70. package/dist/core/exec.d.ts.map +1 -1
  71. package/dist/core/exec.js +104 -60
  72. package/dist/core/exec.js.map +1 -1
  73. package/dist/core/export-html/template.css +9 -0
  74. package/dist/core/export-html/template.js +165 -45
  75. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  76. package/dist/core/export-html/tool-renderer.js +3 -0
  77. package/dist/core/export-html/tool-renderer.js.map +1 -1
  78. package/dist/core/extensions/index.d.ts +1 -1
  79. package/dist/core/extensions/index.d.ts.map +1 -1
  80. package/dist/core/extensions/index.js.map +1 -1
  81. package/dist/core/extensions/loader.d.ts.map +1 -1
  82. package/dist/core/extensions/loader.js +7 -6
  83. package/dist/core/extensions/loader.js.map +1 -1
  84. package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
  85. package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
  86. package/dist/core/extensions/pi-ai-extension-view.js +22 -0
  87. package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
  88. package/dist/core/extensions/types.d.ts +27 -4
  89. package/dist/core/extensions/types.d.ts.map +1 -1
  90. package/dist/core/extensions/types.js.map +1 -1
  91. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  92. package/dist/core/extensions/virtual-modules.js +8 -7
  93. package/dist/core/extensions/virtual-modules.js.map +1 -1
  94. package/dist/core/mcp-servers.d.ts +11 -4
  95. package/dist/core/mcp-servers.d.ts.map +1 -1
  96. package/dist/core/mcp-servers.js +15 -5
  97. package/dist/core/mcp-servers.js.map +1 -1
  98. package/dist/core/model-config.d.ts +1678 -2029
  99. package/dist/core/model-config.d.ts.map +1 -1
  100. package/dist/core/model-config.js +2 -3
  101. package/dist/core/model-config.js.map +1 -1
  102. package/dist/core/model-resolver.d.ts.map +1 -1
  103. package/dist/core/model-resolver.js +16 -10
  104. package/dist/core/model-resolver.js.map +1 -1
  105. package/dist/core/package-manager.d.ts +14 -0
  106. package/dist/core/package-manager.d.ts.map +1 -1
  107. package/dist/core/package-manager.js +165 -51
  108. package/dist/core/package-manager.js.map +1 -1
  109. package/dist/core/pi-ai-schemas.d.ts +163 -0
  110. package/dist/core/pi-ai-schemas.d.ts.map +1 -0
  111. package/dist/core/pi-ai-schemas.js +21 -0
  112. package/dist/core/pi-ai-schemas.js.map +1 -0
  113. package/dist/core/pi-manifest.d.ts +1 -0
  114. package/dist/core/pi-manifest.d.ts.map +1 -1
  115. package/dist/core/pi-manifest.js +4 -0
  116. package/dist/core/pi-manifest.js.map +1 -1
  117. package/dist/core/project-trust.js +1 -1
  118. package/dist/core/project-trust.js.map +1 -1
  119. package/dist/core/resource-loader.d.ts +4 -1
  120. package/dist/core/resource-loader.d.ts.map +1 -1
  121. package/dist/core/resource-loader.js +39 -24
  122. package/dist/core/resource-loader.js.map +1 -1
  123. package/dist/core/sdk.d.ts.map +1 -1
  124. package/dist/core/sdk.js +3 -1
  125. package/dist/core/sdk.js.map +1 -1
  126. package/dist/core/session-manager.d.ts +7 -0
  127. package/dist/core/session-manager.d.ts.map +1 -1
  128. package/dist/core/session-manager.js +32 -13
  129. package/dist/core/session-manager.js.map +1 -1
  130. package/dist/core/settings-manager.d.ts +2 -0
  131. package/dist/core/settings-manager.d.ts.map +1 -1
  132. package/dist/core/settings-manager.js +11 -0
  133. package/dist/core/settings-manager.js.map +1 -1
  134. package/dist/core/settings-schema.d.ts +4 -2
  135. package/dist/core/settings-schema.d.ts.map +1 -1
  136. package/dist/core/settings-schema.js +8 -1
  137. package/dist/core/settings-schema.js.map +1 -1
  138. package/dist/core/skills.d.ts.map +1 -1
  139. package/dist/core/skills.js +6 -14
  140. package/dist/core/skills.js.map +1 -1
  141. package/dist/core/slash-commands.js +2 -2
  142. package/dist/core/slash-commands.js.map +1 -1
  143. package/dist/core/source-info.d.ts +9 -0
  144. package/dist/core/source-info.d.ts.map +1 -1
  145. package/dist/core/source-info.js +13 -0
  146. package/dist/core/source-info.js.map +1 -1
  147. package/dist/core/system-prompt.d.ts.map +1 -1
  148. package/dist/core/system-prompt.js +5 -6
  149. package/dist/core/system-prompt.js.map +1 -1
  150. package/dist/core/tools/bash.d.ts +2 -2
  151. package/dist/core/tools/bash.d.ts.map +1 -1
  152. package/dist/core/tools/bash.js.map +1 -1
  153. package/dist/core/tools/edit.d.ts +3 -3
  154. package/dist/core/tools/edit.d.ts.map +1 -1
  155. package/dist/core/tools/edit.js +2 -4
  156. package/dist/core/tools/edit.js.map +1 -1
  157. package/dist/core/tools/find.d.ts +2 -2
  158. package/dist/core/tools/find.d.ts.map +1 -1
  159. package/dist/core/tools/find.js.map +1 -1
  160. package/dist/core/tools/grep.d.ts +2 -2
  161. package/dist/core/tools/grep.d.ts.map +1 -1
  162. package/dist/core/tools/grep.js +1 -1
  163. package/dist/core/tools/grep.js.map +1 -1
  164. package/dist/core/tools/ls.d.ts +2 -2
  165. package/dist/core/tools/ls.d.ts.map +1 -1
  166. package/dist/core/tools/ls.js.map +1 -1
  167. package/dist/core/tools/read.d.ts +2 -2
  168. package/dist/core/tools/read.d.ts.map +1 -1
  169. package/dist/core/tools/read.js.map +1 -1
  170. package/dist/core/tools/render-utils.d.ts.map +1 -1
  171. package/dist/core/tools/render-utils.js +2 -7
  172. package/dist/core/tools/render-utils.js.map +1 -1
  173. package/dist/core/tools/renderers/write.d.ts.map +1 -1
  174. package/dist/core/tools/renderers/write.js +19 -19
  175. package/dist/core/tools/renderers/write.js.map +1 -1
  176. package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
  177. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  178. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  179. package/dist/core/tools/write.d.ts +2 -2
  180. package/dist/core/tools/write.d.ts.map +1 -1
  181. package/dist/core/tools/write.js.map +1 -1
  182. package/dist/core/trust-manager.d.ts.map +1 -1
  183. package/dist/core/trust-manager.js +14 -8
  184. package/dist/core/trust-manager.js.map +1 -1
  185. package/dist/core/usage-totals.d.ts.map +1 -1
  186. package/dist/core/usage-totals.js +2 -0
  187. package/dist/core/usage-totals.js.map +1 -1
  188. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  189. package/dist/extensions/codemode/renderer.js +6 -2
  190. package/dist/extensions/codemode/renderer.js.map +1 -1
  191. package/dist/extensions/codemode/tool.d.ts +2 -1
  192. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  193. package/dist/extensions/codemode/tool.js +33 -8
  194. package/dist/extensions/codemode/tool.js.map +1 -1
  195. package/dist/extensions/llama/ui.d.ts.map +1 -1
  196. package/dist/extensions/llama/ui.js +16 -4
  197. package/dist/extensions/llama/ui.js.map +1 -1
  198. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  199. package/dist/extensions/mcp/cli.js +34 -8
  200. package/dist/extensions/mcp/cli.js.map +1 -1
  201. package/dist/extensions/mcp/oauth.d.ts +1 -1
  202. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  203. package/dist/extensions/mcp/oauth.js +36 -13
  204. package/dist/extensions/mcp/oauth.js.map +1 -1
  205. package/dist/extensions/mcp/ui.d.ts +1 -0
  206. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  207. package/dist/extensions/mcp/ui.js +33 -24
  208. package/dist/extensions/mcp/ui.js.map +1 -1
  209. package/dist/extensions/tool-search/tool.d.ts +21 -6
  210. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  211. package/dist/extensions/tool-search/tool.js +104 -36
  212. package/dist/extensions/tool-search/tool.js.map +1 -1
  213. package/dist/index.d.ts +2 -2
  214. package/dist/index.d.ts.map +1 -1
  215. package/dist/index.js.map +1 -1
  216. package/dist/main.d.ts.map +1 -1
  217. package/dist/main.js +15 -8
  218. package/dist/main.js.map +1 -1
  219. package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
  220. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  221. package/dist/modes/interactive/components/assistant-message.js +45 -21
  222. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  223. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  224. package/dist/modes/interactive/components/config-selector.js +4 -17
  225. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  226. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  227. package/dist/modes/interactive/components/custom-editor.js +7 -0
  228. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  229. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  230. package/dist/modes/interactive/components/custom-entry.js +2 -1
  231. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  232. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  233. package/dist/modes/interactive/components/custom-message.js +2 -1
  234. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  235. package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
  236. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  237. package/dist/modes/interactive/components/extension-editor.js +4 -0
  238. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  239. package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
  240. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  241. package/dist/modes/interactive/components/login-dialog.js +105 -10
  242. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  243. package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
  244. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/markdown-transform.js +3 -2
  246. package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
  247. package/dist/modes/interactive/components/model-selector.d.ts +1 -0
  248. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  249. package/dist/modes/interactive/components/model-selector.js +17 -6
  250. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  251. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
  252. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  253. package/dist/modes/interactive/components/oauth-selector.js +13 -4
  254. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  255. package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
  256. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  257. package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
  258. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  259. package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
  260. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  261. package/dist/modes/interactive/components/session-selector-search.js +86 -22
  262. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  263. package/dist/modes/interactive/components/session-selector.d.ts +2 -1
  264. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  265. package/dist/modes/interactive/components/session-selector.js +16 -24
  266. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  267. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  268. package/dist/modes/interactive/components/settings-submenu.js +2 -0
  269. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  270. package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
  271. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  272. package/dist/modes/interactive/components/tool-execution.js +14 -2
  273. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  274. package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
  275. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  276. package/dist/modes/interactive/components/tree-selector.js +5 -6
  277. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  278. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
  279. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  280. package/dist/modes/interactive/components/user-message-selector.js +9 -1
  281. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  282. package/dist/modes/interactive/components/user-message.d.ts +3 -1
  283. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  284. package/dist/modes/interactive/components/user-message.js +6 -2
  285. package/dist/modes/interactive/components/user-message.js.map +1 -1
  286. package/dist/modes/interactive/external-editor.d.ts +1 -0
  287. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  288. package/dist/modes/interactive/external-editor.js +16 -4
  289. package/dist/modes/interactive/external-editor.js.map +1 -1
  290. package/dist/modes/interactive/interactive-mode.d.ts +5 -0
  291. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  292. package/dist/modes/interactive/interactive-mode.js +154 -45
  293. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  294. package/dist/modes/interactive/model-search.d.ts +10 -0
  295. package/dist/modes/interactive/model-search.d.ts.map +1 -1
  296. package/dist/modes/interactive/model-search.js +21 -0
  297. package/dist/modes/interactive/model-search.js.map +1 -1
  298. package/dist/modes/interactive/theme/theme.d.ts +10 -0
  299. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  300. package/dist/modes/interactive/theme/theme.js +31 -23
  301. package/dist/modes/interactive/theme/theme.js.map +1 -1
  302. package/dist/package-manager-cli.d.ts.map +1 -1
  303. package/dist/package-manager-cli.js +55 -4
  304. package/dist/package-manager-cli.js.map +1 -1
  305. package/dist/utils/ansi.d.ts.map +1 -1
  306. package/dist/utils/ansi.js +5 -2
  307. package/dist/utils/ansi.js.map +1 -1
  308. package/dist/utils/clipboard-command.d.ts.map +1 -1
  309. package/dist/utils/clipboard-command.js +4 -0
  310. package/dist/utils/clipboard-command.js.map +1 -1
  311. package/dist/utils/git.d.ts +1 -1
  312. package/dist/utils/git.d.ts.map +1 -1
  313. package/dist/utils/git.js.map +1 -1
  314. package/dist/utils/image-resize-core.d.ts.map +1 -1
  315. package/dist/utils/image-resize-core.js +5 -3
  316. package/dist/utils/image-resize-core.js.map +1 -1
  317. package/dist/utils/open-browser.d.ts.map +1 -1
  318. package/dist/utils/open-browser.js +4 -1
  319. package/dist/utils/open-browser.js.map +1 -1
  320. package/dist/utils/paths.d.ts +17 -0
  321. package/dist/utils/paths.d.ts.map +1 -1
  322. package/dist/utils/paths.js +42 -1
  323. package/dist/utils/paths.js.map +1 -1
  324. package/dist/utils/shell.d.ts.map +1 -1
  325. package/dist/utils/shell.js +14 -0
  326. package/dist/utils/shell.js.map +1 -1
  327. package/dist/utils/syntax-highlight.d.ts +5 -0
  328. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  329. package/dist/utils/syntax-highlight.js +7 -0
  330. package/dist/utils/syntax-highlight.js.map +1 -1
  331. package/dist/utils/tools-manager.d.ts.map +1 -1
  332. package/dist/utils/tools-manager.js +30 -35
  333. package/dist/utils/tools-manager.js.map +1 -1
  334. package/docs/cli.md +21 -11
  335. package/docs/custom-provider.md +2 -0
  336. package/docs/environment-variables.md +2 -0
  337. package/docs/extensions.md +3172 -225
  338. package/docs/keybindings.md +1 -1
  339. package/docs/llama-cpp.md +23 -12
  340. package/docs/mcp.md +6 -4
  341. package/docs/message-types.md +1 -1
  342. package/docs/packages.md +24 -0
  343. package/docs/quickstart.md +7 -3
  344. package/docs/sessions.md +11 -3
  345. package/docs/settings.md +5 -4
  346. package/docs/slash-commands.md +3 -2
  347. package/docs/terminal-setup.md +3 -1
  348. package/docs/tmux.md +6 -0
  349. package/docs/tui.md +2 -0
  350. package/docs/windows.md +27 -0
  351. package/examples/extensions/README.md +2 -1
  352. package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
  353. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  354. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  355. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  356. package/examples/extensions/debug-provider.ts +2 -2
  357. package/examples/extensions/gondolin/package-lock.json +19 -29
  358. package/examples/extensions/gondolin/package.json +2 -2
  359. package/examples/extensions/preset.ts +2 -0
  360. package/examples/extensions/reload-runtime.ts +17 -5
  361. package/examples/extensions/todo.ts +7 -0
  362. package/examples/extensions/tools.ts +2 -0
  363. package/examples/extensions/with-deps/package-lock.json +2 -2
  364. package/examples/extensions/with-deps/package.json +1 -1
  365. package/examples/tsconfig.json +180 -0
  366. package/package.json +13 -14
  367. package/schemas/models.schema.json +36 -36
  368. package/schemas/settings.schema.json +17 -0
  369. package/dist/bundle/chunks/anthropic-messages-5FHV3XZG.js +0 -6
  370. package/dist/bundle/chunks/azure-openai-responses-KLTRI2FU.js +0 -2
  371. package/dist/bundle/chunks/chunk-3V45WARH.js +0 -7
  372. package/dist/bundle/chunks/chunk-4GGCU36O.js +0 -11
  373. package/dist/bundle/chunks/chunk-BSS6T6KQ.js +0 -2
  374. package/dist/bundle/chunks/chunk-EGE5YVUM.js +0 -82
  375. package/dist/bundle/chunks/chunk-H76KZMOI.js +0 -2
  376. package/dist/bundle/chunks/chunk-INGZIYBC.js +0 -4
  377. package/dist/bundle/chunks/chunk-NFLURVK3.js +0 -2
  378. package/dist/bundle/chunks/chunk-T726RZZU.js +0 -131
  379. package/dist/bundle/chunks/chunk-TEPMHNKQ.js +0 -2
  380. package/dist/bundle/chunks/chunk-ZEIZZEGK.js +0 -1222
  381. package/dist/bundle/chunks/mistral-conversations-WCAJTBXO.js +0 -5
  382. package/dist/bundle/chunks/openai-completions-27RKPL37.js +0 -7
  383. package/dist/bundle/chunks/pi-messages-S7RKCD5K.js +0 -8
  384. package/dist/bundle/chunks/virtual-modules-6XWNE4NR.js +0 -2
  385. package/examples/extensions/sandbox/index.ts +0 -321
  386. package/examples/extensions/sandbox/package-lock.json +0 -92
  387. package/examples/extensions/sandbox/package.json +0 -19
@@ -29,6 +29,7 @@ import { RADIUS_MCP_URL, RADIUS_PROVIDER_ID } from "../../core/radius.js";
29
29
  import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
30
30
  import { SessionManager, sessionEntryToContextMessages, } from "../../core/session-manager.js";
31
31
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
32
+ import { getSourcePackageKey } from "../../core/source-info.js";
32
33
  import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
33
34
  import { withBuiltInRenderers } from "../../core/tools/renderers/index.js";
34
35
  import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
@@ -39,10 +40,11 @@ import { copyToClipboard, readClipboardFilePaths, readClipboardText } from "../.
39
40
  import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
40
41
  import { parseGitUrl } from "../../utils/git.js";
41
42
  import { ensurePngTranscoder } from "../../utils/image-convert.js";
42
- import { getCwdRelativePath } from "../../utils/paths.js";
43
+ import { getCwdRelativePath, shortenHomePath } from "../../utils/paths.js";
43
44
  import { getPiUserAgent } from "../../utils/pi-user-agent.js";
44
45
  import { killTrackedDetachedChildren } from "../../utils/shell.js";
45
46
  import { loadAllHighlightLanguages } from "../../utils/syntax-highlight.js";
47
+ import { stripBom } from "../../utils/text.js";
46
48
  import { ensureTool } from "../../utils/tools-manager.js";
47
49
  import { checkForNewPiVersion } from "../../utils/version-check.js";
48
50
  import { reportBug } from "./bug-report.js";
@@ -274,6 +276,7 @@ export class InteractiveMode {
274
276
  lastSigintTime = 0;
275
277
  lastEscapeTime = 0;
276
278
  changelogMarkdown = undefined;
279
+ extensionChangelogUpdates = [];
277
280
  startupNoticesShown = false;
278
281
  anthropicSubscriptionWarningShown = false;
279
282
  // Status line tracking (for mutating immediately-sequential status updates)
@@ -573,24 +576,44 @@ export class InteractiveMode {
573
576
  return;
574
577
  }
575
578
  this.startupNoticesShown = true;
576
- if (!this.changelogMarkdown) {
579
+ if (!this.changelogMarkdown && this.extensionChangelogUpdates.length === 0) {
577
580
  return;
578
581
  }
579
582
  if (this.chatContainer.children.length > 0) {
580
583
  this.chatContainer.addChild(new Spacer(1));
581
584
  }
582
585
  this.chatContainer.addChild(new DynamicBorder());
583
- if (this.settingsManager.getCollapseChangelog()) {
584
- const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
585
- const latestVersion = versionMatch ? versionMatch[1] : this.version;
586
- const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
587
- this.chatContainer.addChild(new Text(condensedText, 1, 0));
586
+ if (this.changelogMarkdown) {
587
+ if (this.settingsManager.getCollapseChangelog()) {
588
+ const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
589
+ const latestVersion = versionMatch ? versionMatch[1] : this.version;
590
+ const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
591
+ this.chatContainer.addChild(new Text(condensedText, 1, 0));
592
+ }
593
+ else {
594
+ this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
595
+ this.chatContainer.addChild(new Spacer(1));
596
+ this.chatContainer.addChild(new Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()));
597
+ this.chatContainer.addChild(new Spacer(1));
598
+ }
588
599
  }
589
- else {
590
- this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
591
- this.chatContainer.addChild(new Spacer(1));
592
- this.chatContainer.addChild(new Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()));
593
- this.chatContainer.addChild(new Spacer(1));
600
+ if (this.extensionChangelogUpdates.length > 0) {
601
+ if (this.changelogMarkdown) {
602
+ this.chatContainer.addChild(new Spacer(1));
603
+ }
604
+ if (this.settingsManager.getCollapseChangelog()) {
605
+ const condensedText = this.extensionChangelogUpdates
606
+ .map((update) => `Updated ${update.name} to v${update.version}.`)
607
+ .join("\n");
608
+ this.chatContainer.addChild(new Text(condensedText, 1, 0));
609
+ }
610
+ else {
611
+ this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "Extension Updates")), 1, 0));
612
+ this.chatContainer.addChild(new Spacer(1));
613
+ const markdown = this.extensionChangelogUpdates.map((update) => update.markdown).join("\n\n");
614
+ this.chatContainer.addChild(new Markdown(markdown, 1, 0, this.getMarkdownThemeWithSettings()));
615
+ this.chatContainer.addChild(new Spacer(1));
616
+ }
594
617
  }
595
618
  this.chatContainer.addChild(new DynamicBorder());
596
619
  }
@@ -667,20 +690,15 @@ export class InteractiveMode {
667
690
  if (this.isInitialized)
668
691
  return;
669
692
  this.registerSignalHandlers();
670
- // Load changelog (only show new entries, skip for resumed sessions)
693
+ // Load changelogs (only show new entries, skip for resumed sessions)
671
694
  this.changelogMarkdown = this.getChangelogForDisplay();
672
- if (this.session.scopedModels.length > 0 && this.shouldShowStartupDetails()) {
673
- const modelList = this.session.scopedModels
674
- .map((sm) => {
675
- const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
676
- return `${sm.model.id}${thinkingStr}`;
677
- })
678
- .join(", ");
679
- const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
680
- const cycleHint = cycleKeys.length > 0
681
- ? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
682
- : "";
683
- console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
695
+ this.extensionChangelogUpdates = this.getExtensionChangelogUpdates();
696
+ // Fullscreen renders on the alternate screen, so text printed to stdout here would stay in the shell
697
+ // after exit. Fullscreen shows the notice in the header instead (#11508).
698
+ if (this.renderer.mode !== "fullscreen") {
699
+ const modelScopeNotice = this.getModelScopeNotice();
700
+ if (modelScopeNotice)
701
+ console.log(modelScopeNotice);
684
702
  }
685
703
  // Keep one component tree and remount it when changing renderers.
686
704
  this.renderWidgets(); // Initialize with default spacer
@@ -780,6 +798,8 @@ export class InteractiveMode {
780
798
  this.builtInHeader = new Text("", 0, 0);
781
799
  this.headerContainer.addChild(this.builtInHeader);
782
800
  }
801
+ if (this.renderer.mode === "fullscreen")
802
+ this.showFullscreenModelScopeNotice();
783
803
  this.ui.requestRender();
784
804
  // Ensure fd and rg are available after mounting the TUI (downloads if missing, adds to PATH via getBinDir)
785
805
  // so slow downloads do not make startup appear frozen.
@@ -1017,6 +1037,58 @@ export class InteractiveMode {
1017
1037
  }
1018
1038
  return undefined;
1019
1039
  }
1040
+ getExtensionChangelogUpdates() {
1041
+ // Skip changelog for resumed/continued sessions (already have messages)
1042
+ if (this.session.state.messages.length > 0) {
1043
+ return [];
1044
+ }
1045
+ const seenKeys = new Set();
1046
+ const updates = [];
1047
+ for (const { sourceInfo } of this.session.resourceLoader.getExtensions().extensions) {
1048
+ if (sourceInfo.origin !== "package" || !sourceInfo.baseDir || !sourceInfo.changelogPath) {
1049
+ continue;
1050
+ }
1051
+ const key = getSourcePackageKey(sourceInfo);
1052
+ if (seenKeys.has(key)) {
1053
+ continue;
1054
+ }
1055
+ seenKeys.add(key);
1056
+ const pkg = this.readPackageJson(sourceInfo.baseDir);
1057
+ if (!pkg?.version) {
1058
+ continue;
1059
+ }
1060
+ const lastVersion = this.settingsManager.getExtensionChangelogVersion(key);
1061
+ if (!lastVersion) {
1062
+ // Fresh install - record the version, don't show changelog
1063
+ this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1064
+ continue;
1065
+ }
1066
+ const newEntries = getNewEntries(parseChangelog(sourceInfo.changelogPath), lastVersion);
1067
+ if (newEntries.length > 0) {
1068
+ this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
1069
+ const name = pkg.name || sourceInfo.source;
1070
+ // Prefix each "## [x.y.z]" heading with the package name so entries render like Pi's own.
1071
+ const markdown = newEntries
1072
+ .map((entry) => entry.content.replace(/^##\s+/, `## ${name} `))
1073
+ .join("\n\n")
1074
+ .trim();
1075
+ updates.push({ name, version: pkg.version, markdown });
1076
+ }
1077
+ }
1078
+ return updates;
1079
+ }
1080
+ readPackageJson(packageRoot) {
1081
+ try {
1082
+ const pkg = JSON.parse(stripBom(fs.readFileSync(path.join(packageRoot, "package.json"), "utf-8")));
1083
+ return {
1084
+ name: typeof pkg.name === "string" ? pkg.name : undefined,
1085
+ version: typeof pkg.version === "string" ? pkg.version : undefined,
1086
+ };
1087
+ }
1088
+ catch {
1089
+ return undefined;
1090
+ }
1091
+ }
1020
1092
  reportInstallTelemetry(version) {
1021
1093
  if (process.env.PI_OFFLINE) {
1022
1094
  return;
@@ -1043,13 +1115,7 @@ export class InteractiveMode {
1043
1115
  // Extension System
1044
1116
  // =========================================================================
1045
1117
  formatDisplayPath(p) {
1046
- const home = os.homedir();
1047
- let result = p;
1048
- // Replace home directory with ~
1049
- if (result.startsWith(home)) {
1050
- result = `~${result.slice(home.length)}`;
1051
- }
1052
- return result;
1118
+ return shortenHomePath(p);
1053
1119
  }
1054
1120
  formatExtensionDisplayPath(path) {
1055
1121
  let result = this.formatDisplayPath(path);
@@ -1073,6 +1139,27 @@ export class InteractiveMode {
1073
1139
  return this.options.verbose === true || this.settingsManager.getQuietStartup() !== true;
1074
1140
  }
1075
1141
  /** Startup details (model scope, loaded resources). Hidden by quietStartup: true or "header". */
1142
+ getModelScopeNotice() {
1143
+ if (this.session.scopedModels.length === 0 || !this.shouldShowStartupDetails())
1144
+ return undefined;
1145
+ const modelList = this.session.scopedModels
1146
+ .map((sm) => {
1147
+ const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
1148
+ return `${sm.model.id}${thinkingStr}`;
1149
+ })
1150
+ .join(", ");
1151
+ const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
1152
+ const cycleHint = cycleKeys.length > 0
1153
+ ? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
1154
+ : "";
1155
+ return theme.fg("dim", `Model scope: ${modelList}${cycleHint}`);
1156
+ }
1157
+ showFullscreenModelScopeNotice() {
1158
+ if (!this.getModelScopeNotice())
1159
+ return;
1160
+ this.headerContainer.addChild(new ThemedText(() => this.getModelScopeNotice() ?? "", 1, 0));
1161
+ this.headerContainer.addChild(new Spacer(1));
1162
+ }
1076
1163
  shouldShowStartupDetails() {
1077
1164
  return this.options.verbose === true || this.settingsManager.getQuietStartup() === false;
1078
1165
  }
@@ -1443,7 +1530,7 @@ export class InteractiveMode {
1443
1530
  const skillDiagnostics = skillsResult.diagnostics;
1444
1531
  if (skillDiagnostics.length > 0) {
1445
1532
  const warningLines = () => this.formatDiagnostics(skillDiagnostics, sourceInfos);
1446
- this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill conflicts]")}\n${warningLines()}`, 0, 0));
1533
+ this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill warnings]")}\n${warningLines()}`, 0, 0));
1447
1534
  this.loadedResourcesContainer.addChild(new Spacer(1));
1448
1535
  }
1449
1536
  const promptDiagnostics = promptsResult.diagnostics;
@@ -2217,8 +2304,12 @@ export class InteractiveMode {
2217
2304
  this.editorComponentFactory = factory;
2218
2305
  // Save text from current editor before switching
2219
2306
  const currentText = this.editor.getText();
2220
- this.disposeActiveSelector();
2221
- this.editorContainer.clear();
2307
+ // An open extension dialog keeps the editor slot; the new editor is shown when the last dialog closes.
2308
+ const dialogOpen = this.extensionDialogs.length > 0;
2309
+ if (!dialogOpen) {
2310
+ this.disposeActiveSelector();
2311
+ this.editorContainer.clear();
2312
+ }
2222
2313
  if (factory) {
2223
2314
  // Create the custom editor with tui, theme, and keybindings
2224
2315
  const newEditor = factory(this.ui, getEditorTheme(), this.keybindings);
@@ -2269,7 +2360,8 @@ export class InteractiveMode {
2269
2360
  this.defaultEditor.setText(currentText);
2270
2361
  this.editor = this.defaultEditor;
2271
2362
  }
2272
- this.editorContainer.addChild(this.editor);
2363
+ if (!dialogOpen)
2364
+ this.editorContainer.addChild(this.editor);
2273
2365
  if (this.activeStatusIndicator) {
2274
2366
  this.statusContainer.clear();
2275
2367
  this.activeWorkingIndicatorEmbedded = this.setEditorWorkingStatusIndicator(this.activeStatusIndicator);
@@ -2277,7 +2369,8 @@ export class InteractiveMode {
2277
2369
  this.statusContainer.addChild(this.activeStatusIndicator);
2278
2370
  }
2279
2371
  }
2280
- this.ui.setFocus(this.editor);
2372
+ if (!dialogOpen)
2373
+ this.ui.setFocus(this.editor);
2281
2374
  this.ui.requestRender();
2282
2375
  }
2283
2376
  /**
@@ -2349,7 +2442,7 @@ export class InteractiveMode {
2349
2442
  options?.onHandle?.(overlayHandle);
2350
2443
  }
2351
2444
  else {
2352
- this.pushExtensionDialog(c);
2445
+ this.pushExtensionDialog(c, options?.blocked);
2353
2446
  }
2354
2447
  })
2355
2448
  .catch((err) => {
@@ -3170,12 +3263,12 @@ export class InteractiveMode {
3170
3263
  // Render user message separately if present
3171
3264
  if (skillBlock.userMessage) {
3172
3265
  this.chatContainer.addChild(new Spacer(1));
3173
- const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
3266
+ const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3174
3267
  this.chatContainer.addChild(userComponent);
3175
3268
  }
3176
3269
  }
3177
3270
  else {
3178
- const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
3271
+ const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3179
3272
  this.chatContainer.addChild(userComponent);
3180
3273
  }
3181
3274
  if (options?.populateHistory) {
@@ -3185,7 +3278,7 @@ export class InteractiveMode {
3185
3278
  break;
3186
3279
  }
3187
3280
  case "assistant": {
3188
- const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers());
3281
+ const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
3189
3282
  this.chatContainer.addChild(assistantComponent);
3190
3283
  break;
3191
3284
  }
@@ -3198,7 +3291,7 @@ export class InteractiveMode {
3198
3291
  }
3199
3292
  }
3200
3293
  }
3201
- renderSessionItems(items, options = {}) {
3294
+ renderSessionItems(items, messageMeta, options = {}) {
3202
3295
  this.pendingTools.clear();
3203
3296
  const renderedPendingTools = new Map();
3204
3297
  // Cache misses are not persisted, unlike successful cache-warming usage.
@@ -3226,7 +3319,11 @@ export class InteractiveMode {
3226
3319
  const message = item;
3227
3320
  // Assistant messages need special handling for tool calls
3228
3321
  if (message.role === "assistant") {
3229
- this.addMessageToChat(message);
3322
+ const meta = messageMeta?.get(message);
3323
+ this.addMessageToChat(message, {
3324
+ messageId: meta?.id,
3325
+ timestamp: meta?.timestamp,
3326
+ });
3230
3327
  // Render tool call components
3231
3328
  for (const content of message.content) {
3232
3329
  if (content.type === "toolCall") {
@@ -3272,7 +3369,12 @@ export class InteractiveMode {
3272
3369
  }
3273
3370
  else {
3274
3371
  // All other messages use standard rendering
3275
- this.addMessageToChat(message, options);
3372
+ const meta = messageMeta?.get(message);
3373
+ this.addMessageToChat(message, {
3374
+ ...options,
3375
+ messageId: meta?.id,
3376
+ timestamp: meta?.timestamp,
3377
+ });
3276
3378
  }
3277
3379
  }
3278
3380
  for (const [toolCallId, component] of renderedPendingTools) {
@@ -3290,17 +3392,21 @@ export class InteractiveMode {
3290
3392
  // Selection coordinates point into the transcript being replaced (#9311).
3291
3393
  if (this.renderer instanceof TuiAltScreen)
3292
3394
  this.renderer.resetTextSelection();
3395
+ const messageMeta = new Map();
3293
3396
  const items = entries.flatMap((entry) => {
3294
3397
  if (entry.type === "custom" || (entry.type === "usage" && entry.kind === "cache_warm")) {
3295
3398
  return [entry];
3296
3399
  }
3297
3400
  const messages = sessionEntryToContextMessages(entry);
3401
+ for (const msg of messages) {
3402
+ messageMeta.set(msg, { id: entry.id, timestamp: entry.timestamp });
3403
+ }
3298
3404
  if ((entry.type === "compaction" || entry.type === "branch_summary") && entry.usage && messages.length > 0) {
3299
3405
  return [...messages, { type: "compaction_cost", kind: entry.type, usage: entry.usage }];
3300
3406
  }
3301
3407
  return messages;
3302
3408
  });
3303
- this.renderSessionItems(items, options);
3409
+ this.renderSessionItems(items, messageMeta, options);
3304
3410
  }
3305
3411
  addCacheWarmingUsage(entry) {
3306
3412
  if (!this.settingsManager.getShowCacheMissNotices())
@@ -3749,6 +3855,9 @@ export class InteractiveMode {
3749
3855
  if (result.status === "complete") {
3750
3856
  this.editor.setText(result.content);
3751
3857
  }
3858
+ else {
3859
+ this.showStatus(result.message);
3860
+ }
3752
3861
  }
3753
3862
  finally {
3754
3863
  this.ui.start();