@punch-bot/cli 0.85.1 → 1.2.0

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 (1103) hide show
  1. package/CHANGELOG.md +572 -3
  2. package/README.md +82 -174
  3. package/dist/bun/cli.d.ts.map +1 -1
  4. package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
  5. package/dist/bun/restore-sandbox-env.js.map +1 -1
  6. package/dist/bun/runtime-setup.d.ts.map +1 -1
  7. package/dist/bun/runtime-setup.js +4 -1
  8. package/dist/bun/runtime-setup.js.map +1 -1
  9. package/dist/bun/sandbox-env-setup.d.ts.map +1 -1
  10. package/dist/bundle/chunks/anthropic-messages-DA6M7CRN.js +6 -0
  11. package/dist/bundle/chunks/anthropic.js +2 -2
  12. package/dist/bundle/chunks/azure-openai-responses-IJO5RNR3.js +2 -0
  13. package/dist/bundle/chunks/bedrock-converse-stream.js +10 -2
  14. package/dist/bundle/chunks/chunk-22CYIUS4.js +2 -0
  15. package/dist/bundle/chunks/chunk-2M76JOVH.js +8 -0
  16. package/dist/bundle/chunks/chunk-5HTGPCR7.js +2 -0
  17. package/dist/bundle/chunks/chunk-5OD3Y36V.js +11 -0
  18. package/dist/bundle/chunks/chunk-6C5VKHGV.js +50 -0
  19. package/dist/bundle/chunks/chunk-F5ZABL6Z.js +20 -0
  20. package/dist/bundle/chunks/{chunk-3DNTDXPG.js → chunk-FJPXW4TE.js} +3 -3
  21. package/dist/bundle/chunks/chunk-FLX3SJDL.js +1156 -0
  22. package/dist/bundle/chunks/chunk-HACVPRBJ.js +11 -0
  23. package/dist/bundle/chunks/chunk-ITZNWD4K.js +2 -0
  24. package/dist/bundle/chunks/chunk-J7I2NFJ7.js +82 -0
  25. package/dist/bundle/chunks/chunk-JHYQSLCR.js +2 -0
  26. package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  27. package/dist/bundle/chunks/chunk-OO6DJ3CL.js +31 -0
  28. package/dist/bundle/chunks/chunk-PMRZO46Y.js +2 -0
  29. package/dist/bundle/chunks/{chunk-TRDNDS6A.js → chunk-PYGXRV27.js} +5 -2
  30. package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  31. package/dist/bundle/chunks/{chunk-XDUWOHPL.js → chunk-S3GGRYIO.js} +2 -2
  32. package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
  33. package/dist/bundle/chunks/chunk-WUIPA42N.js +14 -0
  34. package/dist/bundle/chunks/chunk-XIX7LUWI.js +2 -0
  35. package/dist/bundle/chunks/chunk-YWHGLBPB.js +2 -0
  36. package/dist/bundle/chunks/chunk-ZBURYEWF.js +2 -0
  37. package/dist/bundle/chunks/cli-QAQLORRY.js +51 -0
  38. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +2 -0
  39. package/dist/bundle/chunks/codemode-worker.js +478 -0
  40. package/dist/bundle/chunks/execute-2Z6BN5R3.js +499 -0
  41. package/dist/bundle/chunks/github-copilot.js +1 -1
  42. package/dist/bundle/chunks/google-generative-ai-JSIIVUNP.js +2 -0
  43. package/dist/bundle/chunks/google-vertex-BZ3ID54S.js +2 -0
  44. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  45. package/dist/bundle/chunks/jiti-loader-C3NU2SDH.js +21 -0
  46. package/dist/bundle/chunks/jiti-static-loader-E6ANQD5T.js +2 -0
  47. package/dist/bundle/chunks/{lib-HGQMNYVT.js → lib-TEDK3E5I.js} +2 -2
  48. package/dist/bundle/chunks/llama-cpp-classify-FYN623RH.js +22 -0
  49. package/dist/bundle/chunks/meta.js +2 -0
  50. package/dist/bundle/chunks/mistral-conversations-RMNTDYQK.js +5 -0
  51. package/dist/bundle/chunks/node-N5BSDOA5.js +16 -0
  52. package/dist/bundle/chunks/{node-4PXJTSWH.js → node-TWVVAGPO.js} +1 -1
  53. package/dist/bundle/chunks/openai-chatgpt.js +75 -0
  54. package/dist/bundle/chunks/openai-codex-responses-O3P3UWDP.js +10 -0
  55. package/dist/bundle/chunks/openai-codex.js +2 -2
  56. package/dist/bundle/chunks/openai-completions-G4BKSHGH.js +7 -0
  57. package/dist/bundle/chunks/openai-decisions-WVPMQ4JD.js +5 -0
  58. package/dist/bundle/chunks/openai-responses-377V6EDU.js +3 -0
  59. package/dist/bundle/chunks/{openrouter-images-N4XVVFSD.js → openrouter-images-YU24TD7D.js} +1 -1
  60. package/dist/bundle/chunks/openrouter.js +2 -2
  61. package/dist/bundle/chunks/{pi-messages-ZRYGTSON.js → pi-messages-V27DSLVC.js} +2 -2
  62. package/dist/bundle/chunks/radius.js +2 -2
  63. package/dist/bundle/chunks/runtime-R6O72Q4R.js +2 -0
  64. package/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +2 -0
  65. package/dist/bundle/chunks/virtual-modules-FOSN3OT2.js +2 -0
  66. package/dist/bundle/cli-runtime.js +3 -0
  67. package/dist/bundle/cli.js +4 -2
  68. package/dist/bundle/index.js +1 -1
  69. package/dist/bundle/rpc-entry.js +1 -1
  70. package/dist/cli/args.d.ts +1 -2
  71. package/dist/cli/args.d.ts.map +1 -1
  72. package/dist/cli/args.js +73 -53
  73. package/dist/cli/args.js.map +1 -1
  74. package/dist/cli/auth-check.d.ts.map +1 -1
  75. package/dist/cli/auth-check.js.map +1 -1
  76. package/dist/cli/auth-command.d.ts.map +1 -1
  77. package/dist/cli/auth-command.js.map +1 -1
  78. package/dist/cli/credential-print.d.ts.map +1 -1
  79. package/dist/cli/credential-print.js.map +1 -1
  80. package/dist/cli/experimental/transport-address.d.ts +21 -0
  81. package/dist/cli/experimental/transport-address.d.ts.map +1 -0
  82. package/dist/cli/experimental/transport-address.js +89 -0
  83. package/dist/cli/experimental/transport-address.js.map +1 -0
  84. package/dist/cli/file-processor.d.ts +1 -1
  85. package/dist/cli/file-processor.d.ts.map +1 -1
  86. package/dist/cli/file-processor.js.map +1 -1
  87. package/dist/cli/initial-message.d.ts +1 -1
  88. package/dist/cli/initial-message.d.ts.map +1 -1
  89. package/dist/cli/initial-message.js.map +1 -1
  90. package/dist/cli/list-models.d.ts.map +1 -1
  91. package/dist/cli/list-models.js +1 -1
  92. package/dist/cli/list-models.js.map +1 -1
  93. package/dist/cli/project-trust.d.ts.map +1 -1
  94. package/dist/cli/project-trust.js +5 -35
  95. package/dist/cli/project-trust.js.map +1 -1
  96. package/dist/cli/setup.d.ts.map +1 -1
  97. package/dist/cli/setup.js.map +1 -1
  98. package/dist/cli.d.ts.map +1 -1
  99. package/dist/config.d.ts +30 -11
  100. package/dist/config.d.ts.map +1 -1
  101. package/dist/config.js +72 -21
  102. package/dist/config.js.map +1 -1
  103. package/dist/core/agent-session-runtime.d.ts +4 -3
  104. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  105. package/dist/core/agent-session-runtime.js +37 -27
  106. package/dist/core/agent-session-runtime.js.map +1 -1
  107. package/dist/core/agent-session-services.d.ts +1 -0
  108. package/dist/core/agent-session-services.d.ts.map +1 -1
  109. package/dist/core/agent-session-services.js +14 -0
  110. package/dist/core/agent-session-services.js.map +1 -1
  111. package/dist/core/agent-session.d.ts +270 -22
  112. package/dist/core/agent-session.d.ts.map +1 -1
  113. package/dist/core/agent-session.js +1174 -410
  114. package/dist/core/agent-session.js.map +1 -1
  115. package/dist/core/auth-guidance.d.ts.map +1 -1
  116. package/dist/core/auth-guidance.js.map +1 -1
  117. package/dist/core/auth-storage.d.ts.map +1 -1
  118. package/dist/core/auth-storage.js +20 -13
  119. package/dist/core/auth-storage.js.map +1 -1
  120. package/dist/core/bash-executor.d.ts.map +1 -1
  121. package/dist/core/bash-executor.js +42 -52
  122. package/dist/core/bash-executor.js.map +1 -1
  123. package/dist/core/bug-report-upload.d.ts +12 -0
  124. package/dist/core/bug-report-upload.d.ts.map +1 -0
  125. package/dist/core/bug-report-upload.js +22 -0
  126. package/dist/core/bug-report-upload.js.map +1 -0
  127. package/dist/core/bug-report.d.ts +184 -0
  128. package/dist/core/bug-report.d.ts.map +1 -0
  129. package/dist/core/bug-report.js +292 -0
  130. package/dist/core/bug-report.js.map +1 -0
  131. package/dist/core/cache-stats.d.ts.map +1 -1
  132. package/dist/core/cache-stats.js +12 -1
  133. package/dist/core/cache-stats.js.map +1 -1
  134. package/dist/core/cache-warmer.d.ts +103 -0
  135. package/dist/core/cache-warmer.d.ts.map +1 -0
  136. package/dist/core/cache-warmer.js +356 -0
  137. package/dist/core/cache-warmer.js.map +1 -0
  138. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  139. package/dist/core/compaction/branch-summarization.js +2 -2
  140. package/dist/core/compaction/branch-summarization.js.map +1 -1
  141. package/dist/core/compaction/compaction.d.ts +5 -3
  142. package/dist/core/compaction/compaction.d.ts.map +1 -1
  143. package/dist/core/compaction/compaction.js +164 -88
  144. package/dist/core/compaction/compaction.js.map +1 -1
  145. package/dist/core/compaction/index.d.ts.map +1 -1
  146. package/dist/core/compaction/utils.d.ts +8 -1
  147. package/dist/core/compaction/utils.d.ts.map +1 -1
  148. package/dist/core/compaction/utils.js +32 -26
  149. package/dist/core/compaction/utils.js.map +1 -1
  150. package/dist/core/crash-log.d.ts +27 -0
  151. package/dist/core/crash-log.d.ts.map +1 -0
  152. package/dist/core/crash-log.js +140 -0
  153. package/dist/core/crash-log.js.map +1 -0
  154. package/dist/core/defaults.d.ts.map +1 -1
  155. package/dist/core/delivery.d.ts.map +1 -1
  156. package/dist/core/delivery.js.map +1 -1
  157. package/dist/core/diagnostics.d.ts.map +1 -1
  158. package/dist/core/event-bus.d.ts.map +1 -1
  159. package/dist/core/event-bus.js.map +1 -1
  160. package/dist/core/exec.d.ts.map +1 -1
  161. package/dist/core/exec.js.map +1 -1
  162. package/dist/core/experimental.d.ts.map +1 -1
  163. package/dist/core/experimental.js.map +1 -1
  164. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
  165. package/dist/core/export-html/ansi-to-html.js.map +1 -1
  166. package/dist/core/export-html/index.d.ts.map +1 -1
  167. package/dist/core/export-html/index.js +1 -1
  168. package/dist/core/export-html/index.js.map +1 -1
  169. package/dist/core/export-html/template.css +10 -0
  170. package/dist/core/export-html/template.js +93 -34
  171. package/dist/core/export-html/tool-renderer.d.ts +5 -11
  172. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  173. package/dist/core/export-html/tool-renderer.js +8 -99
  174. package/dist/core/export-html/tool-renderer.js.map +1 -1
  175. package/dist/core/extensions/index.d.ts +1 -1
  176. package/dist/core/extensions/index.d.ts.map +1 -1
  177. package/dist/core/extensions/index.js.map +1 -1
  178. package/dist/core/extensions/jiti-loader.d.ts +2 -0
  179. package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
  180. package/dist/core/extensions/jiti-loader.js +4 -0
  181. package/dist/core/extensions/jiti-loader.js.map +1 -0
  182. package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
  183. package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
  184. package/dist/core/extensions/jiti-static-loader.js +4 -0
  185. package/dist/core/extensions/jiti-static-loader.js.map +1 -0
  186. package/dist/core/extensions/loader.d.ts.map +1 -1
  187. package/dist/core/extensions/loader.js +102 -74
  188. package/dist/core/extensions/loader.js.map +1 -1
  189. package/dist/core/extensions/runner.d.ts +44 -14
  190. package/dist/core/extensions/runner.d.ts.map +1 -1
  191. package/dist/core/extensions/runner.js +297 -169
  192. package/dist/core/extensions/runner.js.map +1 -1
  193. package/dist/core/extensions/types.d.ts +482 -238
  194. package/dist/core/extensions/types.d.ts.map +1 -1
  195. package/dist/core/extensions/types.js.map +1 -1
  196. package/dist/core/extensions/virtual-modules.d.ts +3 -0
  197. package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
  198. package/dist/core/extensions/virtual-modules.js +35 -0
  199. package/dist/core/extensions/virtual-modules.js.map +1 -0
  200. package/dist/core/extensions/wrapper.d.ts +2 -2
  201. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  202. package/dist/core/extensions/wrapper.js +3 -22
  203. package/dist/core/extensions/wrapper.js.map +1 -1
  204. package/dist/core/footer-data-provider.d.ts.map +1 -1
  205. package/dist/core/footer-data-provider.js.map +1 -1
  206. package/dist/core/http-dispatcher.d.ts +13 -0
  207. package/dist/core/http-dispatcher.d.ts.map +1 -1
  208. package/dist/core/http-dispatcher.js +13 -4
  209. package/dist/core/http-dispatcher.js.map +1 -1
  210. package/dist/core/index.d.ts +2 -1
  211. package/dist/core/index.d.ts.map +1 -1
  212. package/dist/core/index.js.map +1 -1
  213. package/dist/core/mcp-servers.d.ts +139 -0
  214. package/dist/core/mcp-servers.d.ts.map +1 -0
  215. package/dist/core/mcp-servers.js +232 -0
  216. package/dist/core/mcp-servers.js.map +1 -0
  217. package/dist/core/messages.d.ts.map +1 -1
  218. package/dist/core/messages.js +1 -0
  219. package/dist/core/messages.js.map +1 -1
  220. package/dist/{modes/interactive → core}/model-catalog-refresh.d.ts +2 -2
  221. package/dist/core/model-catalog-refresh.d.ts.map +1 -0
  222. package/dist/{modes/interactive → core}/model-catalog-refresh.js +2 -2
  223. package/dist/core/model-catalog-refresh.js.map +1 -0
  224. package/dist/core/model-config.d.ts +886 -80
  225. package/dist/core/model-config.d.ts.map +1 -1
  226. package/dist/core/model-config.js +33 -148
  227. package/dist/core/model-config.js.map +1 -1
  228. package/dist/core/model-registry.d.ts +15 -1
  229. package/dist/core/model-registry.d.ts.map +1 -1
  230. package/dist/core/model-registry.js +29 -0
  231. package/dist/core/model-registry.js.map +1 -1
  232. package/dist/core/model-resolver.d.ts +19 -46
  233. package/dist/core/model-resolver.d.ts.map +1 -1
  234. package/dist/core/model-resolver.js +149 -359
  235. package/dist/core/model-resolver.js.map +1 -1
  236. package/dist/core/model-runtime.d.ts +47 -3
  237. package/dist/core/model-runtime.d.ts.map +1 -1
  238. package/dist/core/model-runtime.js +205 -43
  239. package/dist/core/model-runtime.js.map +1 -1
  240. package/dist/core/models-store.d.ts.map +1 -1
  241. package/dist/core/models-store.js.map +1 -1
  242. package/dist/core/nested-tool-calls.d.ts +103 -0
  243. package/dist/core/nested-tool-calls.d.ts.map +1 -0
  244. package/dist/core/nested-tool-calls.js +179 -0
  245. package/dist/core/nested-tool-calls.js.map +1 -0
  246. package/dist/core/output-guard.d.ts.map +1 -1
  247. package/dist/core/output-guard.js.map +1 -1
  248. package/dist/core/package-manager.d.ts +4 -0
  249. package/dist/core/package-manager.d.ts.map +1 -1
  250. package/dist/core/package-manager.js +62 -15
  251. package/dist/core/package-manager.js.map +1 -1
  252. package/dist/core/pi-manifest.d.ts.map +1 -1
  253. package/dist/core/pi-manifest.js.map +1 -1
  254. package/dist/core/project-trust.d.ts.map +1 -1
  255. package/dist/core/project-trust.js +2 -1
  256. package/dist/core/project-trust.js.map +1 -1
  257. package/dist/core/prompt-templates.d.ts +6 -1
  258. package/dist/core/prompt-templates.d.ts.map +1 -1
  259. package/dist/core/prompt-templates.js +68 -37
  260. package/dist/core/prompt-templates.js.map +1 -1
  261. package/dist/core/provider-attribution.d.ts.map +1 -1
  262. package/dist/core/provider-attribution.js.map +1 -1
  263. package/dist/core/provider-composer.d.ts +42 -20
  264. package/dist/core/provider-composer.d.ts.map +1 -1
  265. package/dist/core/provider-composer.js +126 -40
  266. package/dist/core/provider-composer.js.map +1 -1
  267. package/dist/core/radius.d.ts +5 -0
  268. package/dist/core/radius.d.ts.map +1 -1
  269. package/dist/core/radius.js +8 -0
  270. package/dist/core/radius.js.map +1 -1
  271. package/dist/core/remote-catalog-provider.d.ts +19 -1
  272. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  273. package/dist/core/remote-catalog-provider.js +102 -34
  274. package/dist/core/remote-catalog-provider.js.map +1 -1
  275. package/dist/core/resolve-config-value.d.ts.map +1 -1
  276. package/dist/core/resolve-config-value.js.map +1 -1
  277. package/dist/core/resource-loader.d.ts +11 -2
  278. package/dist/core/resource-loader.d.ts.map +1 -1
  279. package/dist/core/resource-loader.js +170 -42
  280. package/dist/core/resource-loader.js.map +1 -1
  281. package/dist/core/runtime-credentials.d.ts.map +1 -1
  282. package/dist/core/runtime-credentials.js.map +1 -1
  283. package/dist/core/sdk.d.ts +16 -5
  284. package/dist/core/sdk.d.ts.map +1 -1
  285. package/dist/core/sdk.js +124 -52
  286. package/dist/core/sdk.js.map +1 -1
  287. package/dist/core/session-cwd.d.ts.map +1 -1
  288. package/dist/core/session-cwd.js.map +1 -1
  289. package/dist/core/session-export.d.ts +6 -2
  290. package/dist/core/session-export.d.ts.map +1 -1
  291. package/dist/core/session-export.js +14 -13
  292. package/dist/core/session-export.js.map +1 -1
  293. package/dist/core/session-manager.d.ts +72 -13
  294. package/dist/core/session-manager.d.ts.map +1 -1
  295. package/dist/core/session-manager.js +277 -124
  296. package/dist/core/session-manager.js.map +1 -1
  297. package/dist/core/settings-defaults.d.ts +65 -0
  298. package/dist/core/settings-defaults.d.ts.map +1 -0
  299. package/dist/core/settings-defaults.js +66 -0
  300. package/dist/core/settings-defaults.js.map +1 -0
  301. package/dist/core/settings-diagnostics.d.ts.map +1 -1
  302. package/dist/core/settings-diagnostics.js.map +1 -1
  303. package/dist/core/settings-manager.d.ts +41 -126
  304. package/dist/core/settings-manager.d.ts.map +1 -1
  305. package/dist/core/settings-manager.js +165 -52
  306. package/dist/core/settings-manager.js.map +1 -1
  307. package/dist/core/settings-schema.d.ts +224 -0
  308. package/dist/core/settings-schema.d.ts.map +1 -0
  309. package/dist/core/settings-schema.js +285 -0
  310. package/dist/core/settings-schema.js.map +1 -0
  311. package/dist/core/skills.d.ts +4 -1
  312. package/dist/core/skills.d.ts.map +1 -1
  313. package/dist/core/skills.js +6 -1
  314. package/dist/core/skills.js.map +1 -1
  315. package/dist/core/slash-commands.d.ts.map +1 -1
  316. package/dist/core/slash-commands.js +3 -2
  317. package/dist/core/slash-commands.js.map +1 -1
  318. package/dist/core/source-info.d.ts +8 -0
  319. package/dist/core/source-info.d.ts.map +1 -1
  320. package/dist/core/source-info.js +16 -0
  321. package/dist/core/source-info.js.map +1 -1
  322. package/dist/core/system-prompt.d.ts +55 -6
  323. package/dist/core/system-prompt.d.ts.map +1 -1
  324. package/dist/core/system-prompt.js +128 -93
  325. package/dist/core/system-prompt.js.map +1 -1
  326. package/dist/core/telemetry.d.ts +2 -0
  327. package/dist/core/telemetry.d.ts.map +1 -1
  328. package/dist/core/telemetry.js +45 -0
  329. package/dist/core/telemetry.js.map +1 -1
  330. package/dist/core/theme/dark.json +78 -0
  331. package/dist/core/theme/light.json +78 -0
  332. package/dist/core/theme/system-theme.d.ts +54 -0
  333. package/dist/core/theme/system-theme.d.ts.map +1 -0
  334. package/dist/core/theme/system-theme.js +547 -0
  335. package/dist/core/theme/system-theme.js.map +1 -0
  336. package/dist/core/theme/theme-schema.d.ts +28 -0
  337. package/dist/core/theme/theme-schema.d.ts.map +1 -0
  338. package/dist/core/theme/theme-schema.js +105 -0
  339. package/dist/core/theme/theme-schema.js.map +1 -0
  340. package/dist/core/theme/theme-tokens.d.ts +257 -0
  341. package/dist/core/theme/theme-tokens.d.ts.map +1 -0
  342. package/dist/core/theme/theme-tokens.js +94 -0
  343. package/dist/core/theme/theme-tokens.js.map +1 -0
  344. package/dist/core/theme/theme.d.ts +162 -0
  345. package/dist/core/theme/theme.d.ts.map +1 -0
  346. package/dist/{modes/interactive → core}/theme/theme.js +265 -402
  347. package/dist/core/theme/theme.js.map +1 -0
  348. package/dist/core/timings.d.ts.map +1 -1
  349. package/dist/core/timings.js.map +1 -1
  350. package/dist/core/tools/bash.d.ts +14 -1
  351. package/dist/core/tools/bash.d.ts.map +1 -1
  352. package/dist/core/tools/bash.js +43 -6
  353. package/dist/core/tools/bash.js.map +1 -1
  354. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  355. package/dist/core/tools/edit-diff.js.map +1 -1
  356. package/dist/core/tools/edit.d.ts +1 -2
  357. package/dist/core/tools/edit.d.ts.map +1 -1
  358. package/dist/core/tools/edit.js +0 -3
  359. package/dist/core/tools/edit.js.map +1 -1
  360. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
  361. package/dist/core/tools/file-mutation-queue.js.map +1 -1
  362. package/dist/core/tools/find.d.ts.map +1 -1
  363. package/dist/core/tools/find.js +0 -2
  364. package/dist/core/tools/find.js.map +1 -1
  365. package/dist/core/tools/grep.d.ts.map +1 -1
  366. package/dist/core/tools/grep.js +0 -2
  367. package/dist/core/tools/grep.js.map +1 -1
  368. package/dist/core/tools/index.d.ts.map +1 -1
  369. package/dist/core/tools/index.js.map +1 -1
  370. package/dist/core/tools/ls.d.ts.map +1 -1
  371. package/dist/core/tools/ls.js +0 -2
  372. package/dist/core/tools/ls.js.map +1 -1
  373. package/dist/core/tools/output-accumulator.d.ts +11 -0
  374. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  375. package/dist/core/tools/output-accumulator.js +40 -10
  376. package/dist/core/tools/output-accumulator.js.map +1 -1
  377. package/dist/core/tools/path-utils.d.ts.map +1 -1
  378. package/dist/core/tools/path-utils.js.map +1 -1
  379. package/dist/core/tools/powershell.d.ts.map +1 -1
  380. package/dist/core/tools/powershell.js.map +1 -1
  381. package/dist/core/tools/read.d.ts +17 -1
  382. package/dist/core/tools/read.d.ts.map +1 -1
  383. package/dist/core/tools/read.js +23 -4
  384. package/dist/core/tools/read.js.map +1 -1
  385. package/dist/core/tools/tool-definition-wrapper.d.ts +5 -3
  386. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  387. package/dist/core/tools/tool-definition-wrapper.js +3 -1
  388. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  389. package/dist/core/tools/truncate.d.ts +14 -0
  390. package/dist/core/tools/truncate.d.ts.map +1 -1
  391. package/dist/core/tools/truncate.js +29 -0
  392. package/dist/core/tools/truncate.js.map +1 -1
  393. package/dist/core/tools/write.d.ts.map +1 -1
  394. package/dist/core/tools/write.js +0 -2
  395. package/dist/core/tools/write.js.map +1 -1
  396. package/dist/core/trust-manager.d.ts.map +1 -1
  397. package/dist/core/trust-manager.js +1 -0
  398. package/dist/core/trust-manager.js.map +1 -1
  399. package/dist/core/usage-totals.d.ts +3 -1
  400. package/dist/core/usage-totals.d.ts.map +1 -1
  401. package/dist/core/usage-totals.js +28 -1
  402. package/dist/core/usage-totals.js.map +1 -1
  403. package/dist/core/virtual-models.d.ts +117 -0
  404. package/dist/core/virtual-models.d.ts.map +1 -0
  405. package/dist/core/virtual-models.js +124 -0
  406. package/dist/core/virtual-models.js.map +1 -0
  407. package/dist/extensions/browser/index.d.ts.map +1 -1
  408. package/dist/extensions/browser/index.js.map +1 -1
  409. package/dist/extensions/codemode/execute.d.ts +16 -0
  410. package/dist/extensions/codemode/execute.d.ts.map +1 -0
  411. package/dist/extensions/codemode/execute.js +665 -0
  412. package/dist/extensions/codemode/execute.js.map +1 -0
  413. package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
  414. package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
  415. package/dist/extensions/codemode/execute.lazy.js +3 -0
  416. package/dist/extensions/codemode/execute.lazy.js.map +1 -0
  417. package/dist/extensions/codemode/index.d.ts +21 -0
  418. package/dist/extensions/codemode/index.d.ts.map +1 -0
  419. package/dist/extensions/codemode/index.js +33 -0
  420. package/dist/extensions/codemode/index.js.map +1 -0
  421. package/dist/extensions/codemode/tool.d.ts +124 -0
  422. package/dist/extensions/codemode/tool.d.ts.map +1 -0
  423. package/dist/extensions/codemode/tool.js +286 -0
  424. package/dist/extensions/codemode/tool.js.map +1 -0
  425. package/dist/extensions/codemode/worker.d.ts +7 -0
  426. package/dist/extensions/codemode/worker.d.ts.map +1 -0
  427. package/dist/extensions/codemode/worker.js +7 -0
  428. package/dist/extensions/codemode/worker.js.map +1 -0
  429. package/dist/extensions/context-pruning/compress_context.d.ts.map +1 -1
  430. package/dist/extensions/context-pruning/compress_context.js +1 -3
  431. package/dist/extensions/context-pruning/compress_context.js.map +1 -1
  432. package/dist/extensions/context-pruning/context-pruning-state.d.ts.map +1 -1
  433. package/dist/extensions/context-pruning/context-pruning-state.js.map +1 -1
  434. package/dist/extensions/index.d.ts.map +1 -1
  435. package/dist/extensions/index.js +6 -2
  436. package/dist/extensions/index.js.map +1 -1
  437. package/dist/extensions/llama/client.d.ts +2 -0
  438. package/dist/extensions/llama/client.d.ts.map +1 -1
  439. package/dist/extensions/llama/client.js +7 -3
  440. package/dist/extensions/llama/client.js.map +1 -1
  441. package/dist/extensions/llama/huggingface.d.ts.map +1 -1
  442. package/dist/extensions/llama/huggingface.js.map +1 -1
  443. package/dist/extensions/llama/index.d.ts.map +1 -1
  444. package/dist/extensions/llama/index.js +0 -4
  445. package/dist/extensions/llama/index.js.map +1 -1
  446. package/dist/extensions/llama/provider.d.ts +1 -1
  447. package/dist/extensions/llama/provider.d.ts.map +1 -1
  448. package/dist/extensions/llama/provider.js +103 -13
  449. package/dist/extensions/llama/provider.js.map +1 -1
  450. package/dist/extensions/llama/ui.d.ts +3 -2
  451. package/dist/extensions/llama/ui.d.ts.map +1 -1
  452. package/dist/extensions/llama/ui.js +106 -364
  453. package/dist/extensions/llama/ui.js.map +1 -1
  454. package/dist/extensions/mcp/cli.d.ts +21 -0
  455. package/dist/extensions/mcp/cli.d.ts.map +1 -0
  456. package/dist/extensions/mcp/cli.js +494 -0
  457. package/dist/extensions/mcp/cli.js.map +1 -0
  458. package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
  459. package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
  460. package/dist/extensions/mcp/cli.lazy.js +3 -0
  461. package/dist/extensions/mcp/cli.lazy.js.map +1 -0
  462. package/dist/extensions/mcp/config.d.ts +84 -0
  463. package/dist/extensions/mcp/config.d.ts.map +1 -0
  464. package/dist/extensions/mcp/config.js +196 -0
  465. package/dist/extensions/mcp/config.js.map +1 -0
  466. package/dist/extensions/mcp/index.d.ts +71 -2
  467. package/dist/extensions/mcp/index.d.ts.map +1 -1
  468. package/dist/extensions/mcp/index.js +839 -131
  469. package/dist/extensions/mcp/index.js.map +1 -1
  470. package/dist/extensions/mcp/log.d.ts +16 -0
  471. package/dist/extensions/mcp/log.d.ts.map +1 -0
  472. package/dist/extensions/mcp/log.js +66 -0
  473. package/dist/extensions/mcp/log.js.map +1 -0
  474. package/dist/extensions/mcp/oauth.d.ts +102 -0
  475. package/dist/extensions/mcp/oauth.d.ts.map +1 -0
  476. package/dist/extensions/mcp/oauth.js +428 -0
  477. package/dist/extensions/mcp/oauth.js.map +1 -0
  478. package/dist/extensions/mcp/resources.d.ts +36 -0
  479. package/dist/extensions/mcp/resources.d.ts.map +1 -0
  480. package/dist/extensions/mcp/resources.js +261 -0
  481. package/dist/extensions/mcp/resources.js.map +1 -0
  482. package/dist/extensions/mcp/runtime.d.ts +98 -0
  483. package/dist/extensions/mcp/runtime.d.ts.map +1 -0
  484. package/dist/extensions/mcp/runtime.js +378 -0
  485. package/dist/extensions/mcp/runtime.js.map +1 -0
  486. package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
  487. package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
  488. package/dist/extensions/mcp/runtime.lazy.js +3 -0
  489. package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
  490. package/dist/extensions/mcp/tools.d.ts +84 -0
  491. package/dist/extensions/mcp/tools.d.ts.map +1 -0
  492. package/dist/extensions/mcp/tools.js +263 -0
  493. package/dist/extensions/mcp/tools.js.map +1 -0
  494. package/dist/extensions/punch/a2a-listen.d.ts +9 -0
  495. package/dist/extensions/punch/a2a-listen.d.ts.map +1 -0
  496. package/dist/extensions/punch/a2a-listen.js +88 -0
  497. package/dist/extensions/punch/a2a-listen.js.map +1 -0
  498. package/dist/extensions/punch/a2a.d.ts +12 -0
  499. package/dist/extensions/punch/a2a.d.ts.map +1 -0
  500. package/dist/extensions/punch/a2a.js +106 -0
  501. package/dist/extensions/punch/a2a.js.map +1 -0
  502. package/dist/extensions/punch/auth.d.ts.map +1 -1
  503. package/dist/extensions/punch/auth.js.map +1 -1
  504. package/dist/extensions/punch/collabs.d.ts.map +1 -1
  505. package/dist/extensions/punch/collabs.js.map +1 -1
  506. package/dist/extensions/punch/index.d.ts.map +1 -1
  507. package/dist/extensions/punch/index.js +9 -14
  508. package/dist/extensions/punch/index.js.map +1 -1
  509. package/dist/extensions/punch/routines.d.ts +1 -3
  510. package/dist/extensions/punch/routines.d.ts.map +1 -1
  511. package/dist/extensions/punch/routines.js +1 -121
  512. package/dist/extensions/punch/routines.js.map +1 -1
  513. package/dist/extensions/punch/server.d.ts.map +1 -1
  514. package/dist/extensions/punch/server.js.map +1 -1
  515. package/dist/extensions/punch/timezone.d.ts.map +1 -1
  516. package/dist/extensions/punch/timezone.js.map +1 -1
  517. package/dist/extensions/punch/todos.d.ts.map +1 -1
  518. package/dist/extensions/punch/todos.js.map +1 -1
  519. package/dist/extensions/report-progress/index.d.ts.map +1 -1
  520. package/dist/extensions/report-progress/index.js.map +1 -1
  521. package/dist/extensions/subagent/agents.d.ts.map +1 -1
  522. package/dist/extensions/subagent/agents.js.map +1 -1
  523. package/dist/extensions/subagent/index.d.ts.map +1 -1
  524. package/dist/extensions/subagent/index.js +0 -372
  525. package/dist/extensions/subagent/index.js.map +1 -1
  526. package/dist/extensions/tool-search/index.d.ts +12 -0
  527. package/dist/extensions/tool-search/index.d.ts.map +1 -0
  528. package/dist/extensions/tool-search/index.js +15 -0
  529. package/dist/extensions/tool-search/index.js.map +1 -0
  530. package/dist/extensions/tool-search/tool.d.ts +71 -0
  531. package/dist/extensions/tool-search/tool.d.ts.map +1 -0
  532. package/dist/extensions/tool-search/tool.js +187 -0
  533. package/dist/extensions/tool-search/tool.js.map +1 -0
  534. package/dist/extensions/webfetch/index.d.ts.map +1 -1
  535. package/dist/extensions/webfetch/index.js.map +1 -1
  536. package/dist/extensions/websearch/index.d.ts.map +1 -1
  537. package/dist/extensions/websearch/index.js.map +1 -1
  538. package/dist/index.d.ts +13 -6
  539. package/dist/index.d.ts.map +1 -1
  540. package/dist/index.js +9 -6
  541. package/dist/index.js.map +1 -1
  542. package/dist/main.d.ts +1 -1
  543. package/dist/main.d.ts.map +1 -1
  544. package/dist/main.js +139 -173
  545. package/dist/main.js.map +1 -1
  546. package/dist/migrations.d.ts.map +1 -1
  547. package/dist/migrations.js +0 -20
  548. package/dist/migrations.js.map +1 -1
  549. package/dist/modes/index.d.ts +0 -1
  550. package/dist/modes/index.d.ts.map +1 -1
  551. package/dist/modes/index.js +0 -1
  552. package/dist/modes/index.js.map +1 -1
  553. package/dist/modes/json-event.d.ts.map +1 -1
  554. package/dist/modes/json-event.js.map +1 -1
  555. package/dist/modes/print-mode.d.ts.map +1 -1
  556. package/dist/modes/print-mode.js +4 -0
  557. package/dist/modes/print-mode.js.map +1 -1
  558. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  559. package/dist/modes/rpc/jsonl.js.map +1 -1
  560. package/dist/modes/rpc/rpc-client.d.ts +6 -6
  561. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  562. package/dist/modes/rpc/rpc-client.js +12 -8
  563. package/dist/modes/rpc/rpc-client.js.map +1 -1
  564. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  565. package/dist/modes/rpc/rpc-mode.js +16 -46
  566. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  567. package/dist/modes/rpc/rpc-types.d.ts +10 -1
  568. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  569. package/dist/modes/rpc/rpc-types.js.map +1 -1
  570. package/dist/package-manager-cli.d.ts.map +1 -1
  571. package/dist/package-manager-cli.js +43 -43
  572. package/dist/package-manager-cli.js.map +1 -1
  573. package/dist/rpc-entry.d.ts.map +1 -1
  574. package/dist/rpc-entry.js.map +1 -1
  575. package/dist/server/a2a/harness-runner.d.ts.map +1 -1
  576. package/dist/server/a2a/harness-runner.js.map +1 -1
  577. package/dist/server/a2a/run-server.d.ts.map +1 -1
  578. package/dist/server/a2a/run-server.js.map +1 -1
  579. package/dist/utils/abort.d.ts.map +1 -1
  580. package/dist/utils/abort.js.map +1 -1
  581. package/dist/utils/ansi.d.ts +8 -0
  582. package/dist/utils/ansi.d.ts.map +1 -1
  583. package/dist/utils/ansi.js +30 -11
  584. package/dist/utils/ansi.js.map +1 -1
  585. package/dist/utils/changelog.d.ts.map +1 -1
  586. package/dist/utils/changelog.js +5 -2
  587. package/dist/utils/changelog.js.map +1 -1
  588. package/dist/utils/child-process.d.ts.map +1 -1
  589. package/dist/utils/child-process.js.map +1 -1
  590. package/dist/utils/clipboard-command.d.ts.map +1 -1
  591. package/dist/utils/clipboard-command.js.map +1 -1
  592. package/dist/utils/clipboard-image.d.ts.map +1 -1
  593. package/dist/utils/clipboard-image.js +15 -41
  594. package/dist/utils/clipboard-image.js.map +1 -1
  595. package/dist/utils/clipboard.d.ts.map +1 -1
  596. package/dist/utils/clipboard.js +96 -38
  597. package/dist/utils/clipboard.js.map +1 -1
  598. package/dist/utils/colors.d.ts +73 -0
  599. package/dist/utils/colors.d.ts.map +1 -0
  600. package/dist/utils/colors.js +273 -0
  601. package/dist/utils/colors.js.map +1 -0
  602. package/dist/utils/deprecation.d.ts.map +1 -1
  603. package/dist/utils/deprecation.js.map +1 -1
  604. package/dist/utils/exif-orientation.d.ts.map +1 -1
  605. package/dist/utils/exif-orientation.js.map +1 -1
  606. package/dist/utils/frontmatter.d.ts.map +1 -1
  607. package/dist/utils/frontmatter.js.map +1 -1
  608. package/dist/utils/fs-watch.d.ts.map +1 -1
  609. package/dist/utils/fs-watch.js.map +1 -1
  610. package/dist/utils/fuzzy.d.ts +16 -0
  611. package/dist/utils/fuzzy.d.ts.map +1 -0
  612. package/dist/utils/fuzzy.js +111 -0
  613. package/dist/utils/fuzzy.js.map +1 -0
  614. package/dist/utils/git.d.ts.map +1 -1
  615. package/dist/utils/git.js.map +1 -1
  616. package/dist/utils/html.d.ts.map +1 -1
  617. package/dist/utils/html.js.map +1 -1
  618. package/dist/utils/image-convert.d.ts.map +1 -1
  619. package/dist/utils/image-convert.js.map +1 -1
  620. package/dist/utils/image-process.d.ts.map +1 -1
  621. package/dist/utils/image-process.js.map +1 -1
  622. package/dist/utils/image-resize-core.d.ts +12 -0
  623. package/dist/utils/image-resize-core.d.ts.map +1 -1
  624. package/dist/utils/image-resize-core.js +5 -0
  625. package/dist/utils/image-resize-core.js.map +1 -1
  626. package/dist/utils/image-resize-worker.d.ts.map +1 -1
  627. package/dist/utils/image-resize-worker.js +3 -2
  628. package/dist/utils/image-resize-worker.js.map +1 -1
  629. package/dist/utils/image-resize.d.ts.map +1 -1
  630. package/dist/utils/image-resize.js +9 -10
  631. package/dist/utils/image-resize.js.map +1 -1
  632. package/dist/utils/json.d.ts.map +1 -1
  633. package/dist/utils/json.js.map +1 -1
  634. package/dist/utils/management-http.d.ts.map +1 -1
  635. package/dist/utils/management-http.js.map +1 -1
  636. package/dist/utils/mime.d.ts.map +1 -1
  637. package/dist/utils/mime.js +1 -1
  638. package/dist/utils/mime.js.map +1 -1
  639. package/dist/utils/oklab.d.ts +43 -0
  640. package/dist/utils/oklab.d.ts.map +1 -0
  641. package/dist/utils/oklab.js +210 -0
  642. package/dist/utils/oklab.js.map +1 -0
  643. package/dist/utils/open-browser.d.ts.map +1 -1
  644. package/dist/utils/open-browser.js.map +1 -1
  645. package/dist/utils/output-files.d.ts +15 -0
  646. package/dist/utils/output-files.d.ts.map +1 -0
  647. package/dist/utils/output-files.js +30 -0
  648. package/dist/utils/output-files.js.map +1 -0
  649. package/dist/utils/paths.d.ts +3 -3
  650. package/dist/utils/paths.d.ts.map +1 -1
  651. package/dist/utils/paths.js +5 -4
  652. package/dist/utils/paths.js.map +1 -1
  653. package/dist/utils/photon.d.ts.map +1 -1
  654. package/dist/utils/photon.js.map +1 -1
  655. package/dist/utils/pi-user-agent.d.ts.map +1 -1
  656. package/dist/utils/pi-user-agent.js.map +1 -1
  657. package/dist/utils/shell.d.ts +1 -3
  658. package/dist/utils/shell.d.ts.map +1 -1
  659. package/dist/utils/shell.js +3 -30
  660. package/dist/utils/shell.js.map +1 -1
  661. package/dist/utils/sleep.d.ts.map +1 -1
  662. package/dist/utils/sleep.js.map +1 -1
  663. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  664. package/dist/utils/syntax-highlight.js +8 -1
  665. package/dist/utils/syntax-highlight.js.map +1 -1
  666. package/dist/utils/text.d.ts.map +1 -1
  667. package/dist/utils/text.js.map +1 -1
  668. package/dist/utils/tool-result-images.d.ts +3 -1
  669. package/dist/utils/tool-result-images.d.ts.map +1 -1
  670. package/dist/utils/tool-result-images.js +4 -1
  671. package/dist/utils/tool-result-images.js.map +1 -1
  672. package/dist/utils/tools-manager.d.ts.map +1 -1
  673. package/dist/utils/tools-manager.js.map +1 -1
  674. package/dist/utils/version-check.d.ts.map +1 -1
  675. package/dist/utils/version-check.js.map +1 -1
  676. package/dist/utils/windows-self-update.d.ts.map +1 -1
  677. package/dist/utils/windows-self-update.js.map +1 -1
  678. package/dist/utils/wsl.d.ts +3 -0
  679. package/dist/utils/wsl.d.ts.map +1 -0
  680. package/dist/utils/wsl.js +15 -0
  681. package/dist/utils/wsl.js.map +1 -0
  682. package/dist/utils/zip.d.ts +7 -0
  683. package/dist/utils/zip.d.ts.map +1 -0
  684. package/dist/utils/zip.js +60 -0
  685. package/dist/utils/zip.js.map +1 -0
  686. package/docs/cli-integration.md +106 -0
  687. package/docs/cli.md +333 -0
  688. package/docs/codemode.md +230 -0
  689. package/docs/compaction.md +47 -28
  690. package/docs/configuration.md +47 -0
  691. package/docs/containerization.md +109 -82
  692. package/docs/custom-provider.md +109 -713
  693. package/docs/docs.json +148 -96
  694. package/docs/environment-variables.md +18 -3
  695. package/docs/extensions.md +284 -604
  696. package/docs/how-pi-works.md +49 -0
  697. package/docs/images/interactive-mode.png +0 -0
  698. package/docs/index.md +24 -69
  699. package/docs/json.md +193 -65
  700. package/docs/keybindings.md +58 -103
  701. package/docs/llama-cpp.md +24 -4
  702. package/docs/mcp.md +272 -0
  703. package/docs/message-types.md +279 -0
  704. package/docs/models.md +124 -489
  705. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  706. package/docs/packages.md +67 -166
  707. package/docs/prompt-templates.md +31 -68
  708. package/docs/providers.md +158 -228
  709. package/docs/quickstart.md +61 -106
  710. package/docs/rpc-commands.md +860 -0
  711. package/docs/rpc-extension-ui.md +200 -0
  712. package/docs/rpc.md +131 -1554
  713. package/docs/sdk.md +79 -1158
  714. package/docs/security.md +72 -32
  715. package/docs/session-format.md +58 -215
  716. package/docs/sessions.md +35 -114
  717. package/docs/settings.md +98 -326
  718. package/docs/shell-aliases.md +85 -5
  719. package/docs/skills.md +51 -190
  720. package/docs/slash-commands.md +60 -0
  721. package/docs/subagents.md +2 -0
  722. package/docs/terminal-setup.md +7 -182
  723. package/docs/termux.md +74 -83
  724. package/docs/themes.md +89 -273
  725. package/docs/tmux.md +31 -39
  726. package/docs/tui.md +74 -910
  727. package/docs/usage.md +52 -129
  728. package/docs/virtual-models.md +114 -0
  729. package/docs/windows.md +45 -17
  730. package/examples/README.md +13 -5
  731. package/examples/extensions/README.md +4 -30
  732. package/examples/extensions/custom-provider-anthropic/index.ts +18 -12
  733. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  734. package/examples/extensions/custom-provider-anthropic/package.json +17 -17
  735. package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
  736. package/examples/extensions/custom-provider-gitlab-duo/package.json +14 -14
  737. package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
  738. package/examples/extensions/debug-provider.ts +69 -0
  739. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  740. package/examples/extensions/gondolin/package-lock.json +5 -5
  741. package/examples/extensions/gondolin/package.json +1 -1
  742. package/examples/extensions/jev-router.ts +113 -0
  743. package/examples/extensions/prompt-customizer.ts +19 -67
  744. package/examples/extensions/sandbox/package-lock.json +2 -2
  745. package/examples/extensions/sandbox/package.json +1 -1
  746. package/examples/extensions/with-deps/package-lock.json +2 -2
  747. package/examples/extensions/with-deps/package.json +20 -20
  748. package/examples/rpc-client.ts +35 -0
  749. package/examples/sdk/14-codemode-mcp.ts +61 -0
  750. package/examples/sdk/README.md +3 -2
  751. package/npm-shrinkwrap.json +2425 -0
  752. package/package.json +20 -29
  753. package/schemas/models.schema.json +1157 -0
  754. package/schemas/settings.schema.json +734 -0
  755. package/schemas/theme.schema.json +365 -0
  756. package/dist/bundle/chunks/anthropic-messages-ASRU76PT.js +0 -6
  757. package/dist/bundle/chunks/azure-openai-responses-UGF6LMEX.js +0 -2
  758. package/dist/bundle/chunks/chunk-5PRUVL6W.js +0 -1770
  759. package/dist/bundle/chunks/chunk-6R7UI4IY.js +0 -2
  760. package/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
  761. package/dist/bundle/chunks/chunk-CHB3CEFP.js +0 -2
  762. package/dist/bundle/chunks/chunk-ELBMWBDG.js +0 -11
  763. package/dist/bundle/chunks/chunk-GMWCTUPB.js +0 -2
  764. package/dist/bundle/chunks/chunk-GTBU4EAF.js +0 -2
  765. package/dist/bundle/chunks/chunk-NUHFSC37.js +0 -25
  766. package/dist/bundle/chunks/chunk-UIWY7TU5.js +0 -42
  767. package/dist/bundle/chunks/chunk-XNGRGP62.js +0 -2
  768. package/dist/bundle/chunks/google-generative-ai-VCD2PGIY.js +0 -2
  769. package/dist/bundle/chunks/google-vertex-L6U34ZRC.js +0 -2
  770. package/dist/bundle/chunks/mistral-conversations-IXWQ2YKN.js +0 -5
  771. package/dist/bundle/chunks/node-5YXRXMVN.js +0 -16
  772. package/dist/bundle/chunks/openai-codex-responses-P7HKQLIT.js +0 -10
  773. package/dist/bundle/chunks/openai-completions-O7BFLP3U.js +0 -7
  774. package/dist/bundle/chunks/openai-responses-QAKWAYVG.js +0 -2
  775. package/dist/cli/config-selector.d.ts +0 -16
  776. package/dist/cli/config-selector.d.ts.map +0 -1
  777. package/dist/cli/config-selector.js +0 -32
  778. package/dist/cli/config-selector.js.map +0 -1
  779. package/dist/cli/session-picker.d.ts +0 -10
  780. package/dist/cli/session-picker.d.ts.map +0 -1
  781. package/dist/cli/session-picker.js +0 -36
  782. package/dist/cli/session-picker.js.map +0 -1
  783. package/dist/cli/startup-ui.d.ts +0 -20
  784. package/dist/cli/startup-ui.d.ts.map +0 -1
  785. package/dist/cli/startup-ui.js +0 -185
  786. package/dist/cli/startup-ui.js.map +0 -1
  787. package/dist/core/keybindings.d.ts +0 -428
  788. package/dist/core/keybindings.d.ts.map +0 -1
  789. package/dist/core/keybindings.js +0 -321
  790. package/dist/core/keybindings.js.map +0 -1
  791. package/dist/core/tools/render-utils.d.ts +0 -24
  792. package/dist/core/tools/render-utils.d.ts.map +0 -1
  793. package/dist/core/tools/render-utils.js +0 -65
  794. package/dist/core/tools/render-utils.js.map +0 -1
  795. package/dist/core/tools/renderers/bash.d.ts +0 -12
  796. package/dist/core/tools/renderers/bash.d.ts.map +0 -1
  797. package/dist/core/tools/renderers/bash.js +0 -130
  798. package/dist/core/tools/renderers/bash.js.map +0 -1
  799. package/dist/core/tools/renderers/edit.d.ts +0 -23
  800. package/dist/core/tools/renderers/edit.d.ts.map +0 -1
  801. package/dist/core/tools/renderers/edit.js +0 -167
  802. package/dist/core/tools/renderers/edit.js.map +0 -1
  803. package/dist/core/tools/renderers/find.d.ts +0 -10
  804. package/dist/core/tools/renderers/find.d.ts.map +0 -1
  805. package/dist/core/tools/renderers/find.js +0 -64
  806. package/dist/core/tools/renderers/find.js.map +0 -1
  807. package/dist/core/tools/renderers/grep.d.ts +0 -10
  808. package/dist/core/tools/renderers/grep.d.ts.map +0 -1
  809. package/dist/core/tools/renderers/grep.js +0 -69
  810. package/dist/core/tools/renderers/grep.js.map +0 -1
  811. package/dist/core/tools/renderers/index.d.ts +0 -28
  812. package/dist/core/tools/renderers/index.d.ts.map +0 -1
  813. package/dist/core/tools/renderers/index.js +0 -47
  814. package/dist/core/tools/renderers/index.js.map +0 -1
  815. package/dist/core/tools/renderers/ls.d.ts +0 -10
  816. package/dist/core/tools/renderers/ls.d.ts.map +0 -1
  817. package/dist/core/tools/renderers/ls.js +0 -58
  818. package/dist/core/tools/renderers/ls.js.map +0 -1
  819. package/dist/core/tools/renderers/read.d.ts +0 -11
  820. package/dist/core/tools/renderers/read.d.ts.map +0 -1
  821. package/dist/core/tools/renderers/read.js +0 -129
  822. package/dist/core/tools/renderers/read.js.map +0 -1
  823. package/dist/core/tools/renderers/write.d.ts +0 -10
  824. package/dist/core/tools/renderers/write.d.ts.map +0 -1
  825. package/dist/core/tools/renderers/write.js +0 -153
  826. package/dist/core/tools/renderers/write.js.map +0 -1
  827. package/dist/extensions/mcp/mcp-client.d.ts +0 -31
  828. package/dist/extensions/mcp/mcp-client.d.ts.map +0 -1
  829. package/dist/extensions/mcp/mcp-client.js +0 -149
  830. package/dist/extensions/mcp/mcp-client.js.map +0 -1
  831. package/dist/extensions/mcp/mcp-config.d.ts +0 -47
  832. package/dist/extensions/mcp/mcp-config.d.ts.map +0 -1
  833. package/dist/extensions/mcp/mcp-config.js +0 -281
  834. package/dist/extensions/mcp/mcp-config.js.map +0 -1
  835. package/dist/extensions/mcp/mcp-transport.d.ts +0 -65
  836. package/dist/extensions/mcp/mcp-transport.d.ts.map +0 -1
  837. package/dist/extensions/mcp/mcp-transport.js +0 -278
  838. package/dist/extensions/mcp/mcp-transport.js.map +0 -1
  839. package/dist/modes/interactive/assets/clankolas.png +0 -0
  840. package/dist/modes/interactive/chat-viewport.d.ts +0 -20
  841. package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
  842. package/dist/modes/interactive/chat-viewport.js +0 -28
  843. package/dist/modes/interactive/chat-viewport.js.map +0 -1
  844. package/dist/modes/interactive/components/armin.d.ts +0 -34
  845. package/dist/modes/interactive/components/armin.d.ts.map +0 -1
  846. package/dist/modes/interactive/components/armin.js +0 -333
  847. package/dist/modes/interactive/components/armin.js.map +0 -1
  848. package/dist/modes/interactive/components/assistant-message.d.ts +0 -26
  849. package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
  850. package/dist/modes/interactive/components/assistant-message.js +0 -158
  851. package/dist/modes/interactive/components/assistant-message.js.map +0 -1
  852. package/dist/modes/interactive/components/bash-execution.d.ts +0 -34
  853. package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
  854. package/dist/modes/interactive/components/bash-execution.js +0 -175
  855. package/dist/modes/interactive/components/bash-execution.js.map +0 -1
  856. package/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
  857. package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
  858. package/dist/modes/interactive/components/bordered-loader.js +0 -54
  859. package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
  860. package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
  861. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
  862. package/dist/modes/interactive/components/branch-summary-message.js +0 -44
  863. package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
  864. package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
  865. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
  866. package/dist/modes/interactive/components/compaction-summary-message.js +0 -45
  867. package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
  868. package/dist/modes/interactive/components/config-selector.d.ts +0 -102
  869. package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
  870. package/dist/modes/interactive/components/config-selector.js +0 -761
  871. package/dist/modes/interactive/components/config-selector.js.map +0 -1
  872. package/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
  873. package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
  874. package/dist/modes/interactive/components/countdown-timer.js +0 -33
  875. package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
  876. package/dist/modes/interactive/components/custom-editor.d.ts +0 -30
  877. package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
  878. package/dist/modes/interactive/components/custom-editor.js +0 -115
  879. package/dist/modes/interactive/components/custom-editor.js.map +0 -1
  880. package/dist/modes/interactive/components/custom-entry.d.ts +0 -19
  881. package/dist/modes/interactive/components/custom-entry.d.ts.map +0 -1
  882. package/dist/modes/interactive/components/custom-entry.js +0 -52
  883. package/dist/modes/interactive/components/custom-entry.js.map +0 -1
  884. package/dist/modes/interactive/components/custom-message.d.ts +0 -22
  885. package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
  886. package/dist/modes/interactive/components/custom-message.js +0 -87
  887. package/dist/modes/interactive/components/custom-message.js.map +0 -1
  888. package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
  889. package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
  890. package/dist/modes/interactive/components/daxnuts.js +0 -140
  891. package/dist/modes/interactive/components/daxnuts.js.map +0 -1
  892. package/dist/modes/interactive/components/diff.d.ts +0 -12
  893. package/dist/modes/interactive/components/diff.d.ts.map +0 -1
  894. package/dist/modes/interactive/components/diff.js +0 -133
  895. package/dist/modes/interactive/components/diff.js.map +0 -1
  896. package/dist/modes/interactive/components/dynamic-border.d.ts +0 -15
  897. package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
  898. package/dist/modes/interactive/components/dynamic-border.js +0 -21
  899. package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
  900. package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
  901. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
  902. package/dist/modes/interactive/components/earendil-announcement.js +0 -40
  903. package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
  904. package/dist/modes/interactive/components/extension-editor.d.ts +0 -21
  905. package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
  906. package/dist/modes/interactive/components/extension-editor.js +0 -98
  907. package/dist/modes/interactive/components/extension-editor.js.map +0 -1
  908. package/dist/modes/interactive/components/extension-input.d.ts +0 -23
  909. package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
  910. package/dist/modes/interactive/components/extension-input.js +0 -61
  911. package/dist/modes/interactive/components/extension-input.js.map +0 -1
  912. package/dist/modes/interactive/components/extension-selector.d.ts +0 -26
  913. package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
  914. package/dist/modes/interactive/components/extension-selector.js +0 -83
  915. package/dist/modes/interactive/components/extension-selector.js.map +0 -1
  916. package/dist/modes/interactive/components/first-time-setup.d.ts +0 -25
  917. package/dist/modes/interactive/components/first-time-setup.d.ts.map +0 -1
  918. package/dist/modes/interactive/components/first-time-setup.js +0 -103
  919. package/dist/modes/interactive/components/first-time-setup.js.map +0 -1
  920. package/dist/modes/interactive/components/footer.d.ts +0 -32
  921. package/dist/modes/interactive/components/footer.d.ts.map +0 -1
  922. package/dist/modes/interactive/components/footer.js +0 -222
  923. package/dist/modes/interactive/components/footer.js.map +0 -1
  924. package/dist/modes/interactive/components/index.d.ts +0 -34
  925. package/dist/modes/interactive/components/index.d.ts.map +0 -1
  926. package/dist/modes/interactive/components/index.js +0 -35
  927. package/dist/modes/interactive/components/index.js.map +0 -1
  928. package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -13
  929. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
  930. package/dist/modes/interactive/components/keybinding-hints.js +0 -36
  931. package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
  932. package/dist/modes/interactive/components/login-dialog.d.ts +0 -52
  933. package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
  934. package/dist/modes/interactive/components/login-dialog.js +0 -188
  935. package/dist/modes/interactive/components/login-dialog.js.map +0 -1
  936. package/dist/modes/interactive/components/markdown-transform.d.ts +0 -3
  937. package/dist/modes/interactive/components/markdown-transform.d.ts.map +0 -1
  938. package/dist/modes/interactive/components/markdown-transform.js +0 -19
  939. package/dist/modes/interactive/components/markdown-transform.js.map +0 -1
  940. package/dist/modes/interactive/components/mermaid.d.ts +0 -11
  941. package/dist/modes/interactive/components/mermaid.d.ts.map +0 -1
  942. package/dist/modes/interactive/components/mermaid.js +0 -75
  943. package/dist/modes/interactive/components/mermaid.js.map +0 -1
  944. package/dist/modes/interactive/components/model-selector.d.ts +0 -60
  945. package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
  946. package/dist/modes/interactive/components/model-selector.js +0 -361
  947. package/dist/modes/interactive/components/model-selector.js.map +0 -1
  948. package/dist/modes/interactive/components/oauth-selector.d.ts +0 -33
  949. package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
  950. package/dist/modes/interactive/components/oauth-selector.js +0 -163
  951. package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
  952. package/dist/modes/interactive/components/question-selector.d.ts +0 -24
  953. package/dist/modes/interactive/components/question-selector.d.ts.map +0 -1
  954. package/dist/modes/interactive/components/question-selector.js +0 -158
  955. package/dist/modes/interactive/components/question-selector.js.map +0 -1
  956. package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -46
  957. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
  958. package/dist/modes/interactive/components/scoped-models-selector.js +0 -326
  959. package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
  960. package/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
  961. package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
  962. package/dist/modes/interactive/components/session-selector-search.js +0 -155
  963. package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
  964. package/dist/modes/interactive/components/session-selector.d.ts +0 -95
  965. package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
  966. package/dist/modes/interactive/components/session-selector.js +0 -867
  967. package/dist/modes/interactive/components/session-selector.js.map +0 -1
  968. package/dist/modes/interactive/components/settings-selector.d.ts +0 -92
  969. package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
  970. package/dist/modes/interactive/components/settings-selector.js +0 -709
  971. package/dist/modes/interactive/components/settings-selector.js.map +0 -1
  972. package/dist/modes/interactive/components/settings-submenu.d.ts +0 -72
  973. package/dist/modes/interactive/components/settings-submenu.d.ts.map +0 -1
  974. package/dist/modes/interactive/components/settings-submenu.js +0 -165
  975. package/dist/modes/interactive/components/settings-submenu.js.map +0 -1
  976. package/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
  977. package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
  978. package/dist/modes/interactive/components/show-images-selector.js +0 -39
  979. package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
  980. package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
  981. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
  982. package/dist/modes/interactive/components/skill-invocation-message.js +0 -47
  983. package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
  984. package/dist/modes/interactive/components/status-indicator.d.ts +0 -30
  985. package/dist/modes/interactive/components/status-indicator.d.ts.map +0 -1
  986. package/dist/modes/interactive/components/status-indicator.js +0 -67
  987. package/dist/modes/interactive/components/status-indicator.js.map +0 -1
  988. package/dist/modes/interactive/components/theme-selector.d.ts +0 -11
  989. package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
  990. package/dist/modes/interactive/components/theme-selector.js +0 -50
  991. package/dist/modes/interactive/components/theme-selector.js.map +0 -1
  992. package/dist/modes/interactive/components/thinking-selector.d.ts +0 -23
  993. package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
  994. package/dist/modes/interactive/components/thinking-selector.js +0 -109
  995. package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
  996. package/dist/modes/interactive/components/tool-execution.d.ts +0 -80
  997. package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
  998. package/dist/modes/interactive/components/tool-execution.js +0 -328
  999. package/dist/modes/interactive/components/tool-execution.js.map +0 -1
  1000. package/dist/modes/interactive/components/tree-selector.d.ts +0 -94
  1001. package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
  1002. package/dist/modes/interactive/components/tree-selector.js +0 -1245
  1003. package/dist/modes/interactive/components/tree-selector.js.map +0 -1
  1004. package/dist/modes/interactive/components/trust-selector.d.ts +0 -23
  1005. package/dist/modes/interactive/components/trust-selector.d.ts.map +0 -1
  1006. package/dist/modes/interactive/components/trust-selector.js +0 -91
  1007. package/dist/modes/interactive/components/trust-selector.js.map +0 -1
  1008. package/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
  1009. package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
  1010. package/dist/modes/interactive/components/user-message-selector.js +0 -114
  1011. package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
  1012. package/dist/modes/interactive/components/user-message.d.ts +0 -16
  1013. package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
  1014. package/dist/modes/interactive/components/user-message.js +0 -49
  1015. package/dist/modes/interactive/components/user-message.js.map +0 -1
  1016. package/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
  1017. package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
  1018. package/dist/modes/interactive/components/visual-truncate.js +0 -33
  1019. package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
  1020. package/dist/modes/interactive/external-editor.d.ts +0 -12
  1021. package/dist/modes/interactive/external-editor.d.ts.map +0 -1
  1022. package/dist/modes/interactive/external-editor.js +0 -38
  1023. package/dist/modes/interactive/external-editor.js.map +0 -1
  1024. package/dist/modes/interactive/interactive-mode.d.ts +0 -443
  1025. package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
  1026. package/dist/modes/interactive/interactive-mode.js +0 -5604
  1027. package/dist/modes/interactive/interactive-mode.js.map +0 -1
  1028. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
  1029. package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
  1030. package/dist/modes/interactive/model-search.d.ts +0 -12
  1031. package/dist/modes/interactive/model-search.d.ts.map +0 -1
  1032. package/dist/modes/interactive/model-search.js +0 -15
  1033. package/dist/modes/interactive/model-search.js.map +0 -1
  1034. package/dist/modes/interactive/session-share.d.ts +0 -16
  1035. package/dist/modes/interactive/session-share.d.ts.map +0 -1
  1036. package/dist/modes/interactive/session-share.js +0 -184
  1037. package/dist/modes/interactive/session-share.js.map +0 -1
  1038. package/dist/modes/interactive/theme/dark.json +0 -91
  1039. package/dist/modes/interactive/theme/light.json +0 -90
  1040. package/dist/modes/interactive/theme/theme-controller.d.ts +0 -41
  1041. package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
  1042. package/dist/modes/interactive/theme/theme-controller.js +0 -130
  1043. package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
  1044. package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
  1045. package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  1046. package/dist/modes/interactive/theme/theme-json.js +0 -130
  1047. package/dist/modes/interactive/theme/theme-json.js.map +0 -1
  1048. package/dist/modes/interactive/theme/theme-schema.json +0 -356
  1049. package/dist/modes/interactive/theme/theme.d.ts +0 -131
  1050. package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
  1051. package/dist/modes/interactive/theme/theme.js.map +0 -1
  1052. package/dist/modes/interactive/tui-renderer.d.ts +0 -21
  1053. package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
  1054. package/dist/modes/interactive/tui-renderer.js +0 -66
  1055. package/dist/modes/interactive/tui-renderer.js.map +0 -1
  1056. package/docs/development.md +0 -90
  1057. package/examples/extensions/border-status-editor.ts +0 -145
  1058. package/examples/extensions/built-in-tool-renderer.ts +0 -249
  1059. package/examples/extensions/custom-footer.ts +0 -64
  1060. package/examples/extensions/custom-header.ts +0 -73
  1061. package/examples/extensions/doom-overlay/README.md +0 -46
  1062. package/examples/extensions/doom-overlay/doom/build/doom.js +0 -21
  1063. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  1064. package/examples/extensions/doom-overlay/doom/build.sh +0 -152
  1065. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
  1066. package/examples/extensions/doom-overlay/doom-component.ts +0 -132
  1067. package/examples/extensions/doom-overlay/doom-engine.ts +0 -173
  1068. package/examples/extensions/doom-overlay/doom-keys.ts +0 -104
  1069. package/examples/extensions/doom-overlay/index.ts +0 -74
  1070. package/examples/extensions/doom-overlay/wad-finder.ts +0 -55
  1071. package/examples/extensions/entry-renderer.ts +0 -41
  1072. package/examples/extensions/github-issue-autocomplete.ts +0 -185
  1073. package/examples/extensions/handoff.ts +0 -190
  1074. package/examples/extensions/interactive-shell.ts +0 -196
  1075. package/examples/extensions/kimi-deferred-tools.ts +0 -61
  1076. package/examples/extensions/message-renderer.ts +0 -59
  1077. package/examples/extensions/minimal-mode.ts +0 -426
  1078. package/examples/extensions/modal-editor.ts +0 -85
  1079. package/examples/extensions/overlay-qa-tests.ts +0 -1450
  1080. package/examples/extensions/overlay-test.ts +0 -153
  1081. package/examples/extensions/plan-mode/README.md +0 -66
  1082. package/examples/extensions/plan-mode/index.ts +0 -390
  1083. package/examples/extensions/plan-mode/utils.ts +0 -168
  1084. package/examples/extensions/preset.ts +0 -436
  1085. package/examples/extensions/qna.ts +0 -118
  1086. package/examples/extensions/question.ts +0 -278
  1087. package/examples/extensions/questionnaire.ts +0 -440
  1088. package/examples/extensions/rainbow-editor.ts +0 -88
  1089. package/examples/extensions/snake.ts +0 -343
  1090. package/examples/extensions/space-invaders.ts +0 -560
  1091. package/examples/extensions/structured-output.ts +0 -65
  1092. package/examples/extensions/summarize.ts +0 -199
  1093. package/examples/extensions/tic-tac-toe.ts +0 -1008
  1094. package/examples/extensions/todo.ts +0 -297
  1095. package/examples/extensions/tools.ts +0 -146
  1096. package/examples/extensions/truncated-tool.ts +0 -195
  1097. package/examples/plugins/pi-example-plugin/README.md +0 -38
  1098. package/examples/plugins/pi-example-plugin/package.json +0 -10
  1099. package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
  1100. package/examples/plugins/pi-example-plugin/src/session.ts +0 -23
  1101. package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
  1102. package/examples/rpc-extension-ui.ts +0 -641
  1103. /package/dist/bundle/chunks/{chunk-PATAL4PO.js → chunk-7ZC4UXSL.js} +0 -0
