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
@@ -98,7 +98,7 @@ The dedicated history actions browse prompt history regardless of cursor positio
98
98
 
99
99
  #### Fullscreen
100
100
 
101
- In fullscreen mode, these actions control the transcript and take precedence over editor actions using the same key.
101
+ In fullscreen mode, these actions control the transcript and take precedence over editor actions using the same key. While an overlay or a scrollable list such as autocomplete, `/settings`, or the model selector has focus, the scrolling and prompt-jump actions go to it instead of the transcript, so `tui.select.pageUp` and `tui.select.pageDown` move the list selection. Transcript search actions keep working.
102
102
 
103
103
  | Keybinding id | Default | Description |
104
104
  |---|---|---|
package/docs/llama-cpp.md CHANGED
@@ -1,31 +1,42 @@
1
1
  # Local Models with llama.cpp
2
2
 
3
- Pi supports the [llama.cpp](https://github.com/ggml-org/llama.cpp) router server. The router discovers multiple GGUF models and loads or unloads them on demand.
3
+ Pi supports the [llama.cpp](https://llama.app) router server. The router discovers multiple GGUF models and loads or unloads them on demand.
4
4
 
5
- Use a current llama.cpp build with router support. Follow the [build instructions](https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md) or install a [prebuilt release](https://github.com/ggml-org/llama.cpp/releases) for your platform.
5
+ ## Install llama.cpp
6
+
7
+ Install llama.cpp with the [official installer](https://llama.app/docs/installation):
8
+
9
+ ```bash
10
+ curl -LsSf https://llama.app/install.sh | sh
11
+ ```
12
+
13
+ Verify the installation:
14
+
15
+ ```bash
16
+ llama cli --version
17
+ ```
18
+
19
+ See [llama.app](https://llama.app) for other installation methods, including package managers and building from source.
6
20
 
7
21
  ## Start the router
8
22
 
9
- Start `llama-server` without `--model` or `-m`. Passing a model starts single-model mode instead of router mode.
23
+ Start `llama serve` without `--model`, `-m`, or `-hf`. Passing a model starts single-model mode instead of router mode. See the [llama.cpp server guide](https://llama.app/docs/serve#serving-multiple-models-router-mode) for router configuration.
10
24
 
11
25
  ```bash
12
- llama-server \
13
- --models-dir ~/models \
26
+ llama serve \
14
27
  --no-models-autoload \
15
- --jinja \
16
28
  --host 127.0.0.1 \
17
29
  --port 8080 \
18
- -ngl 999 \
30
+ -ngl all \
19
31
  -c 32768
20
32
  ```
21
33
 
22
34
  Important options:
23
35
 
24
- - `--models-dir ~/models` discovers local GGUF files.
25
36
  - `--no-models-autoload` keeps loading explicit through `/llama`.
26
37
  - `--jinja` enables compatible chat templates and tool calling.
27
- - `-ngl 999` offloads as many layers as possible to the GPU.
28
- - `-c 32768` sets the context window for each loaded model. Omit it to use the model's native context, which may require substantially more memory.
38
+ - `-ngl all` offloads all layers to the GPU. Omit it to use automatic GPU offloading.
39
+ - `-c 32768` sets the context size in tokens. Use `-c 0` for the model's full context window, which may require substantially more memory. Context is shared across parallel server slots.
29
40
 
30
41
  A single-file model can sit directly in the model directory. Put multimodal and multi-shard models in separate subdirectories:
31
42
 
@@ -41,7 +52,7 @@ A single-file model can sit directly in the model directory. Put multimodal and
41
52
  └── large-model-Q4_K_M-00003-of-00003.gguf
42
53
  ```
43
54
 
44
- Restart the router after manually adding files. For per-model context sizes and other options, use [llama.cpp model presets](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md#model-presets). For settings tuned to a specific NVIDIA GPU and model, see [Run Pi with NVIDIA RTX and llama.cpp](nvidia-rtx-llama-cpp.md).
55
+ Restart the router after manually adding files. The router also supports cached models and preset files via `--models-preset`, as described in the [server guide](https://llama.app/docs/serve#serving-multiple-models-router-mode).
45
56
 
46
57
  ## Configure Pi
47
58
 
@@ -63,7 +74,7 @@ export LLAMA_API_KEY=optional-secret
63
74
  pi
64
75
  ```
65
76
 
66
- If the server uses an API key, start `llama-server` with the matching `--api-key` value. Keep `--host 127.0.0.1` for local-only access.
77
+ If the server uses an API key, start `llama serve` with the matching `--api-key` value. Keep `--host 127.0.0.1` for local-only access.
67
78
 
68
79
  ## Manage models
69
80
 
package/docs/mcp.md CHANGED
@@ -126,7 +126,7 @@ Remote servers that use OAuth, such as Sentry, need no credentials in `mcp.json`
126
126
 
127
127
  When the server rejects an unauthenticated connection, `/mcp` shows that it needs sign-in. Select "Sign in", run `/mcp login sentry`, or run `pi mcp login sentry`. Pi opens the authorization page and waits for approval. If the browser runs on another machine, such as over SSH, paste its redirected URL into the sign-in screen. A running session uses the new credentials on its next turn.
128
128
 
129
- Pi registers itself with the authorization server, stores tokens in `~/.pi/agent/mcp-auth.json`, and refreshes access tokens when they expire or the server rejects them. If a server later requests additional scope, Pi asks for sign-in again. Signing out deletes the stored credentials.
129
+ Pi identifies itself to the authorization server with its Client ID Metadata Document or by registering a client, stores tokens in `~/.pi/agent/mcp-auth.json`, and refreshes access tokens when they expire or the server rejects them. If a server later requests additional scope, Pi asks for sign-in again. Signing out deletes the stored credentials.
130
130
 
131
131
  Credentials belong to a server name and URL. Servers with the same URL under different names, such as one per account, sign in separately; servers with the same name and URL in different `mcp.json` files share one sign-in.
132
132
 
@@ -159,17 +159,19 @@ Pi registers as `pi`. Some servers only accept registrations from known clients.
159
159
 
160
160
  The name is only sent when Pi registers a client. To register again under a new name, sign out first.
161
161
 
162
- Some authorization servers allow clients by their Client ID Metadata Document URL instead of registering them. Set `clientRegistration` to `cimd` to identify as Pi's document on pi.dev instead of registering:
162
+ Without `clientId`, Pi identifies itself with its Client ID Metadata Document on pi.dev when the authorization server advertises support for documents and public clients. Otherwise it registers a client dynamically. A client registered before stays in use while its redirect URI matches, until you sign out. With the document, the client ID is `https://pi.dev/oauth/client.json` with the redirect URI `http://127.0.0.1:<port>/callback`. If the authorization server does not send the `iss` parameter in authorization responses (RFC 9207), Pi uses a document and redirect path specific to the MCP server instead: `https://pi.dev/oauth/<id>/client.json` with `http://127.0.0.1:<port>/callback/<id>`.
163
+
164
+ Pi registers instead of using the document when `clientName` is set or `callbackUrl` is not `/callback` on `localhost` or `127.0.0.1`. Set `clientRegistration` to choose the method: `auto` (default) as described, `dcr` to always register, or `cimd` to always use the document. With `cimd`, sign-in fails if the authorization server does not support documents for public clients. Use `dcr` when the authorization page reports an invalid client:
163
165
 
164
166
  ```json
165
167
  {
166
168
  "mcpServers": {
167
- "example": { "url": "https://mcp.example.com/mcp", "oauth": { "clientRegistration": "cimd" } }
169
+ "example": { "url": "https://mcp.example.com/mcp", "oauth": { "clientRegistration": "dcr" } }
168
170
  }
169
171
  }
170
172
  ```
171
173
 
172
- The client ID is `https://pi.dev/oauth/client.json` with the redirect URI `http://127.0.0.1:<port>/callback`. If the authorization server does not send the `iss` parameter in authorization responses (RFC 9207), Pi uses a document and redirect path specific to the MCP server instead: `https://pi.dev/oauth/<id>/client.json` with `http://127.0.0.1:<port>/callback/<id>`. The authorization server must advertise Client ID Metadata Document support and public clients, or sign-in fails. `cimd` cannot be combined with `clientId` or `clientName`, and a `callbackUrl` must use `localhost` or `127.0.0.1` with the path `/callback`.
174
+ `pi mcp add --oauth-client-registration <mode>` sets it when adding a server. `cimd` cannot be combined with `clientId` or `clientName`, and a `callbackUrl` must use `localhost` or `127.0.0.1` with the path `/callback`.
173
175
 
174
176
  Pi finds the authorization server through the server's protected resource metadata (RFC 9728) and checks that the authorization server's metadata names the expected issuer (RFC 8414). Some servers advertise the wrong authorization server or none, so sign-in opens a page that does not exist. Set `authServerMetadataUrl` to the metadata document of the right authorization server:
175
177
 
@@ -140,7 +140,7 @@ interface AssistantMessage {
140
140
  }
141
141
  ```
142
142
 
143
- `responseModel` records a concrete provider response model when it differs from the requested model. `responseId`, `providerThinkingLevel`, `thinkingLevel`, `diagnostics`, and `rawStopReason` preserve provider or runtime details.
143
+ `responseModel` records the concrete model reported by the provider, when the provider reports one. It may equal the requested model. `responseId`, `providerThinkingLevel`, `thinkingLevel`, `diagnostics`, and `rawStopReason` preserve provider or runtime details.
144
144
 
145
145
  `"pending"` is used for a partial assistant message while it streams. The completed message in `message_end` has a terminal stop reason, and Pi does not persist `"pending"` assistant messages in session JSONL.
146
146
 
@@ -0,0 +1,196 @@
1
+ # Models Configuration
2
+
3
+ <!-- This file is generated from TypeScript source. Do not edit it manually; run npm run generate:references. -->
4
+
5
+ This reference lists the fields of `models.json`. See [Configure a compatible endpoint](models.md#configure-a-compatible-endpoint) for examples and [Configuration](configuration.md#agent-directory) for the file location.
6
+
7
+ Add `"$schema": "https://pi.dev/schemas/models.schema.json"` to `models.json` for editor validation and completion.
8
+
9
+ ## Providers
10
+
11
+ Each key under `providers` is a provider ID. A built-in provider ID changes that provider. Any other ID adds a provider, which needs `baseUrl` and an `api` at provider or model level.
12
+
13
+ | Field | Type | Default | Description |
14
+ |---|---|---|---|
15
+ | `name` | string | | Display name. |
16
+ | `baseUrl` | string | | API base URL. Also applies to the provider's built-in models. |
17
+ | `apiKey` | string | | Literal key, "$NAME" environment interpolation, or "!command" output. |
18
+ | `api` | string | | API for the provider's models, such as "openai-completions", "openai-responses", "anthropic-messages", or "google-generative-ai". |
19
+ | `oauth` | `"radius"` | | OAuth login flow. Requires baseUrl. |
20
+ | `headers` | object | | Request headers. Values resolve like apiKey. |
21
+ | `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
22
+ | `authHeader` | boolean | `false` | Whether to send the resolved API key as Authorization: Bearer. |
23
+ | `models` | [`object[]`](#models) | | |
24
+ | `modelOverrides` | [object](#model-overrides) | | |
25
+
26
+ ## Models
27
+
28
+ Each `models` entry adds a model to the provider. An entry whose `id` matches an existing model replaces it.
29
+
30
+ | Field | Type | Default | Description |
31
+ |---|---|---|---|
32
+ | `id` | string | | Required. Model ID sent to the API. |
33
+ | `name` | string | | Display name, also matched by --model patterns. |
34
+ | `api` | string | | Overrides the provider api. |
35
+ | `baseUrl` | string | | Overrides the provider baseUrl. |
36
+ | `reasoning` | boolean | `false` | Whether the model supports thinking. |
37
+ | `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
38
+ | `input` | `("text" \| "image")[]` | `["text"]` | |
39
+ | `inputLimits` | [object](#input-limits) | | |
40
+ | `cost` | object | | |
41
+ | `cost.input` | number | | Required. Input cost in USD per million tokens. |
42
+ | `cost.output` | number | | Required. Output cost in USD per million tokens. |
43
+ | `cost.cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
44
+ | `cost.cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
45
+ | `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
46
+ | `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
47
+ | `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
48
+ | `cost.tiers[].output` | number | | Required. Output cost in USD per million tokens. |
49
+ | `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
50
+ | `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
51
+ | `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Pi warms only tiers with a known lifetime. |
52
+ | `contextWindow` | number | `128000` | Context window in tokens. |
53
+ | `maxTokens` | number | `16384` | Maximum output tokens. |
54
+ | `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
55
+ | `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
56
+ | `headers` | object | | Request headers. Values resolve like apiKey. |
57
+ | `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
58
+
59
+ ## Model overrides
60
+
61
+ Each `modelOverrides` key is the ID of a built-in or extension model. Unknown IDs are ignored. Object fields, such as `cost`, merge with the model's value field by field; other fields replace it.
62
+
63
+ | Field | Type | Default | Description |
64
+ |---|---|---|---|
65
+ | `name` | string | | Display name, also matched by --model patterns. |
66
+ | `reasoning` | boolean | | Whether the model supports thinking. |
67
+ | `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
68
+ | `input` | `("text" \| "image")[]` | | |
69
+ | `inputLimits` | [object](#input-limits) | | |
70
+ | `cost` | object | | |
71
+ | `cost.input` | number | | Input cost in USD per million tokens. |
72
+ | `cost.output` | number | | Output cost in USD per million tokens. |
73
+ | `cost.cacheRead` | number | | Cache-read cost in USD per million tokens. |
74
+ | `cost.cacheWrite` | number | | Cache-write cost in USD per million tokens. |
75
+ | `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
76
+ | `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
77
+ | `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
78
+ | `cost.tiers[].output` | number | | Required. Output cost in USD per million tokens. |
79
+ | `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
80
+ | `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
81
+ | `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Pi warms only tiers with a known lifetime. |
82
+ | `contextWindow` | number | | Context window in tokens. |
83
+ | `maxTokens` | number | | Maximum output tokens. |
84
+ | `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
85
+ | `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
86
+ | `headers` | object | | Request headers. Values resolve like apiKey. |
87
+ | `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
88
+
89
+ ## Input limits
90
+
91
+ See [Describe model input and caching](models.md#describe-model-input-and-caching).
92
+
93
+ | Field | Type | Default | Description |
94
+ |---|---|---|---|
95
+ | `maxRequestBytes` | integer | | Maximum serialized provider request size in bytes. |
96
+ | `images` | object | | |
97
+ | `images.resize` | object | | Cache-safe resize profile applied before a new image enters conversation history. |
98
+ | `images.resize.maxWidth` | integer | | |
99
+ | `images.resize.maxHeight` | integer | | |
100
+ | `images.resize.maxBytes` | integer | | Maximum base64-encoded payload size in bytes. |
101
+ | `images.resize.jpegQuality` | integer | | |
102
+ | `images.maxPerMessage` | integer | | Maximum images accepted in one provider message. |
103
+ | `images.maxPerRequest` | integer | | Maximum images accepted across one provider request. |
104
+
105
+ ## Compatibility
106
+
107
+ `compat` describes verified differences from an API's standard request and response behavior. Model values override provider values per field. The fields that apply depend on the model's `api`.
108
+
109
+ ### `openai-completions`
110
+
111
+ | Field | Type | Default | Description |
112
+ |---|---|---|---|
113
+ | `supportsStore` | boolean | | Whether the provider supports the store field. Default: auto-detected from URL. |
114
+ | `supportsDeveloperRole` | boolean | | Whether the provider supports the developer role instead of system. Default: auto-detected from URL. |
115
+ | `supportsReasoningEffort` | boolean | | Whether the provider supports reasoning_effort. Default: auto-detected from URL. |
116
+ | `supportsUsageInStreaming` | boolean | `true` | Whether the provider supports stream_options.include_usage for token usage in streaming responses. |
117
+ | `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false, pi infers stop or toolUse when the stream ends. |
118
+ | `maxTokensField` | `"max_completion_tokens" \| "max_tokens"` | | Which field to use for max tokens. Default: auto-detected from URL. |
119
+ | `requiresToolResultName` | boolean | | Whether tool results require the name field. Default: auto-detected from URL. |
120
+ | `requiresAssistantAfterToolResult` | boolean | | Whether a user message after tool results requires an assistant message in between. Default: auto-detected from URL. |
121
+ | `requiresThinkingAsText` | boolean | | Whether thinking blocks must be converted to text blocks with &lt;thinking> delimiters. Default: auto-detected from URL. |
122
+ | `requiresReasoningContentOnAssistantMessages` | boolean | | Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL. |
123
+ | `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking" \| "ant-ling"` | | Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, "string-thinking" uses top-level thinking, and "ant-ling" uses reasoning.effort only when the mapped effort is non-null. |
124
+ | `chatTemplateKwargs` | object | | Kwargs sent as chat_template_kwargs when thinkingFormat is "chat-template". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for pi-controlled values. |
125
+ | `chatTemplateArgs` | object | | Arguments sent as chat_template_args when thinkingFormat is "baseten". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for pi-controlled values. |
126
+ | `openRouterRouting` | object | | OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection. |
127
+ | `vercelGatewayRouting` | object | | Vercel AI Gateway routing preferences. Controls which upstream providers the gateway routes requests to. See https://vercel.com/docs/ai-gateway/models-and-providers/provider-options. |
128
+ | `zaiToolStream` | boolean | `false` | Whether z.ai supports top-level tool_stream for streaming tool call deltas. |
129
+ | `thinkingTokenBudgetField` | `"thinking_token_budget" \| "thinking_budget" \| "thinking_budget_tokens"` | | Top-level request field used to cap reasoning tokens from thinkingBudgets. Reasoning and the answer share max_tokens on these endpoints. "thinking_token_budget" is vLLM, "thinking_budget" is Qwen, DashScope, or SGLang, and "thinking_budget_tokens" is llama.cpp. Off by default and not set on the generated catalog. |
130
+ | `supportsThinkingTokenBudget` | boolean | `false` | Alias for thinkingTokenBudgetField: "thinking_token_budget" (vLLM). Prefer thinkingTokenBudgetField. |
131
+ | `supportsOpenAIGrammarTools` | boolean | `false` | Whether the provider supports OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
132
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system or developer messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
133
+ | `supportsMidConvoToolAdditions` | boolean | `false` | Whether system messages can introduce additional tools mid-conversation. Requires supportsMidConvoSystemMessages. The generated catalog enables this for capable models. |
134
+ | `supportsStrictMode` | boolean | `false` | Whether the provider supports the strict field in tool definitions. Generated capable models enable it explicitly. |
135
+ | `cacheControlFormat` | `"anthropic"` | | Cache control convention for prompt caching. Anthropic applies cache_control markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content. |
136
+ | `sendSessionAffinityHeaders` | boolean | | Whether to send session-affinity data from options.sessionId. Default: true for OpenRouter endpoints, false otherwise. |
137
+ | `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id, x-client-request-id, and x-session-affinity; openai-nosession sends x-client-request-id and x-session-affinity; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
138
+ | `supportsLongCacheRetention` | boolean | | Whether the provider supports long prompt cache retention (prompt_cache_retention: "24h" or Anthropic-style cache_control.ttl: "1h", depending on format). Default: auto-detected from provider and URL. |
139
+ | `vllmPriority` | number | | vLLM scheduler priority sent as the top-level priority request field. Lower values are handled earlier and the server default is 0. Only meaningful with --scheduling-policy priority. Off by default and not set on the generated catalog. |
140
+
141
+ ### `openai-responses`
142
+
143
+ Also applies to `azure-openai-responses` and `openai-codex-responses`.
144
+
145
+ | Field | Type | Default | Description |
146
+ |---|---|---|---|
147
+ | `supportsDeveloperRole` | boolean | `true` | Whether the provider supports the developer role instead of system. |
148
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts developer or system messages after the conversation has started. When false, later system messages are folded into the leading system message. The generated catalog enables this for verified models. |
149
+ | `sessionAffinityFormat` | `"openai" \| "openai-nosession" \| "openrouter"` | | Session-affinity header format. openai sends session_id and x-client-request-id; openai-nosession sends x-client-request-id; openrouter sends x-session-id. Does not affect prompt_cache_key. Default: auto-detected. |
150
+ | `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports long prompt cache retention. This uses prompt_cache_options.ttl: "30m" on GPT-5.6+ and prompt_cache_retention: "24h" on earlier models. |
151
+ | `supportsStrictMode` | boolean | | Whether the provider supports strict JSON-schema function tools. Defaults are API-specific; generated OpenAI models enable it explicitly. |
152
+ | `supportsOpenAIGrammarTools` | boolean | `false` | Whether to emit OpenAI custom tools with Lark or regex grammar formats. When false, grammar-constrained tools fall back to normal function tools. The generated catalog enables this for capable models. |
153
+ | `supportsAdditionalTools` | boolean | `false` | Whether the model supports message-anchored additional_tools input items. |
154
+ | `supportsToolSearch` | boolean | `false` | Whether the model supports client-executed tool search for transcript-anchored additions. |
155
+ | `supportsExplicitPromptCacheMode` | boolean | `false` | Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter. |
156
+ | `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Only used by the openai-responses API, and ignored with Sign in with ChatGPT on the openai provider. |
157
+ | `supportsMaxOutputTokens` | boolean | `true` | Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it. |
158
+
159
+ ### `anthropic-messages`
160
+
161
+ | Field | Type | Default | Description |
162
+ |---|---|---|---|
163
+ | `supportsEagerToolInputStreaming` | boolean | `true` | Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests. |
164
+ | `supportsLongCacheRetention` | boolean | `true` | Whether the provider supports Anthropic long cache retention through cache_control.ttl. |
165
+ | `sendSessionAffinityHeaders` | boolean | | Whether to send x-session-affinity from options.sessionId when caching is enabled. Required for providers like Fireworks that use session affinity for prompt cache routing; requests to the same replica maximize cache hits. Default: true for OpenRouter endpoints, false otherwise. |
166
+ | `sessionAffinityFormat` | `"openrouter"` | | Session-affinity format. openrouter sends x-session-id; when unset, sends x-session-affinity. |
167
+ | `supportsCacheControlOnTools` | boolean | `true` | Whether the provider supports Anthropic-style cache_control markers on tool definitions. When false, cache_control is omitted from tool parameters. Some Anthropic-compatible providers, such as Fireworks, do not support this field on tools and may reject or ignore it. |
168
+ | `supportsTemperature` | boolean | `true` | Whether the model accepts the Anthropic temperature request field. Claude Opus 4.7+ rejects non-default values. |
169
+ | `forceAdaptiveThinking` | boolean | `false` | Whether to force adaptive thinking (thinking.type: adaptive plus output_config.effort) regardless of model ID. Built-in models that require adaptive thinking set this in generated metadata. Custom Anthropic-compatible providers can set this to true for any model whose upstream requires the adaptive format. Set false to opt out on overridden built-in models. |
170
+ | `allowEmptySignature` | boolean | `false` | Whether to replay empty thinking signatures instead of converting thinking to text. |
171
+ | `supportsStrictTools` | boolean | `false` | Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly. |
172
+ | `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
173
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt. |
174
+ | `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
175
+ | `allowedFallbackModels` | `object[]` | | Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets. |
176
+
177
+ ### `bedrock-converse-stream`
178
+
179
+ | Field | Type | Default | Description |
180
+ |---|---|---|---|
181
+ | `supportsStrictMode` | boolean | `false` | Whether the model supports Bedrock strict tool schemas. |
182
+
183
+ ### `mistral-conversations`
184
+
185
+ | Field | Type | Default | Description |
186
+ |---|---|---|---|
187
+ | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message. |
188
+
189
+ ### `typesafe-system-one`
190
+
191
+ Also applies to `cloudflare-workers-ai-system-one`.
192
+
193
+ | Field | Type | Default | Description |
194
+ |---|---|---|---|
195
+ | `imageInput` | `"assets" \| "images" \| "state-image-urls"` | | How the service takes classifier images. "assets" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. "images" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. "state-image-urls" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models only. |
196
+ | `sendImageOptInHeader` | boolean | | Whether requests with images send the TypeSafe-Danger-Zone-Images: true header, which TypeSafe's own API requires for its experimental image input. Defaults to true for the typesafe-system-one API unless the model is detected as OpenRouter. |
package/docs/models.md CHANGED
@@ -62,10 +62,22 @@ Use [`models.json`](configuration.md#agent-directory) when an endpoint speaks an
62
62
  }
63
63
  ```
64
64
 
65
- The dummy key makes the model available to Pi; Ollama ignores it. For an authenticated endpoint, `apiKey` and header values can use `$NAME` or `${NAME}` environment interpolation, a literal value, or a leading `!command`. Commands in `models.json` run at request time and are not cached by Pi.
65
+ The dummy key makes the model available to Pi; Ollama ignores it. For an authenticated endpoint, `apiKey` and header values can use `$NAME` or `${NAME}` environment interpolation, a literal value, or a leading `!command`. `$$` and `$!` produce a literal `$` and `!`. Commands in `models.json` run at request time and are not cached by Pi.
66
66
 
67
67
  Opening `/model` reloads the file. A `models` entry adds or replaces a model with the same ID on that provider. Use `modelOverrides` to change metadata for an existing built-in or extension-provided model without replacing the provider's model list. Unknown override IDs are ignored.
68
68
 
69
+ To route a built-in provider through a proxy, set only its `baseUrl`. Its models and authentication stay unchanged:
70
+
71
+ ```json
72
+ {
73
+ "providers": {
74
+ "anthropic": { "baseUrl": "https://proxy.example.com/v1" }
75
+ }
76
+ }
77
+ ```
78
+
79
+ [Models Configuration](models-configuration.md) lists every field.
80
+
69
81
  ### Describe model input and caching
70
82
 
71
83
  Use `inputLimits.images.resize` to control how Pi encodes new image attachments, `read` results, and tool-result images before storing them in conversation history:
@@ -129,20 +141,20 @@ Compatibility settings should describe verified differences in the endpoint's re
129
141
 
130
142
  ## Use classifier models
131
143
 
132
- Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. Pi includes TypeSafe's Jev model from these providers, Cloudflare's Clef and Clef Flash models from Workers AI, and OpenAI's GPT-6 Luna through the [Decisions API](https://developers.openai.com/api/docs/guides/decisions):
144
+ Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. Pi includes TypeSafe's Jev model from these providers, Cloudflare's Clef, Clef Flash, and Clef Omni models from Workers AI and OpenRouter, and OpenAI's GPT-6 Luna through the [Decisions API](https://developers.openai.com/api/docs/guides/decisions):
133
145
 
134
146
  | Provider | Model IDs | Authentication |
135
147
  |---|---|---|
136
148
  | `typesafe` | `jev-latest` | `TYPESAFE_API_KEY` |
137
- | `openrouter` | `typesafe/jev-1.13`, `~typesafe/jev-latest` | `OPENROUTER_API_KEY` or `/login` |
138
- | `cloudflare-workers-ai` | `typesafe/jev`, `@cf/cloudflare/clef`, `@cf/cloudflare/clef-flash` | `CLOUDFLARE_API_KEY` and `CLOUDFLARE_ACCOUNT_ID` |
149
+ | `openrouter` | `typesafe/jev-1.13`, `typesafe/jev-1.14`, `~typesafe/jev-latest`, `cloudflare/clef`, `cloudflare/clef-flash`, `cloudflare/clef-omni` | `OPENROUTER_API_KEY` or `/login` |
150
+ | `cloudflare-workers-ai` | `typesafe/jev`, `typesafe/jev-1.14.0`, `@cf/cloudflare/clef`, `@cf/cloudflare/clef-flash`, `@cf/cloudflare/clef-omni` | `CLOUDFLARE_API_KEY` and `CLOUDFLARE_ACCOUNT_ID` |
139
151
  | `vercel-ai-gateway` | `typesafe-ai/jev` | `AI_GATEWAY_API_KEY` |
140
152
  | `opencode` | `jev-1.13`, `jev-1.13-free` | `OPENCODE_API_KEY` |
141
153
  | `openai` | `gpt-6-luna` | `OPENAI_API_KEY` |
142
154
 
143
155
  Chat models on a [llama.cpp router](llama-cpp.md#classification) are also listed as classifier models.
144
156
 
145
- OpenAI's Decisions API needs an API key. Sign in with ChatGPT credentials do not work with it, so `gpt-6-luna` is not listed as available while `openai` is logged in through `/login`, even when `OPENAI_API_KEY` is set; log out of `openai` to use the key. GPT-6 Luna also judges images passed in `images` (see [Codemode](codemode.md#classify)); other classifier models return an error for them. The API rejects inputs above 922K tokens, but requests that run longer than about five seconds, currently above roughly 600K input tokens, fail with a gateway timeout.
157
+ OpenAI's Decisions API needs an API key. Sign in with ChatGPT credentials do not work with it, so `gpt-6-luna` is not listed as available while `openai` is logged in through `/login`, even when `OPENAI_API_KEY` is set; log out of `openai` to use the key. The API rejects inputs above 922K tokens, but requests that run longer than about five seconds, currently above roughly 600K input tokens, fail with a gateway timeout.
146
158
 
147
159
  Classifier models do not appear in `/model`. The model reaches them through the [`codemode`](cli.md#enable-codemode) tool, which is off unless an MCP server turned it on. Enable it with `"defaultTools": ["+codemode"]` in [settings](settings.md#tools). Scripts then list classifier models with `models.getAvailableOfType("classifier")` and call `models.classify(model, { state, questions })`:
148
160
 
@@ -163,6 +175,10 @@ return result.answers;
163
175
 
164
176
  [Codemode](codemode.md#classify) describes the question and answer types.
165
177
 
178
+ Classifier models whose `input` includes `"image"` also judge images passed in `images`; other classifier models return an error for them. Image input works with GPT-6 Luna, with Jev from `typesafe` and `cloudflare-workers-ai`, with Clef from `cloudflare-workers-ai`, and with the OpenRouter models whose catalog lists image input. Jev takes PNG and JPEG images, and image input is experimental on TypeSafe's own API. Clef takes PNG, JPEG, and WebP images, at most four per request. Jev from `vercel-ai-gateway` and `opencode` takes text only.
179
+
180
+ Each System One service takes images in its own request format, set by the model's `compat.imageInput`. Built-in models set it, so overriding a provider's `baseUrl` keeps it. A custom provider that proxies another service's classifiers sets it in its provider-level `compat` in `models.json` (see [System One compatibility](models-configuration.md#typesafe-system-one)). OpenRouter in particular answers requests in TypeSafe's format without an error but drops the images.
181
+
166
182
  When the service reports token counts, as all System One services do, `result.usage` carries them with their cost. Pi adds the usage of a script's classifier calls to the `codemode` tool result, so it counts toward the session cost in the footer and `/session`. The cost uses the model's catalog price; models without one, such as TypeSafe's direct `jev-latest`, report tokens at no cost.
167
183
 
168
184
  Extensions call classifiers through `ctx.modelRegistry.classify()`, without codemode. [Virtual models](virtual-models.md#route-requests) can use them to route requests; see the `jev-router.ts` example.
package/docs/packages.md CHANGED
@@ -16,6 +16,8 @@ pi install ./local-package
16
16
 
17
17
  `pi list` shows configured packages. Use `pi remove <source>` to remove one and `pi update --extensions` to reconcile package installations. See [Command Line](cli.md#package-commands) for every package command and option.
18
18
 
19
+ If a configured package fails to install at startup, for example because npm cannot reach the registry, Pi warns about it, skips that package's resources, and keeps running. Pi tries to install it again on the next start or `/reload`. `pi install` and `pi update --extensions` still report the failure and exit non-zero.
20
+
19
21
  Personal installs are written to `~/.pi/agent/settings.json`. Add `--local` or `-l` to write the package declaration to `.pi/settings.json`. Pi reads declarations from that file only after project trust is granted.
20
22
 
21
23
  Project packages are installed and loaded only after project trust is resolved. Packages can execute extension code and can include skills that instruct the model to run programs. Review third-party package source before installing it. Review project package declarations before granting project trust.
@@ -26,6 +28,8 @@ Use `--extension` or `-e` to try a package for one invocation without adding it
26
28
  pi -e npm:@example/pi-tools
27
29
  ```
28
30
 
31
+ Pi caches `-e` packages under `~/.pi/agent/tmp/extensions/` and checks them on every start and `/reload`. An npm package is reinstalled when the registry has a newer version that matches the specification. A version pinned to an exact number, such as `@1.2.3`, is not checked. A git package is fetched and reset to the remote branch or ref. A ref that is a commit hash already checked out is not fetched. If the check fails or offline mode is on, Pi loads the cached copy.
32
+
29
33
  ## Choose a source
30
34
 
31
35
  | Source | Example | Behavior |
@@ -73,6 +77,26 @@ Paths are relative to the package root. Arrays accept glob patterns and exclusio
73
77
 
74
78
  The `pi-package` keyword makes an npm package eligible for discovery in the [Pi package gallery](https://pi.dev/packages). Optional `pi.image` and `pi.video` fields add gallery previews.
75
79
 
80
+ ## Show a changelog
81
+
82
+ After a package update, Pi can show what changed. On the next fresh launch, Pi reads the package changelog and shows entries newer than the last seen version under "Extension Updates", the same way it shows its own changelog. The first time Pi sees a package, it records the version without showing anything.
83
+
84
+ This applies to packages that load at least one extension. Packages that only provide skills, prompt templates, or themes do not show a changelog.
85
+
86
+ By default Pi reads `CHANGELOG.md` from the package root. Point `pi.changelogPath` at another file inside the package, or set it to `""` to disable the changelog:
87
+
88
+ ```json
89
+ {
90
+ "name": "my-pi-package",
91
+ "version": "1.2.0",
92
+ "pi": {
93
+ "changelogPath": "./docs/CHANGELOG.md"
94
+ }
95
+ }
96
+ ```
97
+
98
+ Use version headings in the same format as Pi's changelog, such as `## [1.2.0]` or `## 1.2.0 - 2026-01-01`. Entries are matched against the `version` field in `package.json`, so a git package only shows a changelog when that field increases. The `collapseChangelog` setting condenses the section to one line per package, such as `Updated my-pi-package to v1.2.0.` Unlike Pi's own changelog, `/changelog` does not show package changelogs, so read the package's changelog file or repository for details.
99
+
76
100
  ### Namespace
77
101
 
78
102
  Declare `pi.namespace` to expose the package's name-keyed resources (skills,
@@ -6,13 +6,17 @@ For native Windows setup, read [Windows Setup](windows.md). For Android, read [T
6
6
 
7
7
  ## 1. Install Pi
8
8
 
9
- On macOS or Linux, you can use the installer:
9
+ Install Pi with the installer on macOS, Linux, or Windows:
10
10
 
11
- ```bash
11
+ ```bash tab="macOS / Linux"
12
12
  curl -fsSL https://pi.dev/install.sh | sh
13
13
  ```
14
14
 
15
- The installer pins all dependencies and updates Pi with `pi update`. Alternatively, install Pi from npm, which does not pin transitive dependencies. This requires Node.js 22.19 or newer:
15
+ ```powershell tab="Windows"
16
+ powershell -c "irm https://pi.dev/install.ps1 | iex"
17
+ ```
18
+
19
+ Both installers pin all dependencies and update Pi with `pi update`. Alternatively, install Pi from npm, which does not pin transitive dependencies. This requires Node.js 22.19 or newer:
16
20
 
17
21
  ```bash
18
22
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent
package/docs/sessions.md CHANGED
@@ -11,7 +11,17 @@ pi --continue
11
11
  pi --resume
12
12
  ```
13
13
 
14
- `--continue` opens the most recent session for the current working directory. `--resume` opens the session picker. In interactive mode, `/resume` opens the same picker and `/new` starts a new session.
14
+ `--continue` opens the most recent session for the current directory. `--resume` opens the session picker. In interactive mode, `/resume` opens the same picker and `/new` starts a new session.
15
+
16
+ Each session records the working directory it was created in and never changes it. Pi runs a session in its working directory, so tools, `@path` references, project configuration, and context files resolve from there.
17
+
18
+ | Entry point | Working directory |
19
+ |---|---|
20
+ | `--continue` | The current directory |
21
+ | `--resume`, `/resume`, `--session`, `/import` | The session's working directory, which can differ from the current directory |
22
+ | `--fork`, or a `--session` ID from another directory that you choose to fork | The current directory, in a new session |
23
+
24
+ If a session's working directory no longer exists, interactive mode offers to run the session in the current directory instead. Pi does not store that choice, so it asks again the next time you open the session. Other modes exit with an error.
15
25
 
16
26
  Use `/name` or `--name` to assign a recognizable session name. Run `/session` to verify the current session file, ID, message count, token usage, and cost.
17
27
 
@@ -51,8 +61,6 @@ By default, Pi stores sessions under `~/.pi/agent/sessions/`, grouped by working
51
61
 
52
62
  Use `--no-session` for an ephemeral run. An ephemeral session cannot be resumed after Pi exits.
53
63
 
54
- Use `--session` when you already know the session path or ID. Use `--fork` to create a new session from an existing session before interactive mode starts.
55
-
56
64
  ## Export or share a session
57
65
 
58
66
  Use `/export` to write the current session as HTML or JSONL. Use `/share` to upload it and get a viewer link. By default, Pi uses a Radius artifact when Radius authentication is configured; otherwise, it uses a private GitHub gist. Set [`sessionShareDestination`](settings.md#sessions-and-context) to `gist` or `radius` to force one destination.
package/docs/settings.md CHANGED
@@ -71,7 +71,7 @@ CLI tool options override this setting for one invocation. `--tools` with only `
71
71
  | Setting | Type | Default | Description |
72
72
  |---|---|---|---|
73
73
  | `compaction.enabled` | boolean | `true` | Enable automatic compaction. |
74
- | `compaction.reserveTokens` | number | `16384` | Tokens reserved for the model response. |
74
+ | `compaction.reserveTokens` | number | `16384` | Free context tokens below which automatic compaction starts. |
75
75
  | `compaction.keepRecentTokens` | number | `20000` | Recent tokens retained without summarization. |
76
76
  | `compaction.modelOverrides` | object | None | Per-model token settings keyed by exact `provider/modelId`. |
77
77
 
@@ -105,7 +105,7 @@ See [Compaction Reference](compaction.md) for trigger, summarization, and valida
105
105
  | `showHardwareCursor` | boolean | `false` | Use the terminal cursor instead of Pi's drawn cursor. Pi still positions it for input methods. |
106
106
  | `terminal.showImages` | boolean | `true` | Display inline images when supported. |
107
107
  | `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
108
- | `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
108
+ | `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. When unset, `PI_CLEAR_ON_SHRINK=1` enables it. |
109
109
  | `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
110
110
  | `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
111
111
  | `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
@@ -123,8 +123,8 @@ See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and p
123
123
  |---|---|---|---|
124
124
  | `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
125
125
  | `httpProxy` | string | None | Proxy URL applied as `HTTP_PROXY` and `HTTPS_PROXY` for Pi-managed HTTP clients. **Can only be set in agent-directory settings.** |
126
- | `httpIdleTimeoutMs` | number | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` to disable. |
127
- | `websocketConnectTimeoutMs` | number | `15000` | WebSocket connection timeout in milliseconds. Set to `0` to disable. |
126
+ | `httpIdleTimeoutMs` | number \| `"disabled"` | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` or `"disabled"` to disable. |
127
+ | `websocketConnectTimeoutMs` | number \| `"disabled"` | `15000` | WebSocket connection timeout in milliseconds. Set to `0` or `"disabled"` to disable. |
128
128
  | `retry.enabled` | boolean | `true` | Enable automatic agent-level retry for transient failures. |
129
129
  | `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts. |
130
130
  | `retry.baseDelayMs` | number | `2000` | Initial exponential-backoff delay in milliseconds. |
@@ -142,6 +142,7 @@ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are requir
142
142
  | `shellPath` | string | Platform default | Custom shell executable path. Supports a leading `~`. |
143
143
  | `shellCommandPrefix` | string | None | Prefix prepended to every shell command. |
144
144
  | `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation. |
145
+ | `selfUpdateCommand` | `string[]` | None | Command and arguments `pi update` runs to update Pi itself, with `{packageName}`, `{version}`, and `{installSpec}` placeholders. `PI_SELF_UPDATE_COMMAND` takes precedence. **Can only be set in agent-directory settings.** See [Custom update command](cli.md#custom-update-command). |
145
146
 
146
147
  See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
147
148
 
@@ -166,7 +167,7 @@ The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:c
166
167
 
167
168
  | Setting | Type | Default | Description |
168
169
  |---|---|---|---|
169
- | `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. |
170
+ | `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. Also condenses extension package changelogs to one line per package. |
170
171
  | `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
171
172
  | `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
172
173
  | `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
@@ -21,14 +21,14 @@ Extensions, prompt templates, and skills can add commands. The command menu in P
21
21
  | Command | Description |
22
22
  |---|---|
23
23
  | `/new` | Start a new session |
24
- | `/resume` | Switch to another saved session |
24
+ | `/resume` | Resume another session |
25
25
  | `/name [name]` | Set the session display name, or show the current name when omitted |
26
26
  | `/session` | Show current session information and statistics |
27
27
  | `/tree` | Navigate the session tree |
28
28
  | `/fork` | Create a new session from an earlier user message |
29
29
  | `/clone` | Duplicate the current session at its current position |
30
30
  | `/compact [instructions]` | Compact the current context, optionally with custom instructions |
31
- | `/import <path>` | Import and resume a JSONL session |
31
+ | `/import <path>` | Import a JSONL session, preserving its ID and working directory |
32
32
 
33
33
  ## Export and share
34
34
 
@@ -46,6 +46,7 @@ Review a session before exporting or sharing it. Sessions can contain prompts, t
46
46
  | Command | Description |
47
47
  |---|---|
48
48
  | `/trust` | Save a project trust decision for future Pi processes |
49
+ | `/mcp` | Manage MCP servers: sign in, reconnect, enable or disable, and change exposure |
49
50
  | `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
50
51
  | `/hotkeys` | Show active keyboard shortcuts |
51
52
  | `/changelog` | Show changelog entries |
@@ -40,7 +40,7 @@ This is an iTerm2-wide setting and can also change native trackpad scrolling. Th
40
40
 
41
41
  ## Apple Terminal
42
42
 
43
- Pi enables enhanced key reporting when available. If Terminal.app still sends plain Return for `Shift+Enter`, Pi uses a local macOS modifier fallback and treats it as `Shift+Enter`.
43
+ Pi enables enhanced key reporting when available. If Terminal.app still sends plain Return or `ESC` + Return for `Shift+Enter`, Pi uses a local macOS modifier fallback and treats it as `Shift+Enter`. `ESC` + Return without Shift held remains `Alt+Enter`.
44
44
 
45
45
  The fallback works only when Pi runs on the same Mac as Terminal.app. It cannot inspect the local modifier state when Pi runs on another machine over SSH.
46
46
 
@@ -170,6 +170,8 @@ Windows Terminal uses Pi's Windows and WSL shortcut defaults. See [Keybindings](
170
170
 
171
171
  ### Forward Shift+Enter
172
172
 
173
+ When Pi runs natively on Windows, it checks the local Shift key state and treats plain Return or `ESC` + Return as `Shift+Enter` while Shift is held. This fallback does not work in WSL or over SSH. If `Shift+Enter` still submits, forward it explicitly.
174
+
173
175
  Open Windows Terminal's `settings.json` with `Ctrl+Shift+,` or **Settings > Open JSON file**. Add this object to its `actions` array:
174
176
 
175
177
  ```json
package/docs/tmux.md CHANGED
@@ -53,3 +53,9 @@ set -g extended-keys on
53
53
  Pi supports the xterm `modifyOtherKeys` format used by these versions. Restart tmux and repeat the verification steps.
54
54
 
55
55
  For older versions, upgrade tmux or use Pi outside tmux rather than relying on modified Enter shortcuts.
56
+
57
+ ## Known issues
58
+
59
+ | Issue | Affects | Remedy |
60
+ |---|---|---|
61
+ | Text such as `c0c/0c0c/0c0c` appears in the editor at startup ([tmux#4749](https://github.com/tmux/tmux/issues/4749)) | tmux 3.6 | Upgrade tmux. Changing Pi's theme does not help. |