@punch-bot/cli 1.5.1 → 1.5.3

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 (505) hide show
  1. package/CHANGELOG.md +162 -1
  2. package/README.md +6 -8
  3. package/dist/bundle/chunks/anthropic-messages-WIBS5YKY.js +6 -0
  4. package/dist/bundle/chunks/azure-openai-responses-GP5GDEGO.js +2 -0
  5. package/dist/bundle/chunks/bedrock-converse-stream.js +7 -4
  6. package/dist/bundle/chunks/chunk-35EHANXE.js +2 -0
  7. package/dist/bundle/chunks/chunk-3IMHRFLG.js +6 -0
  8. package/dist/bundle/chunks/chunk-77CRE5SV.js +9 -0
  9. package/dist/bundle/chunks/chunk-CE33JMCE.js +861 -0
  10. package/dist/bundle/chunks/{chunk-MYNHUMKE.js → chunk-CXY7BILM.js} +2 -44
  11. package/dist/bundle/chunks/chunk-EISXNXOQ.js +41 -0
  12. package/dist/bundle/chunks/chunk-ENMVUQHE.js +26 -0
  13. package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
  14. package/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
  15. package/dist/bundle/chunks/chunk-HQH636GU.js +361 -0
  16. package/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  17. package/dist/bundle/chunks/chunk-JAJLG57O.js +4 -0
  18. package/dist/bundle/chunks/{chunk-RROECCMX.js → chunk-LOHGXPCL.js} +2 -2
  19. package/dist/bundle/chunks/{chunk-CRILLKNU.js → chunk-OV2VGRRS.js} +1 -1
  20. package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
  21. package/dist/bundle/chunks/chunk-PDENR63J.js +16 -0
  22. package/dist/bundle/chunks/chunk-RHOWRSGK.js +2 -0
  23. package/dist/bundle/chunks/{chunk-HMPP4ECW.js → chunk-UZ3LUZDC.js} +1 -1
  24. package/dist/bundle/chunks/chunk-WN2D4UD4.js +2 -0
  25. package/dist/bundle/chunks/chunk-X4T5TGM4.js +82 -0
  26. package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  27. package/dist/bundle/chunks/cli-OQNR6ESL.js +53 -0
  28. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-JWAAZATQ.js → cloudflare-workers-ai-system-one-36EDUVVN.js} +1 -1
  29. package/dist/bundle/chunks/codemode-worker.js +2 -0
  30. package/dist/bundle/chunks/{execute-HXULRBCI.js → execute-EHT55MW7.js} +5 -3
  31. package/dist/bundle/chunks/github-copilot.js +1 -1
  32. package/dist/bundle/chunks/{google-generative-ai-EHUU7JII.js → google-generative-ai-KA6FZCHM.js} +1 -1
  33. package/dist/bundle/chunks/{google-vertex-AFMVUS5C.js → google-vertex-DXKQ4IYR.js} +1 -1
  34. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  35. package/dist/bundle/chunks/kimi-coding.js +1 -1
  36. package/dist/bundle/chunks/{llama-cpp-classify-YVA2UOJG.js → llama-cpp-classify-676UCBOD.js} +1 -1
  37. package/dist/bundle/chunks/meta.js +1 -1
  38. package/dist/bundle/chunks/mistral-conversations-PJ56UMXO.js +5 -0
  39. package/dist/bundle/chunks/openai-codex-responses-DWVG7MAQ.js +10 -0
  40. package/dist/bundle/chunks/openai-completions-OKI6KBNP.js +7 -0
  41. package/dist/bundle/chunks/{openai-decisions-GNOLFL74.js → openai-decisions-SO57QA6O.js} +1 -1
  42. package/dist/bundle/chunks/openai-responses-3HV234HB.js +4 -0
  43. package/dist/bundle/chunks/{openrouter-images-ZTNVFSL2.js → openrouter-images-5X6D7HFS.js} +1 -1
  44. package/dist/bundle/chunks/pi-messages-BS5Z34RE.js +8 -0
  45. package/dist/bundle/chunks/radius.js +1 -1
  46. package/dist/bundle/chunks/{runtime-R5GXO4CV.js → runtime-74PFKASL.js} +1 -1
  47. package/dist/bundle/chunks/{typesafe-system-one-I5AHLF6T.js → typesafe-system-one-IPNULX2M.js} +1 -1
  48. package/dist/bundle/chunks/virtual-modules-2Y422I6U.js +2 -0
  49. package/dist/bundle/cli-runtime.js +1 -1
  50. package/dist/bundle/index.js +1 -1
  51. package/dist/bundle/rpc-entry.js +1 -1
  52. package/dist/cli/args.d.ts +0 -1
  53. package/dist/cli/args.d.ts.map +1 -1
  54. package/dist/cli/args.js +8 -12
  55. package/dist/cli/args.js.map +1 -1
  56. package/dist/cli/auth-command.d.ts.map +1 -1
  57. package/dist/cli/auth-command.js +26 -2
  58. package/dist/cli/auth-command.js.map +1 -1
  59. package/dist/cli/auth-login.d.ts +15 -0
  60. package/dist/cli/auth-login.d.ts.map +1 -0
  61. package/dist/cli/auth-login.js +232 -0
  62. package/dist/cli/auth-login.js.map +1 -0
  63. package/dist/cli/auth-logout.d.ts +14 -0
  64. package/dist/cli/auth-logout.d.ts.map +1 -0
  65. package/dist/cli/auth-logout.js +63 -0
  66. package/dist/cli/auth-logout.js.map +1 -0
  67. package/dist/cli/auth-terminal.d.ts +17 -0
  68. package/dist/cli/auth-terminal.d.ts.map +1 -0
  69. package/dist/cli/auth-terminal.js +63 -0
  70. package/dist/cli/auth-terminal.js.map +1 -0
  71. package/dist/cli/project-trust.js +1 -1
  72. package/dist/cli/project-trust.js.map +1 -1
  73. package/dist/config.d.ts +10 -2
  74. package/dist/config.d.ts.map +1 -1
  75. package/dist/config.js +24 -11
  76. package/dist/config.js.map +1 -1
  77. package/dist/core/agent-session-runtime.d.ts +5 -0
  78. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  79. package/dist/core/agent-session-runtime.js +20 -5
  80. package/dist/core/agent-session-runtime.js.map +1 -1
  81. package/dist/core/agent-session.d.ts +31 -15
  82. package/dist/core/agent-session.d.ts.map +1 -1
  83. package/dist/core/agent-session.js +158 -71
  84. package/dist/core/agent-session.js.map +1 -1
  85. package/dist/core/auth-storage.d.ts.map +1 -1
  86. package/dist/core/auth-storage.js +3 -2
  87. package/dist/core/auth-storage.js.map +1 -1
  88. package/dist/core/bash-executor.d.ts.map +1 -1
  89. package/dist/core/bash-executor.js +3 -1
  90. package/dist/core/bash-executor.js.map +1 -1
  91. package/dist/core/cache-warmer.d.ts +4 -37
  92. package/dist/core/cache-warmer.d.ts.map +1 -1
  93. package/dist/core/cache-warmer.js +11 -89
  94. package/dist/core/cache-warmer.js.map +1 -1
  95. package/dist/core/compaction/branch-summarization.d.ts +4 -2
  96. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  97. package/dist/core/compaction/branch-summarization.js +16 -4
  98. package/dist/core/compaction/branch-summarization.js.map +1 -1
  99. package/dist/core/compaction/utils.d.ts.map +1 -1
  100. package/dist/core/compaction/utils.js +2 -1
  101. package/dist/core/compaction/utils.js.map +1 -1
  102. package/dist/core/exec.d.ts +9 -1
  103. package/dist/core/exec.d.ts.map +1 -1
  104. package/dist/core/exec.js +104 -60
  105. package/dist/core/exec.js.map +1 -1
  106. package/dist/core/export-html/template.css +9 -0
  107. package/dist/core/export-html/template.js +165 -45
  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 -13
  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/runner.d.ts +1 -4
  119. package/dist/core/extensions/runner.d.ts.map +1 -1
  120. package/dist/core/extensions/runner.js +0 -14
  121. package/dist/core/extensions/runner.js.map +1 -1
  122. package/dist/core/extensions/types.d.ts +5 -18
  123. package/dist/core/extensions/types.d.ts.map +1 -1
  124. package/dist/core/extensions/types.js +1 -1
  125. package/dist/core/extensions/types.js.map +1 -1
  126. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  127. package/dist/core/extensions/virtual-modules.js +8 -7
  128. package/dist/core/extensions/virtual-modules.js.map +1 -1
  129. package/dist/core/index.d.ts +1 -1
  130. package/dist/core/index.d.ts.map +1 -1
  131. package/dist/core/index.js.map +1 -1
  132. package/dist/core/mcp-servers.d.ts +23 -41
  133. package/dist/core/mcp-servers.d.ts.map +1 -1
  134. package/dist/core/mcp-servers.js +51 -120
  135. package/dist/core/mcp-servers.js.map +1 -1
  136. package/dist/core/model-config.d.ts +1730 -2029
  137. package/dist/core/model-config.d.ts.map +1 -1
  138. package/dist/core/model-config.js +2 -3
  139. package/dist/core/model-config.js.map +1 -1
  140. package/dist/core/model-resolver.d.ts.map +1 -1
  141. package/dist/core/model-resolver.js +36 -29
  142. package/dist/core/model-resolver.js.map +1 -1
  143. package/dist/core/model-runtime.d.ts +5 -0
  144. package/dist/core/model-runtime.d.ts.map +1 -1
  145. package/dist/core/model-runtime.js +11 -4
  146. package/dist/core/model-runtime.js.map +1 -1
  147. package/dist/core/package-manager.d.ts +24 -1
  148. package/dist/core/package-manager.d.ts.map +1 -1
  149. package/dist/core/package-manager.js +210 -51
  150. package/dist/core/package-manager.js.map +1 -1
  151. package/dist/core/pi-ai-schemas.d.ts +167 -0
  152. package/dist/core/pi-ai-schemas.d.ts.map +1 -0
  153. package/dist/core/pi-ai-schemas.js +21 -0
  154. package/dist/core/pi-ai-schemas.js.map +1 -0
  155. package/dist/core/pi-manifest.d.ts +1 -0
  156. package/dist/core/pi-manifest.d.ts.map +1 -1
  157. package/dist/core/pi-manifest.js +4 -0
  158. package/dist/core/pi-manifest.js.map +1 -1
  159. package/dist/core/preferred-providers.d.ts +17 -0
  160. package/dist/core/preferred-providers.d.ts.map +1 -0
  161. package/dist/core/preferred-providers.js +24 -0
  162. package/dist/core/preferred-providers.js.map +1 -0
  163. package/dist/core/project-trust.d.ts +1 -1
  164. package/dist/core/project-trust.d.ts.map +1 -1
  165. package/dist/core/project-trust.js +1 -1
  166. package/dist/core/project-trust.js.map +1 -1
  167. package/dist/core/prompt-templates.d.ts.map +1 -1
  168. package/dist/core/prompt-templates.js +18 -2
  169. package/dist/core/prompt-templates.js.map +1 -1
  170. package/dist/core/provider-composer.d.ts.map +1 -1
  171. package/dist/core/provider-composer.js +3 -1
  172. package/dist/core/provider-composer.js.map +1 -1
  173. package/dist/core/provider-matching.d.ts +11 -0
  174. package/dist/core/provider-matching.d.ts.map +1 -0
  175. package/dist/core/provider-matching.js +14 -0
  176. package/dist/core/provider-matching.js.map +1 -0
  177. package/dist/core/radius-mcp.d.ts +13 -0
  178. package/dist/core/radius-mcp.d.ts.map +1 -0
  179. package/dist/core/radius-mcp.js +29 -0
  180. package/dist/core/radius-mcp.js.map +1 -0
  181. package/dist/core/radius.d.ts +0 -3
  182. package/dist/core/radius.d.ts.map +1 -1
  183. package/dist/core/radius.js +0 -5
  184. package/dist/core/radius.js.map +1 -1
  185. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  186. package/dist/core/remote-catalog-provider.js +2 -0
  187. package/dist/core/remote-catalog-provider.js.map +1 -1
  188. package/dist/core/resource-loader.d.ts +4 -1
  189. package/dist/core/resource-loader.d.ts.map +1 -1
  190. package/dist/core/resource-loader.js +40 -25
  191. package/dist/core/resource-loader.js.map +1 -1
  192. package/dist/core/runtime-credentials.d.ts +8 -0
  193. package/dist/core/runtime-credentials.d.ts.map +1 -1
  194. package/dist/core/runtime-credentials.js +15 -1
  195. package/dist/core/runtime-credentials.js.map +1 -1
  196. package/dist/core/sdk.d.ts.map +1 -1
  197. package/dist/core/sdk.js +3 -1
  198. package/dist/core/sdk.js.map +1 -1
  199. package/dist/core/session-cwd.d.ts +0 -1
  200. package/dist/core/session-cwd.d.ts.map +1 -1
  201. package/dist/core/session-cwd.js +0 -3
  202. package/dist/core/session-cwd.js.map +1 -1
  203. package/dist/core/session-manager.d.ts +7 -0
  204. package/dist/core/session-manager.d.ts.map +1 -1
  205. package/dist/core/session-manager.js +32 -13
  206. package/dist/core/session-manager.js.map +1 -1
  207. package/dist/core/settings-defaults.d.ts +1 -31
  208. package/dist/core/settings-defaults.d.ts.map +1 -1
  209. package/dist/core/settings-defaults.js +1 -31
  210. package/dist/core/settings-defaults.js.map +1 -1
  211. package/dist/core/settings-manager.d.ts +4 -56
  212. package/dist/core/settings-manager.d.ts.map +1 -1
  213. package/dist/core/settings-manager.js +11 -247
  214. package/dist/core/settings-manager.js.map +1 -1
  215. package/dist/core/settings-schema.d.ts +4 -54
  216. package/dist/core/settings-schema.d.ts.map +1 -1
  217. package/dist/core/settings-schema.js +7 -101
  218. package/dist/core/settings-schema.js.map +1 -1
  219. package/dist/core/skills.d.ts.map +1 -1
  220. package/dist/core/skills.js +6 -14
  221. package/dist/core/skills.js.map +1 -1
  222. package/dist/core/slash-commands.d.ts +0 -6
  223. package/dist/core/slash-commands.d.ts.map +1 -1
  224. package/dist/core/slash-commands.js +1 -27
  225. package/dist/core/slash-commands.js.map +1 -1
  226. package/dist/core/source-info.d.ts +9 -0
  227. package/dist/core/source-info.d.ts.map +1 -1
  228. package/dist/core/source-info.js +13 -0
  229. package/dist/core/source-info.js.map +1 -1
  230. package/dist/core/system-prompt.d.ts.map +1 -1
  231. package/dist/core/system-prompt.js +5 -6
  232. package/dist/core/system-prompt.js.map +1 -1
  233. package/dist/core/telemetry.js +1 -1
  234. package/dist/core/telemetry.js.map +1 -1
  235. package/dist/core/theme/theme.d.ts.map +1 -1
  236. package/dist/core/theme/theme.js +5 -1
  237. package/dist/core/theme/theme.js.map +1 -1
  238. package/dist/core/tools/bash.d.ts +2 -2
  239. package/dist/core/tools/bash.d.ts.map +1 -1
  240. package/dist/core/tools/bash.js +35 -5
  241. package/dist/core/tools/bash.js.map +1 -1
  242. package/dist/core/tools/edit-diff.d.ts +23 -14
  243. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  244. package/dist/core/tools/edit-diff.js +182 -41
  245. package/dist/core/tools/edit-diff.js.map +1 -1
  246. package/dist/core/tools/edit.d.ts +3 -3
  247. package/dist/core/tools/edit.d.ts.map +1 -1
  248. package/dist/core/tools/edit.js +10 -11
  249. package/dist/core/tools/edit.js.map +1 -1
  250. package/dist/core/tools/find.d.ts +2 -2
  251. package/dist/core/tools/find.d.ts.map +1 -1
  252. package/dist/core/tools/find.js +82 -36
  253. package/dist/core/tools/find.js.map +1 -1
  254. package/dist/core/tools/grep.d.ts +7 -5
  255. package/dist/core/tools/grep.d.ts.map +1 -1
  256. package/dist/core/tools/grep.js +87 -75
  257. package/dist/core/tools/grep.js.map +1 -1
  258. package/dist/core/tools/ls.d.ts +2 -2
  259. package/dist/core/tools/ls.d.ts.map +1 -1
  260. package/dist/core/tools/ls.js +2 -1
  261. package/dist/core/tools/ls.js.map +1 -1
  262. package/dist/core/tools/powershell.d.ts.map +1 -1
  263. package/dist/core/tools/powershell.js +15 -2
  264. package/dist/core/tools/powershell.js.map +1 -1
  265. package/dist/core/tools/read.d.ts +10 -2
  266. package/dist/core/tools/read.d.ts.map +1 -1
  267. package/dist/core/tools/read.js +141 -25
  268. package/dist/core/tools/read.js.map +1 -1
  269. package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
  270. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  271. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  272. package/dist/core/tools/truncate.d.ts +4 -14
  273. package/dist/core/tools/truncate.d.ts.map +1 -1
  274. package/dist/core/tools/truncate.js +23 -29
  275. package/dist/core/tools/truncate.js.map +1 -1
  276. package/dist/core/tools/write.d.ts +2 -2
  277. package/dist/core/tools/write.d.ts.map +1 -1
  278. package/dist/core/tools/write.js.map +1 -1
  279. package/dist/core/trust-manager.d.ts.map +1 -1
  280. package/dist/core/trust-manager.js +14 -8
  281. package/dist/core/trust-manager.js.map +1 -1
  282. package/dist/core/usage-totals.d.ts.map +1 -1
  283. package/dist/core/usage-totals.js +2 -0
  284. package/dist/core/usage-totals.js.map +1 -1
  285. package/dist/extensions/codemode/execute.js +4 -4
  286. package/dist/extensions/codemode/execute.js.map +1 -1
  287. package/dist/extensions/codemode/tool.d.ts +2 -1
  288. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  289. package/dist/extensions/codemode/tool.js +59 -12
  290. package/dist/extensions/codemode/tool.js.map +1 -1
  291. package/dist/extensions/llama/client.d.ts +2 -0
  292. package/dist/extensions/llama/client.d.ts.map +1 -1
  293. package/dist/extensions/llama/client.js +23 -2
  294. package/dist/extensions/llama/client.js.map +1 -1
  295. package/dist/extensions/llama/index.d.ts.map +1 -1
  296. package/dist/extensions/llama/index.js +1 -1
  297. package/dist/extensions/llama/index.js.map +1 -1
  298. package/dist/extensions/mcp/cli.d.ts +2 -0
  299. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  300. package/dist/extensions/mcp/cli.js +83 -22
  301. package/dist/extensions/mcp/cli.js.map +1 -1
  302. package/dist/extensions/mcp/config.d.ts.map +1 -1
  303. package/dist/extensions/mcp/config.js +4 -7
  304. package/dist/extensions/mcp/config.js.map +1 -1
  305. package/dist/extensions/mcp/index.d.ts.map +1 -1
  306. package/dist/extensions/mcp/index.js +5 -4
  307. package/dist/extensions/mcp/index.js.map +1 -1
  308. package/dist/extensions/mcp/oauth.d.ts +11 -49
  309. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  310. package/dist/extensions/mcp/oauth.js +56 -296
  311. package/dist/extensions/mcp/oauth.js.map +1 -1
  312. package/dist/extensions/mcp/resources.d.ts +1 -1
  313. package/dist/extensions/mcp/resources.d.ts.map +1 -1
  314. package/dist/extensions/mcp/resources.js +4 -3
  315. package/dist/extensions/mcp/resources.js.map +1 -1
  316. package/dist/extensions/mcp/runtime.d.ts +4 -3
  317. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  318. package/dist/extensions/mcp/runtime.js +7 -5
  319. package/dist/extensions/mcp/runtime.js.map +1 -1
  320. package/dist/extensions/mcp/tools.d.ts +2 -23
  321. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  322. package/dist/extensions/mcp/tools.js +6 -58
  323. package/dist/extensions/mcp/tools.js.map +1 -1
  324. package/dist/extensions/punch/index.d.ts.map +1 -1
  325. package/dist/extensions/punch/index.js +1 -1
  326. package/dist/extensions/punch/index.js.map +1 -1
  327. package/dist/extensions/punch/todos.js +1 -1
  328. package/dist/extensions/punch/todos.js.map +1 -1
  329. package/dist/extensions/subagent/index.d.ts.map +1 -1
  330. package/dist/extensions/subagent/index.js +278 -129
  331. package/dist/extensions/subagent/index.js.map +1 -1
  332. package/dist/extensions/tool-search/tool.d.ts +21 -6
  333. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  334. package/dist/extensions/tool-search/tool.js +122 -42
  335. package/dist/extensions/tool-search/tool.js.map +1 -1
  336. package/dist/index.d.ts +4 -4
  337. package/dist/index.d.ts.map +1 -1
  338. package/dist/index.js +2 -0
  339. package/dist/index.js.map +1 -1
  340. package/dist/main.d.ts.map +1 -1
  341. package/dist/main.js +106 -14
  342. package/dist/main.js.map +1 -1
  343. package/dist/modes/print-mode.d.ts.map +1 -1
  344. package/dist/modes/print-mode.js +19 -10
  345. package/dist/modes/print-mode.js.map +1 -1
  346. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  347. package/dist/modes/rpc/rpc-mode.js +53 -23
  348. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  349. package/dist/package-manager-cli.d.ts.map +1 -1
  350. package/dist/package-manager-cli.js +94 -12
  351. package/dist/package-manager-cli.js.map +1 -1
  352. package/dist/utils/ansi.d.ts.map +1 -1
  353. package/dist/utils/ansi.js +5 -2
  354. package/dist/utils/ansi.js.map +1 -1
  355. package/dist/utils/changelog.d.ts +2 -2
  356. package/dist/utils/changelog.d.ts.map +1 -1
  357. package/dist/utils/changelog.js +12 -9
  358. package/dist/utils/changelog.js.map +1 -1
  359. package/dist/utils/clipboard-command.d.ts.map +1 -1
  360. package/dist/utils/clipboard-command.js +4 -0
  361. package/dist/utils/clipboard-command.js.map +1 -1
  362. package/dist/utils/fuzzy.d.ts.map +1 -1
  363. package/dist/utils/fuzzy.js +59 -44
  364. package/dist/utils/fuzzy.js.map +1 -1
  365. package/dist/utils/git.d.ts +11 -1
  366. package/dist/utils/git.d.ts.map +1 -1
  367. package/dist/utils/git.js +44 -0
  368. package/dist/utils/git.js.map +1 -1
  369. package/dist/utils/image-resize-core.d.ts.map +1 -1
  370. package/dist/utils/image-resize-core.js +5 -3
  371. package/dist/utils/image-resize-core.js.map +1 -1
  372. package/dist/utils/image-resize.d.ts.map +1 -1
  373. package/dist/utils/image-resize.js +3 -1
  374. package/dist/utils/image-resize.js.map +1 -1
  375. package/dist/utils/open-browser.d.ts.map +1 -1
  376. package/dist/utils/open-browser.js +4 -1
  377. package/dist/utils/open-browser.js.map +1 -1
  378. package/dist/utils/paths.d.ts +17 -0
  379. package/dist/utils/paths.d.ts.map +1 -1
  380. package/dist/utils/paths.js +42 -1
  381. package/dist/utils/paths.js.map +1 -1
  382. package/dist/utils/shell.d.ts.map +1 -1
  383. package/dist/utils/shell.js +14 -0
  384. package/dist/utils/shell.js.map +1 -1
  385. package/dist/utils/terminal-question.d.ts +8 -0
  386. package/dist/utils/terminal-question.d.ts.map +1 -0
  387. package/dist/utils/terminal-question.js +24 -0
  388. package/dist/utils/terminal-question.js.map +1 -0
  389. package/dist/utils/text.d.ts +2 -0
  390. package/dist/utils/text.d.ts.map +1 -1
  391. package/dist/utils/text.js +5 -0
  392. package/dist/utils/text.js.map +1 -1
  393. package/dist/utils/tools-manager.d.ts.map +1 -1
  394. package/dist/utils/tools-manager.js +30 -35
  395. package/dist/utils/tools-manager.js.map +1 -1
  396. package/dist/utils/web-url.d.ts +12 -0
  397. package/dist/utils/web-url.d.ts.map +1 -0
  398. package/dist/utils/web-url.js +20 -0
  399. package/dist/utils/web-url.js.map +1 -0
  400. package/docs/cli-integration.md +3 -5
  401. package/docs/cli.md +45 -26
  402. package/docs/compaction.md +9 -9
  403. package/docs/configuration.md +1 -2
  404. package/docs/containerization.md +16 -14
  405. package/docs/custom-provider.md +5 -3
  406. package/docs/docs.json +9 -9
  407. package/docs/environment-variables.md +5 -12
  408. package/docs/extensions.md +683 -757
  409. package/docs/how-pi-works.md +5 -5
  410. package/docs/index.md +5 -5
  411. package/docs/llama-cpp.md +41 -39
  412. package/docs/mcp.md +12 -10
  413. package/docs/message-types.md +1 -1
  414. package/docs/models-configuration.md +6 -1
  415. package/docs/models.md +18 -19
  416. package/docs/nvidia-rtx-llama-cpp.md +1 -1
  417. package/docs/packages.md +21 -1
  418. package/docs/prompt-templates.md +11 -9
  419. package/docs/providers.md +8 -8
  420. package/docs/quickstart.md +28 -52
  421. package/docs/rpc-commands.md +2 -2
  422. package/docs/rpc-extension-ui.md +5 -7
  423. package/docs/rpc.md +4 -2
  424. package/docs/sdk.md +1 -1
  425. package/docs/security.md +9 -5
  426. package/docs/session-format.md +7 -9
  427. package/docs/sessions.md +26 -26
  428. package/docs/settings.md +36 -67
  429. package/docs/shell-aliases.md +7 -7
  430. package/docs/skills.md +4 -4
  431. package/docs/slash-commands.md +50 -58
  432. package/docs/termux.md +8 -9
  433. package/docs/themes.md +21 -41
  434. package/docs/usage.md +59 -177
  435. package/docs/virtual-models.md +4 -4
  436. package/docs/windows.md +8 -10
  437. package/examples/extensions/README.md +3 -2
  438. package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
  439. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  440. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  441. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  442. package/examples/extensions/gondolin/package-lock.json +16 -26
  443. package/examples/extensions/gondolin/package.json +2 -2
  444. package/examples/extensions/reload-runtime.ts +17 -5
  445. package/examples/extensions/rpc-demo.ts +2 -2
  446. package/examples/extensions/subagent/README.md +14 -11
  447. package/examples/extensions/with-deps/package-lock.json +2 -2
  448. package/examples/extensions/with-deps/package.json +1 -1
  449. package/examples/tsconfig.json +208 -0
  450. package/npm-shrinkwrap.json +32 -34
  451. package/package.json +12 -14
  452. package/schemas/models.schema.json +65 -36
  453. package/schemas/settings.schema.json +17 -243
  454. package/dist/bundle/chunks/anthropic-messages-WAYXCPZL.js +0 -6
  455. package/dist/bundle/chunks/azure-openai-responses-LUIPKPFC.js +0 -2
  456. package/dist/bundle/chunks/chunk-275CIYA5.js +0 -16
  457. package/dist/bundle/chunks/chunk-2W2ATKZM.js +0 -2
  458. package/dist/bundle/chunks/chunk-3V45WARH.js +0 -7
  459. package/dist/bundle/chunks/chunk-4LBJE4YM.js +0 -14
  460. package/dist/bundle/chunks/chunk-4NE64BTO.js +0 -82
  461. package/dist/bundle/chunks/chunk-7SFLP7ZK.js +0 -1197
  462. package/dist/bundle/chunks/chunk-BQU3RKDL.js +0 -2
  463. package/dist/bundle/chunks/chunk-NJK3U3WK.js +0 -8
  464. package/dist/bundle/chunks/chunk-NQWQE4BR.js +0 -11
  465. package/dist/bundle/chunks/chunk-TEPMHNKQ.js +0 -2
  466. package/dist/bundle/chunks/chunk-TRN3ET6M.js +0 -2
  467. package/dist/bundle/chunks/chunk-UE7JCDFW.js +0 -2
  468. package/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
  469. package/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
  470. package/dist/bundle/chunks/cli-W5KJM7YB.js +0 -51
  471. package/dist/bundle/chunks/mistral-conversations-FEBYNTL2.js +0 -5
  472. package/dist/bundle/chunks/openai-codex-responses-MI7TTP3C.js +0 -10
  473. package/dist/bundle/chunks/openai-completions-BVORSTAM.js +0 -7
  474. package/dist/bundle/chunks/openai-responses-TLIV5OQA.js +0 -4
  475. package/dist/bundle/chunks/pi-messages-4MVQCGGY.js +0 -8
  476. package/dist/bundle/chunks/virtual-modules-QK7S56IZ.js +0 -2
  477. package/dist/core/bug-report-upload.d.ts +0 -12
  478. package/dist/core/bug-report-upload.d.ts.map +0 -1
  479. package/dist/core/bug-report-upload.js +0 -22
  480. package/dist/core/bug-report-upload.js.map +0 -1
  481. package/dist/core/bug-report.d.ts +0 -184
  482. package/dist/core/bug-report.d.ts.map +0 -1
  483. package/dist/core/bug-report.js +0 -292
  484. package/dist/core/bug-report.js.map +0 -1
  485. package/dist/core/crash-log.d.ts +0 -27
  486. package/dist/core/crash-log.d.ts.map +0 -1
  487. package/dist/core/crash-log.js +0 -140
  488. package/dist/core/crash-log.js.map +0 -1
  489. package/dist/core/footer-data-provider.d.ts +0 -64
  490. package/dist/core/footer-data-provider.d.ts.map +0 -1
  491. package/dist/core/footer-data-provider.js +0 -338
  492. package/dist/core/footer-data-provider.js.map +0 -1
  493. package/dist/utils/zip.d.ts +0 -7
  494. package/dist/utils/zip.d.ts.map +0 -1
  495. package/dist/utils/zip.js +0 -60
  496. package/dist/utils/zip.js.map +0 -1
  497. package/docs/images/interactive-mode.png +0 -0
  498. package/docs/images/tree-view.png +0 -0
  499. package/docs/keybindings.md +0 -194
  500. package/docs/terminal-setup.md +0 -17
  501. package/docs/tmux.md +0 -55
  502. package/docs/tui.md +0 -125
  503. package/examples/extensions/sandbox/index.ts +0 -321
  504. package/examples/extensions/sandbox/package-lock.json +0 -66
  505. package/examples/extensions/sandbox/package.json +0 -22