@@ -0,0 +1,106 @@
1
+ # CLI Integration
2
+
3
+ By default, running `pi` opens the interactive terminal interface. When input or output is piped or redirected, Pi uses print mode instead. You can also select print, JSON, or RPC mode explicitly for scripts and applications.
4
+
5
+ All four modes use the same agent, sessions, resources, and tools. The mode determines how input enters Pi, how output is exposed, and whether the process remains available for more commands.
6
+
7
+ The SDK is not a CLI mode. It embeds the agent directly in a Node.js or Bun process. See the [SDK](sdk.md) when direct TypeScript access is preferable to a process boundary.
8
+
9
+ ## Choose a mode
10
+
11
+ | Mode | Interface | Lifetime | Use it when |
12
+ |---|---|---|---|
13
+ | Interactive | Terminal UI | Until the user exits | A person is working with Pi directly |
14
+ | Print | Final text on stdout | One invocation | A script needs the final assistant response |
15
+ | JSON | JSONL events on stdout | One invocation | A process needs structured progress from a run |
16
+ | RPC | JSONL commands, responses, and events | Long-lived | A process needs bidirectional control |
17
+
18
+ CLI options still select the working directory, model, tools, resources, and session persistence independently of the mode. See [Command Line](cli.md) for the complete startup options.
19
+
20
+ ## Print to stdout
21
+
22
+ Print mode runs the supplied prompts, writes the final assistant text to stdout, and exits:
23
+
24
+ ```bash
25
+ pi --print "Summarize the changes in this repository"
26
+ ```
27
+
28
+ Use print mode when only the final text is needed, including command substitution, pipelines, and one-shot jobs. Intermediate events are not exposed.
29
+
30
+ Print mode writes errors to stderr. A final assistant response with an `error` or `aborted` stop reason produces a nonzero exit status. A response cut off at the model's output token limit (`length` stop reason) still prints its partial text to stdout, writes a warning to stderr, and produces a nonzero exit status.
31
+
32
+ When no mode is selected explicitly, non-TTY stdin or stdout also selects print mode. This allows piped input and output without adding `--print`.
33
+
34
+ ## Stream JSON events
35
+
36
+ JSON mode writes a session header followed by agent and session events as newline-delimited JSON:
37
+
38
+ ```bash
39
+ pi --mode json "Review this repository" > events.jsonl
40
+ ```
41
+
42
+ This is structured event output, not a single JSON result or a constraint on the format of the model’s response.
43
+
44
+ All prompts are supplied when the process starts. The process streams events for that run and then exits; it does not accept later commands.
45
+
46
+ A failed or aborted assistant response appears in the event stream but does not by itself produce a nonzero exit status. Inspect the events when success or failure matters. Pi still exits nonzero if the invocation throws an error.
47
+
48
+ Streaming `message_update` records contain deltas rather than a growing message snapshot. Assemble live output from the delta events, then replace it with the authoritative message from `message_end`.
49
+
50
+ `agent_end` can be followed by automatic recovery or queued work. `agent_settled` marks the end of automatic work for the current run.
51
+
52
+ Stdout is reserved for JSONL. Diagnostics and application logging are written to stderr. See [JSON Event Stream](json.md) for framing, event shapes, and reconstruction rules.
53
+
54
+ ## Control Pi with RPC
55
+
56
+ RPC mode keeps Pi running while another process sends commands and receives responses and events:
57
+
58
+ ```bash
59
+ pi --mode rpc --no-session
60
+ ```
61
+
62
+ Commands are JSON objects written to stdin. Responses and events are JSON objects written to stdout. Every record occupies one line.
63
+
64
+ Add an `id` to commands that need correlation. The matching response repeats that ID. Events generally have no command ID because they describe session activity rather than one request.
65
+
66
+ A successful `prompt` response means the prompt was accepted, queued, or handled. It does not mean the run completed. Continue consuming events through `agent_settled` when completion matters.
67
+
68
+ RPC commands can change models, inspect state, manage sessions, run shell commands, and answer extension UI requests.
69
+
70
+ Extension dialogs form a request-response subprotocol. Other extension UI updates are notifications that a client may display or ignore. TUI-only extension capabilities are unavailable or degraded outside interactive mode.
71
+
72
+ For Node.js or TypeScript integrations, prefer `RpcClient` from `@punch-bot/cli`. It starts a Pi RPC child process, correlates requests, exposes typed command methods, and delivers session events to listeners.
73
+
74
+ The [RPC client example](../examples/rpc-client.ts) sends one prompt, streams text and tool activity, waits for `agent_settled`, and shuts down the child process. It is included in the repository’s TypeScript checks.
75
+
76
+ `RpcClient.promptAndWait()` installs its event listener before sending the prompt, avoiding a race with fast completions. For separate operations, subscribe before calling `prompt()` and call `waitForIdle()` only while a run is active.
77
+
78
+ The client requires a path to a runnable Pi CLI. The repository example points at `dist/cli.js`, so the package must be built before that example runs from a checkout.
79
+
80
+ If you are building a client without `RpcClient`, start with [RPC Protocol](rpc.md), then use [RPC Commands](rpc-commands.md) and [JSON Event Stream](json.md) as the wire references.
81
+
82
+ ## Fork and rebrand Pi
83
+
84
+ A source fork can change the CLI name and configuration directory through `package.json`:
85
+
86
+ ```json
87
+ {
88
+ "piConfig": {
89
+ "name": "my-agent",
90
+ "configDir": ".my-agent"
91
+ }
92
+ }
93
+ ```
94
+
95
+ Change the top-level `bin` field to set the executable name. These settings affect the CLI banner, configuration paths, and derived environment variable names.
96
+
97
+ ## Examples and references
98
+
99
+ - [RPC client](../examples/rpc-client.ts): typed Node.js integration
100
+ - [RPC extension UI](../examples/rpc-extension-ui.ts): custom terminal client with extension dialogs
101
+ - [Command Line](cli.md): startup options and mode selection
102
+ - [JSON Event Stream](json.md): JSON event reference
103
+ - [RPC Protocol](rpc.md): RPC lifecycle, framing, errors, and shutdown
104
+ - [RPC Commands](rpc-commands.md): command and response reference
105
+ - [RPC Extension UI](rpc-extension-ui.md): extension interaction subprotocol
106
+ - [SDK examples](../examples/sdk/): in-process TypeScript integrations
package/docs/cli.md ADDED
@@ -0,0 +1,333 @@
1
+ <a id="cli-and-modes-reference"></a>
2
+
3
+ # Command Line
4
+
5
+ This page documents Pi's built-in command-line commands and options. Run `pi --help` or append `--help` to a command for the exact interface in your installed version. The top-level help also includes options registered by loaded extensions.
6
+
7
+ ```sh
8
+ pi [options] [--] [@files...] [messages...]
9
+ pi install <source> [options]
10
+ pi remove <source> [options]
11
+ pi uninstall <source> [options]
12
+ pi update [target] [options]
13
+ pi list
14
+ pi config [options]
15
+ pi auth <check|print-api-key|print-bearer-token> [options]
16
+ pi mcp <list|login|logout> [options]
17
+ ```
18
+
19
+ <a id="modes"></a>
20
+
21
+ ## Invocation and output
22
+
23
+ ```sh
24
+ pi
25
+ pi --print "Summarize this repository"
26
+ git diff | pi --print "Review this change"
27
+ pi --mode json "Inspect this repository" > events.jsonl
28
+ ```
29
+
30
+ With terminal stdin and stdout, Pi opens the terminal UI unless `--print`, `--mode json`, or `--mode rpc` selects another interface. When either stream is redirected and neither JSON nor RPC mode is selected, Pi uses print mode. See [CLI Integration](cli-integration.md) for choosing between interactive, print, JSON, RPC, and SDK integration.
31
+
32
+ | Input | Behavior |
33
+ |---|---|
34
+ | `message` | Provide an initial prompt |
35
+ | `@path` | Include a text file or image in the first prompt |
36
+ | Piped stdin | Prepend its contents to the first prompt |
37
+ | `--` | Stop option parsing so a prompt can begin with `-` |
38
+
39
+ Pi resolves `@path` from the current working directory. The working directory also controls project configuration, resource discovery, and session grouping.
40
+
41
+ `--print` controls whether Pi runs once and exits. `--mode` selects the output interface. `--mode text` does not force one-shot execution when stdin and stdout are terminals; use `--print` for that behavior.
42
+
43
+ | Option | Behavior |
44
+ |---|---|
45
+ | `-p`, `--print` | Run the supplied prompts, write the final assistant text to stdout, then exit |
46
+ | `--mode text` | Select text output; still open the terminal UI when stdin and stdout are terminals |
47
+ | `--mode json` | Run the supplied prompts, write JSONL events to stdout, then exit |
48
+ | `--mode rpc` | Read JSONL commands from stdin and write responses and events to stdout until shutdown |
49
+ | `--export <input> [output]` | Export a session file to HTML and exit; derive the destination when `output` is omitted |
50
+
51
+ RPC mode rejects `@file` arguments. JSON and RPC modes reserve stdout for protocol records. See [JSON Event Stream](json.md) and [RPC Protocol](rpc.md).
52
+
53
+ <a id="model-options"></a>
54
+
55
+ ## Models
56
+
57
+ ```sh
58
+ pi --model sonnet:high
59
+ ```
60
+
61
+ See [Choose a Model](models.md) for model selection and [Providers](providers.md) for credentials.
62
+
63
+ - `--provider <name>`<br>
64
+ Selects the provider for `--model`. It requires `--model`. Provider names ignore case only when that leaves a single match.
65
+ - `--model <id>`<br>
66
+ Selects one exact catalog ID as `provider/id` or with `--provider`. Case is ignored only when that leaves a single match. A bare ID offered by several providers requires a provider. One trailing `:<thinking>` suffix is parsed only when the full string is not a catalog ID.
67
+ - `--api-key <key>`<br>
68
+ Uses a non-persistent API-key override. It requires a model selected through `--model` or `--models`. It does not choose between providers that offer the same model.
69
+ - `--thinking <level>`<br>
70
+ Sets `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`. It overrides a `--model` suffix and is clamped to the model's capabilities.
71
+ - `--models <ids>`<br>
72
+ Sets a comma-separated scope for startup and cycling. It accepts exact IDs, globs (`*`, `?`, `[...]`), and optional `:<thinking>` suffixes. An entry that matches nothing fails startup.
73
+ - `--list-models [search]`<br>
74
+ Lists available models, optionally filtered by a fuzzy search, then exits.
75
+
76
+ <a id="session-options"></a>
77
+
78
+ ## Sessions
79
+
80
+ ```sh
81
+ pi --continue
82
+ ```
83
+
84
+ See [Sessions and Context](sessions.md) for resuming, forking, naming, and storing sessions.
85
+
86
+ - `-c`, `--continue`<br>
87
+ Continues the most recent session for the current project.
88
+ - `-r`, `--resume`<br>
89
+ Opens the session selector.
90
+ - `--session <path|id>`<br>
91
+ Opens by file path, exact ID, or partial ID. Pi searches the current project first and offers to fork a cross-project match.
92
+ - `--session-id <id>`<br>
93
+ Opens the exact project session ID or creates it if absent. IDs accept letters, numbers, `.`, `_`, and `-`.
94
+ - `--fork <path|id>`<br>
95
+ Forks an existing session into a new session for the current project.
96
+ - `--session-dir <dir>`<br>
97
+ Overrides storage and lookup. It takes precedence over `PI_CODING_AGENT_SESSION_DIR` and the `sessionDir` setting.
98
+ - `--no-session`<br>
99
+ Uses an in-memory session that is not persisted.
100
+ - `-n`, `--name <name>`<br>
101
+ Sets the session display name.
102
+
103
+ Constraints:
104
+
105
+ - Session IDs must start and end with a letter or number.
106
+ - `--fork` cannot be combined with `--session`, `--continue`, `--resume`, or `--no-session`.
107
+ - `--session-id` cannot be combined with `--session`, `--continue`, or `--resume`. Combine it with `--fork` to choose the new ID.
108
+
109
+ <a id="tool-options"></a>
110
+
111
+ ## Tools
112
+
113
+ ```sh
114
+ pi --tools read,grep,find,ls --print "Review this project"
115
+ ```
116
+
117
+ See [Settings](settings.md#tools) for configuring the default tool selection.
118
+
119
+ - `-t`, `--tools <list>`<br>
120
+ Replaces the default selection with a comma-separated allowlist of built-in, extension, or custom tools. Entries are tool names or patterns where `*` matches any characters. MCP tools are kept unless an entry starts with `mcp__` (see [MCP tools](#mcp-tools)). A list of only `+name` and `-name` entries is not an allowlist; it changes the default selection instead.
121
+ - `-xt`, `--exclude-tools <list>`<br>
122
+ Disables comma-separated tool names or patterns after all other selection options, MCP tools included.
123
+ - `-nbt`, `--no-builtin-tools`<br>
124
+ Disables default built-in tools while retaining extension and custom tools.
125
+ - `-nt`, `--no-tools`<br>
126
+ Starts with all built-in, extension, custom, and MCP tools disabled.
127
+
128
+ Default enabled tools are `read`, `bash`, `edit`, and `write`, unless `defaultTools` changes them. `--tools` with plain names replaces the whole selection, so name every tool you want. Like `defaultTools`, it also accepts a list of only `+name` and `-name` entries, which adds tools to or removes them from the default selection: `pi --tools +codemode,-write` keeps the other default tools, enables `codemode`, and disables `write`. These entries take exact tool names, not `*` patterns; use `--exclude-tools` to disable tools by pattern. Plain names and `+name`/`-name` entries cannot be mixed. `/reload` enables tools newly added to `defaultTools`, but a tool removed with `-name` stays removed.
129
+
130
+ <a id="mcp-tools"></a>
131
+
132
+ `--tools` selects the tools declared to the model. It does not remove MCP tools, whose reach is set by their [exposure](mcp.md#control-tool-exposure): `pi --tools read,codemode` keeps every MCP tool callable from codemode scripts. An MCP tool that no entry names or matches is never declared directly, whatever its exposure; only `tool_search`, if listed, can load it. Once an entry starts with `mcp__`, `--tools` filters MCP tools too, so this keeps only the tools of the `radius` server:
133
+
134
+ ```sh
135
+ pi --tools read,bash,codemode,'mcp__radius__*'
136
+ ```
137
+
138
+ The MCP resource tools (`list_mcp_resources`, `list_mcp_resource_templates`, `read_mcp_resource`) count as MCP tools. To remove MCP tools, use `--exclude-tools 'mcp__*'` or [`--no-mcp`](#resource-options).
139
+
140
+ | Built-in | Purpose |
141
+ |---|---|
142
+ | `read` | Read text files and supported images |
143
+ | `bash` | Run shell commands |
144
+ | `powershell` | Run PowerShell commands on Windows |
145
+ | `edit` | Apply exact text replacements to an existing file |
146
+ | `write` | Create or overwrite a file |
147
+ | `grep` | Search file contents |
148
+ | `find` | Find paths using glob patterns |
149
+ | `ls` | List directory contents |
150
+
151
+ Built-in extensions add two more tools. They are off by default; the MCP extension turns them on when an MCP server needs them (see [MCP](mcp.md#exposure)). To enable them yourself, name them in `--tools` or `defaultTools`.
152
+
153
+ | Built-in extension | Purpose |
154
+ |---|---|
155
+ | `codemode` | Run JavaScript that calls the other tools, for example in parallel with `Promise.allSettled`; only the script's output reaches the model |
156
+ | `tool_search` | Search tools that are not declared to the model (`codemode` and `deferred` exposure, such as MCP tools) and declare the matches for the next call |
157
+
158
+ ### Enable codemode
159
+
160
+ To turn on `codemode` for every session, add it to the default tools in `~/.pi/agent/settings.json` or a project's `.pi/settings.json`:
161
+
162
+ ```json
163
+ {
164
+ "defaultTools": ["+codemode"]
165
+ }
166
+ ```
167
+
168
+ This keeps `read`, `bash`, `edit`, and `write` and adds `codemode`. For one invocation, add it with `--tools`:
169
+
170
+ ```sh
171
+ pi --tools +codemode
172
+ ```
173
+
174
+ Codemode is useful without MCP: scripts can run several tool calls in parallel, filter large output before it reaches the model, call classifier models such as TypeSafe's Jev through `models.classify()` (see [Classifier models](models.md#use-classifier-models)), and generate images through `models.generateImages()` (see [Image models](models.md#use-image-models)).
175
+
176
+ ### How codemode works
177
+
178
+ Scripts run in a QuickJS sandbox and reach the other tools through `tools.<name>(args)`. [Codemode](codemode.md) describes the script API, how tools are listed and found, the `store()` and `models` globals, and the limits.
179
+
180
+ ### Tool search
181
+
182
+ `tool_search` is off by default; enable it with `"defaultTools": ["+tool_search"]` or `--tools`. It uses the same ranking as `searchTools()` over tools that are not declared yet and declares the matches for the next model call. Loaded tools are recorded in the session like other tool changes, so they stay declared on that branch.
183
+
184
+ <a id="resource-options"></a>
185
+
186
+ ## Resources
187
+
188
+ ```sh
189
+ pi --extension ./review.ts
190
+ ```
191
+
192
+ See [Configuration](configuration.md) for conventional directories and project trust, [Settings](settings.md#resources) for configured paths, and [Pi Packages](packages.md) for package sources.
193
+
194
+ - `-e`, `--extension <path>`<br>
195
+ Loads an extension file or directory, or a built-in extension such as `builtin:mcp`, and is repeatable.
196
+ - `-ne`, `--no-extensions`<br>
197
+ Disables discovered, configured, and built-in extensions. Explicit `-e` paths still load, so `pi -ne -e builtin:mcp` keeps only the built-in MCP support.
198
+ - `--no-mcp`<br>
199
+ Disables the built-in MCP support for this run: no servers connect, and there are no MCP tools or `/mcp`. It does not affect an extension that replaces the built-in MCP support.
200
+ - `--skill <path>`<br>
201
+ Loads a skill file or directory and is repeatable.
202
+ - `-ns`, `--no-skills`<br>
203
+ Disables discovered and configured skills. Explicit `--skill` paths still load.
204
+ - `--prompt-template <path>`<br>
205
+ Loads a prompt-template file or directory and is repeatable.
206
+ - `-np`, `--no-prompt-templates`<br>
207
+ Disables discovered and configured templates. Explicit `--prompt-template` paths still load.
208
+ - `--theme <path>`<br>
209
+ Loads a theme file or directory and is repeatable.
210
+ - `--use-theme <name[/name]>`<br>
211
+ Selects the initial interactive theme for this run.
212
+ - `--no-themes`<br>
213
+ Disables discovered and configured themes. Explicit `--theme` paths still load.
214
+ - `-nc`, `--no-context-files`<br>
215
+ Disables `AGENTS.md` and `CLAUDE.md` discovery.
216
+
217
+ Resource paths apply only to the current process. Relative paths resolve from the current working directory.
218
+
219
+ <a id="prompt-and-display-options"></a>
220
+
221
+ ## Prompts and process
222
+
223
+ ```sh
224
+ pi --append-system-prompt ./instructions.md
225
+ ```
226
+
227
+ See [Configuration](configuration.md) for saved configuration, [Security](security.md#understand-project-trust) for project trust, and [Environment Variables](environment-variables.md) for process controls.
228
+
229
+ - `--system-prompt <text|path>`<br>
230
+ Replaces the default system prompt with text or the contents of an existing file.
231
+ - `--append-system-prompt <text|path>`<br>
232
+ Appends text or an existing file to the system prompt and is repeatable.
233
+ - `--tui-mode <mode>`<br>
234
+ Uses `fullscreen` (default) or `regular` terminal mode.
235
+ - `--verbose`<br>
236
+ Shows verbose interactive startup information, overriding `quietStartup`.
237
+ - `-a`, `--approve`<br>
238
+ Trusts project-local configuration and resources for this process.
239
+ - `-na`, `--no-approve`<br>
240
+ Ignores trust-gated project-local configuration and resources for this process.
241
+ - `--offline`<br>
242
+ Disables automatic network activity, including model catalog refreshes. Equivalent to `PI_OFFLINE=1`.
243
+ - `-h`, `--help`<br>
244
+ Shows help, including flags registered by loaded extensions, then exits.
245
+ - `-v`, `--version`<br>
246
+ Shows the Pi version, then exits.
247
+
248
+ Extensions may register additional long-form options. Unknown short options are rejected.
249
+
250
+ ## Package commands
251
+
252
+ ```sh
253
+ pi install npm:@scope/package
254
+ ```
255
+
256
+ See [Pi Packages](packages.md) for source formats, filtering, installation, and project scope.
257
+
258
+ ### Common tasks
259
+
260
+ | Task | Command |
261
+ |---|---|
262
+ | Install a package | `pi install <source>` |
263
+ | List configured packages | `pi list` |
264
+ | Remove a package and its settings entry | `pi remove <source>` |
265
+ | Configure which package resources load | `pi config` |
266
+
267
+ Add `--local` or `-l` to `install`, `remove`, `uninstall`, or `config` to use project settings instead of global settings.
268
+
269
+ ### Update Pi or packages
270
+
271
+ Running `pi update` without a target updates Pi itself.
272
+
273
+ | Task | Command |
274
+ |---|---|
275
+ | Update Pi | `pi update` |
276
+ | Update all installed packages | `pi update --extensions` |
277
+ | Update one installed package | `pi update <source>` |
278
+ | Refresh model catalogs | `pi update --models` |
279
+ | Update Pi and all installed packages | `pi update --all` |
280
+
281
+ Add `--force` to reinstall Pi when the selected update includes Pi.
282
+
283
+ `pi update` cannot update Pi when another package manager provides it, such as Nix. Update Pi with that package manager, for example `nix profile upgrade pi`. Package and model catalog updates still work.
284
+
285
+ ### Aliases and command options
286
+
287
+ - `pi uninstall <source>` is an alias for `pi remove <source>`.
288
+ - `pi update --self`, `pi update self`, and `pi update pi` are aliases for `pi update`.
289
+ - `pi update --extension <source>` is an alias for `pi update <source>`.
290
+ - `-a`, `--approve` trusts project-local files for one command. `-na`, `--no-approve` ignores trust-gated project-local files.
291
+ - Append `-h` or `--help` to a command for its exact usage and option constraints.
292
+
293
+ ## Credential commands
294
+
295
+ ```sh
296
+ pi auth check --provider openai --json
297
+ ```
298
+
299
+ Authentication commands require `--provider <provider>` or `--model <model>`. See [Providers](providers.md) for supported methods.
300
+
301
+ | Command | Description |
302
+ |---|---|
303
+ | `pi auth check` | Print `ready`, `not_ready`, or `invalid`; exit with status `0`, `1`, or `2`, respectively |
304
+ | `pi auth print-api-key` | Print the resolved API key |
305
+ | `pi auth print-bearer-token` | Print a resolved OAuth bearer token |
306
+
307
+ | Option | Applies to | Description |
308
+ |---|---|---|
309
+ | `--provider <provider>` | All | Resolve credentials for a provider |
310
+ | `--model <model>` | All | Resolve credentials from a model; may be combined with `--provider` |
311
+ | `--json` | `auth check` | Write the structured result as JSON |
312
+ | `--credentials` | `auth check` | Emit the resolved credential when ready |
313
+ | `--no-refresh` | `auth check` | Do not refresh expired OAuth credentials; refresh is the default |
314
+ | `--min-expiry <duration>` | `print-bearer-token` | Require remaining token lifetime using `ms`, `s`, `m`, or `h`, such as `30m` |
315
+
316
+ Credential-printing commands write secrets to stdout.
317
+
318
+ ## MCP commands
319
+
320
+ These commands work outside a session, so agents can run them through `bash`. See [MCP Servers](mcp.md).
321
+
322
+ | Command | Description |
323
+ |---|---|
324
+ | `pi mcp add <server> [options] -- <command> [args...]` | Add or replace a stdio server in `mcp.json`; `--env KEY=VALUE` (repeatable) and `--cwd <dir>` set its environment and working directory. Arguments after the command are passed to it |
325
+ | `pi mcp add <server> [options] --url <url>` | Add or replace a streamable HTTP server; `--header KEY=VALUE` (repeatable), `--bearer-token-env-var <NAME>` (sends `Authorization: Bearer ${NAME}`), `--oauth-client-id`, `--oauth-client-secret`, `--oauth-callback-port`, and `--oauth-client-name` configure authentication |
326
+ | `pi mcp remove <server>` | Remove a server from `mcp.json`; stored OAuth credentials are kept |
327
+ | `pi mcp list [--json]` | Connect to every enabled server and print its state, tools, and errors; exit with `1` when a config entry is invalid or an enabled server is not connected |
328
+ | `pi mcp login <server> [--timeout <seconds>]` | Sign in to an OAuth server: open the authorization page and wait for the browser; a terminal also accepts the pasted redirect URL. `--timeout` limits the whole sign-in, including requests to the authorization server (default 300 seconds) |
329
+ | `pi mcp logout <server>` | Delete the stored OAuth credentials of a server |
330
+
331
+ `add` and `remove` change `~/.pi/agent/mcp.json`, or `.pi/mcp.json` in the current directory with `--local` (`-l`). `add` also takes `--exposure <mode>` (see [Exposure](mcp.md#exposure)) and `--description <text>` and does not connect; run `pi mcp list` to check the server.
332
+
333
+ Project `.pi/mcp.json` files are only read for projects that are already trusted.