@sheason/pi-coding-agent 0.78.0-sheason.0.6.0-alpha.3 → 0.79.1-sheason.0.6.0-alpha.4

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 (464) hide show
  1. package/CHANGELOG.md +135 -23
  2. package/README.md +26 -4
  3. package/dist/bun/register-bedrock.d.ts.map +1 -1
  4. package/dist/bun/register-bedrock.js +2 -2
  5. package/dist/bun/register-bedrock.js.map +1 -1
  6. package/dist/cli/args.d.ts +2 -1
  7. package/dist/cli/args.d.ts.map +1 -1
  8. package/dist/cli/args.js +11 -0
  9. package/dist/cli/args.js.map +1 -1
  10. package/dist/cli/config-selector.d.ts.map +1 -1
  11. package/dist/cli/config-selector.js +1 -1
  12. package/dist/cli/config-selector.js.map +1 -1
  13. package/dist/cli/file-processor.d.ts +1 -1
  14. package/dist/cli/file-processor.d.ts.map +1 -1
  15. package/dist/cli/file-processor.js.map +1 -1
  16. package/dist/cli/initial-message.d.ts +1 -1
  17. package/dist/cli/initial-message.d.ts.map +1 -1
  18. package/dist/cli/initial-message.js.map +1 -1
  19. package/dist/cli/list-models.d.ts.map +1 -1
  20. package/dist/cli/list-models.js +1 -1
  21. package/dist/cli/list-models.js.map +1 -1
  22. package/dist/cli/project-trust.d.ts +10 -0
  23. package/dist/cli/project-trust.d.ts.map +1 -0
  24. package/dist/cli/project-trust.js +48 -0
  25. package/dist/cli/project-trust.js.map +1 -0
  26. package/dist/cli/session-picker.d.ts.map +1 -1
  27. package/dist/cli/session-picker.js +1 -1
  28. package/dist/cli/session-picker.js.map +1 -1
  29. package/dist/cli/startup-ui.d.ts +7 -0
  30. package/dist/cli/startup-ui.d.ts.map +1 -0
  31. package/dist/cli/startup-ui.js +59 -0
  32. package/dist/cli/startup-ui.js.map +1 -0
  33. package/dist/config.d.ts.map +1 -1
  34. package/dist/config.js +9 -1
  35. package/dist/config.js.map +1 -1
  36. package/dist/core/agent-session-proxy.d.ts +21 -3
  37. package/dist/core/agent-session-proxy.d.ts.map +1 -1
  38. package/dist/core/agent-session-proxy.js.map +1 -1
  39. package/dist/core/agent-session-runtime.d.ts +3 -1
  40. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  41. package/dist/core/agent-session-runtime.js +4 -1
  42. package/dist/core/agent-session-runtime.js.map +1 -1
  43. package/dist/core/agent-session-services.d.ts +4 -3
  44. package/dist/core/agent-session-services.d.ts.map +1 -1
  45. package/dist/core/agent-session-services.js +2 -2
  46. package/dist/core/agent-session-services.js.map +1 -1
  47. package/dist/core/agent-session.d.ts +6 -3
  48. package/dist/core/agent-session.d.ts.map +1 -1
  49. package/dist/core/agent-session.js +24 -2
  50. package/dist/core/agent-session.js.map +1 -1
  51. package/dist/core/auth-storage.d.ts +2 -2
  52. package/dist/core/auth-storage.d.ts.map +1 -1
  53. package/dist/core/auth-storage.js +6 -5
  54. package/dist/core/auth-storage.js.map +1 -1
  55. package/dist/core/compaction/branch-summarization.d.ts +4 -2
  56. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  57. package/dist/core/compaction/branch-summarization.js +10 -4
  58. package/dist/core/compaction/branch-summarization.js.map +1 -1
  59. package/dist/core/compaction/compaction.d.ts +2 -2
  60. package/dist/core/compaction/compaction.d.ts.map +1 -1
  61. package/dist/core/compaction/compaction.js +1 -1
  62. package/dist/core/compaction/compaction.js.map +1 -1
  63. package/dist/core/compaction/utils.d.ts +3 -3
  64. package/dist/core/compaction/utils.d.ts.map +1 -1
  65. package/dist/core/compaction/utils.js +1 -1
  66. package/dist/core/compaction/utils.js.map +1 -1
  67. package/dist/core/defaults.d.ts +1 -1
  68. package/dist/core/defaults.d.ts.map +1 -1
  69. package/dist/core/defaults.js.map +1 -1
  70. package/dist/core/experimental.d.ts +2 -0
  71. package/dist/core/experimental.d.ts.map +1 -0
  72. package/dist/core/experimental.js +4 -0
  73. package/dist/core/experimental.js.map +1 -0
  74. package/dist/core/export-html/index.d.ts +1 -1
  75. package/dist/core/export-html/index.d.ts.map +1 -1
  76. package/dist/core/export-html/index.js.map +1 -1
  77. package/dist/core/export-html/template.js +19 -6
  78. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  79. package/dist/core/export-html/tool-renderer.js.map +1 -1
  80. package/dist/core/extensions/index.d.ts +1 -1
  81. package/dist/core/extensions/index.d.ts.map +1 -1
  82. package/dist/core/extensions/index.js.map +1 -1
  83. package/dist/core/extensions/loader.d.ts +1 -1
  84. package/dist/core/extensions/loader.d.ts.map +1 -1
  85. package/dist/core/extensions/loader.js +20 -20
  86. package/dist/core/extensions/loader.js.map +1 -1
  87. package/dist/core/extensions/runner.d.ts +13 -6
  88. package/dist/core/extensions/runner.d.ts.map +1 -1
  89. package/dist/core/extensions/runner.js +47 -1
  90. package/dist/core/extensions/runner.js.map +1 -1
  91. package/dist/core/extensions/types.d.ts +31 -5
  92. package/dist/core/extensions/types.d.ts.map +1 -1
  93. package/dist/core/extensions/types.js.map +1 -1
  94. package/dist/core/extensions/wrapper.d.ts +1 -1
  95. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  96. package/dist/core/extensions/wrapper.js.map +1 -1
  97. package/dist/core/footer-data-provider.d.ts +2 -0
  98. package/dist/core/footer-data-provider.d.ts.map +1 -1
  99. package/dist/core/footer-data-provider.js +29 -1
  100. package/dist/core/footer-data-provider.js.map +1 -1
  101. package/dist/core/index.d.ts +1 -0
  102. package/dist/core/index.d.ts.map +1 -1
  103. package/dist/core/index.js +1 -0
  104. package/dist/core/index.js.map +1 -1
  105. package/dist/core/keybindings.d.ts +2 -2
  106. package/dist/core/keybindings.d.ts.map +1 -1
  107. package/dist/core/keybindings.js +1 -1
  108. package/dist/core/keybindings.js.map +1 -1
  109. package/dist/core/local-agent-session-proxy.d.ts +1 -1
  110. package/dist/core/local-agent-session-proxy.d.ts.map +1 -1
  111. package/dist/core/local-agent-session-proxy.js +68 -11
  112. package/dist/core/local-agent-session-proxy.js.map +1 -1
  113. package/dist/core/messages.d.ts +3 -3
  114. package/dist/core/messages.d.ts.map +1 -1
  115. package/dist/core/messages.js.map +1 -1
  116. package/dist/core/model-registry.d.ts +1 -1
  117. package/dist/core/model-registry.d.ts.map +1 -1
  118. package/dist/core/model-registry.js +3 -2
  119. package/dist/core/model-registry.js.map +1 -1
  120. package/dist/core/model-resolver.d.ts +2 -2
  121. package/dist/core/model-resolver.d.ts.map +1 -1
  122. package/dist/core/model-resolver.js +4 -1
  123. package/dist/core/model-resolver.js.map +1 -1
  124. package/dist/core/package-manager.d.ts +3 -0
  125. package/dist/core/package-manager.d.ts.map +1 -1
  126. package/dist/core/package-manager.js +47 -13
  127. package/dist/core/package-manager.js.map +1 -1
  128. package/dist/core/project-trust.d.ts +15 -0
  129. package/dist/core/project-trust.d.ts.map +1 -0
  130. package/dist/core/project-trust.js +58 -0
  131. package/dist/core/project-trust.js.map +1 -0
  132. package/dist/core/prompt-templates.d.ts +2 -1
  133. package/dist/core/prompt-templates.d.ts.map +1 -1
  134. package/dist/core/prompt-templates.js +24 -26
  135. package/dist/core/prompt-templates.js.map +1 -1
  136. package/dist/core/provider-attribution.d.ts +4 -0
  137. package/dist/core/provider-attribution.d.ts.map +1 -0
  138. package/dist/core/provider-attribution.js +72 -0
  139. package/dist/core/provider-attribution.js.map +1 -0
  140. package/dist/core/provider-display-names.d.ts.map +1 -1
  141. package/dist/core/provider-display-names.js +3 -0
  142. package/dist/core/provider-display-names.js.map +1 -1
  143. package/dist/core/resource-loader.d.ts +13 -2
  144. package/dist/core/resource-loader.d.ts.map +1 -1
  145. package/dist/core/resource-loader.js +112 -37
  146. package/dist/core/resource-loader.js.map +1 -1
  147. package/dist/core/sdk.d.ts +3 -3
  148. package/dist/core/sdk.d.ts.map +1 -1
  149. package/dist/core/sdk.js +11 -38
  150. package/dist/core/sdk.js.map +1 -1
  151. package/dist/core/session-manager.d.ts +2 -2
  152. package/dist/core/session-manager.d.ts.map +1 -1
  153. package/dist/core/session-manager.js +93 -69
  154. package/dist/core/session-manager.js.map +1 -1
  155. package/dist/core/settings-manager.d.ts +15 -3
  156. package/dist/core/settings-manager.d.ts.map +1 -1
  157. package/dist/core/settings-manager.js +80 -30
  158. package/dist/core/settings-manager.js.map +1 -1
  159. package/dist/core/slash-commands.d.ts.map +1 -1
  160. package/dist/core/slash-commands.js +1 -0
  161. package/dist/core/slash-commands.js.map +1 -1
  162. package/dist/core/tools/bash.d.ts +1 -1
  163. package/dist/core/tools/bash.d.ts.map +1 -1
  164. package/dist/core/tools/bash.js +2 -2
  165. package/dist/core/tools/bash.js.map +1 -1
  166. package/dist/core/tools/edit.d.ts +2 -2
  167. package/dist/core/tools/edit.d.ts.map +1 -1
  168. package/dist/core/tools/edit.js +1 -1
  169. package/dist/core/tools/edit.js.map +1 -1
  170. package/dist/core/tools/find.d.ts +1 -1
  171. package/dist/core/tools/find.d.ts.map +1 -1
  172. package/dist/core/tools/find.js +2 -2
  173. package/dist/core/tools/find.js.map +1 -1
  174. package/dist/core/tools/grep.d.ts +1 -1
  175. package/dist/core/tools/grep.d.ts.map +1 -1
  176. package/dist/core/tools/grep.js +2 -2
  177. package/dist/core/tools/grep.js.map +1 -1
  178. package/dist/core/tools/index.d.ts +1 -1
  179. package/dist/core/tools/index.d.ts.map +1 -1
  180. package/dist/core/tools/index.js.map +1 -1
  181. package/dist/core/tools/ls.d.ts +1 -1
  182. package/dist/core/tools/ls.d.ts.map +1 -1
  183. package/dist/core/tools/ls.js +2 -2
  184. package/dist/core/tools/ls.js.map +1 -1
  185. package/dist/core/tools/read.d.ts +1 -1
  186. package/dist/core/tools/read.d.ts.map +1 -1
  187. package/dist/core/tools/read.js +2 -2
  188. package/dist/core/tools/read.js.map +1 -1
  189. package/dist/core/tools/render-utils.d.ts +1 -1
  190. package/dist/core/tools/render-utils.d.ts.map +1 -1
  191. package/dist/core/tools/render-utils.js +1 -1
  192. package/dist/core/tools/render-utils.js.map +1 -1
  193. package/dist/core/tools/tool-definition-wrapper.d.ts +1 -1
  194. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  195. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  196. package/dist/core/tools/write.d.ts +1 -1
  197. package/dist/core/tools/write.d.ts.map +1 -1
  198. package/dist/core/tools/write.js +2 -2
  199. package/dist/core/tools/write.js.map +1 -1
  200. package/dist/core/trust-manager.d.ts +31 -0
  201. package/dist/core/trust-manager.d.ts.map +1 -0
  202. package/dist/core/trust-manager.js +187 -0
  203. package/dist/core/trust-manager.js.map +1 -0
  204. package/dist/index.d.ts +5 -4
  205. package/dist/index.d.ts.map +1 -1
  206. package/dist/index.js +2 -1
  207. package/dist/index.js.map +1 -1
  208. package/dist/main.d.ts.map +1 -1
  209. package/dist/main.js +62 -33
  210. package/dist/main.js.map +1 -1
  211. package/dist/migrations.d.ts.map +1 -1
  212. package/dist/migrations.js +39 -34
  213. package/dist/migrations.js.map +1 -1
  214. package/dist/modes/connect/remote-agent-session-proxy.d.ts +1 -1
  215. package/dist/modes/connect/remote-agent-session-proxy.d.ts.map +1 -1
  216. package/dist/modes/connect/remote-agent-session-proxy.js.map +1 -1
  217. package/dist/modes/index.d.ts +1 -1
  218. package/dist/modes/index.d.ts.map +1 -1
  219. package/dist/modes/index.js.map +1 -1
  220. package/dist/modes/interactive/components/armin.d.ts +1 -1
  221. package/dist/modes/interactive/components/armin.d.ts.map +1 -1
  222. package/dist/modes/interactive/components/armin.js.map +1 -1
  223. package/dist/modes/interactive/components/assistant-message.d.ts +2 -2
  224. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  225. package/dist/modes/interactive/components/assistant-message.js +1 -1
  226. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  227. package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
  228. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  229. package/dist/modes/interactive/components/bash-execution.js +3 -3
  230. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  231. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  232. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  233. package/dist/modes/interactive/components/bordered-loader.js +1 -1
  234. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  235. package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
  236. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  237. package/dist/modes/interactive/components/branch-summary-message.js +1 -1
  238. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  239. package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
  240. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  241. package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  242. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  243. package/dist/modes/interactive/components/config-selector.d.ts +1 -1
  244. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/config-selector.js +1 -1
  246. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  247. package/dist/modes/interactive/components/countdown-timer.d.ts +1 -1
  248. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
  249. package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
  250. package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
  251. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  252. package/dist/modes/interactive/components/custom-editor.js +1 -1
  253. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  254. package/dist/modes/interactive/components/custom-message.d.ts +1 -1
  255. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  256. package/dist/modes/interactive/components/custom-message.js +1 -1
  257. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  258. package/dist/modes/interactive/components/daxnuts.d.ts +1 -1
  259. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
  260. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  261. package/dist/modes/interactive/components/dynamic-border.d.ts +1 -1
  262. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  263. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  264. package/dist/modes/interactive/components/earendil-announcement.d.ts +1 -1
  265. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
  266. package/dist/modes/interactive/components/earendil-announcement.js +1 -1
  267. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
  268. package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
  269. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  270. package/dist/modes/interactive/components/extension-editor.js +1 -1
  271. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  272. package/dist/modes/interactive/components/extension-input.d.ts +1 -1
  273. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  274. package/dist/modes/interactive/components/extension-input.js +1 -1
  275. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  276. package/dist/modes/interactive/components/extension-selector.d.ts +1 -1
  277. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  278. package/dist/modes/interactive/components/extension-selector.js +1 -1
  279. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  280. package/dist/modes/interactive/components/footer.d.ts +1 -1
  281. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  282. package/dist/modes/interactive/components/footer.js +11 -1
  283. package/dist/modes/interactive/components/footer.js.map +1 -1
  284. package/dist/modes/interactive/components/index.d.ts +1 -0
  285. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  286. package/dist/modes/interactive/components/index.js +1 -0
  287. package/dist/modes/interactive/components/index.js.map +1 -1
  288. package/dist/modes/interactive/components/keybinding-hints.d.ts +1 -1
  289. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  290. package/dist/modes/interactive/components/keybinding-hints.js +1 -1
  291. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  292. package/dist/modes/interactive/components/login-dialog.d.ts +3 -3
  293. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  294. package/dist/modes/interactive/components/login-dialog.js +12 -15
  295. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  296. package/dist/modes/interactive/components/model-selector.d.ts +2 -2
  297. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  298. package/dist/modes/interactive/components/model-selector.js +2 -2
  299. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  300. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
  301. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  302. package/dist/modes/interactive/components/oauth-selector.js +1 -1
  303. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  304. package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -2
  305. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  307. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  308. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  309. package/dist/modes/interactive/components/session-selector-search.js +1 -1
  310. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  311. package/dist/modes/interactive/components/session-selector.d.ts +1 -1
  312. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  313. package/dist/modes/interactive/components/session-selector.js +1 -1
  314. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  315. package/dist/modes/interactive/components/settings-selector.d.ts +6 -4
  316. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  317. package/dist/modes/interactive/components/settings-selector.js +21 -1
  318. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  319. package/dist/modes/interactive/components/show-images-selector.d.ts +1 -1
  320. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  321. package/dist/modes/interactive/components/show-images-selector.js +1 -1
  322. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  323. package/dist/modes/interactive/components/skill-invocation-message.d.ts +1 -1
  324. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  325. package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  326. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  327. package/dist/modes/interactive/components/theme-selector.d.ts +1 -1
  328. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  329. package/dist/modes/interactive/components/theme-selector.js +1 -1
  330. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  331. package/dist/modes/interactive/components/thinking-selector.d.ts +2 -2
  332. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  333. package/dist/modes/interactive/components/thinking-selector.js +1 -1
  334. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  335. package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
  336. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  337. package/dist/modes/interactive/components/tool-execution.js +23 -1
  338. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  339. package/dist/modes/interactive/components/tree-selector.d.ts +1 -1
  340. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  341. package/dist/modes/interactive/components/tree-selector.js +1 -1
  342. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  343. package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
  344. package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
  345. package/dist/modes/interactive/components/trust-selector.js +91 -0
  346. package/dist/modes/interactive/components/trust-selector.js.map +1 -0
  347. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -1
  348. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  349. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  350. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  351. package/dist/modes/interactive/components/user-message.d.ts +1 -1
  352. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  353. package/dist/modes/interactive/components/user-message.js +1 -1
  354. package/dist/modes/interactive/components/user-message.js.map +1 -1
  355. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  356. package/dist/modes/interactive/components/visual-truncate.js +1 -1
  357. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  358. package/dist/modes/interactive/interactive-mode.d.ts +19 -2
  359. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  360. package/dist/modes/interactive/interactive-mode.js +153 -13
  361. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  362. package/dist/modes/interactive/theme/theme.d.ts +1 -1
  363. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  364. package/dist/modes/interactive/theme/theme.js +1 -1
  365. package/dist/modes/interactive/theme/theme.js.map +1 -1
  366. package/dist/modes/print-mode.d.ts +1 -1
  367. package/dist/modes/print-mode.d.ts.map +1 -1
  368. package/dist/modes/print-mode.js +1 -0
  369. package/dist/modes/print-mode.js.map +1 -1
  370. package/dist/modes/rpc/rpc-client.d.ts +2 -2
  371. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  372. package/dist/modes/rpc/rpc-client.js.map +1 -1
  373. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  374. package/dist/modes/rpc/rpc-mode.js +1 -0
  375. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  376. package/dist/modes/rpc/rpc-types.d.ts +2 -2
  377. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  378. package/dist/modes/rpc/rpc-types.js.map +1 -1
  379. package/dist/package-manager-cli.d.ts +6 -2
  380. package/dist/package-manager-cli.d.ts.map +1 -1
  381. package/dist/package-manager-cli.js +105 -11
  382. package/dist/package-manager-cli.js.map +1 -1
  383. package/dist/utils/changelog.d.ts +1 -0
  384. package/dist/utils/changelog.d.ts.map +1 -1
  385. package/dist/utils/changelog.js +78 -0
  386. package/dist/utils/changelog.js.map +1 -1
  387. package/dist/utils/git.d.ts.map +1 -1
  388. package/dist/utils/git.js +54 -22
  389. package/dist/utils/git.js.map +1 -1
  390. package/dist/utils/open-browser.d.ts +9 -0
  391. package/dist/utils/open-browser.d.ts.map +1 -0
  392. package/dist/utils/open-browser.js +22 -0
  393. package/dist/utils/open-browser.js.map +1 -0
  394. package/docs/containerization.md +111 -0
  395. package/docs/docs.json +8 -0
  396. package/docs/extensions.md +67 -13
  397. package/docs/index.md +2 -0
  398. package/docs/models.md +4 -3
  399. package/docs/packages.md +1 -1
  400. package/docs/prompt-templates.md +9 -2
  401. package/docs/providers.md +5 -0
  402. package/docs/rpc.md +1 -1
  403. package/docs/sdk.md +5 -0
  404. package/docs/security.md +55 -0
  405. package/docs/settings.md +13 -0
  406. package/docs/skills.md +1 -1
  407. package/docs/terminal-setup.md +36 -2
  408. package/docs/themes.md +1 -1
  409. package/docs/tmux.md +4 -2
  410. package/docs/tui.md +10 -1
  411. package/docs/usage.md +19 -2
  412. package/examples/extensions/README.md +3 -1
  413. package/examples/extensions/border-status-editor.ts +2 -2
  414. package/examples/extensions/built-in-tool-renderer.ts +1 -1
  415. package/examples/extensions/custom-compaction.ts +1 -1
  416. package/examples/extensions/custom-footer.ts +2 -2
  417. package/examples/extensions/custom-header.ts +1 -1
  418. package/examples/extensions/custom-provider-anthropic/index.ts +1 -1
  419. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  420. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  421. package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
  422. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  423. package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
  424. package/examples/extensions/doom-overlay/doom-component.ts +2 -2
  425. package/examples/extensions/doom-overlay/doom-keys.ts +1 -1
  426. package/examples/extensions/doom-overlay/index.ts +1 -1
  427. package/examples/extensions/github-issue-autocomplete.ts +2 -2
  428. package/examples/extensions/gondolin/index.ts +531 -0
  429. package/examples/extensions/gondolin/package-lock.json +185 -0
  430. package/examples/extensions/gondolin/package.json +19 -0
  431. package/examples/extensions/handoff.ts +3 -3
  432. package/examples/extensions/hello.ts +1 -1
  433. package/examples/extensions/interactive-shell.ts +1 -1
  434. package/examples/extensions/message-renderer.ts +1 -1
  435. package/examples/extensions/minimal-mode.ts +1 -1
  436. package/examples/extensions/modal-editor.ts +1 -1
  437. package/examples/extensions/overlay-qa-tests.ts +153 -82
  438. package/examples/extensions/overlay-test.ts +1 -1
  439. package/examples/extensions/plan-mode/index.ts +3 -3
  440. package/examples/extensions/preset.ts +2 -2
  441. package/examples/extensions/project-trust.ts +64 -0
  442. package/examples/extensions/qna.ts +2 -2
  443. package/examples/extensions/question.ts +2 -2
  444. package/examples/extensions/questionnaire.ts +2 -2
  445. package/examples/extensions/sandbox/package-lock.json +2 -2
  446. package/examples/extensions/sandbox/package.json +1 -1
  447. package/examples/extensions/snake.ts +2 -2
  448. package/examples/extensions/space-invaders.ts +2 -2
  449. package/examples/extensions/structured-output.ts +1 -1
  450. package/examples/extensions/subagent/index.ts +4 -4
  451. package/examples/extensions/summarize.ts +3 -3
  452. package/examples/extensions/tic-tac-toe.ts +3 -3
  453. package/examples/extensions/todo.ts +3 -3
  454. package/examples/extensions/tool-override.ts +1 -1
  455. package/examples/extensions/tools.ts +6 -1
  456. package/examples/extensions/truncated-tool.ts +1 -1
  457. package/examples/extensions/with-deps/package-lock.json +2 -2
  458. package/examples/extensions/with-deps/package.json +1 -1
  459. package/examples/rpc-extension-ui.ts +1 -1
  460. package/examples/sdk/02-custom-model.ts +1 -1
  461. package/examples/sdk/12-full-control.ts +1 -1
  462. package/examples/sdk/README.md +1 -1
  463. package/npm-shrinkwrap.json +57 -318
  464. package/package.json +6 -9