package/docs/settings.md CHANGED
@@ -16,11 +16,9 @@ Add `"$schema": "https://raw.githubusercontent.com/punch-bot/core/main/packages/
16
16
  | `modelThinkingLevels` | object | None | Per-model startup thinking levels keyed by exact `provider/modelId`. |
17
17
  | `thinkingBudgets` | object | Built-in budgets | Token budgets for `minimal`, `low`, `medium`, and `high` thinking levels. |
18
18
  | `enabledModels` | `string[]` | All available models | Model patterns or globs used for startup selection and model cycling. Uses the same format as `--models`; stale entries are skipped with a warning. |
19
- | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
20
- | `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
21
- | `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"streaming"` | Keep eligible provider prompt caches warm during active runs or, with `"idle"`, between runs. Global setting only. |
19
+ | `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"idle"` | Keep eligible provider prompt caches warm during active runs and, with `"idle"`, for up to 30 minutes between runs. `"streaming"` warms only during active runs. Global setting only. |
22
20
 
23
- Cache warming runs only when the model declares a cache lifetime and Pi estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. `/session` shows the next decision; extensions can override it with `cache_warming_decision`. See [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes).
21
+ Cache warming runs only when the model declares a cache lifetime and Pi estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. Extensions can override the decision with `cache_warming_decision`. See [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes).
24
22
 
25
23
  See [Choose a Model](models.md) for model selection and thinking controls.
26
24
 
@@ -30,9 +28,6 @@ See [Choose a Model](models.md) for model selection and thinking controls.
30
28
  |---|---|---|---|
31
29
  | `steeringMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued steering messages are delivered. |
32
30
  | `followUpMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued follow-up messages are delivered. |
33
- | `externalEditor` | string | `$VISUAL`, `$EDITOR`, then platform default | Command opened by the external-editor keybinding. |
34
- | `doubleEscapeAction` | `"tree" \| "fork" \| "none"` | `"tree"` | Action for double Escape with an empty editor. |
35
- | `treeFilterMode` | `"default" \| "no-tools" \| "user-only" \| "labeled-only" \| "all"` | `"default"` | Initial filter used by `/tree`. |
36
31
  | `defaultProjectTrust` | `"ask" \| "always" \| "never"` | `"ask"` | Fallback project-trust behavior. **Can only be set in agent-directory settings.** |
37
32
 
38
33
  ## Tools
@@ -55,9 +50,9 @@ A list of only `+name` and `-name` entries changes the inherited selection inste
55
50
 
56
51
  This replaces `bash` with `powershell` and enables `grep`: `["-bash", "+powershell", "+grep"]`. Project settings apply on top of user settings: a project list with only `+name` and `-name` entries changes the user's selection, and a project list with a plain name replaces it. In one list, plain names form the selection, and `+name` and `-name` then apply in order.