package/CHANGELOG.md CHANGED
@@ -1,11 +1,123 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.79.1] - 2026-06-09
4
+
5
+ ## [0.79.1-sheason.0.6.0-alpha.4] - 2026-06-11
6
+
7
+ ### Changed
8
+
9
+ - **Release pipeline no longer ships the upstream `@earendil-works/*` packages.** The d-pi release pipeline (`scripts/publish.mjs`, `scripts/local-release.mjs`, `.github/workflows/release.yml`) now only publishes the two `@sheason/*` packages (`@sheason/pi-coding-agent`, `@sheason/d-pi`). The upstream `@earendil-works/pi-{ai,tui,agent-core}` packages remain runtime dependencies that the npm install pulls from the public registry; they are still built locally to satisfy workspace tsconfig paths, but they are not packed, not published, and not attached to the GitHub release. The fork does not have npm publish permission to the `@earendil-works` scope.
10
+
11
+ ### Fixed
12
+
13
+ - Fixed `/tree` in d-pi connect mode crashing with "Cannot read properties of undefined (reading 'role' | 'content' | ...)" on the first non-message tree entry. The wire-format `TreeNodeData` (used by `LocalAgentSessionProxy.getTree()` → `RemoteAgentSessionProxy.fetchTree()` → `InteractiveMode._convertTreeDataToNodes()`) now forwards every type-specific field the TUI's `TreeSelectorComponent` dereferences (`message`, `summary`, `tokensBefore`, `customType`, `content`, `provider`, `modelId`, `thinkingLevel`, `targetId`, `name`), and `_convertTreeDataToNodes` copies them through onto the reconstructed `entry`. `LocalAgentSessionProxy._convertTreeNode` also guards `entry.message` against runtime-missing cases with a `"(message)"` preview fallback.
14
+ - Fixed the connect-mode TUI footer silently omitting the `CHxx.x%` (cache hit rate) segment. `LocalAgentSessionProxy.getSnapshot()` and `AgentSession._emitStateUpdate()` now both compute `latestCacheHitRate` from the most recent assistant turn (matching the local interactive mode's calculation) and forward it in the wire `TokenUsage`. `FooterComponent._renderFromSnapshot()` renders the `CH` segment when `cacheRead`/`cacheWrite > 0` and the rate is defined, exactly as the local render path does.
15
+
16
+ ### New Features
17
+
18
+ - **Claude Fable 5** - Claude Fable 5 is now available on the Anthropic and Amazon Bedrock providers, with adaptive thinking and `xhigh` effort support.
19
+ - **Prompt template defaults** - Prompt templates can use default positional arguments such as `${1:-7}` for optional values. See [Prompt Template Arguments](docs/prompt-templates.md#arguments).
20
+ - **Configurable project trust defaults** - `defaultProjectTrust` lets users choose whether unresolved project trust asks, always trusts, or never trusts by default, and extensions can inspect effective trust decisions. See [Project Trust](docs/security.md#project-trust) and [`ctx.isProjectTrusted()`](docs/extensions.md#ctxisprojecttrusted).
21
+ - **Natural extension autocomplete triggers** - Extension autocomplete providers can declare trigger characters such as `#` or `$` so suggestions open without slash-command prefixes. See [Autocomplete Providers](docs/extensions.md#autocomplete-providers).
22
+
23
+ ### Added
24
+
25
+ - Added default-value expansion for prompt template positional arguments, e.g. `${1:-7}` ([#5553](https://github.com/earendil-works/pi/pull/5553) by [@dannote](https://github.com/dannote)).
26
+ - Added `areExperimentalFeaturesEnabled` feature guard to allow users to opt in to early features ([#5547](https://github.com/earendil-works/pi/pull/5547) by [@vegarsti](https://github.com/vegarsti)).
27
+ - Added `ctx.isProjectTrusted()` for extensions to observe the effective project trust decision, including temporary trust decisions ([#5523](https://github.com/earendil-works/pi/issues/5523)).
28
+ - Added a global `defaultProjectTrust` setting to choose whether unresolved project trust asks, always trusts, or never trusts by default.
29
+ - Added extension autocomplete trigger character support for `ctx.ui.addAutocompleteProvider()` wrappers ([#4703](https://github.com/earendil-works/pi/issues/4703)).
30
+ - Added Claude Fable 5 model support inherited from `@earendil-works/pi-ai` for the Anthropic and Amazon Bedrock providers, with adaptive thinking and `xhigh` effort support.
31
+
32
+ ### Fixed
33
+
34
+ - Fixed inherited Amazon Bedrock inference profile ARN region resolution to prefer the ARN's embedded region over `AWS_REGION` ([#5527](https://github.com/earendil-works/pi/pull/5527) by [@AJM10565](https://github.com/AJM10565)).
35
+ - Fixed inherited IME hardware cursor positioning while slash-command autocomplete is visible ([#5283](https://github.com/earendil-works/pi/pull/5283) by [@smoosex](https://github.com/smoosex)).
36
+ - Fixed inherited z.ai thinking-off requests to send the provider's `thinking: { type: "disabled" }` compatibility parameter ([#5330](https://github.com/earendil-works/pi/issues/5330)).
37
+ - Fixed inherited OpenCode completions model metadata to send explicit `maxTokens` as `max_tokens` ([#5331](https://github.com/earendil-works/pi/issues/5331)).
38
+ - Fixed inherited Moonshot Kimi thinking-off requests to send the provider's `thinking: { type: "disabled" }` compatibility parameter ([#5531](https://github.com/earendil-works/pi/issues/5531)).
39
+ - Fixed inherited Azure OpenAI Responses requests to disable server-side response storage ([#5530](https://github.com/earendil-works/pi/issues/5530)).
40
+ - Fixed inherited Azure GPT-5.4 and GPT-5.5 context window metadata to 1,050,000 tokens, matching Azure Foundry deployments instead of OpenAI's 272k limit ([#5559](https://github.com/earendil-works/pi/issues/5559)).
41
+ - Fixed inherited OpenAI and Azure GPT-5 Pro `maxTokens` metadata to 128,000, correcting an upstream value that duplicated the input sub-limit as the output limit ([#5559](https://github.com/earendil-works/pi/issues/5559)).
42
+ - Fixed inherited prompt history navigation to restore the current draft when returning from history browsing ([#5494](https://github.com/earendil-works/pi/issues/5494)).
43
+ - Fixed inherited wrapping for mixed Latin and CJK text so unspaced CJK runs can break at grapheme boundaries without leaving large trailing gaps ([#5495](https://github.com/earendil-works/pi/issues/5495)).
44
+ - Fixed extension OAuth login prompts to keep previous submitted prompt rows stable instead of mirroring the active input value ([#5433](https://github.com/earendil-works/pi/issues/5433)).
45
+ - Fixed `/reload` to apply updated `steeringMode` and `followUpMode` settings to the current session ([#5377](https://github.com/earendil-works/pi/issues/5377)).
46
+ - Fixed invalid `models.json` syntax to skip startup config migrations and report the normal file-path-aware models error instead of a raw JSON parse stack trace ([#5418](https://github.com/earendil-works/pi/issues/5418)).
47
+ - Fixed GitHub release notes and interactive changelog links to resolve package-relative documentation URLs correctly ([#5516](https://github.com/earendil-works/pi/issues/5516)).
48
+ - Fixed CLI help and version output, including plain redirected `--help`/`--version` output and simplified `list`/`config` help text.
49
+ - Fixed `/new` from ephemeral sessions to keep the new session ephemeral instead of persisting it by default ([#5045](https://github.com/earendil-works/pi/issues/5045)).
50
+ - Clarified custom model docs that `name` and `modelOverrides.name` do not replace model IDs in the footer or primary model lists ([#4841](https://github.com/earendil-works/pi/issues/4841)).
51
+
3
52
  ## [Unreleased]
4
53
 
54
+ ## [0.79.0] - 2026-06-08
55
+
56
+ ### New Features
57
+
58
+ - **Project trust for local inputs** - Pi now asks before loading project-local settings, resources, instructions, and packages, with saved decisions and `--approve` / `--no-approve` controls for non-interactive modes. See [Project Trust](README.md#project-trust).
59
+ - **Extension-controlled trust decisions** - Global and CLI extensions can handle `project_trust`, decide, remember, or defer project trust before project-local resources load. See [`project_trust`](docs/extensions.md#project_trust).
60
+ - **Cache-hit visibility in the footer** - The interactive footer now shows the latest prompt cache hit rate (`CH`). See [Interactive Mode](README.md#interactive-mode).
61
+ - **Richer SDK and RPC extension surfaces** - Public exports now include RPC extension UI request/response types and package asset path helpers. See [Extension UI Protocol](docs/rpc.md#extension-ui-protocol) and [SDK Exports](docs/sdk.md#exports).
62
+
63
+ ### Added
64
+
65
+ - Added a `project_trust` extension event so global and CLI extensions can decide or defer project trust during startup and runtime cwd switches.
66
+ - Added project trust gating for project-local settings, resources, instructions, and packages ([#5332](https://github.com/earendil-works/pi/pull/5332)).
67
+ - Added the latest prompt cache hit rate to the interactive footer.
68
+ - Exported RPC extension UI request and response types from the public API ([#5455](https://github.com/earendil-works/pi/issues/5455)).
69
+ - Exported coding-agent package asset path helpers from the public API ([#5415](https://github.com/earendil-works/pi/issues/5415)).
70
+
71
+ ### Fixed
72
+
73
+ - Fixed package exports by removing the stale `./hooks` subpath that pointed at non-existent build output.
74
+ - Fixed inherited TUI rendering to clear stale lines when content shrinks to zero.
75
+ - Fixed inherited autocomplete suggestions to refresh after editor cursor movement ([#5499](https://github.com/earendil-works/pi/pull/5499) by [@Roman-Galeev](https://github.com/Roman-Galeev)).
76
+ - Fixed `/reload` to persist project trust when an implicitly trusted session creates a project `.pi` directory.
77
+ - Fixed project trust input discovery to traverse parent directories portably.
78
+ - Fixed inherited intermittent Shift+Enter handling by making Kitty keyboard protocol fallback response-driven instead of timeout-driven ([#5188](https://github.com/earendil-works/pi/issues/5188)).
79
+ - Fixed the compaction summarization system prompt to use neutral AI assistant wording for non-coding agents ([#5401](https://github.com/earendil-works/pi/issues/5401)).
80
+ - Fixed `models.json` schema support and inherited OpenAI Responses custom-provider handling for `compat.supportsDeveloperRole: false` ([#5456](https://github.com/earendil-works/pi/issues/5456)).
81
+ - Fixed inherited prompt history navigation to place the cursor at the start when browsing upward and at the end when browsing downward ([#5454](https://github.com/earendil-works/pi/issues/5454)).
82
+ - Fixed tmux setup documentation to require tmux 3.5 for `extended-keys-format csi-u` and document the tmux 3.2-3.4 fallback ([#5432](https://github.com/earendil-works/pi/issues/5432)).
83
+ - Fixed inherited OpenRouter routing preferences on OpenAI-compatible custom providers to work when the custom provider base URL does not point directly at OpenRouter ([#5347](https://github.com/earendil-works/pi/issues/5347)).
84
+ - Fixed built-in tool expand hints to style closing parentheses consistently ([#5359](https://github.com/earendil-works/pi/issues/5359)).
85
+ - Fixed skill-wrapped prompts to insert spacing between skill instructions and the user message ([#5371](https://github.com/earendil-works/pi/pull/5371) by [@Perlence](https://github.com/Perlence)).
86
+
87
+ ## [0.78.1] - 2026-06-04
88
+
89
+ ### New Features
90
+
91
+ - **More built-in provider coverage** - Added Ant Ling and NVIDIA NIM provider setup, plus MiniMax-M3 support for the direct MiniMax providers. See [Providers](docs/providers.md).
92
+ - **Richer extension context** - Extensions can use `ctx.mode` and `ctx.getSystemPromptOptions()` to adapt behavior across TUI, RPC, JSON, and print modes and inspect base system prompt inputs. See [Extensions](docs/extensions.md).
93
+
94
+ ### Added
95
+
96
+ - Added containerization documentation and a Gondolin extension example for routing built-in tools into a local micro-VM.
97
+ - Added Ant Ling provider selection and setup documentation.
98
+ - Added MiniMax-M3 model support inherited from `@earendil-works/pi-ai` for the `minimax` and `minimax-cn` direct providers ([#5313](https://github.com/earendil-works/pi/issues/5313)).
99
+ - Added NVIDIA NIM provider selection, setup documentation, and direct NIM request attribution headers.
100
+ - Added `ctx.mode` to extension contexts so extensions can distinguish TUI, RPC, JSON, and print mode.
101
+ - Added `ctx.getSystemPromptOptions()` for extension commands to inspect the current base system prompt inputs ([#5306](https://github.com/earendil-works/pi/pull/5306) by [@xl0](https://github.com/xl0)).
102
+
5
103
  ### Fixed
6
104
 
7
- - Fixed npm publish E422 due to missing `repository.url` (will be in v0.6.0-alpha.3)
8
- - Fixed pre-existing 19+1 vitest false positives via `@sheason/*` alias in vitest config
105
+ - Fixed temporary extension package installs to use a private `~/.pi/agent/tmp/extensions` directory with `0700` permissions instead of `os.tmpdir()/pi-extensions`.
106
+ - Fixed git package source handling to reject unsafe host/path components and keep managed clone paths inside install roots.
107
+ - Fixed stored XSS in HTML session exports by sanitizing Markdown link and image URLs with a scheme allow-list after stripping control characters.
108
+ - Fixed SDK embedding in bundled Node apps failing with `ENOENT` when `package.json` is not present next to the bundle entrypoint. The package metadata reader now gracefully handles missing `package.json` by using defaults, enabling `createAgentSession()` without requiring package-adjacent files at runtime ([#5226](https://github.com/earendil-works/pi/issues/5226)).
109
+ - Fixed HTTP timeout setting not being respected for non-Codex providers (e.g., llama.cpp via OpenAI-compatible API). The `httpIdleTimeoutMs` setting (set via `/settings` HTTP timeout) now applies as the default SDK request timeout for all providers that support it, not just OpenAI Codex Responses. Disabling the timeout (HTTP timeout = false) now correctly disables SDK timeouts for all supported providers by sending a maximum int32 value (effectively infinite) instead of 0, since SDKs treat timeout=0 as an immediate timeout ([#5294](https://github.com/earendil-works/pi/issues/5294)).
110
+ - Fixed inherited Amazon Bedrock requests to replace blank required user/tool-result text with a placeholder and skip blank replay text blocks ([#4975](https://github.com/earendil-works/pi/issues/4975)).
111
+ - Fixed inherited Anthropic Claude Opus 4.7+ requests to suppress deprecated temperature parameters ([#5251](https://github.com/earendil-works/pi/pull/5251) by [@yzhg1983](https://github.com/yzhg1983)).
112
+ - Fixed inherited OpenAI GPT-5.5 generated metadata to omit unsupported minimal thinking ([#5243](https://github.com/earendil-works/pi/issues/5243)).
113
+ - Fixed inherited OpenRouter Kimi K2.6 thinking replay and developer-role instruction handling ([#5309](https://github.com/earendil-works/pi/issues/5309)).
114
+ - Fixed inherited OpenRouter reasoning instruction requests to preserve the system role when required ([#5221](https://github.com/earendil-works/pi/pull/5221) by [@PriNova](https://github.com/PriNova)).
115
+ - Fixed inherited overlay focus restoration so non-capturing overlays remain interactive after UI rerenders and explicit focus release ([#5235](https://github.com/earendil-works/pi/pull/5235) by [@nicobailon](https://github.com/nicobailon)).
116
+ - Fixed inherited tab width accounting in column slicing and overlay compositing so tab-containing output cannot exceed the terminal width ([#5218](https://github.com/earendil-works/pi/issues/5218)).
117
+ - Fixed opening and listing very large JSONL session files by reading session entries line-by-line instead of materializing the full file as one string ([#5231](https://github.com/earendil-works/pi/issues/5231)).
118
+ - Fixed the footer branch display in WSL `/mnt/...` repositories to refresh after branch changes ([#5264](https://github.com/earendil-works/pi/pull/5264) by [@psoukie](https://github.com/psoukie)).
119
+ - Fixed `renderShell: "self"` tool renderers that emit no component lines leaving a blank chat row ([#5299](https://github.com/earendil-works/pi/issues/5299)).
120
+ - Restored inherited NVIDIA Qwen 3.5 122B NIM model support.
9
121
 
10
122
  ## [0.78.0] - 2026-05-29
11
123
 
@@ -21,7 +133,7 @@
21
133
  - Added `--name` / `-n` to set the session display name at startup ([#5153](https://github.com/earendil-works/pi-mono/issues/5153)).
22
134
  - Added a resume command hint when exiting interactive sessions ([#5176](https://github.com/earendil-works/pi-mono/pull/5176) by [@yzhg1983](https://github.com/yzhg1983)).
23
135
  - Added OSC 8 `file://` hyperlinks to file paths shown in built-in file tool titles ([#5189](https://github.com/earendil-works/pi-mono/pull/5189) by [@mpazik](https://github.com/mpazik)).
24
- - Added custom Amazon Bedrock request header support inherited from `@sheason/pi-ai` ([#5178](https://github.com/earendil-works/pi-mono/pull/5178) by [@stephanmck](https://github.com/stephanmck)).
136
+ - Added custom Amazon Bedrock request header support inherited from `@earendil-works/pi-ai` ([#5178](https://github.com/earendil-works/pi-mono/pull/5178) by [@stephanmck](https://github.com/stephanmck)).
25
137
 
26
138
  ### Fixed
27
139
 
@@ -134,7 +246,7 @@
134
246
  - Fixed config pattern matching to resolve patterns from the correct base directory ([#4898](https://github.com/earendil-works/pi-mono/pull/4898) by [@haoqixu](https://github.com/haoqixu)).
135
247
  - Fixed theme pickers to list themes by their content name instead of file stem ([#4830](https://github.com/earendil-works/pi-mono/pull/4830) by [@Perlence](https://github.com/Perlence)).
136
248
  - Fixed OpenCode Zen/Go requests to send per-session OpenCode routing headers ([#4847](https://github.com/earendil-works/pi/issues/4847)).
137
- - Fixed Amazon Bedrock provider loading under strict package managers by inheriting the declared `@smithy/node-http-handler` dependency from `@sheason/pi-ai` ([#4842](https://github.com/earendil-works/pi/issues/4842)).
249
+ - Fixed Amazon Bedrock provider loading under strict package managers by inheriting the declared `@smithy/node-http-handler` dependency from `@earendil-works/pi-ai` ([#4842](https://github.com/earendil-works/pi/issues/4842)).
138
250
  - Fixed inherited Amazon Bedrock Claude requests to send the model output token cap by default, avoiding Bedrock's 4096-token default truncation ([#4848](https://github.com/earendil-works/pi/issues/4848)).
139
251
  - Fixed exported session HTML to escape quote characters in attribute values ([#4832](https://github.com/earendil-works/pi/issues/4832)).
140
252
  - Fixed GitHub Copilot device-code login to keep opening the verification URL in browser-capable environments while ignoring browser launch failures for headless use ([#4788](https://github.com/earendil-works/pi-mono/pull/4788) by [@vegarsti](https://github.com/vegarsti)).
@@ -179,9 +291,9 @@
179
291
  - Fixed HTML share/export sidebar clicks for shared tool entries to scroll to the rendered tool call ([#4664](https://github.com/earendil-works/pi-mono/pull/4664) by [@yzhg1983](https://github.com/yzhg1983)).
180
292
  - Fixed theme palettes to set explicit text colors and avoid terminal-default color drift.
181
293
  - Fixed truecolor detection to align terminal image rendering and interactive theme decisions.
182
- - Fixed loader indicator startup inherited from `@sheason/pi-tui` so initialization cannot run before frames are available.
183
- - Fixed OpenAI-compatible default output token requests inherited from `@sheason/pi-ai` to avoid reserving impossible context windows on servers such as vLLM ([#4675](https://github.com/earendil-works/pi/issues/4675)).
184
- - Fixed OpenAI prompt cache keys inherited from `@sheason/pi-ai` to stay within the 64-character provider limit ([#4720](https://github.com/earendil-works/pi/issues/4720)).
294
+ - Fixed loader indicator startup inherited from `@earendil-works/pi-tui` so initialization cannot run before frames are available.
295
+ - Fixed OpenAI-compatible default output token requests inherited from `@earendil-works/pi-ai` to avoid reserving impossible context windows on servers such as vLLM ([#4675](https://github.com/earendil-works/pi/issues/4675)).
296
+ - Fixed OpenAI prompt cache keys inherited from `@earendil-works/pi-ai` to stay within the 64-character provider limit ([#4720](https://github.com/earendil-works/pi/issues/4720)).
185
297
  - Fixed Windows npm-family package commands for fnm-managed Node.js installs that expose both extensionless Unix scripts and `.cmd` shims ([#4793](https://github.com/earendil-works/pi/issues/4793)).
186
298
 
187
299
  ## [0.75.3] - 2026-05-18
@@ -195,7 +307,7 @@
195
307
  ### Fixed
196
308
 
197
309
  - Fixed Bun-compiled release binaries failing to start when Bun's built-in undici shim lacks npm undici's `install` export ([#4661](https://github.com/earendil-works/pi-mono/pull/4661) by [@dmasiero](https://github.com/dmasiero)).
198
- - Fixed Xiaomi MiMo generated model metadata to replay assistant tool-call messages with `reasoning_content` for thinking-mode multi-turn requests, inherited from `@sheason/pi-ai` ([#4678](https://github.com/earendil-works/pi/issues/4678)).
310
+ - Fixed Xiaomi MiMo generated model metadata to replay assistant tool-call messages with `reasoning_content` for thinking-mode multi-turn requests, inherited from `@earendil-works/pi-ai` ([#4678](https://github.com/earendil-works/pi/issues/4678)).
199
311
  - Fixed Windows external editor handoff so vim/nvim can receive input after opening from the TUI ([#4612](https://github.com/earendil-works/pi/issues/4612)).
200
312
  - Fixed Windows npm self-updates to move loaded native dependency packages out of the active install before reinstalling pi ([#4157](https://github.com/earendil-works/pi/issues/4157)).
201
313
  - Fixed `pi update --self` detection for pnpm v11 global installs whose package path resolves through the pnpm store ([#4647](https://github.com/earendil-works/pi/issues/4647)).
@@ -207,17 +319,17 @@
207
319
  ### Fixed
208
320
 
209
321
  - Fixed config selectors to scale their visible row count to terminal height ([#4243](https://github.com/earendil-works/pi-mono/pull/4243) by [@samjonester](https://github.com/samjonester)).
210
- - Fixed Anthropic-compatible API-key requests to ignore unrelated `ANTHROPIC_AUTH_TOKEN` environment values, avoiding invalid bearer credentials for providers such as Xiaomi MiMo inherited from `@sheason/pi-ai` ([#4342](https://github.com/earendil-works/pi/issues/4342)).
211
- - Fixed Amazon Bedrock message conversion to skip unknown content blocks instead of failing the stream, inherited from `@sheason/pi-ai` ([#4223](https://github.com/earendil-works/pi/issues/4223)).
212
- - Fixed Azure OpenAI Responses and OpenAI Responses error formatting to prefix HTTP status codes onto `errorMessage`, so transient 5xx and 429 errors are correctly matched by the agent-level auto-retry classifier inherited from `@sheason/pi-ai` ([#4232](https://github.com/earendil-works/pi/issues/4232)).
213
- - Fixed OpenCode Go Kimi reasoning replay by normalizing streamed `reasoning` fields back to `reasoning_content` for OpenCode Go only, inherited from `@sheason/pi-ai` ([#4251](https://github.com/earendil-works/pi/issues/4251)).
214
- - Fixed Xiaomi MiMo model metadata to use the OpenAI-compatible endpoints and `openai-completions` API, restoring multi-turn thinking/tool-call sessions inherited from `@sheason/pi-ai` ([#4505](https://github.com/earendil-works/pi/issues/4505)).
322
+ - Fixed Anthropic-compatible API-key requests to ignore unrelated `ANTHROPIC_AUTH_TOKEN` environment values, avoiding invalid bearer credentials for providers such as Xiaomi MiMo inherited from `@earendil-works/pi-ai` ([#4342](https://github.com/earendil-works/pi/issues/4342)).
323
+ - Fixed Amazon Bedrock message conversion to skip unknown content blocks instead of failing the stream, inherited from `@earendil-works/pi-ai` ([#4223](https://github.com/earendil-works/pi/issues/4223)).
324
+ - Fixed Azure OpenAI Responses and OpenAI Responses error formatting to prefix HTTP status codes onto `errorMessage`, so transient 5xx and 429 errors are correctly matched by the agent-level auto-retry classifier inherited from `@earendil-works/pi-ai` ([#4232](https://github.com/earendil-works/pi/issues/4232)).
325
+ - Fixed OpenCode Go Kimi reasoning replay by normalizing streamed `reasoning` fields back to `reasoning_content` for OpenCode Go only, inherited from `@earendil-works/pi-ai` ([#4251](https://github.com/earendil-works/pi/issues/4251)).
326
+ - Fixed Xiaomi MiMo model metadata to use the OpenAI-compatible endpoints and `openai-completions` API, restoring multi-turn thinking/tool-call sessions inherited from `@earendil-works/pi-ai` ([#4505](https://github.com/earendil-works/pi/issues/4505)).
215
327
  - Fixed JSON parse failures for compressed fetch responses under Node 26.0 by installing undici fetch globals alongside pi's global dispatcher ([#4650](https://github.com/earendil-works/pi/issues/4650), [#4652](https://github.com/earendil-works/pi/issues/4652), [#4653](https://github.com/earendil-works/pi/issues/4653)).
216
328
  - Fixed npm-family package commands on Windows to avoid shell argument splitting when install prefixes contain spaces ([#4623](https://github.com/earendil-works/pi/issues/4623)).
217
329
 
218
330
  ### Removed
219
331
 
220
- - Removed non-working OpenAI Codex fast model variants inherited from `@sheason/pi-ai`.
332
+ - Removed non-working OpenAI Codex fast model variants inherited from `@earendil-works/pi-ai`.
221
333
 
222
334
  ## [0.75.0] - 2026-05-17
223
335
 
@@ -229,24 +341,24 @@
229
341
 
230
342
  - Fixed compaction summary calls to use custom agent stream functions, preserving proxy-backed LLM routing ([#4484](https://github.com/earendil-works/pi/issues/4484)).
231
343
  - Fixed system prompt and context file boundaries to use explicit XML tags instead of Markdown headings, reducing inconsistent boundary ingestion by models ([#4541](https://github.com/earendil-works/pi-mono/pull/4541) by [@herrnel](https://github.com/herrnel)).
232
- - Fixed OpenAI Codex generated model metadata to use the current upstream model list inherited from `@sheason/pi-ai` ([#4603](https://github.com/earendil-works/pi-mono/pull/4603) by [@mattiacerutti](https://github.com/mattiacerutti)).
233
- - Fixed GitHub Copilot GPT model thinking metadata inherited from `@sheason/pi-ai` to map unsupported minimal thinking to low ([#4622](https://github.com/earendil-works/pi-mono/pull/4622) by [@mattiacerutti](https://github.com/mattiacerutti)).
344
+ - Fixed OpenAI Codex generated model metadata to use the current upstream model list inherited from `@earendil-works/pi-ai` ([#4603](https://github.com/earendil-works/pi-mono/pull/4603) by [@mattiacerutti](https://github.com/mattiacerutti)).
345
+ - Fixed GitHub Copilot GPT model thinking metadata inherited from `@earendil-works/pi-ai` to map unsupported minimal thinking to low ([#4622](https://github.com/earendil-works/pi-mono/pull/4622) by [@mattiacerutti](https://github.com/mattiacerutti)).
234
346
  - Fixed user-scoped npm pi packages to install under `~/.pi/agent/npm/` instead of npm's global package root, avoiding permission errors with system-managed Node installs ([#4587](https://github.com/earendil-works/pi/issues/4587)).
235
347
  - Fixed Mistral requests failing after the global fetch proxy/timeout workaround by removing the custom fetch override and using undici 8 dispatcher support instead ([#4619](https://github.com/earendil-works/pi/issues/4619)).
236
- - Fixed default output token requests for models whose advertised output limit is effectively their full context window, avoiding impossible provider requests inherited from `@sheason/pi-ai` ([#4614](https://github.com/earendil-works/pi/issues/4614)).
348
+ - Fixed default output token requests for models whose advertised output limit is effectively their full context window, avoiding impossible provider requests inherited from `@earendil-works/pi-ai` ([#4614](https://github.com/earendil-works/pi/issues/4614)).
237
349
 
238
350
  ## [0.74.1] - 2026-05-16
239
351
 
240
352
  ### New Features
241
353
 
242
- - **Image generation support** - Added image generation APIs, generated image model metadata, and built-in OpenRouter image generation support inherited from `@sheason/pi-ai`.
354
+ - **Image generation support** - Added image generation APIs, generated image model metadata, and built-in OpenRouter image generation support inherited from `@earendil-works/pi-ai`.
243
355
  - **Together AI provider** - Added Together AI as a built-in provider with `/login` API-key auth, default model resolution, and setup docs. See [README.md#providers--models](README.md#providers--models) and [docs/providers.md](docs/providers.md).
244
356
  - **Windows ARM64 standalone binaries** - Added standalone release artifacts for Windows ARM64.
245
- - **Improved terminal and markdown rendering** - Added markdown list indentation, task-list checkbox rendering, large markdown robustness, and inline image placement fixes inherited from `@sheason/pi-tui`.
357
+ - **Improved terminal and markdown rendering** - Added markdown list indentation, task-list checkbox rendering, large markdown robustness, and inline image placement fixes inherited from `@earendil-works/pi-tui`.
246
358
 
247
359
  ### Added
248
360
 
249
- - Added image generation support from `@sheason/pi-ai`, including image generation APIs, image model metadata, and built-in OpenRouter image generation support ([#3887](https://github.com/earendil-works/pi-mono/pull/3887) by [@cristinaponcela](https://github.com/cristinaponcela)).
361
+ - Added image generation support from `@earendil-works/pi-ai`, including image generation APIs, image model metadata, and built-in OpenRouter image generation support ([#3887](https://github.com/earendil-works/pi-mono/pull/3887) by [@cristinaponcela](https://github.com/cristinaponcela)).
250
362
  - Added Together AI to built-in provider setup, `/login` API-key auth, and default model resolution ([#3624](https://github.com/earendil-works/pi-mono/pull/3624) by [@Nutlope](https://github.com/Nutlope)).
251
363
  - Added Windows ARM64 standalone binary release artifacts ([#4458](https://github.com/earendil-works/pi/pull/4458) by [@brianmichel](https://github.com/brianmichel)).
252
364
 
@@ -270,8 +382,8 @@
270
382
  - Fixed uncaught interactive-mode exceptions to restore the terminal before exiting ([#4426](https://github.com/earendil-works/pi-mono/pull/4426) by [@ofa1](https://github.com/ofa1)).
271
383
  - Fixed ANSI stripping to match `strip-ansi` behavior after dependency removal.
272
384
  - Fixed UUIDv7 sequence generation shared by session IDs after dependency removal.
273
- - Fixed OpenRouter cached-token usage accounting, Fireworks caching compatibility, and OpenAI Codex WebSocket proxy handling inherited from `@sheason/pi-ai`.
274
- - Fixed markdown list wrapping, task-list checkboxes, large markdown rendering, WezTerm Kitty keyboard escape handling, and short-viewport inline image placement inherited from `@sheason/pi-tui`.
385
+ - Fixed OpenRouter cached-token usage accounting, Fireworks caching compatibility, and OpenAI Codex WebSocket proxy handling inherited from `@earendil-works/pi-ai`.
386
+ - Fixed markdown list wrapping, task-list checkboxes, large markdown rendering, WezTerm Kitty keyboard escape handling, and short-viewport inline image placement inherited from `@earendil-works/pi-tui`.
275
387
  - Fixed theme sharing across package scopes so extensions do not crash with `Theme not initialized` ([#4333](https://github.com/earendil-works/pi/issues/4333)).
276
388
  - Fixed keybinding hints to show Option instead of Alt on macOS ([#4289](https://github.com/earendil-works/pi/issues/4289)).
277
389
  - Fixed the interactive update notification to render the changelog as an OSC 8 hyperlink when the terminal supports hyperlinks ([#4280](https://github.com/earendil-works/pi/issues/4280)).
@@ -286,7 +398,7 @@
286
398
 
287
399
  ### New Features
288
400
 
289
- - **Self-update support for the npm scope migration**: `pi update --self` now supports the upcoming package rename from `@mariozechner/pi-coding-agent` to `@sheason/pi-coding-agent`. After the new package is published, existing global installs can update through the normal self-update flow; pi will uninstall the old global package and install the package name returned by the version check endpoint.
401
+ - **Self-update support for the npm scope migration**: `pi update --self` now supports the upcoming package rename from `@mariozechner/pi-coding-agent` to `@earendil-works/pi-coding-agent`. After the new package is published, existing global installs can update through the normal self-update flow; pi will uninstall the old global package and install the package name returned by the version check endpoint.
290
402
  - **Interactive OAuth login selection**: OAuth providers can now present multiple login choices in `/login`, enabling provider-specific interactive authentication flows. See [Providers](docs/providers.md).
291
403
  - **JSONC-style `models.json` parsing**: `models.json` now allows comments and trailing commas, making custom provider and model configuration easier to maintain. See [Providers](docs/providers.md) and [Custom Providers](docs/custom-provider.md).
292
404
 
package/README.md CHANGED
@@ -110,9 +110,11 @@ For each built-in provider, pi maintains a list of tool-capable models, updated
110
110
 
111
111
  **API keys:**
112
112
  - Anthropic
113
+ - Ant Ling
113
114
  - OpenAI
114
115
  - Azure OpenAI
115
116
  - DeepSeek
117
+ - NVIDIA NIM
116
118
  - Google Gemini
117
119
  - Google Vertex
118
120
  - Amazon Bedrock
@@ -125,6 +127,7 @@ For each built-in provider, pi maintains a list of tool-capable models, updated
125
127
  - OpenRouter
126
128
  - Vercel AI Gateway
127
129
  - ZAI
130
+ - ZAI Coding Plan (China)
128
131
  - OpenCode Zen
129
132
  - OpenCode Go
130
133
  - Hugging Face
@@ -152,7 +155,7 @@ The interface from top to bottom:
152
155
  - **Startup header** - Shows shortcuts (`/hotkeys` for all), loaded AGENTS.md files, prompt templates, skills, and extensions
153
156
  - **Messages** - Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI
154
157
  - **Editor** - Where you type; border color indicates thinking level
155
- - **Footer** - Working directory, session name, total token/cache usage, cost, context usage, current model
158
+ - **Footer** - Working directory, session name, total token/cache usage (`↑` input, `↓` output, `R` cache read, `W` cache write, `CH` latest cache hit rate), cost, context usage, current model
156
159
 
157
160
  The editor can be temporarily replaced by other UI, like built-in `/settings` or custom UI from extensions (e.g., a Q&A tool that lets the user answer model questions in a structured format). [Extensions](#extensions) can also replace the editor, add widgets above/below it, a status line, custom footer, or overlays.
158
161
 
@@ -183,6 +186,7 @@ Type `/` in the editor to trigger commands. [Extensions](#extensions) can regist
183
186
  | `/name <name>` | Set session display name |
184
187
  | `/session` | Show session info (file, ID, messages, tokens, cost) |
185
188
  | `/tree` | Jump to any point in the session and continue from there |
189
+ | `/trust` | Save project trust decision for future sessions (restart required) |
186
190
  | `/fork` | Create a new session from a previous user message |
187
191
  | `/clone` | Duplicate the current active branch into a new session |
188
192
  | `/compact [prompt]` | Manually compact context, optional custom instructions |
@@ -285,12 +289,26 @@ Use `/settings` to modify common options, or edit JSON files directly:
285
289
 
286
290
  See [docs/settings.md](docs/settings.md) for all options.
287
291
 
292
+ ### Project Trust
293
+
294
+ On interactive startup, pi asks before trusting a project folder that contains project-local extensions or settings and has no saved decision for the folder or a parent folder in `~/.pi/agent/trust.json`. Trusting a project allows pi to load `.pi/settings.json` and `.pi` resources, install missing project packages, and execute project extensions.
295
+
296
+ Before the trust decision, pi loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
297
+
298
+ Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore trust-gated project inputs, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
299
+
300
+ If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.pi/agent/settings.json`, or change it with `/settings`.
301
+
302
+ `pi config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
303
+
304
+ Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
305
+
288
306
  ### Telemetry and update checks
289
307
 
290
308
  Pi has two separate startup features:
291
309
 
292
310
  - **Update check:** fetches `https://pi.dev/api/latest-version` to check whether a newer Pi version exists. Disable it with `PI_SKIP_VERSION_CHECK=1`. Disabling update checks only turns off this check.
293
- - **Install/update telemetry:** after first install or a changelog-detected update, sends an anonymous version ping to `https://pi.dev/api/report-install`. Opt out by setting `enableInstallTelemetry` to `false` in `settings.json`, or by setting `PI_TELEMETRY=0`. This does not disable update checks; Pi may still contact `pi.dev` for the latest version unless update checks are disabled or offline mode is enabled.
311
+ - **Install/update telemetry:** after first install or a changelog-detected update, sends an anonymous version ping to `https://pi.dev/api/report-install`. This setting also controls optional provider attribution headers for OpenRouter, Cloudflare, and direct NVIDIA NIM requests. Opt out by setting `enableInstallTelemetry` to `false` in `settings.json`, or by setting `PI_TELEMETRY=0`. This does not disable update checks; Pi may still contact `pi.dev` for the latest version unless update checks are disabled or offline mode is enabled.
294
312
 
295
313
  Use `--offline` or `PI_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
296
314
 
@@ -303,7 +321,7 @@ Pi loads `AGENTS.md` (or `CLAUDE.md`) at startup from:
303
321
  - Parent directories (walking up from cwd)
304
322
  - Current directory
305
323
 
306
- Use for project instructions, conventions, common commands. All matching files are concatenated.
324
+ Use for project instructions (`AGENTS.md`/`CLAUDE.md`), conventions, common commands. All matching files are concatenated.
307
325
 
308
326
  Disable context file loading with `--no-context-files` (or `-nc`).
309
327
 
@@ -509,6 +527,8 @@ pi list # List installed packages
509
527
  pi config # Enable/disable package resources
510
528
  ```
511
529
 
530
+ `pi config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command.
531
+
512
532
  ### Modes
513
533
 
514
534
  | Flag | Description |
@@ -582,6 +602,8 @@ Combine `--no-*` with explicit flags to load exactly what you need, ignoring set
582
602
  | `--system-prompt <text>` | Replace default prompt (context files and skills still appended) |
583
603
  | `--append-system-prompt <text>` | Append to system prompt |
584
604
  | `--verbose` | Force verbose startup |
605
+ | `-a`, `--approve` | Trust project-local files for this run |
606
+ | `-na`, `--no-approve` | Ignore project-local files for this run |
585
607
  | `-h`, `--help` | Show help |
586
608
  | `-v`, `--version` | Show version |
587
609
 
@@ -641,7 +663,7 @@ pi --thinking high "Solve this complex problem"
641
663
  | `PI_PACKAGE_DIR` | Override package directory (useful for Nix/Guix where store paths tokenize poorly) |
642
664
  | `PI_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
643
665
  | `PI_SKIP_VERSION_CHECK` | Skip the Pi version update check at startup. This prevents the `pi.dev` latest-version request |
644
- | `PI_TELEMETRY` | Override install/update telemetry. Use `1`/`true`/`yes` to enable or `0`/`false`/`no` to disable. This does not disable update checks |
666
+ | `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers. Use `1`/`true`/`yes` to enable or `0`/`false`/`no` to disable. This does not disable update checks |
645
667
  | `PI_CACHE_RETENTION` | Set to `long` for extended prompt cache (Anthropic: 1h, OpenAI: 24h) |
646
668
  | `VISUAL`, `EDITOR` | External editor for Ctrl+G |
647
669
 
@@ -1 +1 @@
1
- {"version":3,"file":"register-bedrock.d.ts","sourceRoot":"","sources":["../../src/bun/register-bedrock.ts"],"names":[],"mappings":"","sourcesContent":["import { setBedrockProviderModule } from \"@sheason/pi-ai\";\nimport { bedrockProviderModule } from \"@sheason/pi-ai/bedrock-provider\";\n\nsetBedrockProviderModule(bedrockProviderModule);\n"]}
1
+ {"version":3,"file":"register-bedrock.d.ts","sourceRoot":"","sources":["../../src/bun/register-bedrock.ts"],"names":[],"mappings":"","sourcesContent":["import { setBedrockProviderModule } from \"@earendil-works/pi-ai\";\nimport { bedrockProviderModule } from \"@earendil-works/pi-ai/bedrock-provider\";\n\nsetBedrockProviderModule(bedrockProviderModule);\n"]}
@@ -1,4 +1,4 @@
1
- import { setBedrockProviderModule } from "@sheason/pi-ai";
2
- import { bedrockProviderModule } from "@sheason/pi-ai/bedrock-provider";
1
+ import { setBedrockProviderModule } from "@earendil-works/pi-ai";
2
+ import { bedrockProviderModule } from "@earendil-works/pi-ai/bedrock-provider";
3
3
  setBedrockProviderModule(bedrockProviderModule);
4
4
  //# sourceMappingURL=register-bedrock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-bedrock.js","sourceRoot":"","sources":["../../src/bun/register-bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["import { setBedrockProviderModule } from \"@sheason/pi-ai\";\nimport { bedrockProviderModule } from \"@sheason/pi-ai/bedrock-provider\";\n\nsetBedrockProviderModule(bedrockProviderModule);\n"]}
1
+ {"version":3,"file":"register-bedrock.js","sourceRoot":"","sources":["../../src/bun/register-bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,wBAAwB,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["import { setBedrockProviderModule } from \"@earendil-works/pi-ai\";\nimport { bedrockProviderModule } from \"@earendil-works/pi-ai/bedrock-provider\";\n\nsetBedrockProviderModule(bedrockProviderModule);\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * CLI argument parsing and help display
3
3
  */
4
- import type { ThinkingLevel } from "@sheason/pi-agent-core";
4
+ import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
5
5
  import type { ExtensionFlag } from "../core/extensions/types.ts";
6
6
  export type Mode = "text" | "json" | "rpc" | "serve" | "connect";
7
7
  export interface Args {
@@ -43,6 +43,7 @@ export interface Args {
43
43
  listModels?: string | true;
44
44
  offline?: boolean;
45
45
  verbose?: boolean;
46
+ projectTrustOverride?: boolean;
46
47
  messages: string[];
47
48
  fileArgs: string[];
48
49
  /** Unknown flags (potentially extension flags) - map of flag name to value */
@@ -1 +1 @@
1
- {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,IAAI;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8EAA8E;IAC9E,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;IAC5C,WAAW,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE;AAID,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAE1E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAgK9C;AAED,wBAAgB,SAAS,CAAC,cAAc,CAAC,EAAE,aAAa,EAAE,GAAG,IAAI,CA6KhE","sourcesContent":["/**\n * CLI argument parsing and help display\n */\n\nimport type { ThinkingLevel } from \"@sheason/pi-agent-core\";\nimport chalk from \"chalk\";\nimport { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_SESSION_DIR } from \"../config.ts\";\nimport type { ExtensionFlag } from \"../core/extensions/types.ts\";\n\nexport type Mode = \"text\" | \"json\" | \"rpc\" | \"serve\" | \"connect\";\n\nexport interface Args {\n\tprovider?: string;\n\tmodel?: string;\n\tapiKey?: string;\n\tsystemPrompt?: string;\n\tappendSystemPrompt?: string[];\n\tthinking?: ThinkingLevel;\n\tcontinue?: boolean;\n\tresume?: boolean;\n\thelp?: boolean;\n\tversion?: boolean;\n\tmode?: Mode;\n\tport?: number; // --port <number> for serve mode\n\turl?: string; // --url <string> for connect mode\n\tname?: string;\n\tnoSession?: boolean;\n\tsession?: string;\n\tsessionId?: string;\n\tfork?: string;\n\tsessionDir?: string;\n\tmodels?: string[];\n\ttools?: string[];\n\texcludeTools?: string[];\n\tnoTools?: boolean;\n\tnoBuiltinTools?: boolean;\n\textensions?: string[];\n\tnoExtensions?: boolean;\n\tprint?: boolean;\n\texport?: string;\n\tnoSkills?: boolean;\n\tskills?: string[];\n\tpromptTemplates?: string[];\n\tnoPromptTemplates?: boolean;\n\tthemes?: string[];\n\tnoThemes?: boolean;\n\tnoContextFiles?: boolean;\n\tlistModels?: string | true;\n\toffline?: boolean;\n\tverbose?: boolean;\n\tmessages: string[];\n\tfileArgs: string[];\n\t/** Unknown flags (potentially extension flags) - map of flag name to value */\n\tunknownFlags: Map<string, boolean | string>;\n\tdiagnostics: Array<{ type: \"warning\" | \"error\"; message: string }>;\n}\n\nconst VALID_THINKING_LEVELS = [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\"] as const;\n\nexport function isValidThinkingLevel(level: string): level is ThinkingLevel {\n\treturn VALID_THINKING_LEVELS.includes(level as ThinkingLevel);\n}\n\nexport function parseArgs(args: string[]): Args {\n\tconst result: Args = {\n\t\tmessages: [],\n\t\tfileArgs: [],\n\t\tunknownFlags: new Map(),\n\t\tdiagnostics: [],\n\t};\n\n\tfor (let i = 0; i < args.length; i++) {\n\t\tconst arg = args[i];\n\n\t\tif (arg === \"--help\" || arg === \"-h\") {\n\t\t\tresult.help = true;\n\t\t} else if (arg === \"--version\" || arg === \"-v\") {\n\t\t\tresult.version = true;\n\t\t} else if (arg === \"--mode\" && i + 1 < args.length) {\n\t\t\tconst mode = args[++i];\n\t\t\tif (mode === \"text\" || mode === \"json\" || mode === \"rpc\" || mode === \"serve\" || mode === \"connect\") {\n\t\t\t\tresult.mode = mode;\n\t\t\t}\n\t\t} else if (arg === \"--port\") {\n\t\t\tconst value = args[++i];\n\t\t\tif (value === undefined) {\n\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--port requires a value\" });\n\t\t\t} else {\n\t\t\t\tresult.port = parseInt(value, 10);\n\t\t\t\tif (Number.isNaN(result.port)) {\n\t\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--port requires a number\" });\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (arg === \"--url\") {\n\t\t\tconst value = args[++i];\n\t\t\tif (value === undefined) {\n\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--url requires a value\" });\n\t\t\t} else {\n\t\t\t\tresult.url = value;\n\t\t\t}\n\t\t} else if (arg === \"--continue\" || arg === \"-c\") {\n\t\t\tresult.continue = true;\n\t\t} else if (arg === \"--resume\" || arg === \"-r\") {\n\t\t\tresult.resume = true;\n\t\t} else if (arg === \"--provider\" && i + 1 < args.length) {\n\t\t\tresult.provider = args[++i];\n\t\t} else if (arg === \"--model\" && i + 1 < args.length) {\n\t\t\tresult.model = args[++i];\n\t\t} else if (arg === \"--api-key\" && i + 1 < args.length) {\n\t\t\tresult.apiKey = args[++i];\n\t\t} else if (arg === \"--system-prompt\" && i + 1 < args.length) {\n\t\t\tresult.systemPrompt = args[++i];\n\t\t} else if (arg === \"--append-system-prompt\" && i + 1 < args.length) {\n\t\t\tresult.appendSystemPrompt = result.appendSystemPrompt ?? [];\n\t\t\tresult.appendSystemPrompt.push(args[++i]);\n\t\t} else if (arg === \"--name\" || arg === \"-n\") {\n\t\t\tif (i + 1 < args.length) {\n\t\t\t\tresult.name = args[++i];\n\t\t\t} else {\n\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--name requires a value\" });\n\t\t\t}\n\t\t} else if (arg === \"--no-session\") {\n\t\t\tresult.noSession = true;\n\t\t} else if (arg === \"--session\" && i + 1 < args.length) {\n\t\t\tresult.session = args[++i];\n\t\t} else if (arg === \"--session-id\" && i + 1 < args.length) {\n\t\t\tresult.sessionId = args[++i];\n\t\t} else if (arg === \"--fork\" && i + 1 < args.length) {\n\t\t\tresult.fork = args[++i];\n\t\t} else if (arg === \"--session-dir\" && i + 1 < args.length) {\n\t\t\tresult.sessionDir = args[++i];\n\t\t} else if (arg === \"--models\" && i + 1 < args.length) {\n\t\t\tresult.models = args[++i].split(\",\").map((s) => s.trim());\n\t\t} else if (arg === \"--no-tools\" || arg === \"-nt\") {\n\t\t\tresult.noTools = true;\n\t\t} else if (arg === \"--no-builtin-tools\" || arg === \"-nbt\") {\n\t\t\tresult.noBuiltinTools = true;\n\t\t} else if ((arg === \"--tools\" || arg === \"-t\") && i + 1 < args.length) {\n\t\t\tresult.tools = args[++i]\n\t\t\t\t.split(\",\")\n\t\t\t\t.map((s) => s.trim())\n\t\t\t\t.filter((name) => name.length > 0);\n\t\t} else if ((arg === \"--exclude-tools\" || arg === \"-xt\") && i + 1 < args.length) {\n\t\t\tresult.excludeTools = args[++i]\n\t\t\t\t.split(\",\")\n\t\t\t\t.map((s) => s.trim())\n\t\t\t\t.filter((name) => name.length > 0);\n\t\t} else if (arg === \"--thinking\" && i + 1 < args.length) {\n\t\t\tconst level = args[++i];\n\t\t\tif (isValidThinkingLevel(level)) {\n\t\t\t\tresult.thinking = level;\n\t\t\t} else {\n\t\t\t\tresult.diagnostics.push({\n\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\tmessage: `Invalid thinking level \"${level}\". Valid values: ${VALID_THINKING_LEVELS.join(\", \")}`,\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (arg === \"--print\" || arg === \"-p\") {\n\t\t\tresult.print = true;\n\t\t\tconst next = args[i + 1];\n\t\t\tif (next !== undefined && !next.startsWith(\"@\") && (!next.startsWith(\"-\") || next.startsWith(\"---\"))) {\n\t\t\t\tresult.messages.push(next);\n\t\t\t\ti++;\n\t\t\t}\n\t\t} else if (arg === \"--export\" && i + 1 < args.length) {\n\t\t\tresult.export = args[++i];\n\t\t} else if ((arg === \"--extension\" || arg === \"-e\") && i + 1 < args.length) {\n\t\t\tresult.extensions = result.extensions ?? [];\n\t\t\tresult.extensions.push(args[++i]);\n\t\t} else if (arg === \"--no-extensions\" || arg === \"-ne\") {\n\t\t\tresult.noExtensions = true;\n\t\t} else if (arg === \"--skill\" && i + 1 < args.length) {\n\t\t\tresult.skills = result.skills ?? [];\n\t\t\tresult.skills.push(args[++i]);\n\t\t} else if (arg === \"--prompt-template\" && i + 1 < args.length) {\n\t\t\tresult.promptTemplates = result.promptTemplates ?? [];\n\t\t\tresult.promptTemplates.push(args[++i]);\n\t\t} else if (arg === \"--theme\" && i + 1 < args.length) {\n\t\t\tresult.themes = result.themes ?? [];\n\t\t\tresult.themes.push(args[++i]);\n\t\t} else if (arg === \"--no-skills\" || arg === \"-ns\") {\n\t\t\tresult.noSkills = true;\n\t\t} else if (arg === \"--no-prompt-templates\" || arg === \"-np\") {\n\t\t\tresult.noPromptTemplates = true;\n\t\t} else if (arg === \"--no-themes\") {\n\t\t\tresult.noThemes = true;\n\t\t} else if (arg === \"--no-context-files\" || arg === \"-nc\") {\n\t\t\tresult.noContextFiles = true;\n\t\t} else if (arg === \"--list-models\") {\n\t\t\t// Check if next arg is a search pattern (not a flag or file arg)\n\t\t\tif (i + 1 < args.length && !args[i + 1].startsWith(\"-\") && !args[i + 1].startsWith(\"@\")) {\n\t\t\t\tresult.listModels = args[++i];\n\t\t\t} else {\n\t\t\t\tresult.listModels = true;\n\t\t\t}\n\t\t} else if (arg === \"--verbose\") {\n\t\t\tresult.verbose = true;\n\t\t} else if (arg === \"--offline\") {\n\t\t\tresult.offline = true;\n\t\t} else if (arg.startsWith(\"@\")) {\n\t\t\tresult.fileArgs.push(arg.slice(1)); // Remove @ prefix\n\t\t} else if (arg.startsWith(\"--\")) {\n\t\t\tconst eqIndex = arg.indexOf(\"=\");\n\t\t\tif (eqIndex !== -1) {\n\t\t\t\tresult.unknownFlags.set(arg.slice(2, eqIndex), arg.slice(eqIndex + 1));\n\t\t\t} else {\n\t\t\t\tconst flagName = arg.slice(2);\n\t\t\t\tconst next = args[i + 1];\n\t\t\t\tif (next !== undefined && !next.startsWith(\"-\") && !next.startsWith(\"@\")) {\n\t\t\t\t\tresult.unknownFlags.set(flagName, next);\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\tresult.unknownFlags.set(flagName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (arg.startsWith(\"-\") && !arg.startsWith(\"--\")) {\n\t\t\tresult.diagnostics.push({ type: \"error\", message: `Unknown option: ${arg}` });\n\t\t} else if (!arg.startsWith(\"-\")) {\n\t\t\tresult.messages.push(arg);\n\t\t}\n\t}\n\n\treturn result;\n}\n\nexport function printHelp(extensionFlags?: ExtensionFlag[]): void {\n\tconst extensionFlagsText =\n\t\textensionFlags && extensionFlags.length > 0\n\t\t\t? `\\n${chalk.bold(\"Extension CLI Flags:\")}\\n${extensionFlags\n\t\t\t\t\t.map((flag) => {\n\t\t\t\t\t\tconst value = flag.type === \"string\" ? \" <value>\" : \"\";\n\t\t\t\t\t\tconst description = flag.description ?? `Registered by ${flag.extensionPath}`;\n\t\t\t\t\t\treturn ` --${flag.name}${value}`.padEnd(30) + description;\n\t\t\t\t\t})\n\t\t\t\t\t.join(\"\\n\")}\\n`\n\t\t\t: \"\";\n\tconsole.log(`${chalk.bold(APP_NAME)} - AI coding assistant with read, bash, edit, write tools\n\n${chalk.bold(\"Usage:\")}\n ${APP_NAME} [options] [@files...] [messages...]\n\n${chalk.bold(\"Commands:\")}\n ${APP_NAME} install <source> [-l] Install extension source and add to settings\n ${APP_NAME} remove <source> [-l] Remove extension source from settings\n ${APP_NAME} uninstall <source> [-l] Alias for remove\n ${APP_NAME} update [source|self|pi] Update pi and installed extensions\n ${APP_NAME} list List installed extensions from settings\n ${APP_NAME} config Open TUI to enable/disable package resources\n ${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list\n\n${chalk.bold(\"Options:\")}\n --provider <name> Provider name (default: google)\n --model <pattern> Model pattern or ID (supports \"provider/id\" and optional \":<thinking>\")\n --api-key <key> API key (defaults to env vars)\n --system-prompt <text> System prompt (default: coding assistant prompt)\n --append-system-prompt <text> Append text or file contents to the system prompt (can be used multiple times)\n --mode <mode> Output mode: text (default), json, or rpc\n --print, -p Non-interactive mode: process prompt and exit\n --continue, -c Continue previous session\n --resume, -r Select a session to resume\n --session <path|id> Use specific session file or partial UUID\n --session-id <id> Use exact project session ID, creating it if missing\n --fork <path|id> Fork specific session file or partial UUID into a new session\n --session-dir <dir> Directory for session storage and lookup\n --no-session Don't save session (ephemeral)\n --name, -n <name> Set session display name\n --models <patterns> Comma-separated model patterns for Ctrl+P cycling\n Supports globs (anthropic/*, *sonnet*) and fuzzy matching\n --no-tools, -nt Disable all tools by default (built-in and extension)\n --no-builtin-tools, -nbt Disable built-in tools by default but keep extension/custom tools enabled\n --tools, -t <tools> Comma-separated allowlist of tool names to enable\n Applies to built-in, extension, and custom tools\n --exclude-tools, -xt <tools> Comma-separated denylist of tool names to disable\n Applies to built-in, extension, and custom tools\n --thinking <level> Set thinking level: off, minimal, low, medium, high, xhigh\n --extension, -e <path> Load an extension file (can be used multiple times)\n --no-extensions, -ne Disable extension discovery (explicit -e paths still work)\n --skill <path> Load a skill file or directory (can be used multiple times)\n --no-skills, -ns Disable skills discovery and loading\n --prompt-template <path> Load a prompt template file or directory (can be used multiple times)\n --no-prompt-templates, -np Disable prompt template discovery and loading\n --theme <path> Load a theme file or directory (can be used multiple times)\n --no-themes Disable theme discovery and loading\n --no-context-files, -nc Disable AGENTS.md and CLAUDE.md discovery and loading\n --export <file> Export session file to HTML and exit\n --list-models [search] List available models (with optional fuzzy search)\n --verbose Force verbose startup (overrides quietStartup setting)\n --offline Disable startup network operations (same as PI_OFFLINE=1)\n --help, -h Show this help\n --version, -v Show version number\n\nExtensions can register additional flags (e.g., --plan from plan-mode extension).${extensionFlagsText}\n\n${chalk.bold(\"Examples:\")}\n # Interactive mode\n ${APP_NAME}\n\n # Interactive mode with initial prompt\n ${APP_NAME} \"List all .ts files in src/\"\n\n # Include files in initial message\n ${APP_NAME} @prompt.md @image.png \"What color is the sky?\"\n\n # Non-interactive mode (process and exit)\n ${APP_NAME} -p \"List all .ts files in src/\"\n\n # Multiple messages (interactive)\n ${APP_NAME} \"Read package.json\" \"What dependencies do we have?\"\n\n # Continue previous session\n ${APP_NAME} --continue \"What did we discuss?\"\n\n # Start a named session\n ${APP_NAME} --name \"Refactor auth module\"\n\n # Use different model\n ${APP_NAME} --provider openai --model gpt-4o-mini \"Help me refactor this code\"\n\n # Use model with provider prefix (no --provider needed)\n ${APP_NAME} --model openai/gpt-4o \"Help me refactor this code\"\n\n # Use model with thinking level shorthand\n ${APP_NAME} --model sonnet:high \"Solve this complex problem\"\n\n # Limit model cycling to specific models\n ${APP_NAME} --models claude-sonnet,claude-haiku,gpt-4o\n\n # Limit to a specific provider with glob pattern\n ${APP_NAME} --models \"github-copilot/*\"\n\n # Cycle models with fixed thinking levels\n ${APP_NAME} --models sonnet:high,haiku:low\n\n # Start with a specific thinking level\n ${APP_NAME} --thinking high \"Solve this complex problem\"\n\n # Read-only mode (no file modifications possible)\n ${APP_NAME} --tools read,grep,find,ls -p \"Review the code in src/\"\n\n # Disable one tool while keeping the rest available\n ${APP_NAME} --exclude-tools ask_question\n\n # Export a session file to HTML\n ${APP_NAME} --export ~/${CONFIG_DIR_NAME}/agent/sessions/--path--/session.jsonl\n ${APP_NAME} --export session.jsonl output.html\n\n${chalk.bold(\"Environment Variables:\")}\n ANTHROPIC_API_KEY - Anthropic Claude API key\n ANTHROPIC_OAUTH_TOKEN - Anthropic OAuth token (alternative to API key)\n OPENAI_API_KEY - OpenAI GPT API key\n AZURE_OPENAI_API_KEY - Azure OpenAI API key\n AZURE_OPENAI_BASE_URL - Azure OpenAI/Cognitive Services base URL (e.g. https://{resource}.openai.azure.com)\n AZURE_OPENAI_RESOURCE_NAME - Azure OpenAI resource name (alternative to base URL)\n AZURE_OPENAI_API_VERSION - Azure OpenAI API version (default: v1)\n AZURE_OPENAI_DEPLOYMENT_NAME_MAP - Azure OpenAI model=deployment map (comma-separated)\n DEEPSEEK_API_KEY - DeepSeek API key\n GEMINI_API_KEY - Google Gemini API key\n GROQ_API_KEY - Groq API key\n CEREBRAS_API_KEY - Cerebras API key\n XAI_API_KEY - xAI Grok API key\n FIREWORKS_API_KEY - Fireworks API key\n TOGETHER_API_KEY - Together AI API key\n OPENROUTER_API_KEY - OpenRouter API key\n AI_GATEWAY_API_KEY - Vercel AI Gateway API key\n ZAI_API_KEY - ZAI API key\n MISTRAL_API_KEY - Mistral API key\n MINIMAX_API_KEY - MiniMax API key\n MOONSHOT_API_KEY - Moonshot AI API key\n OPENCODE_API_KEY - OpenCode Zen/OpenCode Go API key\n KIMI_API_KEY - Kimi For Coding API key\n CLOUDFLARE_API_KEY - Cloudflare API token (Workers AI and AI Gateway)\n CLOUDFLARE_ACCOUNT_ID - Cloudflare account id (required for both)\n CLOUDFLARE_GATEWAY_ID - Cloudflare AI Gateway slug (required for AI Gateway)\n XIAOMI_API_KEY - Xiaomi MiMo API key (api.xiaomimimo.com billing)\n XIAOMI_TOKEN_PLAN_CN_API_KEY - Xiaomi MiMo Token Plan API key (China region)\n XIAOMI_TOKEN_PLAN_AMS_API_KEY - Xiaomi MiMo Token Plan API key (Amsterdam region)\n XIAOMI_TOKEN_PLAN_SGP_API_KEY - Xiaomi MiMo Token Plan API key (Singapore region)\n AWS_PROFILE - AWS profile for Amazon Bedrock\n AWS_ACCESS_KEY_ID - AWS access key for Amazon Bedrock\n AWS_SECRET_ACCESS_KEY - AWS secret key for Amazon Bedrock\n AWS_BEARER_TOKEN_BEDROCK - Bedrock API key (bearer token)\n AWS_REGION - AWS region for Amazon Bedrock (e.g., us-east-1)\n ${ENV_AGENT_DIR.padEnd(32)} - Config directory (default: ~/${CONFIG_DIR_NAME}/agent)\n ${ENV_SESSION_DIR.padEnd(32)} - Session storage directory (overridden by --session-dir)\n PI_PACKAGE_DIR - Override package directory (for Nix/Guix store paths)\n PI_OFFLINE - Disable startup network operations when set to 1/true/yes\n PI_TELEMETRY - Override install telemetry when set to 1/true/yes or 0/false/no\n PI_SHARE_VIEWER_URL - Base URL for /share command (default: https://pi.dev/session/)\n\n${chalk.bold(\"Built-in Tool Names:\")}\n read - Read file contents\n bash - Execute bash commands\n edit - Edit files with find/replace\n write - Write files (creates/overwrites)\n grep - Search file contents (read-only, off by default)\n find - Find files by glob pattern (read-only, off by default)\n ls - List directory contents (read-only, off by default)\n`);\n}\n"]}
1
+ {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,IAAI;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8EAA8E;IAC9E,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;IAC5C,WAAW,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE;AAID,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAE1E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAoK9C;AAED,wBAAgB,SAAS,CAAC,cAAc,CAAC,EAAE,aAAa,EAAE,GAAG,IAAI,CAkLhE","sourcesContent":["/**\n * CLI argument parsing and help display\n */\n\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport chalk from \"chalk\";\nimport { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_SESSION_DIR } from \"../config.ts\";\nimport type { ExtensionFlag } from \"../core/extensions/types.ts\";\n\nexport type Mode = \"text\" | \"json\" | \"rpc\" | \"serve\" | \"connect\";\n\nexport interface Args {\n\tprovider?: string;\n\tmodel?: string;\n\tapiKey?: string;\n\tsystemPrompt?: string;\n\tappendSystemPrompt?: string[];\n\tthinking?: ThinkingLevel;\n\tcontinue?: boolean;\n\tresume?: boolean;\n\thelp?: boolean;\n\tversion?: boolean;\n\tmode?: Mode;\n\tport?: number; // --port <number> for serve mode\n\turl?: string; // --url <string> for connect mode\n\tname?: string;\n\tnoSession?: boolean;\n\tsession?: string;\n\tsessionId?: string;\n\tfork?: string;\n\tsessionDir?: string;\n\tmodels?: string[];\n\ttools?: string[];\n\texcludeTools?: string[];\n\tnoTools?: boolean;\n\tnoBuiltinTools?: boolean;\n\textensions?: string[];\n\tnoExtensions?: boolean;\n\tprint?: boolean;\n\texport?: string;\n\tnoSkills?: boolean;\n\tskills?: string[];\n\tpromptTemplates?: string[];\n\tnoPromptTemplates?: boolean;\n\tthemes?: string[];\n\tnoThemes?: boolean;\n\tnoContextFiles?: boolean;\n\tlistModels?: string | true;\n\toffline?: boolean;\n\tverbose?: boolean;\n\tprojectTrustOverride?: boolean;\n\tmessages: string[];\n\tfileArgs: string[];\n\t/** Unknown flags (potentially extension flags) - map of flag name to value */\n\tunknownFlags: Map<string, boolean | string>;\n\tdiagnostics: Array<{ type: \"warning\" | \"error\"; message: string }>;\n}\n\nconst VALID_THINKING_LEVELS = [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\"] as const;\n\nexport function isValidThinkingLevel(level: string): level is ThinkingLevel {\n\treturn VALID_THINKING_LEVELS.includes(level as ThinkingLevel);\n}\n\nexport function parseArgs(args: string[]): Args {\n\tconst result: Args = {\n\t\tmessages: [],\n\t\tfileArgs: [],\n\t\tunknownFlags: new Map(),\n\t\tdiagnostics: [],\n\t};\n\n\tfor (let i = 0; i < args.length; i++) {\n\t\tconst arg = args[i];\n\n\t\tif (arg === \"--help\" || arg === \"-h\") {\n\t\t\tresult.help = true;\n\t\t} else if (arg === \"--version\" || arg === \"-v\") {\n\t\t\tresult.version = true;\n\t\t} else if (arg === \"--mode\" && i + 1 < args.length) {\n\t\t\tconst mode = args[++i];\n\t\t\tif (mode === \"text\" || mode === \"json\" || mode === \"rpc\" || mode === \"serve\" || mode === \"connect\") {\n\t\t\t\tresult.mode = mode;\n\t\t\t}\n\t\t} else if (arg === \"--port\") {\n\t\t\tconst value = args[++i];\n\t\t\tif (value === undefined) {\n\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--port requires a value\" });\n\t\t\t} else {\n\t\t\t\tresult.port = parseInt(value, 10);\n\t\t\t\tif (Number.isNaN(result.port)) {\n\t\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--port requires a number\" });\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (arg === \"--url\") {\n\t\t\tconst value = args[++i];\n\t\t\tif (value === undefined) {\n\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--url requires a value\" });\n\t\t\t} else {\n\t\t\t\tresult.url = value;\n\t\t\t}\n\t\t} else if (arg === \"--continue\" || arg === \"-c\") {\n\t\t\tresult.continue = true;\n\t\t} else if (arg === \"--resume\" || arg === \"-r\") {\n\t\t\tresult.resume = true;\n\t\t} else if (arg === \"--provider\" && i + 1 < args.length) {\n\t\t\tresult.provider = args[++i];\n\t\t} else if (arg === \"--model\" && i + 1 < args.length) {\n\t\t\tresult.model = args[++i];\n\t\t} else if (arg === \"--api-key\" && i + 1 < args.length) {\n\t\t\tresult.apiKey = args[++i];\n\t\t} else if (arg === \"--system-prompt\" && i + 1 < args.length) {\n\t\t\tresult.systemPrompt = args[++i];\n\t\t} else if (arg === \"--append-system-prompt\" && i + 1 < args.length) {\n\t\t\tresult.appendSystemPrompt = result.appendSystemPrompt ?? [];\n\t\t\tresult.appendSystemPrompt.push(args[++i]);\n\t\t} else if (arg === \"--name\" || arg === \"-n\") {\n\t\t\tif (i + 1 < args.length) {\n\t\t\t\tresult.name = args[++i];\n\t\t\t} else {\n\t\t\t\tresult.diagnostics.push({ type: \"error\", message: \"--name requires a value\" });\n\t\t\t}\n\t\t} else if (arg === \"--no-session\") {\n\t\t\tresult.noSession = true;\n\t\t} else if (arg === \"--session\" && i + 1 < args.length) {\n\t\t\tresult.session = args[++i];\n\t\t} else if (arg === \"--session-id\" && i + 1 < args.length) {\n\t\t\tresult.sessionId = args[++i];\n\t\t} else if (arg === \"--fork\" && i + 1 < args.length) {\n\t\t\tresult.fork = args[++i];\n\t\t} else if (arg === \"--session-dir\" && i + 1 < args.length) {\n\t\t\tresult.sessionDir = args[++i];\n\t\t} else if (arg === \"--models\" && i + 1 < args.length) {\n\t\t\tresult.models = args[++i].split(\",\").map((s) => s.trim());\n\t\t} else if (arg === \"--no-tools\" || arg === \"-nt\") {\n\t\t\tresult.noTools = true;\n\t\t} else if (arg === \"--no-builtin-tools\" || arg === \"-nbt\") {\n\t\t\tresult.noBuiltinTools = true;\n\t\t} else if ((arg === \"--tools\" || arg === \"-t\") && i + 1 < args.length) {\n\t\t\tresult.tools = args[++i]\n\t\t\t\t.split(\",\")\n\t\t\t\t.map((s) => s.trim())\n\t\t\t\t.filter((name) => name.length > 0);\n\t\t} else if ((arg === \"--exclude-tools\" || arg === \"-xt\") && i + 1 < args.length) {\n\t\t\tresult.excludeTools = args[++i]\n\t\t\t\t.split(\",\")\n\t\t\t\t.map((s) => s.trim())\n\t\t\t\t.filter((name) => name.length > 0);\n\t\t} else if (arg === \"--thinking\" && i + 1 < args.length) {\n\t\t\tconst level = args[++i];\n\t\t\tif (isValidThinkingLevel(level)) {\n\t\t\t\tresult.thinking = level;\n\t\t\t} else {\n\t\t\t\tresult.diagnostics.push({\n\t\t\t\t\ttype: \"warning\",\n\t\t\t\t\tmessage: `Invalid thinking level \"${level}\". Valid values: ${VALID_THINKING_LEVELS.join(\", \")}`,\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (arg === \"--print\" || arg === \"-p\") {\n\t\t\tresult.print = true;\n\t\t\tconst next = args[i + 1];\n\t\t\tif (next !== undefined && !next.startsWith(\"@\") && (!next.startsWith(\"-\") || next.startsWith(\"---\"))) {\n\t\t\t\tresult.messages.push(next);\n\t\t\t\ti++;\n\t\t\t}\n\t\t} else if (arg === \"--export\" && i + 1 < args.length) {\n\t\t\tresult.export = args[++i];\n\t\t} else if ((arg === \"--extension\" || arg === \"-e\") && i + 1 < args.length) {\n\t\t\tresult.extensions = result.extensions ?? [];\n\t\t\tresult.extensions.push(args[++i]);\n\t\t} else if (arg === \"--no-extensions\" || arg === \"-ne\") {\n\t\t\tresult.noExtensions = true;\n\t\t} else if (arg === \"--skill\" && i + 1 < args.length) {\n\t\t\tresult.skills = result.skills ?? [];\n\t\t\tresult.skills.push(args[++i]);\n\t\t} else if (arg === \"--prompt-template\" && i + 1 < args.length) {\n\t\t\tresult.promptTemplates = result.promptTemplates ?? [];\n\t\t\tresult.promptTemplates.push(args[++i]);\n\t\t} else if (arg === \"--theme\" && i + 1 < args.length) {\n\t\t\tresult.themes = result.themes ?? [];\n\t\t\tresult.themes.push(args[++i]);\n\t\t} else if (arg === \"--no-skills\" || arg === \"-ns\") {\n\t\t\tresult.noSkills = true;\n\t\t} else if (arg === \"--no-prompt-templates\" || arg === \"-np\") {\n\t\t\tresult.noPromptTemplates = true;\n\t\t} else if (arg === \"--no-themes\") {\n\t\t\tresult.noThemes = true;\n\t\t} else if (arg === \"--no-context-files\" || arg === \"-nc\") {\n\t\t\tresult.noContextFiles = true;\n\t\t} else if (arg === \"--list-models\") {\n\t\t\t// Check if next arg is a search pattern (not a flag or file arg)\n\t\t\tif (i + 1 < args.length && !args[i + 1].startsWith(\"-\") && !args[i + 1].startsWith(\"@\")) {\n\t\t\t\tresult.listModels = args[++i];\n\t\t\t} else {\n\t\t\t\tresult.listModels = true;\n\t\t\t}\n\t\t} else if (arg === \"--verbose\") {\n\t\t\tresult.verbose = true;\n\t\t} else if (arg === \"--approve\" || arg === \"-a\") {\n\t\t\tresult.projectTrustOverride = true;\n\t\t} else if (arg === \"--no-approve\" || arg === \"-na\") {\n\t\t\tresult.projectTrustOverride = false;\n\t\t} else if (arg === \"--offline\") {\n\t\t\tresult.offline = true;\n\t\t} else if (arg.startsWith(\"@\")) {\n\t\t\tresult.fileArgs.push(arg.slice(1)); // Remove @ prefix\n\t\t} else if (arg.startsWith(\"--\")) {\n\t\t\tconst eqIndex = arg.indexOf(\"=\");\n\t\t\tif (eqIndex !== -1) {\n\t\t\t\tresult.unknownFlags.set(arg.slice(2, eqIndex), arg.slice(eqIndex + 1));\n\t\t\t} else {\n\t\t\t\tconst flagName = arg.slice(2);\n\t\t\t\tconst next = args[i + 1];\n\t\t\t\tif (next !== undefined && !next.startsWith(\"-\") && !next.startsWith(\"@\")) {\n\t\t\t\t\tresult.unknownFlags.set(flagName, next);\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\tresult.unknownFlags.set(flagName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (arg.startsWith(\"-\") && !arg.startsWith(\"--\")) {\n\t\t\tresult.diagnostics.push({ type: \"error\", message: `Unknown option: ${arg}` });\n\t\t} else if (!arg.startsWith(\"-\")) {\n\t\t\tresult.messages.push(arg);\n\t\t}\n\t}\n\n\treturn result;\n}\n\nexport function printHelp(extensionFlags?: ExtensionFlag[]): void {\n\tconst extensionFlagsText =\n\t\textensionFlags && extensionFlags.length > 0\n\t\t\t? `\\n${chalk.bold(\"Extension CLI Flags:\")}\\n${extensionFlags\n\t\t\t\t\t.map((flag) => {\n\t\t\t\t\t\tconst value = flag.type === \"string\" ? \" <value>\" : \"\";\n\t\t\t\t\t\tconst description = flag.description ?? `Registered by ${flag.extensionPath}`;\n\t\t\t\t\t\treturn ` --${flag.name}${value}`.padEnd(30) + description;\n\t\t\t\t\t})\n\t\t\t\t\t.join(\"\\n\")}\\n`\n\t\t\t: \"\";\n\tconsole.log(`${chalk.bold(APP_NAME)} - AI coding assistant with read, bash, edit, write tools\n\n${chalk.bold(\"Usage:\")}\n ${APP_NAME} [options] [@files...] [messages...]\n\n${chalk.bold(\"Commands:\")}\n ${APP_NAME} install <source> [-l] Install extension source and add to settings\n ${APP_NAME} remove <source> [-l] Remove extension source from settings\n ${APP_NAME} uninstall <source> [-l] Alias for remove\n ${APP_NAME} update [source|self|pi] Update pi and installed extensions\n ${APP_NAME} list List installed extensions from settings\n ${APP_NAME} config Open TUI to enable/disable package resources\n ${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list\n\n${chalk.bold(\"Options:\")}\n --provider <name> Provider name (default: google)\n --model <pattern> Model pattern or ID (supports \"provider/id\" and optional \":<thinking>\")\n --api-key <key> API key (defaults to env vars)\n --system-prompt <text> System prompt (default: coding assistant prompt)\n --append-system-prompt <text> Append text or file contents to the system prompt (can be used multiple times)\n --mode <mode> Output mode: text (default), json, or rpc\n --print, -p Non-interactive mode: process prompt and exit\n --continue, -c Continue previous session\n --resume, -r Select a session to resume\n --session <path|id> Use specific session file or partial UUID\n --session-id <id> Use exact project session ID, creating it if missing\n --fork <path|id> Fork specific session file or partial UUID into a new session\n --session-dir <dir> Directory for session storage and lookup\n --no-session Don't save session (ephemeral)\n --name, -n <name> Set session display name\n --models <patterns> Comma-separated model patterns for Ctrl+P cycling\n Supports globs (anthropic/*, *sonnet*) and fuzzy matching\n --no-tools, -nt Disable all tools by default (built-in and extension)\n --no-builtin-tools, -nbt Disable built-in tools by default but keep extension/custom tools enabled\n --tools, -t <tools> Comma-separated allowlist of tool names to enable\n Applies to built-in, extension, and custom tools\n --exclude-tools, -xt <tools> Comma-separated denylist of tool names to disable\n Applies to built-in, extension, and custom tools\n --thinking <level> Set thinking level: off, minimal, low, medium, high, xhigh\n --extension, -e <path> Load an extension file (can be used multiple times)\n --no-extensions, -ne Disable extension discovery (explicit -e paths still work)\n --skill <path> Load a skill file or directory (can be used multiple times)\n --no-skills, -ns Disable skills discovery and loading\n --prompt-template <path> Load a prompt template file or directory (can be used multiple times)\n --no-prompt-templates, -np Disable prompt template discovery and loading\n --theme <path> Load a theme file or directory (can be used multiple times)\n --no-themes Disable theme discovery and loading\n --no-context-files, -nc Disable AGENTS.md and CLAUDE.md discovery and loading\n --export <file> Export session file to HTML and exit\n --list-models [search] List available models (with optional fuzzy search)\n --verbose Force verbose startup (overrides quietStartup setting)\n --approve, -a Trust project-local files for this run\n --no-approve, -na Ignore project-local files for this run\n --offline Disable startup network operations (same as PI_OFFLINE=1)\n --help, -h Show this help\n --version, -v Show version number\n\nExtensions can register additional flags (e.g., --plan from plan-mode extension).${extensionFlagsText}\n\n${chalk.bold(\"Examples:\")}\n # Interactive mode\n ${APP_NAME}\n\n # Interactive mode with initial prompt\n ${APP_NAME} \"List all .ts files in src/\"\n\n # Include files in initial message\n ${APP_NAME} @prompt.md @image.png \"What color is the sky?\"\n\n # Non-interactive mode (process and exit)\n ${APP_NAME} -p \"List all .ts files in src/\"\n\n # Multiple messages (interactive)\n ${APP_NAME} \"Read package.json\" \"What dependencies do we have?\"\n\n # Continue previous session\n ${APP_NAME} --continue \"What did we discuss?\"\n\n # Start a named session\n ${APP_NAME} --name \"Refactor auth module\"\n\n # Use different model\n ${APP_NAME} --provider openai --model gpt-4o-mini \"Help me refactor this code\"\n\n # Use model with provider prefix (no --provider needed)\n ${APP_NAME} --model openai/gpt-4o \"Help me refactor this code\"\n\n # Use model with thinking level shorthand\n ${APP_NAME} --model sonnet:high \"Solve this complex problem\"\n\n # Limit model cycling to specific models\n ${APP_NAME} --models claude-sonnet,claude-haiku,gpt-4o\n\n # Limit to a specific provider with glob pattern\n ${APP_NAME} --models \"github-copilot/*\"\n\n # Cycle models with fixed thinking levels\n ${APP_NAME} --models sonnet:high,haiku:low\n\n # Start with a specific thinking level\n ${APP_NAME} --thinking high \"Solve this complex problem\"\n\n # Read-only mode (no file modifications possible)\n ${APP_NAME} --tools read,grep,find,ls -p \"Review the code in src/\"\n\n # Disable one tool while keeping the rest available\n ${APP_NAME} --exclude-tools ask_question\n\n # Export a session file to HTML\n ${APP_NAME} --export ~/${CONFIG_DIR_NAME}/agent/sessions/--path--/session.jsonl\n ${APP_NAME} --export session.jsonl output.html\n\n${chalk.bold(\"Environment Variables:\")}\n ANTHROPIC_API_KEY - Anthropic Claude API key\n ANTHROPIC_OAUTH_TOKEN - Anthropic OAuth token (alternative to API key)\n ANT_LING_API_KEY - Ant Ling API key\n OPENAI_API_KEY - OpenAI GPT API key\n AZURE_OPENAI_API_KEY - Azure OpenAI API key\n AZURE_OPENAI_BASE_URL - Azure OpenAI/Cognitive Services base URL (e.g. https://{resource}.openai.azure.com)\n AZURE_OPENAI_RESOURCE_NAME - Azure OpenAI resource name (alternative to base URL)\n AZURE_OPENAI_API_VERSION - Azure OpenAI API version (default: v1)\n AZURE_OPENAI_DEPLOYMENT_NAME_MAP - Azure OpenAI model=deployment map (comma-separated)\n DEEPSEEK_API_KEY - DeepSeek API key\n NVIDIA_API_KEY - NVIDIA NIM API key\n GEMINI_API_KEY - Google Gemini API key\n GROQ_API_KEY - Groq API key\n CEREBRAS_API_KEY - Cerebras API key\n XAI_API_KEY - xAI Grok API key\n FIREWORKS_API_KEY - Fireworks API key\n TOGETHER_API_KEY - Together AI API key\n OPENROUTER_API_KEY - OpenRouter API key\n AI_GATEWAY_API_KEY - Vercel AI Gateway API key\n ZAI_API_KEY - ZAI API key\n ZAI_CODING_CN_API_KEY - ZAI Coding Plan API key (China)\n MISTRAL_API_KEY - Mistral API key\n MINIMAX_API_KEY - MiniMax API key\n MOONSHOT_API_KEY - Moonshot AI API key\n OPENCODE_API_KEY - OpenCode Zen/OpenCode Go API key\n KIMI_API_KEY - Kimi For Coding API key\n CLOUDFLARE_API_KEY - Cloudflare API token (Workers AI and AI Gateway)\n CLOUDFLARE_ACCOUNT_ID - Cloudflare account id (required for both)\n CLOUDFLARE_GATEWAY_ID - Cloudflare AI Gateway slug (required for AI Gateway)\n XIAOMI_API_KEY - Xiaomi MiMo API key (api.xiaomimimo.com billing)\n XIAOMI_TOKEN_PLAN_CN_API_KEY - Xiaomi MiMo Token Plan API key (China region)\n XIAOMI_TOKEN_PLAN_AMS_API_KEY - Xiaomi MiMo Token Plan API key (Amsterdam region)\n XIAOMI_TOKEN_PLAN_SGP_API_KEY - Xiaomi MiMo Token Plan API key (Singapore region)\n AWS_PROFILE - AWS profile for Amazon Bedrock\n AWS_ACCESS_KEY_ID - AWS access key for Amazon Bedrock\n AWS_SECRET_ACCESS_KEY - AWS secret key for Amazon Bedrock\n AWS_BEARER_TOKEN_BEDROCK - Bedrock API key (bearer token)\n AWS_REGION - AWS region for Amazon Bedrock (e.g., us-east-1)\n ${ENV_AGENT_DIR.padEnd(32)} - Config directory (default: ~/${CONFIG_DIR_NAME}/agent)\n ${ENV_SESSION_DIR.padEnd(32)} - Session storage directory (overridden by --session-dir)\n PI_PACKAGE_DIR - Override package directory (for Nix/Guix store paths)\n PI_OFFLINE - Disable startup network operations when set to 1/true/yes\n PI_TELEMETRY - Override install telemetry when set to 1/true/yes or 0/false/no\n PI_SHARE_VIEWER_URL - Base URL for /share command (default: https://pi.dev/session/)\n\n${chalk.bold(\"Built-in Tool Names:\")}\n read - Read file contents\n bash - Execute bash commands\n edit - Edit files with find/replace\n write - Write files (creates/overwrites)\n grep - Search file contents (read-only, off by default)\n find - Find files by glob pattern (read-only, off by default)\n ls - List directory contents (read-only, off by default)\n`);\n}\n"]}
package/dist/cli/args.js CHANGED
@@ -181,6 +181,12 @@ export function parseArgs(args) {
181
181
  else if (arg === "--verbose") {
182
182
  result.verbose = true;
183
183
  }
184
+ else if (arg === "--approve" || arg === "-a") {
185
+ result.projectTrustOverride = true;
186
+ }
187
+ else if (arg === "--no-approve" || arg === "-na") {
188
+ result.projectTrustOverride = false;
189
+ }
184
190
  else if (arg === "--offline") {
185
191
  result.offline = true;
186
192
  }
@@ -274,6 +280,8 @@ ${chalk.bold("Options:")}
274
280
  --export <file> Export session file to HTML and exit
275
281
  --list-models [search] List available models (with optional fuzzy search)
276
282
  --verbose Force verbose startup (overrides quietStartup setting)
283
+ --approve, -a Trust project-local files for this run
284
+ --no-approve, -na Ignore project-local files for this run
277
285
  --offline Disable startup network operations (same as PI_OFFLINE=1)
278
286
  --help, -h Show this help
279
287
  --version, -v Show version number
@@ -336,6 +344,7 @@ ${chalk.bold("Examples:")}
336
344
  ${chalk.bold("Environment Variables:")}
337
345
  ANTHROPIC_API_KEY - Anthropic Claude API key
338
346
  ANTHROPIC_OAUTH_TOKEN - Anthropic OAuth token (alternative to API key)
347
+ ANT_LING_API_KEY - Ant Ling API key
339
348
  OPENAI_API_KEY - OpenAI GPT API key
340
349
  AZURE_OPENAI_API_KEY - Azure OpenAI API key
341
350
  AZURE_OPENAI_BASE_URL - Azure OpenAI/Cognitive Services base URL (e.g. https://{resource}.openai.azure.com)
@@ -343,6 +352,7 @@ ${chalk.bold("Environment Variables:")}
343
352
  AZURE_OPENAI_API_VERSION - Azure OpenAI API version (default: v1)
344
353
  AZURE_OPENAI_DEPLOYMENT_NAME_MAP - Azure OpenAI model=deployment map (comma-separated)
345
354
  DEEPSEEK_API_KEY - DeepSeek API key
355
+ NVIDIA_API_KEY - NVIDIA NIM API key
346
356
  GEMINI_API_KEY - Google Gemini API key
347
357
  GROQ_API_KEY - Groq API key
348
358
  CEREBRAS_API_KEY - Cerebras API key
@@ -352,6 +362,7 @@ ${chalk.bold("Environment Variables:")}
352
362
  OPENROUTER_API_KEY - OpenRouter API key
353
363
  AI_GATEWAY_API_KEY - Vercel AI Gateway API key
354
364
  ZAI_API_KEY - ZAI API key
365
+ ZAI_CODING_CN_API_KEY - ZAI Coding Plan API key (China)
355
366
  MISTRAL_API_KEY - Mistral API key
356
367
  MINIMAX_API_KEY - MiniMax API key
357
368
  MOONSHOT_API_KEY - Moonshot AI API key