57
52
 
58
- `/reload` enables tools newly added to `defaultTools`. It does not disable tools removed from it or re-enable unchanged tools you turned off. `--tools` with plain names, `--no-tools`, and `--no-builtin-tools` override `defaultTools`, also on reload.
53
+ Reloading a running session with an extension command's `ctx.reload()` enables tools newly added to `defaultTools`. It does not disable tools removed from it or re-enable unchanged tools you turned off. `--tools` with plain names, `--no-tools`, and `--no-builtin-tools` override `defaultTools`, also on reload.
59
54
 
60
- CLI tool options override this setting for one invocation. `--tools` with only `+name` and `-name` entries changes the resolved `defaultTools` selection instead, for example `pi --tools +codemode`. On `/reload`, these entries apply to the reloaded setting too, so a tool removed with `-name` stays removed. See [Command Line](cli.md#tools).
55
+ CLI tool options override this setting for one invocation. `--tools` with only `+name` and `-name` entries changes the resolved `defaultTools` selection instead, for example `pi --tools +codemode`. On reload, these entries apply to the reloaded setting too, so a tool removed with `-name` stays removed. See [Command Line](cli.md#tools).
61
56
 
62
57
  ## Sessions and context
63
58
 
@@ -83,72 +78,50 @@ See [Compaction Reference](compaction.md) for trigger, summarization, and valida
83
78
  ### Branch summaries
84
79
 
85
80
  | Setting | Type | Default | Description |
86
- |---------|------|---------|-------------|
87
- | `terminal.showImages` | boolean | `true` | Show images in terminal (if supported) |
88
- | `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells |
89
- | `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when content shrinks (can cause flicker) |
90
- | `terminal.trueColor` | boolean or `"auto"` | `"auto"` | Override truecolor support (advanced, JSON-only) |
91
- | `images.autoResize` | boolean | `true` | Resize images to 2000x2000 max. Applies to `@file` attachments, `read`, and images returned by tools |
92
- | `images.blockImages` | boolean | `false` | Block all images from being sent to LLM |
93
-
94
- ### Shell
95
-
96
- | Setting | Type | Default | Description |
97
- |---------|------|---------|-------------|
98
- | `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows); supports a leading `~` for the home directory |
99
- | `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
100
- | `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
81
+ |---|---|---|---|
82
+ | `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when summarizing branch history. |
101
83
 
102
- Windows paths in JSON must use forward slashes or escaped backslashes:
84
+ <a id="terminal-and-display"></a>
103
85
 
104
- ## Terminal and display
86
+ ## Themes and images
105
87
 
106
88
  | Setting | Type | Default | Description |
107
89
  |---|---|---|---|
108
- | `theme` | string | `"system"` | Built-in or custom theme name. `system` derives colors from the terminal theme. |
109
- | `quietStartup` | boolean \| `"header"` | `false` | `true` hides the startup header and loaded-resource listing. `"header"` keeps the header (version and key hints) but hides the model scope line and loaded-resource listing. |
110
- | `tuiMode` | `"regular" \| "fullscreen"` | `"fullscreen"` | Interactive terminal UI mode. |
111
- | `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
112
- | `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. |
113
- | `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. |
114
- | `fullscreenWheelScrollLines` | `"auto"` \| number | `"auto"` | Lines per mouse-wheel event in fullscreen mode, from 1 to 100. `"auto"` moves one line per event in local macOS terminals, which already accelerate wheel and trackpad input; elsewhere, and over SSH, it speeds up fast wheel spins to at most 6 lines per event. Alt+wheel moves five times as far. |
115
- | `editorPaddingX` | number | `0` | Horizontal editor padding from 0 to 3 cells. |
116
- | `outputPad` | `0 \| 1` | `1` | Horizontal transcript padding. |
117
- | `autocompleteMaxVisible` | number | `5` | Visible autocomplete entries, from 3 to 20. |
118
- | `showHardwareCursor` | boolean | `false` | Use the terminal cursor instead of Pi's drawn cursor. Pi still positions it for input methods. |
119
- | `terminal.showImages` | boolean | `true` | Display inline images when supported. |
120
- | `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
121
- | `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
122
- | `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
123
- | `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
124
- | `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
125
- | `terminal.trueColor` | `boolean \| "auto"` | `"auto"` | Override true-color detection. |
126
- | `images.autoResize` | boolean | `true` | Resize images to at most 2000 by 2000 pixels before sending them to a model. |
90
+ | `theme` | string | `"system"` | Built-in or custom theme name for HTML exports and extension colors. |
91
+ | `terminal.trueColor` | `boolean \| "auto"` | `"auto"` | Override truecolor detection. JSON-only. |
92
+ | `images.autoResize` | boolean | `true` | Resize images to at most 2000 by 2000 pixels before sending them to a model. Applies to `@file` attachments, `read`, and images returned by tools. |
127
93
  | `images.blockImages` | boolean | `false` | Prevent images from being sent to models. |
128
- | `markdown.codeBlockIndent` | string | `" "` | Prefix used to indent rendered code blocks. |
129
- | `markdown.mermaid` | `"off" \| "final" \| "streaming"` | `"streaming"` | Mermaid rendering mode. |
130
94
 
131
- See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and platform details.
95
+ See [Themes](themes.md) for theme files and truecolor detection.
132
96
 
133
97
  ## Network and retries
134
98
 
135
99
  | Setting | Type | Default | Description |
136
- |---------|------|---------|-------------|
137
- | `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths, plus `~`. |
138
-
139
- ```json
140
- { "sessionDir": ".pi/sessions" }
141
- ```
142
-
143
- When multiple sources specify a session directory, precedence is `--session-dir`, `PI_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
144
-
145
- ### Model scope
100
+ |---|---|---|---|
101
+ | `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
102
+ | `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.** |
103
+ | `httpIdleTimeoutMs` | number \| `"disabled"` | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` or `"disabled"` to disable. |
104
+ | `websocketConnectTimeoutMs` | number \| `"disabled"` | `15000` | WebSocket connection timeout in milliseconds. Set to `0` or `"disabled"` to disable. |
105
+ | `retry.enabled` | boolean | `true` | Enable automatic agent-level retry for transient failures. |
106
+ | `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts. |
107
+ | `retry.baseDelayMs` | number | `2000` | Initial exponential-backoff delay in milliseconds. |
108
+ | `retry.maxAgentDelayMs` | number | `60000` | Maximum agent-level retry delay in milliseconds. |
109
+ | `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Provider request timeout in milliseconds. |
110
+ | `retry.provider.maxRetries` | number | `0` | Provider-level retry attempts. |
111
+ | `retry.provider.maxRetryDelayMs` | number | `60000` | Maximum server-requested delay in milliseconds. Set to `0` to disable the limit. |
112
+
113
+ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are required. Provider retries can delay Pi from handling quota and usage-limit errors itself.
114
+
115
+ ## Shell
146
116
 
147
117
  | Setting | Type | Default | Description |
148
- |---------|------|---------|-------------|
149
- | `enabledModels` | string[] | - | Model patterns or globs available to the session (same format as `--models`); stale entries are skipped with a warning |
118
+ |---|---|---|---|
119
+ | `shellPath` | string | Platform default | Custom shell executable path, for example for Cygwin on Windows. Supports a leading `~`. |
120
+ | `shellCommandPrefix` | string | None | Prefix prepended to every shell command, for example `"shopt -s expand_aliases"`. |
121
+ | `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation, for example `["mise", "exec", "node@20", "--", "npm"]`. |
122
+ | `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). |
150
123
 
151
- See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
124
+ Windows paths in JSON must use forward slashes or escaped backslashes. See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
152
125
 
153
126
  ## Resources
154
127
 
@@ -161,17 +134,13 @@ Resource paths in user settings resolve from the agent directory. Paths in proje
161
134
  | `skills` | `string[]` | `[]` | Skill files or directories. |
162
135
  | `prompts` | `string[]` | `[]` | Prompt-template files or directories. |
163
136
  | `themes` | `string[]` | `[]` | Theme files or directories. |
164
- | `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands. |
165
137
 
166
138
  Resource arrays support glob exclusions with `!pattern`, exact inclusion with `+path`, and exact exclusion with `-path`. Pi loads resources listed in both user-level and project settings.
167
139
 
168
- The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:codemode`, and `builtin:tool-search` in `extensions`. They load by default; `-builtin:mcp` disables one. A `+builtin:<name>` or `-builtin:<name>` entry in project settings overrides the user setting. `pi config` lists them under Built-in. `--no-extensions` disables them too, and `-e builtin:<name>` loads one explicitly.
140
+ The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:codemode`, and `builtin:tool-search` in `extensions`. They load by default; `-builtin:mcp` disables one. A `+builtin:<name>` or `-builtin:<name>` entry in project settings overrides the user setting. `pi config` prints them with the other resolved resources. `--no-extensions` disables them too, and `-e builtin:<name>` loads one explicitly.
169
141
 
170
- ## Updates, telemetry, and warnings
142
+ ## Telemetry
171
143
 
172
144
  | Setting | Type | Default | Description |
173
145
  |---|---|---|---|
174
- | `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. |
175
146
  | `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
176
- | `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
177
- | `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
@@ -9,7 +9,7 @@ Use `shellPath` to choose the Bash executable and `shellCommandPrefix` to run se
9
9
  | Command source | Shell |
10
10
  |---|---|
11
11
  | Model calls the built-in `bash` tool | Pi's resolved Bash executable |
12
- | You enter `!command` or `!!command` | The same resolved Bash executable |
12
+ | An RPC client sends the [`bash`](rpc-commands.md#bash) command | The same resolved Bash executable |
13
13
  | Model calls the optional `powershell` tool | PowerShell 7 (`pwsh.exe`) or Windows PowerShell |
14
14
  | An extension provides or replaces a shell tool | The operations implemented by that extension |
15
15
 
@@ -33,11 +33,11 @@ On Windows, use forward slashes or escape backslashes:
33
33
  }
34
34
  ```
35
35
 
36
- Run `/reload` after changing the setting. See [Run Pi on Windows](windows.md) for the native Windows defaults.
36
+ Restart Pi after changing the setting. See [Run Pi on Windows](windows.md) for the native Windows defaults.
37
37
 
38
38
  ## Run setup before every Bash command
39
39
 
40
- Set `shellCommandPrefix` to prepend shell setup to both the built-in `bash` tool and user-entered `!` or `!!` commands:
40
+ Set `shellCommandPrefix` to prepend shell setup to both the built-in `bash` tool and the RPC `bash` command:
41
41
 
42
42
  ```json
43
43
  {
@@ -66,10 +66,10 @@ Then configure Pi to enable alias expansion and load the file:
66
66
  }
67
67
  ```
68
68
 
69
- Run `/reload`, then verify the alias through Pi:
69
+ Then verify the alias through Pi:
70
70
 
71
- ```text
72
- !ll
71
+ ```bash
72
+ pi --tools bash -p "Run the shell command ll and show its output."
73
73
  ```
74
74
 
75
75
  The command should produce the same listing as `ls -la`.
@@ -78,7 +78,7 @@ Aliases must use Bash-compatible syntax. Do not source an arbitrary `.zshrc` int
78
78
 
79
79
  ## Troubleshooting
80
80
 
81
- ### The prefix works for `!` but not for an extension tool
81
+ ### The prefix works for the built-in tool but not for an extension tool
82
82
 
83
83
  `shellCommandPrefix` configures Pi's built-in Bash execution. An extension that replaces the `bash` tool or provides its own shell operations controls its own setup. Check that extension's documentation.
84
84
 
package/docs/skills.md CHANGED
@@ -46,11 +46,11 @@ When a task matches, the model reads `SKILL.md` and follows its instructions. Th
46
46
 
47
47
  Arguments after `/skill:name` are appended to the loaded instructions as a user request:
48
48
 
49
- ```text
50
- /skill:pdf-tools extract report.pdf
49
+ ```bash
50
+ pi -p "/skill:pdf-tools extract report.pdf"
51
51
  ```
52
52
 
53
- Set `disable-model-invocation: true` in frontmatter when a skill should be available only through its explicit command. The `enableSkillCommands` [setting](settings.md) controls whether skill commands appear in interactive command discovery; manually entered `/skill:name` commands still work.
53
+ Set `disable-model-invocation: true` in frontmatter when a skill should be available only through its explicit command.
54
54
 
55
55
  <a id="choose-where-it-loads"></a>
56
56
 
@@ -86,7 +86,7 @@ Malformed `SKILL.md` files and declared skills without descriptions are not load
86
86
 
87
87
  ## Validate and share a skill
88
88
 
89
- Run Pi from a location where the skill is discoverable, then inspect the startup diagnostics and `/skill:name` command. Run `/reload` after editing a skill during an active session.
89
+ Run Pi from a location where the skill is discoverable, then inspect the startup diagnostics and run `/skill:name`. RPC [`get_commands`](rpc-commands.md#get_commands) lists loaded skills. Restart Pi after editing a skill, or reload a running session from an extension command with `ctx.reload()`.
90
90
 
91
91
  Use a [Pi package](packages.md) to distribute one or more skills through npm or git. Keep environment setup inside the skill and declare any required runtime dependencies in the package.
92
92
 
@@ -1,60 +1,52 @@
1
1
  # Slash commands
2
2
 
3
- Type `/` in Pi's terminal editor to search the commands available in the current session. This page lists the built-in commands in the current Pi release.
4
-
5
- Extensions, prompt templates, and skills can add commands. The command menu in Pi is therefore the exact reference for the resources loaded in your session.
6
-
7
- ## Models and settings
8
-
9
- | Command | Description |
10
- |---|---|
11
- | `/settings` | Open settings |
12
- | `/model [provider/model]` | Select a model |
13
- | `/thinking [level]` | Set the thinking level |
14
- | `/scoped-models` | Configure the models used by interactive cycling |
15
- | `/login [provider]` | Add provider authentication |
16
- | `/logout` | Remove provider authentication |
17
- | `/llama` | Manage models on the configured llama.cpp router |
18
-
19
- ## Sessions and context
20
-
21
- | Command | Description |
22
- |---|---|
23
- | `/new` | Start a new session |
24
- | `/resume` | Switch to another saved session |
25
- | `/name [name]` | Set the session display name, or show the current name when omitted |
26
- | `/session` | Show current session information and statistics |
27
- | `/tree` | Navigate the session tree |
28
- | `/fork` | Create a new session from an earlier user message |
29
- | `/clone` | Duplicate the current session at its current position |
30
- | `/compact [instructions]` | Compact the current context, optionally with custom instructions |
31
- | `/import <path>` | Import and resume a JSONL session |
32
-
33
- ## Export and share
34
-
35
- | Command | Description |
36
- |---|---|
37
- | `/copy` | Copy the last assistant message |
38
- | `/export [path]` | Export the session as HTML or JSONL |
39
- | `/share` | Upload the session and return a viewer link |
40
- | `/bug [description]` | Prepare a private bug report for the Pi developers |
41
-
42
- Review a session before exporting or sharing it. Sessions can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
43
-
44
- ## Runtime and project
45
-
46
- | Command | Description |
47
- |---|---|
48
- | `/trust` | Save a project trust decision for future Pi processes |
49
- | `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
50
- | `/hotkeys` | Show active keyboard shortcuts |
51
- | `/changelog` | Show changelog entries |
52
- | `/quit` | Quit Pi |
53
-
54
- ## Commands added by resources
55
-
56
- - Extensions can register commands with their own arguments and completion behavior.
57
- - Each prompt template is available under its template name.
58
- - Skills are available as `/skill:name` when skill commands are enabled.
59
-
60
- Use `/reload` after adding or changing a discovered command resource. See [Extensions](extensions.md), [Prompt Templates](prompt-templates.md), and [Skills](skills.md) for their loading and naming rules.
3
+ Pi has no built-in slash commands. A prompt that starts with `/` runs a command only when its name matches a command added by a loaded resource:
4
+
5
+ | Resource | Command | Reference |
6
+ |---|---|---|
7
+ | Extension | `/name`, registered with `pi.registerCommand()` | [Extensions](extensions.md) |
8
+ | Prompt template | `/name`, from the template's filename | [Prompt Templates](prompt-templates.md) |
9
+ | Skill | `/skill:name` | [Skills](skills.md) |
10
+
11
+ Pi checks extension commands first, then skills, then prompt templates. A prompt such as `/model` that matches none of them is sent to the model as plain text.
12
+
13
+ Send commands as prompts in any mode:
14
+
15
+ ```bash
16
+ pi -p "/review concurrency"
17
+ pi -p "/skill:pdf-tools extract report.pdf"
18
+ ```
19
+
20
+ In RPC mode, send them through the [`prompt`](rpc-commands.md#prompt) command. [`get_commands`](rpc-commands.md#get_commands) lists the commands loaded in the current session.
21
+
22
+ ## Commands from built-in extensions
23
+
24
+ | Command | Extension | Description |
25
+ |---|---|---|
26
+ | `/mcp` | `builtin:mcp` | Show MCP server status. `/mcp login <server>`, `/mcp logout <server>`, and `/mcp reconnect <server>` perform those actions. See [MCP Servers](mcp.md). |
27
+ | `/llama` | `builtin:llama.cpp` | Load, unload, and download models on the configured llama.cpp router through extension dialogs. Use it over RPC, whose client shows the dialogs. See [Run Local Models](llama-cpp.md). |
28
+
29
+ ## Replacements for upstream pi commands
30
+
31
+ Upstream pi's terminal UI provides built-in commands such as `/model` and `/tree`. In Pi, use these options, RPC commands, or extension APIs instead:
32
+
33
+ | Upstream command | CLI | RPC command | Extension API |
34
+ |---|---|---|---|
35
+ | `/model` | `--model` | `set_model`, `cycle_model` | `pi.setModel()` |
36
+ | `/thinking` | `--thinking` | `set_thinking_level`, `cycle_thinking_level` | `pi.setThinkingLevel()` |
37
+ | `/scoped-models` | `--models`, `enabledModels` setting | | `ctx.scopedModels` |
38
+ | `/login`, `/logout` | `pi auth login`, `pi auth logout` | | |
39
+ | `/settings` | Edit [`settings.json`](settings.md) | | |
40
+ | `/new` | | `new_session` | `ctx.newSession()` |
41
+ | `/resume` | `--continue`, `--session` | `switch_session` | `ctx.switchSession()` |
42
+ | `/name` | `--name` | `set_session_name` | `pi.setSessionName()` |
43
+ | `/session` | | `get_state`, `get_session_stats` | |
44
+ | `/tree` | | `get_tree` | `ctx.navigateTree()` |
45
+ | `/fork` | `--fork` | `fork` | `ctx.fork()` |
46
+ | `/clone` | | `clone` | `ctx.fork(entryId, { position: "at" })` |
47
+ | `/compact` | | `compact` | `ctx.compact()` |
48
+ | `/copy` | | `get_last_assistant_text` | |
49
+ | `/export` | `--export` | `export_html` | |
50
+ | `/reload` | Restart Pi | | `ctx.reload()` |
51
+
52
+ See [RPC Commands](rpc-commands.md) for each command's fields.
package/docs/termux.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Run Pi on Android with Termux
2
2
 
3
- Pi runs on Android through [Termux](https://termux.dev/), a terminal emulator and Linux environment. Text input, file tools, and shell commands are supported. Pi can copy and paste text through the Android clipboard with Termux:API. Clipboard image paste is not supported.
3
+ Pi runs on Android through [Termux](https://termux.dev/), a terminal emulator and Linux environment. Print, JSON, and RPC modes, file tools, and shell commands are supported. Extensions can copy text to the Android clipboard through Termux:API.
4
4
 
5
5
  ## Before you begin
6
6
 
7
7
  Install Termux from [GitHub or F-Droid](https://github.com/termux/termux-app#installation). Do not use the deprecated Google Play build.
8
8
 
9
- [Termux:API](https://github.com/termux/termux-api#installation) is optional. Install it only when you want Pi to copy or paste Android clipboard text, or when shell commands need Android device APIs.
9
+ [Termux:API](https://github.com/termux/termux-api#installation) is optional. Install it only when an extension should copy text to the Android clipboard, or when shell commands need Android device APIs.
10
10
 
11
11
  ## Install Pi
12
12
 
@@ -34,14 +34,13 @@ Install Termux from [GitHub or F-Droid](https://github.com/termux/termux-app#ins
34
34
  pi --version
35
35
  ```
36
36
 
37
- 5. Open the folder you want to work in and start Pi:
37
+ 5. Open the folder you want to work in:
38
38
 
39
39
  ```bash
40
40
  cd /path/to/working-folder
41
- pi
42
41
  ```
43
42
 
44
- Continue with the main [Quickstart](quickstart.md#3-choose-a-model) to connect a model and run your first task.
43
+ Continue with the main [Quickstart](quickstart.md#2-choose-a-model) to connect a model and run your first task.
45
44
 
46
45
  ## Access Android shared storage
47
46
 
@@ -57,7 +56,7 @@ Only grant this permission when Pi should be able to access those files. Command
57
56
 
58
57
  ## Use clipboard commands
59
58
 
60
- Pi uses `termux-clipboard-set` to copy text and `termux-clipboard-get` for its clipboard-paste shortcut. Shell commands can use both commands directly. Install the Termux:API app and its command-line package:
59
+ The SDK's `copyToClipboard()`, which extensions can call, uses `termux-clipboard-set` in Termux. Shell commands can use `termux-clipboard-set` and `termux-clipboard-get` directly. Install the Termux:API app and its command-line package:
61
60
 
62
61
  ```bash
63
62
  pkg install termux-api
@@ -72,7 +71,7 @@ termux-clipboard-get
72
71
 
73
72
  The second command should print `Pi clipboard test`.
74
73
 
75
- The Termux clipboard API supports text only. Pi's clipboard-paste shortcut inserts that text into the editor but cannot attach clipboard images.
74
+ The Termux clipboard API supports text only.
76
75
 
77
76
  ## Add Termux-specific instructions
78
77
 
@@ -88,7 +87,7 @@ Pi detects that it is running in Termux, but it cannot infer how you want it to
88
87
  - Do not access shared storage unless the task requires it.
89
88
  ````
90
89
 
91
- Run `/reload` after changing the file during an active session.
90
+ Pi reads the file at startup, so the change applies to the next Pi process.
92
91
 
93
92
  ## Troubleshooting
94
93
 
@@ -99,7 +98,7 @@ Confirm that you installed both components:
99
98
  1. The Termux:API Android app from the same source as Termux
100
99
  2. The `termux-api` command-line package
101
100
 
102
- Then run the clipboard verification commands above outside Pi. If they fail there, fix the Termux:API installation before retrying Pi's copy command.
101
+ Then run the clipboard verification commands above outside Pi. If they fail there, fix the Termux:API installation before retrying the extension that copies text.
103
102
 
104
103
  ### Shared storage reports permission denied
105
104
 
package/docs/themes.md CHANGED
@@ -1,33 +1,16 @@
1
1
  # Customize Pi with themes
2
2
 
3
- Themes control the colors Pi uses in interactive mode and HTML exports. Pi includes the `system`, `dark`, and `light` themes. You can select one theme, follow your terminal's light or dark appearance, or create your own palette.
3
+ Themes control the colors of HTML session exports written by the RPC [`export_html`](rpc-commands.md#export_html) command or the SDK, and the `ctx.ui.theme` colors that extensions use. Pi includes the `system`, `dark`, and `light` themes, and you can create your own palette.
4
4
 
5
- ## Use your terminal's colors
5
+ ## Use the default theme
6
6
 
7
- The `system` theme is the default. It builds Pi's colors from your terminal's theme, so Pi matches the terminal instead of bringing its own palette:
8
-
9
- - Pi queries the terminal's default foreground and background colors and its 16 ANSI colors.
10
- - Each Pi color takes its hue from one ANSI color, for example errors from red and links from blue.
11
- - Pi sets each color's lightness so that it stands out from the background by a minimum contrast. Body text keeps at least a 4.5:1 WCAG contrast ratio on the background and every panel.
12
- - When the terminal switches between light and dark, Pi queries the colors again and rebuilds the theme.
13
-
14
- The theme adapts to what the terminal reports:
15
-
16
- | Terminal reports | Result |
17
- |---|---|
18
- | Background and ANSI colors | Colors from the terminal palette, placed for the actual background. |
19
- | Background only | Pi's own hues, placed for the actual background. |
20
- | Nothing | ANSI color indices and the terminal's default colors, which the terminal renders itself. Secondary text is faint, and panels have no background color. |
21
-
22
- Pi asks the terminal for its colors when it starts. Terminals usually answer within a few milliseconds, and Pi waits at most 100 ms before showing the startup header. If the terminal does not answer in time, Pi uses the ANSI color fallback, and it still applies the colors if they arrive later, for example over a slow SSH connection. `system` is a reserved name: a custom theme with that name is ignored.
7
+ The `system` theme is the default. Upstream pi derives it from the colors a terminal reports. Pi's headless modes do not query the terminal, so `system` uses Pi's own hues and picks a dark or light appearance from the `COLORFGBG` environment variable, falling back to dark. `system` is a reserved name: a custom theme with that name is ignored.
23
8
 
24
9
  <a id="selecting-a-theme"></a>
25
10
 
26
11
  ## Choose a theme
27
12
 
28
- Open `/settings` and select **Theme**. You can use one theme for every terminal appearance or choose separate themes for light and dark terminals.
29
-
30
- The selection is saved as the `theme` [setting](settings.md#terminal-and-display):
13
+ Set the `theme` [setting](settings.md#terminal-and-display):
31
14
 
32
15
  ```json
33
16
  {
@@ -37,25 +20,22 @@ The selection is saved as the `theme` [setting](settings.md#terminal-and-display
37
20
 
38
21
  Without a `theme` setting, Pi uses `system`.
39
22
 
40
- Automatic mode stores the light theme first and the dark theme second:
23
+ Upstream pi also accepts a `light/dark` pair that follows the terminal's appearance. Pi cannot detect the appearance, so it uses `system` for a pair. Theme names cannot contain `/` because the pair format reserves it.
41
24
 
42
- ```json
43
- {
44
- "theme": "light/dark"
45
- }
46
- ```
47
-
48
- Pi decides whether the terminal is light or dark from its reported background and foreground colors. If the terminal does not report its background, Pi uses the terminal's light/dark notification, then the `COLORFGBG` environment variable, then dark. The same decision picks the theme of a light/dark pair and the appearance of `system`. When automatic mode is active, Pi changes themes when the terminal reports an appearance change. Theme names cannot contain `/` because Pi reserves it for this setting format.
49
-
50
- Use `--use-theme` to choose the initial theme for one invocation without changing the saved setting:
25
+ Use `--use-theme` to choose the theme for one invocation without changing the saved setting:
51
26
 
52
27
  ```bash
53
- pi --use-theme light
54
- pi --use-theme light/dark
28
+ pi --use-theme light --mode rpc
55
29
  ```
56
30
 
57
31
  See [CLI resources](cli.md#resources) for the command-line option.
58
32
 
33
+ <a id="override-detected-capabilities"></a>
34
+
35
+ ### Override truecolor detection
36
+
37
+ Pi detects truecolor support for the ANSI colors that `ctx.ui.theme` produces. If detection fails behind a terminal proxy or multiplexer, override it with `PI_TRUE_COLOR=1|0|auto` or the JSON-only `terminal.trueColor` setting (`true`, `false`, or `"auto"`). Without truecolor, Pi approximates colors with the 256-color palette.
38
+
59
39
  ## Create a custom theme
60
40
 
61
41
  Copy one of the [built-in themes](https://github.com/punch-bot/core/tree/main/packages/coding-agent/src/core/theme) or create a new JSON file conforming to the [schema](https://raw.githubusercontent.com/punch-bot/core/main/packages/coding-agent/schemas/theme.schema.json). The built-in themes use OKHSL colors, with variables for colors that several roles share, so you can adjust a hue, saturation, or lightness directly.
@@ -63,19 +43,19 @@ Copy one of the [built-in themes](https://github.com/punch-bot/core/tree/main/pa
63
43
  1. Save the file as `<agent-dir>/themes/my-theme.json`. The agent directory defaults to `~/.pi/agent`.
64
44
  2. Set its `name` to `my-theme`.
65
45
  3. Change values in `vars` and `colors`.
66
- 4. Select `my-theme` through `/settings`.
46
+ 4. Set `"theme": "my-theme"` in `settings.json`.
67
47
 
68
- Use the theme name as the filename. Pi hot-reloads the active user theme only from `<agent-dir>/themes/<name>.json`. Run `/reload` after adding or changing a theme from any other source.
48
+ Use the theme name as the filename. Pi loads themes at startup, so restart Pi after adding or changing one. An extension command can reload a running session with `ctx.reload()`.
69
49
 
70
50
  ## Understand the theme file
71
51
 
72
52
  | Property | Required | Responsibility |
73
53
  |---|---|---|
74
54
  | `$schema` | No | Enables editor validation and completion against Pi's published schema. |
75
- | `name` | Yes | Identifies the theme in selectors and settings. It must be unique, cannot contain `/`, and cannot be `system`. |
55
+ | `name` | Yes | Identifies the theme in settings and `--use-theme`. It must be unique, cannot contain `/`, and cannot be `system`. |
76
56
  | `appearance` | No | `"dark"` or `"light"`: the background the theme is designed for. Pi detects it from the theme colors when omitted. |
77
57
  | `vars` | No | Defines reusable color values. Variables can reference other variables. |
78
- | `colors` | Yes | Assigns colors to terminal UI roles. The schema identifies required and optional roles. |
58
+ | `colors` | Yes | Assigns colors to interface roles. The schema identifies required and optional roles. |
79
59
  | `export` | No | Overrides page and panel backgrounds in HTML exports. |
80
60
 
81
61
  Theme objects are strict: only documented top-level fields and color tokens are accepted. Define reusable custom colors under `vars`; custom keys under `colors` or `export` and additional top-level metadata are rejected.
@@ -91,17 +71,17 @@ A color can be written in six forms:
91
71
  | Variable reference | `"primary"` | The value of an entry in `vars`. |
92
72
  | Terminal default | `""` | The terminal's default foreground or background color. |
93
73
 
94
- Terminal default colors render as the terminal's own colors. Where Pi needs a concrete value, such as HTML export or extension color math, it uses the default colors the terminal reports, or a black or white guess based on the theme's appearance.
74
+ Terminal default colors render as the terminal's own colors in ANSI output. Where Pi needs a concrete value, such as HTML export or extension color math, it uses a black or white guess based on the theme's appearance.
95
75
 
96
- Pi resolves chained variable references. A missing variable or circular reference makes the theme invalid. Pi uses truecolor when available, gamut-maps OKLCH to sRGB, and approximates colors for 256-color terminals. HTML exports convert OKHSL values to hexadecimal because CSS does not support them. If colors differ from their source values, check your terminal's truecolor detection and contrast settings. See [Configure Your Terminal](terminal-setup.md#override-detected-capabilities).
76
+ Pi resolves chained variable references. A missing variable or circular reference makes the theme invalid. Pi gamut-maps OKLCH to sRGB. HTML exports convert OKHSL values to hexadecimal because CSS does not support them. For ANSI output, see [Override truecolor detection](#override-detected-capabilities).
97
77
 
98
78
  Use the [theme JSON schema](https://raw.githubusercontent.com/punch-bot/core/main/packages/coding-agent/schemas/theme.schema.json) for the exact properties, required colors, and accepted value types.
99
79
 
100
- Pi reports invalid theme files during startup and `/reload`.
80
+ Pi reports invalid theme files during startup and reload.
101
81
 
102
82
  ## Find the color to change
103
83
 
104
- Theme colors describe interface roles rather than individual components. Use these groups to find the relevant part of the schema:
84
+ Theme colors describe roles of upstream pi's terminal interface; HTML exports reuse them for messages, tool output, Markdown, diffs, and syntax highlighting. Use these groups to find the relevant part of the schema:
105
85
 
106
86
  | Area | Color names |
107
87
  |---|---|