@dc99-tech/pi-agent-port 0.0.0-stage → 1.8.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 (1345) hide show
  1. package/CHANGELOG.md +6869 -0
  2. package/README.md +94 -2
  3. package/dist/bun/cli.d.ts +5 -0
  4. package/dist/bun/cli.d.ts.map +1 -0
  5. package/dist/bun/cli.js +5 -0
  6. package/dist/bun/cli.js.map +1 -0
  7. package/dist/bun/restore-sandbox-env.d.ts +17 -0
  8. package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
  9. package/dist/bun/restore-sandbox-env.js +36 -0
  10. package/dist/bun/restore-sandbox-env.js.map +1 -0
  11. package/dist/bun/runtime-setup.d.ts +2 -0
  12. package/dist/bun/runtime-setup.d.ts.map +1 -0
  13. package/dist/bun/runtime-setup.js +12 -0
  14. package/dist/bun/runtime-setup.js.map +1 -0
  15. package/dist/bun/sandbox-env-setup.d.ts +2 -0
  16. package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
  17. package/dist/bun/sandbox-env-setup.js +4 -0
  18. package/dist/bun/sandbox-env-setup.js.map +1 -0
  19. package/dist/bundle/chunks/anthropic-messages-SWCN23VS.js +3 -0
  20. package/dist/bundle/chunks/anthropic.js +75 -0
  21. package/dist/bundle/chunks/azure-openai-responses-FRC5DTVL.js +2 -0
  22. package/dist/bundle/chunks/bedrock-converse-stream.js +89 -0
  23. package/dist/bundle/chunks/chunk-2BKJ4UF2.js +6 -0
  24. package/dist/bundle/chunks/chunk-33FKGSAH.js +16 -0
  25. package/dist/bundle/chunks/chunk-4B3RNLSW.js +2 -0
  26. package/dist/bundle/chunks/chunk-4DISLNSG.js +131 -0
  27. package/dist/bundle/chunks/chunk-4FWPIAHX.js +2 -0
  28. package/dist/bundle/chunks/chunk-4L3MQGA6.js +2 -0
  29. package/dist/bundle/chunks/chunk-6C7H734F.js +10 -0
  30. package/dist/bundle/chunks/chunk-6TM2SQMT.js +2 -0
  31. package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
  32. package/dist/bundle/chunks/chunk-B3DKXRUQ.js +82 -0
  33. package/dist/bundle/chunks/chunk-BAOCMAMT.js +55 -0
  34. package/dist/bundle/chunks/chunk-BBP2Z2DD.js +8 -0
  35. package/dist/bundle/chunks/chunk-BPLBWOLJ.js +2 -0
  36. package/dist/bundle/chunks/chunk-BTGPNJEB.js +4 -0
  37. package/dist/bundle/chunks/chunk-DAYSTLCZ.js +6 -0
  38. package/dist/bundle/chunks/chunk-ECTDTFL5.js +20 -0
  39. package/dist/bundle/chunks/chunk-EHU5OVTX.js +31 -0
  40. package/dist/bundle/chunks/chunk-G5LK5KU5.js +6 -0
  41. package/dist/bundle/chunks/chunk-GBWJSTPQ.js +14 -0
  42. package/dist/bundle/chunks/chunk-HAJWZYW4.js +2 -0
  43. package/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  44. package/dist/bundle/chunks/chunk-JKGU7UID.js +2 -0
  45. package/dist/bundle/chunks/chunk-K27W3G2V.js +2 -0
  46. package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
  47. package/dist/bundle/chunks/chunk-L6EYYEJG.js +2 -0
  48. package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  49. package/dist/bundle/chunks/chunk-N2K4QL4L.js +2 -0
  50. package/dist/bundle/chunks/chunk-OVXT2WQH.js +2 -0
  51. package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
  52. package/dist/bundle/chunks/chunk-PEHEJLCN.js +12 -0
  53. package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
  54. package/dist/bundle/chunks/chunk-PHM5C7IG.js +9 -0
  55. package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
  56. package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
  57. package/dist/bundle/chunks/chunk-R27YHKNY.js +20 -0
  58. package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  59. package/dist/bundle/chunks/chunk-SNECLPFF.js +2 -0
  60. package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
  61. package/dist/bundle/chunks/chunk-VCHTZPKH.js +44 -0
  62. package/dist/bundle/chunks/chunk-VZAIXDTE.js +1231 -0
  63. package/dist/bundle/chunks/chunk-XAIIWE4F.js +2 -0
  64. package/dist/bundle/chunks/chunk-XHDJEUAZ.js +2 -0
  65. package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  66. package/dist/bundle/chunks/chunk-ZI7BUGBL.js +2 -0
  67. package/dist/bundle/chunks/chunk-ZXP6YLJ3.js +30 -0
  68. package/dist/bundle/chunks/cli-A2LCJL6E.js +53 -0
  69. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-ZWIKTC23.js +2 -0
  70. package/dist/bundle/chunks/codemode-worker.js +480 -0
  71. package/dist/bundle/chunks/easter-egg-3d-66LIJQZ5.js +2 -0
  72. package/dist/bundle/chunks/execute-NLWBUNAS.js +507 -0
  73. package/dist/bundle/chunks/github-copilot.js +2 -0
  74. package/dist/bundle/chunks/google-generative-ai-FF5STOZK.js +2 -0
  75. package/dist/bundle/chunks/google-vertex-JZ74TCHU.js +2 -0
  76. package/dist/bundle/chunks/https-proxy-agent-RQUICABB.js +13 -0
  77. package/dist/bundle/chunks/image-resize-worker.js +2 -0
  78. package/dist/bundle/chunks/jiti-loader-GBP77AXV.js +21 -0
  79. package/dist/bundle/chunks/jiti-static-loader-LHACV52N.js +2 -0
  80. package/dist/bundle/chunks/kimi-coding.js +2 -0
  81. package/dist/bundle/chunks/lib-Z7PEFB5H.js +9 -0
  82. package/dist/bundle/chunks/llama-cpp-classify-ZW56O6EU.js +22 -0
  83. package/dist/bundle/chunks/meta.js +2 -0
  84. package/dist/bundle/chunks/mistral-conversations-7N4JLNBC.js +4 -0
  85. package/dist/bundle/chunks/multipart-parser-5Y3PUG54.js +3 -0
  86. package/dist/bundle/chunks/node-2ZBPDJEZ.js +2 -0
  87. package/dist/bundle/chunks/node-SPQY26DM.js +16 -0
  88. package/dist/bundle/chunks/openai-chatgpt.js +75 -0
  89. package/dist/bundle/chunks/openai-codex-responses-NNLPUFCK.js +2 -0
  90. package/dist/bundle/chunks/openai-codex.js +75 -0
  91. package/dist/bundle/chunks/openai-completions-NF2ENYQ5.js +7 -0
  92. package/dist/bundle/chunks/openai-decisions-CBP44RZ6.js +5 -0
  93. package/dist/bundle/chunks/openai-responses-ZNQ6ER6E.js +4 -0
  94. package/dist/bundle/chunks/openrouter-chat-images-2UBZZGSM.js +2 -0
  95. package/dist/bundle/chunks/openrouter-images-TMB5UU2K.js +4 -0
  96. package/dist/bundle/chunks/openrouter.js +75 -0
  97. package/dist/bundle/chunks/pi-decision-OPRNN7CY.js +2 -0
  98. package/dist/bundle/chunks/pi-image-O2HLYVOH.js +2 -0
  99. package/dist/bundle/chunks/pi-messages-TZ7C2IOR.js +2 -0
  100. package/dist/bundle/chunks/radius.js +75 -0
  101. package/dist/bundle/chunks/runtime-BOID4AB3.js +2 -0
  102. package/dist/bundle/chunks/src-EGHG6VJB.js +4 -0
  103. package/dist/bundle/chunks/typesafe-system-one-5RYB4F72.js +2 -0
  104. package/dist/bundle/chunks/virtual-modules-T3EVEWPN.js +2 -0
  105. package/dist/bundle/chunks/xai.js +2 -0
  106. package/dist/bundle/cli-runtime.js +3 -0
  107. package/dist/bundle/cli.js +7 -0
  108. package/dist/bundle/index.js +2 -0
  109. package/dist/bundle/rpc-entry.js +3 -0
  110. package/dist/cli/agent-dir-arg.d.ts +20 -0
  111. package/dist/cli/agent-dir-arg.d.ts.map +1 -0
  112. package/dist/cli/agent-dir-arg.js +38 -0
  113. package/dist/cli/agent-dir-arg.js.map +1 -0
  114. package/dist/cli/args.d.ts +68 -0
  115. package/dist/cli/args.d.ts.map +1 -0
  116. package/dist/cli/args.js +518 -0
  117. package/dist/cli/args.js.map +1 -0
  118. package/dist/cli/auth-check.d.ts +19 -0
  119. package/dist/cli/auth-check.d.ts.map +1 -0
  120. package/dist/cli/auth-check.js +50 -0
  121. package/dist/cli/auth-check.js.map +1 -0
  122. package/dist/cli/auth-command.d.ts +24 -0
  123. package/dist/cli/auth-command.d.ts.map +1 -0
  124. package/dist/cli/auth-command.js +127 -0
  125. package/dist/cli/auth-command.js.map +1 -0
  126. package/dist/cli/auth-login.d.ts +15 -0
  127. package/dist/cli/auth-login.d.ts.map +1 -0
  128. package/dist/cli/auth-login.js +232 -0
  129. package/dist/cli/auth-login.js.map +1 -0
  130. package/dist/cli/auth-logout.d.ts +14 -0
  131. package/dist/cli/auth-logout.d.ts.map +1 -0
  132. package/dist/cli/auth-logout.js +57 -0
  133. package/dist/cli/auth-logout.js.map +1 -0
  134. package/dist/cli/auth-terminal.d.ts +17 -0
  135. package/dist/cli/auth-terminal.d.ts.map +1 -0
  136. package/dist/cli/auth-terminal.js +63 -0
  137. package/dist/cli/auth-terminal.js.map +1 -0
  138. package/dist/cli/config-selector.d.ts +16 -0
  139. package/dist/cli/config-selector.d.ts.map +1 -0
  140. package/dist/cli/config-selector.js +37 -0
  141. package/dist/cli/config-selector.js.map +1 -0
  142. package/dist/cli/credential-print.d.ts +13 -0
  143. package/dist/cli/credential-print.d.ts.map +1 -0
  144. package/dist/cli/credential-print.js +76 -0
  145. package/dist/cli/credential-print.js.map +1 -0
  146. package/dist/cli/file-processor.d.ts +15 -0
  147. package/dist/cli/file-processor.d.ts.map +1 -0
  148. package/dist/cli/file-processor.js +71 -0
  149. package/dist/cli/file-processor.js.map +1 -0
  150. package/dist/cli/initial-message.d.ts +18 -0
  151. package/dist/cli/initial-message.d.ts.map +1 -0
  152. package/dist/cli/initial-message.js +22 -0
  153. package/dist/cli/initial-message.js.map +1 -0
  154. package/dist/cli/list-models.d.ts +9 -0
  155. package/dist/cli/list-models.d.ts.map +1 -0
  156. package/dist/cli/list-models.js +93 -0
  157. package/dist/cli/list-models.js.map +1 -0
  158. package/dist/cli/project-trust.d.ts +10 -0
  159. package/dist/cli/project-trust.d.ts.map +1 -0
  160. package/dist/cli/project-trust.js +48 -0
  161. package/dist/cli/project-trust.js.map +1 -0
  162. package/dist/cli/session-picker.d.ts +10 -0
  163. package/dist/cli/session-picker.d.ts.map +1 -0
  164. package/dist/cli/session-picker.js +39 -0
  165. package/dist/cli/session-picker.js.map +1 -0
  166. package/dist/cli/setup.d.ts +2 -0
  167. package/dist/cli/setup.d.ts.map +1 -0
  168. package/dist/cli/setup.js +12 -0
  169. package/dist/cli/setup.js.map +1 -0
  170. package/dist/cli/startup-ui.d.ts +21 -0
  171. package/dist/cli/startup-ui.d.ts.map +1 -0
  172. package/dist/cli/startup-ui.js +191 -0
  173. package/dist/cli/startup-ui.js.map +1 -0
  174. package/dist/cli.d.ts +3 -0
  175. package/dist/cli.d.ts.map +1 -0
  176. package/dist/cli.js +6 -0
  177. package/dist/cli.js.map +1 -0
  178. package/dist/config.d.ts +141 -0
  179. package/dist/config.d.ts.map +1 -0
  180. package/dist/config.js +567 -0
  181. package/dist/config.js.map +1 -0
  182. package/dist/core/agent-session-runtime.d.ts +135 -0
  183. package/dist/core/agent-session-runtime.d.ts.map +1 -0
  184. package/dist/core/agent-session-runtime.js +352 -0
  185. package/dist/core/agent-session-runtime.js.map +1 -0
  186. package/dist/core/agent-session-services.d.ts +86 -0
  187. package/dist/core/agent-session-services.d.ts.map +1 -0
  188. package/dist/core/agent-session-services.js +153 -0
  189. package/dist/core/agent-session-services.js.map +1 -0
  190. package/dist/core/agent-session.d.ts +979 -0
  191. package/dist/core/agent-session.d.ts.map +1 -0
  192. package/dist/core/agent-session.js +3772 -0
  193. package/dist/core/agent-session.js.map +1 -0
  194. package/dist/core/auth-guidance.d.ts +5 -0
  195. package/dist/core/auth-guidance.d.ts.map +1 -0
  196. package/dist/core/auth-guidance.js +21 -0
  197. package/dist/core/auth-guidance.js.map +1 -0
  198. package/dist/core/auth-storage.d.ts +72 -0
  199. package/dist/core/auth-storage.d.ts.map +1 -0
  200. package/dist/core/auth-storage.js +440 -0
  201. package/dist/core/auth-storage.js.map +1 -0
  202. package/dist/core/bash-executor.d.ts +34 -0
  203. package/dist/core/bash-executor.d.ts.map +1 -0
  204. package/dist/core/bash-executor.js +114 -0
  205. package/dist/core/bash-executor.js.map +1 -0
  206. package/dist/core/bug-report-upload.d.ts +12 -0
  207. package/dist/core/bug-report-upload.d.ts.map +1 -0
  208. package/dist/core/bug-report-upload.js +22 -0
  209. package/dist/core/bug-report-upload.js.map +1 -0
  210. package/dist/core/bug-report.d.ts +184 -0
  211. package/dist/core/bug-report.d.ts.map +1 -0
  212. package/dist/core/bug-report.js +292 -0
  213. package/dist/core/bug-report.js.map +1 -0
  214. package/dist/core/cache-stats.d.ts +49 -0
  215. package/dist/core/cache-stats.d.ts.map +1 -0
  216. package/dist/core/cache-stats.js +112 -0
  217. package/dist/core/cache-stats.js.map +1 -0
  218. package/dist/core/cache-warmer.d.ts +70 -0
  219. package/dist/core/cache-warmer.d.ts.map +1 -0
  220. package/dist/core/cache-warmer.js +278 -0
  221. package/dist/core/cache-warmer.js.map +1 -0
  222. package/dist/core/client-identity.d.ts +7 -0
  223. package/dist/core/client-identity.d.ts.map +1 -0
  224. package/dist/core/client-identity.js +14 -0
  225. package/dist/core/client-identity.js.map +1 -0
  226. package/dist/core/compaction/branch-summarization.d.ts +100 -0
  227. package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
  228. package/dist/core/compaction/branch-summarization.js +263 -0
  229. package/dist/core/compaction/branch-summarization.js.map +1 -0
  230. package/dist/core/compaction/compaction.d.ts +145 -0
  231. package/dist/core/compaction/compaction.d.ts.map +1 -0
  232. package/dist/core/compaction/compaction.js +752 -0
  233. package/dist/core/compaction/compaction.js.map +1 -0
  234. package/dist/core/compaction/index.d.ts +7 -0
  235. package/dist/core/compaction/index.d.ts.map +1 -0
  236. package/dist/core/compaction/index.js +7 -0
  237. package/dist/core/compaction/index.js.map +1 -0
  238. package/dist/core/compaction/utils.d.ts +45 -0
  239. package/dist/core/compaction/utils.d.ts.map +1 -0
  240. package/dist/core/compaction/utils.js +149 -0
  241. package/dist/core/compaction/utils.js.map +1 -0
  242. package/dist/core/crash-log.d.ts +28 -0
  243. package/dist/core/crash-log.d.ts.map +1 -0
  244. package/dist/core/crash-log.js +140 -0
  245. package/dist/core/crash-log.js.map +1 -0
  246. package/dist/core/defaults.d.ts +4 -0
  247. package/dist/core/defaults.d.ts.map +1 -0
  248. package/dist/core/defaults.js +11 -0
  249. package/dist/core/defaults.js.map +1 -0
  250. package/dist/core/diagnostics.d.ts +15 -0
  251. package/dist/core/diagnostics.d.ts.map +1 -0
  252. package/dist/core/diagnostics.js +2 -0
  253. package/dist/core/diagnostics.js.map +1 -0
  254. package/dist/core/event-bus.d.ts +9 -0
  255. package/dist/core/event-bus.d.ts.map +1 -0
  256. package/dist/core/event-bus.js +25 -0
  257. package/dist/core/event-bus.js.map +1 -0
  258. package/dist/core/exec.d.ts +38 -0
  259. package/dist/core/exec.d.ts.map +1 -0
  260. package/dist/core/exec.js +122 -0
  261. package/dist/core/exec.js.map +1 -0
  262. package/dist/core/experimental.d.ts +2 -0
  263. package/dist/core/experimental.d.ts.map +1 -0
  264. package/dist/core/experimental.js +4 -0
  265. package/dist/core/experimental.js.map +1 -0
  266. package/dist/core/export-html/ansi-to-html.d.ts +27 -0
  267. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
  268. package/dist/core/export-html/ansi-to-html.js +286 -0
  269. package/dist/core/export-html/ansi-to-html.js.map +1 -0
  270. package/dist/core/export-html/index.d.ts +37 -0
  271. package/dist/core/export-html/index.d.ts.map +1 -0
  272. package/dist/core/export-html/index.js +230 -0
  273. package/dist/core/export-html/index.js.map +1 -0
  274. package/dist/core/export-html/template.css +1085 -0
  275. package/dist/core/export-html/template.html +56 -0
  276. package/dist/core/export-html/template.js +2044 -0
  277. package/dist/core/export-html/tool-renderer.d.ts +34 -0
  278. package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
  279. package/dist/core/export-html/tool-renderer.js +112 -0
  280. package/dist/core/export-html/tool-renderer.js.map +1 -0
  281. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  282. package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  283. package/dist/core/export-html/vendor/marked.min.js +79 -0
  284. package/dist/core/extensions/index.d.ts +12 -0
  285. package/dist/core/extensions/index.d.ts.map +1 -0
  286. package/dist/core/extensions/index.js +9 -0
  287. package/dist/core/extensions/index.js.map +1 -0
  288. package/dist/core/extensions/jiti-loader.d.ts +2 -0
  289. package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
  290. package/dist/core/extensions/jiti-loader.js +4 -0
  291. package/dist/core/extensions/jiti-loader.js.map +1 -0
  292. package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
  293. package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
  294. package/dist/core/extensions/jiti-static-loader.js +4 -0
  295. package/dist/core/extensions/jiti-static-loader.js.map +1 -0
  296. package/dist/core/extensions/loader.d.ts +23 -0
  297. package/dist/core/extensions/loader.d.ts.map +1 -0
  298. package/dist/core/extensions/loader.js +732 -0
  299. package/dist/core/extensions/loader.js.map +1 -0
  300. package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
  301. package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
  302. package/dist/core/extensions/pi-ai-extension-view.js +22 -0
  303. package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
  304. package/dist/core/extensions/runner.d.ts +216 -0
  305. package/dist/core/extensions/runner.d.ts.map +1 -0
  306. package/dist/core/extensions/runner.js +1253 -0
  307. package/dist/core/extensions/runner.js.map +1 -0
  308. package/dist/core/extensions/types.d.ts +1824 -0
  309. package/dist/core/extensions/types.d.ts.map +1 -0
  310. package/dist/core/extensions/types.js +48 -0
  311. package/dist/core/extensions/types.js.map +1 -0
  312. package/dist/core/extensions/virtual-modules.d.ts +3 -0
  313. package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
  314. package/dist/core/extensions/virtual-modules.js +42 -0
  315. package/dist/core/extensions/virtual-modules.js.map +1 -0
  316. package/dist/core/extensions/wrapper.d.ts +20 -0
  317. package/dist/core/extensions/wrapper.d.ts.map +1 -0
  318. package/dist/core/extensions/wrapper.js +22 -0
  319. package/dist/core/extensions/wrapper.js.map +1 -0
  320. package/dist/core/footer-data-provider.d.ts +64 -0
  321. package/dist/core/footer-data-provider.d.ts.map +1 -0
  322. package/dist/core/footer-data-provider.js +336 -0
  323. package/dist/core/footer-data-provider.js.map +1 -0
  324. package/dist/core/http-dispatcher.d.ts +22 -0
  325. package/dist/core/http-dispatcher.d.ts.map +1 -0
  326. package/dist/core/http-dispatcher.js +98 -0
  327. package/dist/core/http-dispatcher.js.map +1 -0
  328. package/dist/core/index.d.ts +14 -0
  329. package/dist/core/index.d.ts.map +1 -0
  330. package/dist/core/index.js +13 -0
  331. package/dist/core/index.js.map +1 -0
  332. package/dist/core/key-id-schema.d.ts +6 -0
  333. package/dist/core/key-id-schema.d.ts.map +1 -0
  334. package/dist/core/key-id-schema.js +16 -0
  335. package/dist/core/key-id-schema.js.map +1 -0
  336. package/dist/core/keybindings-schema.d.ts +4 -0
  337. package/dist/core/keybindings-schema.d.ts.map +1 -0
  338. package/dist/core/keybindings-schema.js +16 -0
  339. package/dist/core/keybindings-schema.js.map +1 -0
  340. package/dist/core/keybindings.d.ts +560 -0
  341. package/dist/core/keybindings.d.ts.map +1 -0
  342. package/dist/core/keybindings.js +325 -0
  343. package/dist/core/keybindings.js.map +1 -0
  344. package/dist/core/mcp-config-schema.d.ts +83 -0
  345. package/dist/core/mcp-config-schema.d.ts.map +1 -0
  346. package/dist/core/mcp-config-schema.js +150 -0
  347. package/dist/core/mcp-config-schema.js.map +1 -0
  348. package/dist/core/mcp-servers.d.ts +80 -0
  349. package/dist/core/mcp-servers.d.ts.map +1 -0
  350. package/dist/core/mcp-servers.js +165 -0
  351. package/dist/core/mcp-servers.js.map +1 -0
  352. package/dist/core/messages.d.ts +81 -0
  353. package/dist/core/messages.d.ts.map +1 -0
  354. package/dist/core/messages.js +132 -0
  355. package/dist/core/messages.js.map +1 -0
  356. package/dist/core/model-config.d.ts +2049 -0
  357. package/dist/core/model-config.d.ts.map +1 -0
  358. package/dist/core/model-config.js +167 -0
  359. package/dist/core/model-config.js.map +1 -0
  360. package/dist/core/model-registry.d.ts +63 -0
  361. package/dist/core/model-registry.d.ts.map +1 -0
  362. package/dist/core/model-registry.js +144 -0
  363. package/dist/core/model-registry.js.map +1 -0
  364. package/dist/core/model-resolver.d.ts +129 -0
  365. package/dist/core/model-resolver.d.ts.map +1 -0
  366. package/dist/core/model-resolver.js +428 -0
  367. package/dist/core/model-resolver.js.map +1 -0
  368. package/dist/core/model-runtime.d.ts +150 -0
  369. package/dist/core/model-runtime.d.ts.map +1 -0
  370. package/dist/core/model-runtime.js +778 -0
  371. package/dist/core/model-runtime.js.map +1 -0
  372. package/dist/core/models-store.d.ts +22 -0
  373. package/dist/core/models-store.d.ts.map +1 -0
  374. package/dist/core/models-store.js +115 -0
  375. package/dist/core/models-store.js.map +1 -0
  376. package/dist/core/nested-tool-calls.d.ts +103 -0
  377. package/dist/core/nested-tool-calls.d.ts.map +1 -0
  378. package/dist/core/nested-tool-calls.js +179 -0
  379. package/dist/core/nested-tool-calls.js.map +1 -0
  380. package/dist/core/output-guard.d.ts +7 -0
  381. package/dist/core/output-guard.d.ts.map +1 -0
  382. package/dist/core/output-guard.js +89 -0
  383. package/dist/core/output-guard.js.map +1 -0
  384. package/dist/core/package-manager.d.ts +256 -0
  385. package/dist/core/package-manager.d.ts.map +1 -0
  386. package/dist/core/package-manager.js +2427 -0
  387. package/dist/core/package-manager.js.map +1 -0
  388. package/dist/core/pi-ai-schemas.d.ts +171 -0
  389. package/dist/core/pi-ai-schemas.d.ts.map +1 -0
  390. package/dist/core/pi-ai-schemas.js +21 -0
  391. package/dist/core/pi-ai-schemas.js.map +1 -0
  392. package/dist/core/pi-manifest.d.ts +9 -0
  393. package/dist/core/pi-manifest.d.ts.map +1 -0
  394. package/dist/core/pi-manifest.js +30 -0
  395. package/dist/core/pi-manifest.js.map +1 -0
  396. package/dist/core/preferred-providers.d.ts +17 -0
  397. package/dist/core/preferred-providers.d.ts.map +1 -0
  398. package/dist/core/preferred-providers.js +24 -0
  399. package/dist/core/preferred-providers.js.map +1 -0
  400. package/dist/core/project-trust.d.ts +15 -0
  401. package/dist/core/project-trust.d.ts.map +1 -0
  402. package/dist/core/project-trust.js +60 -0
  403. package/dist/core/project-trust.js.map +1 -0
  404. package/dist/core/prompt-templates.d.ts +59 -0
  405. package/dist/core/prompt-templates.d.ts.map +1 -0
  406. package/dist/core/prompt-templates.js +283 -0
  407. package/dist/core/prompt-templates.js.map +1 -0
  408. package/dist/core/provider-composer.d.ts +82 -0
  409. package/dist/core/provider-composer.d.ts.map +1 -0
  410. package/dist/core/provider-composer.js +495 -0
  411. package/dist/core/provider-composer.js.map +1 -0
  412. package/dist/core/provider-matching.d.ts +6 -0
  413. package/dist/core/provider-matching.d.ts.map +1 -0
  414. package/dist/core/provider-matching.js +8 -0
  415. package/dist/core/provider-matching.js.map +1 -0
  416. package/dist/core/radius-mcp.d.ts +13 -0
  417. package/dist/core/radius-mcp.d.ts.map +1 -0
  418. package/dist/core/radius-mcp.js +29 -0
  419. package/dist/core/radius-mcp.js.map +1 -0
  420. package/dist/core/radius.d.ts +7 -0
  421. package/dist/core/radius.d.ts.map +1 -0
  422. package/dist/core/radius.js +10 -0
  423. package/dist/core/radius.js.map +1 -0
  424. package/dist/core/remote-catalog-provider.d.ts +23 -0
  425. package/dist/core/remote-catalog-provider.d.ts.map +1 -0
  426. package/dist/core/remote-catalog-provider.js +213 -0
  427. package/dist/core/remote-catalog-provider.js.map +1 -0
  428. package/dist/core/resolve-config-value.d.ts +32 -0
  429. package/dist/core/resolve-config-value.d.ts.map +1 -0
  430. package/dist/core/resolve-config-value.js +253 -0
  431. package/dist/core/resolve-config-value.js.map +1 -0
  432. package/dist/core/resource-loader.d.ts +237 -0
  433. package/dist/core/resource-loader.d.ts.map +1 -0
  434. package/dist/core/resource-loader.js +1027 -0
  435. package/dist/core/resource-loader.js.map +1 -0
  436. package/dist/core/runtime-credentials.d.ts +23 -0
  437. package/dist/core/runtime-credentials.d.ts.map +1 -0
  438. package/dist/core/runtime-credentials.js +53 -0
  439. package/dist/core/runtime-credentials.js.map +1 -0
  440. package/dist/core/sdk.d.ts +117 -0
  441. package/dist/core/sdk.d.ts.map +1 -0
  442. package/dist/core/sdk.js +329 -0
  443. package/dist/core/sdk.js.map +1 -0
  444. package/dist/core/session-cwd.d.ts +26 -0
  445. package/dist/core/session-cwd.d.ts.map +1 -0
  446. package/dist/core/session-cwd.js +46 -0
  447. package/dist/core/session-cwd.js.map +1 -0
  448. package/dist/core/session-export.d.ts +8 -0
  449. package/dist/core/session-export.d.ts.map +1 -0
  450. package/dist/core/session-export.js +33 -0
  451. package/dist/core/session-export.js.map +1 -0
  452. package/dist/core/session-manager.d.ts +433 -0
  453. package/dist/core/session-manager.d.ts.map +1 -0
  454. package/dist/core/session-manager.js +1569 -0
  455. package/dist/core/session-manager.js.map +1 -0
  456. package/dist/core/settings-defaults.d.ts +70 -0
  457. package/dist/core/settings-defaults.d.ts.map +1 -0
  458. package/dist/core/settings-defaults.js +71 -0
  459. package/dist/core/settings-defaults.js.map +1 -0
  460. package/dist/core/settings-diagnostics.d.ts +9 -0
  461. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  462. package/dist/core/settings-diagnostics.js +21 -0
  463. package/dist/core/settings-diagnostics.js.map +1 -0
  464. package/dist/core/settings-manager.d.ts +253 -0
  465. package/dist/core/settings-manager.d.ts.map +1 -0
  466. package/dist/core/settings-manager.js +1161 -0
  467. package/dist/core/settings-manager.js.map +1 -0
  468. package/dist/core/settings-schema.d.ts +245 -0
  469. package/dist/core/settings-schema.d.ts.map +1 -0
  470. package/dist/core/settings-schema.js +313 -0
  471. package/dist/core/settings-schema.js.map +1 -0
  472. package/dist/core/skills.d.ts +63 -0
  473. package/dist/core/skills.d.ts.map +1 -0
  474. package/dist/core/skills.js +409 -0
  475. package/dist/core/skills.js.map +1 -0
  476. package/dist/core/slash-commands.d.ts +15 -0
  477. package/dist/core/slash-commands.d.ts.map +1 -0
  478. package/dist/core/slash-commands.js +28 -0
  479. package/dist/core/slash-commands.js.map +1 -0
  480. package/dist/core/source-info.d.ts +35 -0
  481. package/dist/core/source-info.d.ts.map +1 -0
  482. package/dist/core/source-info.js +48 -0
  483. package/dist/core/source-info.js.map +1 -0
  484. package/dist/core/system-prompt.d.ts +77 -0
  485. package/dist/core/system-prompt.d.ts.map +1 -0
  486. package/dist/core/system-prompt.js +151 -0
  487. package/dist/core/system-prompt.js.map +1 -0
  488. package/dist/core/timings.d.ts +10 -0
  489. package/dist/core/timings.d.ts.map +1 -0
  490. package/dist/core/timings.js +41 -0
  491. package/dist/core/timings.js.map +1 -0
  492. package/dist/core/tools/bash.d.ts +103 -0
  493. package/dist/core/tools/bash.d.ts.map +1 -0
  494. package/dist/core/tools/bash.js +380 -0
  495. package/dist/core/tools/bash.js.map +1 -0
  496. package/dist/core/tools/edit-diff.d.ts +110 -0
  497. package/dist/core/tools/edit-diff.d.ts.map +1 -0
  498. package/dist/core/tools/edit-diff.js +562 -0
  499. package/dist/core/tools/edit-diff.js.map +1 -0
  500. package/dist/core/tools/edit.d.ts +44 -0
  501. package/dist/core/tools/edit.d.ts.map +1 -0
  502. package/dist/core/tools/edit.js +146 -0
  503. package/dist/core/tools/edit.js.map +1 -0
  504. package/dist/core/tools/file-mutation-queue.d.ts +6 -0
  505. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
  506. package/dist/core/tools/file-mutation-queue.js +52 -0
  507. package/dist/core/tools/file-mutation-queue.js.map +1 -0
  508. package/dist/core/tools/find.d.ts +42 -0
  509. package/dist/core/tools/find.d.ts.map +1 -0
  510. package/dist/core/tools/find.js +308 -0
  511. package/dist/core/tools/find.js.map +1 -0
  512. package/dist/core/tools/grep.d.ts +43 -0
  513. package/dist/core/tools/grep.d.ts.map +1 -0
  514. package/dist/core/tools/grep.js +266 -0
  515. package/dist/core/tools/grep.js.map +1 -0
  516. package/dist/core/tools/index.d.ts +43 -0
  517. package/dist/core/tools/index.d.ts.map +1 -0
  518. package/dist/core/tools/index.js +129 -0
  519. package/dist/core/tools/index.js.map +1 -0
  520. package/dist/core/tools/ls.d.ts +41 -0
  521. package/dist/core/tools/ls.d.ts.map +1 -0
  522. package/dist/core/tools/ls.js +127 -0
  523. package/dist/core/tools/ls.js.map +1 -0
  524. package/dist/core/tools/output-accumulator.d.ts +75 -0
  525. package/dist/core/tools/output-accumulator.d.ts.map +1 -0
  526. package/dist/core/tools/output-accumulator.js +223 -0
  527. package/dist/core/tools/output-accumulator.js.map +1 -0
  528. package/dist/core/tools/path-utils.d.ts +10 -0
  529. package/dist/core/tools/path-utils.d.ts.map +1 -0
  530. package/dist/core/tools/path-utils.js +99 -0
  531. package/dist/core/tools/path-utils.js.map +1 -0
  532. package/dist/core/tools/powershell.d.ts +16 -0
  533. package/dist/core/tools/powershell.d.ts.map +1 -0
  534. package/dist/core/tools/powershell.js +52 -0
  535. package/dist/core/tools/powershell.js.map +1 -0
  536. package/dist/core/tools/read.d.ts +68 -0
  537. package/dist/core/tools/read.d.ts.map +1 -0
  538. package/dist/core/tools/read.js +297 -0
  539. package/dist/core/tools/read.js.map +1 -0
  540. package/dist/core/tools/render-utils.d.ts +50 -0
  541. package/dist/core/tools/render-utils.d.ts.map +1 -0
  542. package/dist/core/tools/render-utils.js +153 -0
  543. package/dist/core/tools/render-utils.js.map +1 -0
  544. package/dist/core/tools/renderers/bash.d.ts +12 -0
  545. package/dist/core/tools/renderers/bash.d.ts.map +1 -0
  546. package/dist/core/tools/renderers/bash.js +95 -0
  547. package/dist/core/tools/renderers/bash.js.map +1 -0
  548. package/dist/core/tools/renderers/edit.d.ts +23 -0
  549. package/dist/core/tools/renderers/edit.d.ts.map +1 -0
  550. package/dist/core/tools/renderers/edit.js +168 -0
  551. package/dist/core/tools/renderers/edit.js.map +1 -0
  552. package/dist/core/tools/renderers/find.d.ts +10 -0
  553. package/dist/core/tools/renderers/find.d.ts.map +1 -0
  554. package/dist/core/tools/renderers/find.js +64 -0
  555. package/dist/core/tools/renderers/find.js.map +1 -0
  556. package/dist/core/tools/renderers/grep.d.ts +10 -0
  557. package/dist/core/tools/renderers/grep.d.ts.map +1 -0
  558. package/dist/core/tools/renderers/grep.js +69 -0
  559. package/dist/core/tools/renderers/grep.js.map +1 -0
  560. package/dist/core/tools/renderers/index.d.ts +28 -0
  561. package/dist/core/tools/renderers/index.d.ts.map +1 -0
  562. package/dist/core/tools/renderers/index.js +47 -0
  563. package/dist/core/tools/renderers/index.js.map +1 -0
  564. package/dist/core/tools/renderers/ls.d.ts +10 -0
  565. package/dist/core/tools/renderers/ls.d.ts.map +1 -0
  566. package/dist/core/tools/renderers/ls.js +58 -0
  567. package/dist/core/tools/renderers/ls.js.map +1 -0
  568. package/dist/core/tools/renderers/read.d.ts +11 -0
  569. package/dist/core/tools/renderers/read.d.ts.map +1 -0
  570. package/dist/core/tools/renderers/read.js +130 -0
  571. package/dist/core/tools/renderers/read.js.map +1 -0
  572. package/dist/core/tools/renderers/write.d.ts +10 -0
  573. package/dist/core/tools/renderers/write.d.ts.map +1 -0
  574. package/dist/core/tools/renderers/write.js +153 -0
  575. package/dist/core/tools/renderers/write.js.map +1 -0
  576. package/dist/core/tools/tool-definition-wrapper.d.ts +26 -0
  577. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
  578. package/dist/core/tools/tool-definition-wrapper.js +38 -0
  579. package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
  580. package/dist/core/tools/truncate.d.ts +74 -0
  581. package/dist/core/tools/truncate.d.ts.map +1 -0
  582. package/dist/core/tools/truncate.js +244 -0
  583. package/dist/core/tools/truncate.js.map +1 -0
  584. package/dist/core/tools/write.d.ts +30 -0
  585. package/dist/core/tools/write.d.ts.map +1 -0
  586. package/dist/core/tools/write.js +61 -0
  587. package/dist/core/tools/write.js.map +1 -0
  588. package/dist/core/trust-manager.d.ts +36 -0
  589. package/dist/core/trust-manager.d.ts.map +1 -0
  590. package/dist/core/trust-manager.js +210 -0
  591. package/dist/core/trust-manager.js.map +1 -0
  592. package/dist/core/usage-totals.d.ts +21 -0
  593. package/dist/core/usage-totals.d.ts.map +1 -0
  594. package/dist/core/usage-totals.js +84 -0
  595. package/dist/core/usage-totals.js.map +1 -0
  596. package/dist/core/virtual-models.d.ts +117 -0
  597. package/dist/core/virtual-models.d.ts.map +1 -0
  598. package/dist/core/virtual-models.js +124 -0
  599. package/dist/core/virtual-models.js.map +1 -0
  600. package/dist/extensions/codemode/execute.d.ts +16 -0
  601. package/dist/extensions/codemode/execute.d.ts.map +1 -0
  602. package/dist/extensions/codemode/execute.js +775 -0
  603. package/dist/extensions/codemode/execute.js.map +1 -0
  604. package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
  605. package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
  606. package/dist/extensions/codemode/execute.lazy.js +3 -0
  607. package/dist/extensions/codemode/execute.lazy.js.map +1 -0
  608. package/dist/extensions/codemode/index.d.ts +21 -0
  609. package/dist/extensions/codemode/index.d.ts.map +1 -0
  610. package/dist/extensions/codemode/index.js +33 -0
  611. package/dist/extensions/codemode/index.js.map +1 -0
  612. package/dist/extensions/codemode/renderer.d.ts +12 -0
  613. package/dist/extensions/codemode/renderer.d.ts.map +1 -0
  614. package/dist/extensions/codemode/renderer.js +147 -0
  615. package/dist/extensions/codemode/renderer.js.map +1 -0
  616. package/dist/extensions/codemode/tool.d.ts +125 -0
  617. package/dist/extensions/codemode/tool.d.ts.map +1 -0
  618. package/dist/extensions/codemode/tool.js +335 -0
  619. package/dist/extensions/codemode/tool.js.map +1 -0
  620. package/dist/extensions/codemode/worker.d.ts +7 -0
  621. package/dist/extensions/codemode/worker.d.ts.map +1 -0
  622. package/dist/extensions/codemode/worker.js +7 -0
  623. package/dist/extensions/codemode/worker.js.map +1 -0
  624. package/dist/extensions/index.d.ts +3 -0
  625. package/dist/extensions/index.d.ts.map +1 -0
  626. package/dist/extensions/index.js +13 -0
  627. package/dist/extensions/index.js.map +1 -0
  628. package/dist/extensions/llama/client.d.ts +74 -0
  629. package/dist/extensions/llama/client.d.ts.map +1 -0
  630. package/dist/extensions/llama/client.js +324 -0
  631. package/dist/extensions/llama/client.js.map +1 -0
  632. package/dist/extensions/llama/huggingface.d.ts +23 -0
  633. package/dist/extensions/llama/huggingface.d.ts.map +1 -0
  634. package/dist/extensions/llama/huggingface.js +141 -0
  635. package/dist/extensions/llama/huggingface.js.map +1 -0
  636. package/dist/extensions/llama/index.d.ts +3 -0
  637. package/dist/extensions/llama/index.d.ts.map +1 -0
  638. package/dist/extensions/llama/index.js +219 -0
  639. package/dist/extensions/llama/index.js.map +1 -0
  640. package/dist/extensions/llama/provider.d.ts +12 -0
  641. package/dist/extensions/llama/provider.d.ts.map +1 -0
  642. package/dist/extensions/llama/provider.js +238 -0
  643. package/dist/extensions/llama/provider.js.map +1 -0
  644. package/dist/extensions/llama/ui.d.ts +42 -0
  645. package/dist/extensions/llama/ui.d.ts.map +1 -0
  646. package/dist/extensions/llama/ui.js +441 -0
  647. package/dist/extensions/llama/ui.js.map +1 -0
  648. package/dist/extensions/mcp/cli.d.ts +23 -0
  649. package/dist/extensions/mcp/cli.d.ts.map +1 -0
  650. package/dist/extensions/mcp/cli.js +555 -0
  651. package/dist/extensions/mcp/cli.js.map +1 -0
  652. package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
  653. package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
  654. package/dist/extensions/mcp/cli.lazy.js +3 -0
  655. package/dist/extensions/mcp/cli.lazy.js.map +1 -0
  656. package/dist/extensions/mcp/config.d.ts +86 -0
  657. package/dist/extensions/mcp/config.d.ts.map +1 -0
  658. package/dist/extensions/mcp/config.js +193 -0
  659. package/dist/extensions/mcp/config.js.map +1 -0
  660. package/dist/extensions/mcp/index.d.ts +79 -0
  661. package/dist/extensions/mcp/index.d.ts.map +1 -0
  662. package/dist/extensions/mcp/index.js +1203 -0
  663. package/dist/extensions/mcp/index.js.map +1 -0
  664. package/dist/extensions/mcp/log.d.ts +16 -0
  665. package/dist/extensions/mcp/log.d.ts.map +1 -0
  666. package/dist/extensions/mcp/log.js +66 -0
  667. package/dist/extensions/mcp/log.js.map +1 -0
  668. package/dist/extensions/mcp/oauth.d.ts +64 -0
  669. package/dist/extensions/mcp/oauth.d.ts.map +1 -0
  670. package/dist/extensions/mcp/oauth.js +188 -0
  671. package/dist/extensions/mcp/oauth.js.map +1 -0
  672. package/dist/extensions/mcp/resources.d.ts +36 -0
  673. package/dist/extensions/mcp/resources.d.ts.map +1 -0
  674. package/dist/extensions/mcp/resources.js +262 -0
  675. package/dist/extensions/mcp/resources.js.map +1 -0
  676. package/dist/extensions/mcp/runtime.d.ts +105 -0
  677. package/dist/extensions/mcp/runtime.d.ts.map +1 -0
  678. package/dist/extensions/mcp/runtime.js +447 -0
  679. package/dist/extensions/mcp/runtime.js.map +1 -0
  680. package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
  681. package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
  682. package/dist/extensions/mcp/runtime.lazy.js +3 -0
  683. package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
  684. package/dist/extensions/mcp/tools.d.ts +57 -0
  685. package/dist/extensions/mcp/tools.d.ts.map +1 -0
  686. package/dist/extensions/mcp/tools.js +141 -0
  687. package/dist/extensions/mcp/tools.js.map +1 -0
  688. package/dist/extensions/mcp/ui.d.ts +61 -0
  689. package/dist/extensions/mcp/ui.d.ts.map +1 -0
  690. package/dist/extensions/mcp/ui.js +195 -0
  691. package/dist/extensions/mcp/ui.js.map +1 -0
  692. package/dist/extensions/tool-search/index.d.ts +12 -0
  693. package/dist/extensions/tool-search/index.d.ts.map +1 -0
  694. package/dist/extensions/tool-search/index.js +15 -0
  695. package/dist/extensions/tool-search/index.js.map +1 -0
  696. package/dist/extensions/tool-search/tool.d.ts +86 -0
  697. package/dist/extensions/tool-search/tool.d.ts.map +1 -0
  698. package/dist/extensions/tool-search/tool.js +267 -0
  699. package/dist/extensions/tool-search/tool.js.map +1 -0
  700. package/dist/index.d.ts +45 -0
  701. package/dist/index.d.ts.map +1 -0
  702. package/dist/index.js +54 -0
  703. package/dist/index.js.map +1 -0
  704. package/dist/main.d.ts +16 -0
  705. package/dist/main.d.ts.map +1 -0
  706. package/dist/main.js +920 -0
  707. package/dist/main.js.map +1 -0
  708. package/dist/migrations.d.ts +33 -0
  709. package/dist/migrations.d.ts.map +1 -0
  710. package/dist/migrations.js +282 -0
  711. package/dist/migrations.js.map +1 -0
  712. package/dist/modes/diagnostics-stderr.d.ts +4 -0
  713. package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
  714. package/dist/modes/diagnostics-stderr.js +11 -0
  715. package/dist/modes/diagnostics-stderr.js.map +1 -0
  716. package/dist/modes/index.d.ts +10 -0
  717. package/dist/modes/index.d.ts.map +1 -0
  718. package/dist/modes/index.js +8 -0
  719. package/dist/modes/index.js.map +1 -0
  720. package/dist/modes/interactive/assets/clankolas.png +0 -0
  721. package/dist/modes/interactive/bug-report.d.ts +16 -0
  722. package/dist/modes/interactive/bug-report.d.ts.map +1 -0
  723. package/dist/modes/interactive/bug-report.js +210 -0
  724. package/dist/modes/interactive/bug-report.js.map +1 -0
  725. package/dist/modes/interactive/chat-viewport.d.ts +20 -0
  726. package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
  727. package/dist/modes/interactive/chat-viewport.js +28 -0
  728. package/dist/modes/interactive/chat-viewport.js.map +1 -0
  729. package/dist/modes/interactive/components/armin.d.ts +37 -0
  730. package/dist/modes/interactive/components/armin.d.ts.map +1 -0
  731. package/dist/modes/interactive/components/armin.js +335 -0
  732. package/dist/modes/interactive/components/armin.js.map +1 -0
  733. package/dist/modes/interactive/components/assistant-message.d.ts +30 -0
  734. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
  735. package/dist/modes/interactive/components/assistant-message.js +188 -0
  736. package/dist/modes/interactive/components/assistant-message.js.map +1 -0
  737. package/dist/modes/interactive/components/auth-url.d.ts +14 -0
  738. package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
  739. package/dist/modes/interactive/components/auth-url.js +37 -0
  740. package/dist/modes/interactive/components/auth-url.js.map +1 -0
  741. package/dist/modes/interactive/components/bash-execution.d.ts +39 -0
  742. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
  743. package/dist/modes/interactive/components/bash-execution.js +181 -0
  744. package/dist/modes/interactive/components/bash-execution.js.map +1 -0
  745. package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
  746. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
  747. package/dist/modes/interactive/components/bordered-loader.js +54 -0
  748. package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
  749. package/dist/modes/interactive/components/branch-summary-message.d.ts +21 -0
  750. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
  751. package/dist/modes/interactive/components/branch-summary-message.js +62 -0
  752. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
  753. package/dist/modes/interactive/components/compaction-summary-message.d.ts +21 -0
  754. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
  755. package/dist/modes/interactive/components/compaction-summary-message.js +63 -0
  756. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
  757. package/dist/modes/interactive/components/config-selector.d.ts +102 -0
  758. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
  759. package/dist/modes/interactive/components/config-selector.js +761 -0
  760. package/dist/modes/interactive/components/config-selector.js.map +1 -0
  761. package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
  762. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
  763. package/dist/modes/interactive/components/countdown-timer.js +33 -0
  764. package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
  765. package/dist/modes/interactive/components/custom-editor.d.ts +30 -0
  766. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
  767. package/dist/modes/interactive/components/custom-editor.js +134 -0
  768. package/dist/modes/interactive/components/custom-editor.js.map +1 -0
  769. package/dist/modes/interactive/components/custom-entry.d.ts +21 -0
  770. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
  771. package/dist/modes/interactive/components/custom-entry.js +59 -0
  772. package/dist/modes/interactive/components/custom-entry.js.map +1 -0
  773. package/dist/modes/interactive/components/custom-message.d.ts +25 -0
  774. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
  775. package/dist/modes/interactive/components/custom-message.js +96 -0
  776. package/dist/modes/interactive/components/custom-message.js.map +1 -0
  777. package/dist/modes/interactive/components/diff.d.ts +12 -0
  778. package/dist/modes/interactive/components/diff.d.ts.map +1 -0
  779. package/dist/modes/interactive/components/diff.js +139 -0
  780. package/dist/modes/interactive/components/diff.js.map +1 -0
  781. package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
  782. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
  783. package/dist/modes/interactive/components/dynamic-border.js +21 -0
  784. package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
  785. package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
  786. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
  787. package/dist/modes/interactive/components/earendil-announcement.js +40 -0
  788. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
  789. package/dist/modes/interactive/components/easter-egg-3d.d.ts +104 -0
  790. package/dist/modes/interactive/components/easter-egg-3d.d.ts.map +1 -0
  791. package/dist/modes/interactive/components/easter-egg-3d.js +1139 -0
  792. package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -0
  793. package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts +6 -0
  794. package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts.map +1 -0
  795. package/dist/modes/interactive/components/easter-egg-3d.lazy.js +23 -0
  796. package/dist/modes/interactive/components/easter-egg-3d.lazy.js.map +1 -0
  797. package/dist/modes/interactive/components/extension-editor.d.ts +26 -0
  798. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
  799. package/dist/modes/interactive/components/extension-editor.js +107 -0
  800. package/dist/modes/interactive/components/extension-editor.js.map +1 -0
  801. package/dist/modes/interactive/components/extension-input.d.ts +25 -0
  802. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
  803. package/dist/modes/interactive/components/extension-input.js +67 -0
  804. package/dist/modes/interactive/components/extension-input.js.map +1 -0
  805. package/dist/modes/interactive/components/extension-selector.d.ts +27 -0
  806. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
  807. package/dist/modes/interactive/components/extension-selector.js +95 -0
  808. package/dist/modes/interactive/components/extension-selector.js.map +1 -0
  809. package/dist/modes/interactive/components/first-time-setup.d.ts +23 -0
  810. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
  811. package/dist/modes/interactive/components/first-time-setup.js +79 -0
  812. package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
  813. package/dist/modes/interactive/components/footer.d.ts +39 -0
  814. package/dist/modes/interactive/components/footer.d.ts.map +1 -0
  815. package/dist/modes/interactive/components/footer.js +265 -0
  816. package/dist/modes/interactive/components/footer.js.map +1 -0
  817. package/dist/modes/interactive/components/index.d.ts +33 -0
  818. package/dist/modes/interactive/components/index.d.ts.map +1 -0
  819. package/dist/modes/interactive/components/index.js +34 -0
  820. package/dist/modes/interactive/components/index.js.map +1 -0
  821. package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
  822. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
  823. package/dist/modes/interactive/components/keybinding-hints.js +36 -0
  824. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
  825. package/dist/modes/interactive/components/login-dialog.d.ts +59 -0
  826. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
  827. package/dist/modes/interactive/components/login-dialog.js +272 -0
  828. package/dist/modes/interactive/components/login-dialog.js.map +1 -0
  829. package/dist/modes/interactive/components/markdown-transform.d.ts +4 -0
  830. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  831. package/dist/modes/interactive/components/markdown-transform.js +20 -0
  832. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  833. package/dist/modes/interactive/components/mermaid.d.ts +12 -0
  834. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
  835. package/dist/modes/interactive/components/mermaid.js +89 -0
  836. package/dist/modes/interactive/components/mermaid.js.map +1 -0
  837. package/dist/modes/interactive/components/model-selector.d.ts +61 -0
  838. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
  839. package/dist/modes/interactive/components/model-selector.js +383 -0
  840. package/dist/modes/interactive/components/model-selector.js.map +1 -0
  841. package/dist/modes/interactive/components/oauth-selector.d.ts +59 -0
  842. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
  843. package/dist/modes/interactive/components/oauth-selector.js +207 -0
  844. package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
  845. package/dist/modes/interactive/components/pi-logo.d.ts +19 -0
  846. package/dist/modes/interactive/components/pi-logo.d.ts.map +1 -0
  847. package/dist/modes/interactive/components/pi-logo.js +37 -0
  848. package/dist/modes/interactive/components/pi-logo.js.map +1 -0
  849. package/dist/modes/interactive/components/provider-brand.d.ts +14 -0
  850. package/dist/modes/interactive/components/provider-brand.d.ts.map +1 -0
  851. package/dist/modes/interactive/components/provider-brand.js +66 -0
  852. package/dist/modes/interactive/components/provider-brand.js.map +1 -0
  853. package/dist/modes/interactive/components/radius-login-selector.d.ts +14 -0
  854. package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
  855. package/dist/modes/interactive/components/radius-login-selector.js +55 -0
  856. package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
  857. package/dist/modes/interactive/components/scoped-models-selector.d.ts +47 -0
  858. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
  859. package/dist/modes/interactive/components/scoped-models-selector.js +345 -0
  860. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
  861. package/dist/modes/interactive/components/session-selector-search.d.ts +27 -0
  862. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
  863. package/dist/modes/interactive/components/session-selector-search.js +219 -0
  864. package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
  865. package/dist/modes/interactive/components/session-selector.d.ts +103 -0
  866. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
  867. package/dist/modes/interactive/components/session-selector.js +917 -0
  868. package/dist/modes/interactive/components/session-selector.js.map +1 -0
  869. package/dist/modes/interactive/components/settings-selector.d.ts +96 -0
  870. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
  871. package/dist/modes/interactive/components/settings-selector.js +764 -0
  872. package/dist/modes/interactive/components/settings-selector.js.map +1 -0
  873. package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
  874. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
  875. package/dist/modes/interactive/components/settings-submenu.js +171 -0
  876. package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
  877. package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
  878. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
  879. package/dist/modes/interactive/components/show-images-selector.js +39 -0
  880. package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
  881. package/dist/modes/interactive/components/skill-invocation-message.d.ts +22 -0
  882. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
  883. package/dist/modes/interactive/components/skill-invocation-message.js +65 -0
  884. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
  885. package/dist/modes/interactive/components/status-indicator.d.ts +30 -0
  886. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
  887. package/dist/modes/interactive/components/status-indicator.js +67 -0
  888. package/dist/modes/interactive/components/status-indicator.js.map +1 -0
  889. package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
  890. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
  891. package/dist/modes/interactive/components/theme-selector.js +50 -0
  892. package/dist/modes/interactive/components/theme-selector.js.map +1 -0
  893. package/dist/modes/interactive/components/themed-text.d.ts +17 -0
  894. package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
  895. package/dist/modes/interactive/components/themed-text.js +29 -0
  896. package/dist/modes/interactive/components/themed-text.js.map +1 -0
  897. package/dist/modes/interactive/components/thinking-selector.d.ts +23 -0
  898. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
  899. package/dist/modes/interactive/components/thinking-selector.js +113 -0
  900. package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
  901. package/dist/modes/interactive/components/tool-execution.d.ts +79 -0
  902. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
  903. package/dist/modes/interactive/components/tool-execution.js +338 -0
  904. package/dist/modes/interactive/components/tool-execution.js.map +1 -0
  905. package/dist/modes/interactive/components/tree-selector.d.ts +96 -0
  906. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
  907. package/dist/modes/interactive/components/tree-selector.js +1262 -0
  908. package/dist/modes/interactive/components/tree-selector.js.map +1 -0
  909. package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
  910. package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
  911. package/dist/modes/interactive/components/trust-selector.js +91 -0
  912. package/dist/modes/interactive/components/trust-selector.js.map +1 -0
  913. package/dist/modes/interactive/components/user-message-selector.d.ts +31 -0
  914. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
  915. package/dist/modes/interactive/components/user-message-selector.js +122 -0
  916. package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
  917. package/dist/modes/interactive/components/user-message.d.ts +19 -0
  918. package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
  919. package/dist/modes/interactive/components/user-message.js +60 -0
  920. package/dist/modes/interactive/components/user-message.js.map +1 -0
  921. package/dist/modes/interactive/components/visual-truncate.d.ts +48 -0
  922. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
  923. package/dist/modes/interactive/components/visual-truncate.js +66 -0
  924. package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
  925. package/dist/modes/interactive/external-editor.d.ts +13 -0
  926. package/dist/modes/interactive/external-editor.d.ts.map +1 -0
  927. package/dist/modes/interactive/external-editor.js +60 -0
  928. package/dist/modes/interactive/external-editor.js.map +1 -0
  929. package/dist/modes/interactive/interactive-mode.d.ts +537 -0
  930. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
  931. package/dist/modes/interactive/interactive-mode.js +6209 -0
  932. package/dist/modes/interactive/interactive-mode.js.map +1 -0
  933. package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
  934. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
  935. package/dist/modes/interactive/model-catalog-refresh.js +34 -0
  936. package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
  937. package/dist/modes/interactive/model-search.d.ts +22 -0
  938. package/dist/modes/interactive/model-search.d.ts.map +1 -0
  939. package/dist/modes/interactive/model-search.js +36 -0
  940. package/dist/modes/interactive/model-search.js.map +1 -0
  941. package/dist/modes/interactive/program-resume-reporter.d.ts +32 -0
  942. package/dist/modes/interactive/program-resume-reporter.d.ts.map +1 -0
  943. package/dist/modes/interactive/program-resume-reporter.js +56 -0
  944. package/dist/modes/interactive/program-resume-reporter.js.map +1 -0
  945. package/dist/modes/interactive/program-status-reporter.d.ts +36 -0
  946. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
  947. package/dist/modes/interactive/program-status-reporter.js +114 -0
  948. package/dist/modes/interactive/program-status-reporter.js.map +1 -0
  949. package/dist/modes/interactive/session-share.d.ts +18 -0
  950. package/dist/modes/interactive/session-share.d.ts.map +1 -0
  951. package/dist/modes/interactive/session-share.js +205 -0
  952. package/dist/modes/interactive/session-share.js.map +1 -0
  953. package/dist/modes/interactive/theme/dark.json +78 -0
  954. package/dist/modes/interactive/theme/light.json +78 -0
  955. package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
  956. package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
  957. package/dist/modes/interactive/theme/system-theme.js +546 -0
  958. package/dist/modes/interactive/theme/system-theme.js.map +1 -0
  959. package/dist/modes/interactive/theme/theme-controller.d.ts +81 -0
  960. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
  961. package/dist/modes/interactive/theme/theme-controller.js +210 -0
  962. package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
  963. package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
  964. package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  965. package/dist/modes/interactive/theme/theme-schema.js +105 -0
  966. package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  967. package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
  968. package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
  969. package/dist/modes/interactive/theme/theme-tokens.js +94 -0
  970. package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
  971. package/dist/modes/interactive/theme/theme.d.ts +165 -0
  972. package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
  973. package/dist/modes/interactive/theme/theme.js +918 -0
  974. package/dist/modes/interactive/theme/theme.js.map +1 -0
  975. package/dist/modes/interactive/tui-renderer.d.ts +22 -0
  976. package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
  977. package/dist/modes/interactive/tui-renderer.js +67 -0
  978. package/dist/modes/interactive/tui-renderer.js.map +1 -0
  979. package/dist/modes/json-event.d.ts +34 -0
  980. package/dist/modes/json-event.d.ts.map +1 -0
  981. package/dist/modes/json-event.js +29 -0
  982. package/dist/modes/json-event.js.map +1 -0
  983. package/dist/modes/print-mode.d.ts +28 -0
  984. package/dist/modes/print-mode.d.ts.map +1 -0
  985. package/dist/modes/print-mode.js +155 -0
  986. package/dist/modes/print-mode.js.map +1 -0
  987. package/dist/modes/rpc/jsonl.d.ts +17 -0
  988. package/dist/modes/rpc/jsonl.d.ts.map +1 -0
  989. package/dist/modes/rpc/jsonl.js +49 -0
  990. package/dist/modes/rpc/jsonl.js.map +1 -0
  991. package/dist/modes/rpc/rpc-client.d.ts +254 -0
  992. package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
  993. package/dist/modes/rpc/rpc-client.js +499 -0
  994. package/dist/modes/rpc/rpc-client.js.map +1 -0
  995. package/dist/modes/rpc/rpc-mode.d.ts +20 -0
  996. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
  997. package/dist/modes/rpc/rpc-mode.js +677 -0
  998. package/dist/modes/rpc/rpc-mode.js.map +1 -0
  999. package/dist/modes/rpc/rpc-types.d.ts +478 -0
  1000. package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
  1001. package/dist/modes/rpc/rpc-types.js +8 -0
  1002. package/dist/modes/rpc/rpc-types.js.map +1 -0
  1003. package/dist/package-manager-cli.d.ts +9 -0
  1004. package/dist/package-manager-cli.d.ts.map +1 -0
  1005. package/dist/package-manager-cli.js +1043 -0
  1006. package/dist/package-manager-cli.js.map +1 -0
  1007. package/dist/rpc-entry.d.ts +3 -0
  1008. package/dist/rpc-entry.d.ts.map +1 -0
  1009. package/dist/rpc-entry.js +11 -0
  1010. package/dist/rpc-entry.js.map +1 -0
  1011. package/dist/utils/abort.d.ts +5 -0
  1012. package/dist/utils/abort.d.ts.map +1 -0
  1013. package/dist/utils/abort.js +48 -0
  1014. package/dist/utils/abort.js.map +1 -0
  1015. package/dist/utils/ansi.d.ts +10 -0
  1016. package/dist/utils/ansi.d.ts.map +1 -0
  1017. package/dist/utils/ansi.js +74 -0
  1018. package/dist/utils/ansi.js.map +1 -0
  1019. package/dist/utils/changelog.d.ts +22 -0
  1020. package/dist/utils/changelog.d.ts.map +1 -0
  1021. package/dist/utils/changelog.js +172 -0
  1022. package/dist/utils/changelog.js.map +1 -0
  1023. package/dist/utils/child-process.d.ts +18 -0
  1024. package/dist/utils/child-process.d.ts.map +1 -0
  1025. package/dist/utils/child-process.js +106 -0
  1026. package/dist/utils/child-process.js.map +1 -0
  1027. package/dist/utils/clipboard-command.d.ts +7 -0
  1028. package/dist/utils/clipboard-command.d.ts.map +1 -0
  1029. package/dist/utils/clipboard-command.js +52 -0
  1030. package/dist/utils/clipboard-command.js.map +1 -0
  1031. package/dist/utils/clipboard-image.d.ts +11 -0
  1032. package/dist/utils/clipboard-image.d.ts.map +1 -0
  1033. package/dist/utils/clipboard-image.js +214 -0
  1034. package/dist/utils/clipboard-image.js.map +1 -0
  1035. package/dist/utils/clipboard.d.ts +6 -0
  1036. package/dist/utils/clipboard.d.ts.map +1 -0
  1037. package/dist/utils/clipboard.js +162 -0
  1038. package/dist/utils/clipboard.js.map +1 -0
  1039. package/dist/utils/exif-orientation.d.ts +5 -0
  1040. package/dist/utils/exif-orientation.d.ts.map +1 -0
  1041. package/dist/utils/exif-orientation.js +157 -0
  1042. package/dist/utils/exif-orientation.js.map +1 -0
  1043. package/dist/utils/flush-stdout.d.ts +8 -0
  1044. package/dist/utils/flush-stdout.d.ts.map +1 -0
  1045. package/dist/utils/flush-stdout.js +23 -0
  1046. package/dist/utils/flush-stdout.js.map +1 -0
  1047. package/dist/utils/frontmatter.d.ts +8 -0
  1048. package/dist/utils/frontmatter.d.ts.map +1 -0
  1049. package/dist/utils/frontmatter.js +27 -0
  1050. package/dist/utils/frontmatter.js.map +1 -0
  1051. package/dist/utils/fs-watch.d.ts +5 -0
  1052. package/dist/utils/fs-watch.d.ts.map +1 -0
  1053. package/dist/utils/fs-watch.js +25 -0
  1054. package/dist/utils/fs-watch.js.map +1 -0
  1055. package/dist/utils/git.d.ts +26 -0
  1056. package/dist/utils/git.d.ts.map +1 -0
  1057. package/dist/utils/git.js +195 -0
  1058. package/dist/utils/git.js.map +1 -0
  1059. package/dist/utils/html.d.ts +7 -0
  1060. package/dist/utils/html.d.ts.map +1 -0
  1061. package/dist/utils/html.js +40 -0
  1062. package/dist/utils/html.js.map +1 -0
  1063. package/dist/utils/image-convert.d.ts +22 -0
  1064. package/dist/utils/image-convert.d.ts.map +1 -0
  1065. package/dist/utils/image-convert.js +84 -0
  1066. package/dist/utils/image-convert.js.map +1 -0
  1067. package/dist/utils/image-process.d.ts +18 -0
  1068. package/dist/utils/image-process.d.ts.map +1 -0
  1069. package/dist/utils/image-process.js +83 -0
  1070. package/dist/utils/image-process.js.map +1 -0
  1071. package/dist/utils/image-resize-core.d.ts +42 -0
  1072. package/dist/utils/image-resize-core.d.ts.map +1 -0
  1073. package/dist/utils/image-resize-core.js +131 -0
  1074. package/dist/utils/image-resize-core.js.map +1 -0
  1075. package/dist/utils/image-resize-worker.d.ts +2 -0
  1076. package/dist/utils/image-resize-worker.d.ts.map +1 -0
  1077. package/dist/utils/image-resize-worker.js +32 -0
  1078. package/dist/utils/image-resize-worker.js.map +1 -0
  1079. package/dist/utils/image-resize.d.ts +16 -0
  1080. package/dist/utils/image-resize.d.ts.map +1 -0
  1081. package/dist/utils/image-resize.js +98 -0
  1082. package/dist/utils/image-resize.js.map +1 -0
  1083. package/dist/utils/json.d.ts +3 -0
  1084. package/dist/utils/json.d.ts.map +1 -0
  1085. package/dist/utils/json.js +7 -0
  1086. package/dist/utils/json.js.map +1 -0
  1087. package/dist/utils/management-http.d.ts +25 -0
  1088. package/dist/utils/management-http.d.ts.map +1 -0
  1089. package/dist/utils/management-http.js +54 -0
  1090. package/dist/utils/management-http.js.map +1 -0
  1091. package/dist/utils/mime.d.ts +3 -0
  1092. package/dist/utils/mime.d.ts.map +1 -0
  1093. package/dist/utils/mime.js +110 -0
  1094. package/dist/utils/mime.js.map +1 -0
  1095. package/dist/utils/open-browser.d.ts +9 -0
  1096. package/dist/utils/open-browser.d.ts.map +1 -0
  1097. package/dist/utils/open-browser.js +25 -0
  1098. package/dist/utils/open-browser.js.map +1 -0
  1099. package/dist/utils/output-files.d.ts +31 -0
  1100. package/dist/utils/output-files.d.ts.map +1 -0
  1101. package/dist/utils/output-files.js +65 -0
  1102. package/dist/utils/output-files.js.map +1 -0
  1103. package/dist/utils/paths.d.ts +51 -0
  1104. package/dist/utils/paths.d.ts.map +1 -0
  1105. package/dist/utils/paths.js +156 -0
  1106. package/dist/utils/paths.js.map +1 -0
  1107. package/dist/utils/photon.d.ts +21 -0
  1108. package/dist/utils/photon.d.ts.map +1 -0
  1109. package/dist/utils/photon.js +121 -0
  1110. package/dist/utils/photon.js.map +1 -0
  1111. package/dist/utils/pi-user-agent.d.ts +3 -0
  1112. package/dist/utils/pi-user-agent.d.ts.map +1 -0
  1113. package/dist/utils/pi-user-agent.js +6 -0
  1114. package/dist/utils/pi-user-agent.js.map +1 -0
  1115. package/dist/utils/shell.d.ts +36 -0
  1116. package/dist/utils/shell.d.ts.map +1 -0
  1117. package/dist/utils/shell.js +308 -0
  1118. package/dist/utils/shell.js.map +1 -0
  1119. package/dist/utils/sleep.d.ts +5 -0
  1120. package/dist/utils/sleep.d.ts.map +1 -0
  1121. package/dist/utils/sleep.js +17 -0
  1122. package/dist/utils/sleep.js.map +1 -0
  1123. package/dist/utils/syntax-highlight.d.ts +18 -0
  1124. package/dist/utils/syntax-highlight.d.ts.map +1 -0
  1125. package/dist/utils/syntax-highlight.js +191 -0
  1126. package/dist/utils/syntax-highlight.js.map +1 -0
  1127. package/dist/utils/terminal-question.d.ts +8 -0
  1128. package/dist/utils/terminal-question.d.ts.map +1 -0
  1129. package/dist/utils/terminal-question.js +24 -0
  1130. package/dist/utils/terminal-question.js.map +1 -0
  1131. package/dist/utils/text.d.ts +8 -0
  1132. package/dist/utils/text.d.ts.map +1 -0
  1133. package/dist/utils/text.js +9 -0
  1134. package/dist/utils/text.js.map +1 -0
  1135. package/dist/utils/tool-result-images.d.ts +21 -0
  1136. package/dist/utils/tool-result-images.d.ts.map +1 -0
  1137. package/dist/utils/tool-result-images.js +48 -0
  1138. package/dist/utils/tool-result-images.js.map +1 -0
  1139. package/dist/utils/tools-manager.d.ts +14 -0
  1140. package/dist/utils/tools-manager.d.ts.map +1 -0
  1141. package/dist/utils/tools-manager.js +340 -0
  1142. package/dist/utils/tools-manager.js.map +1 -0
  1143. package/dist/utils/version-check.d.ts +18 -0
  1144. package/dist/utils/version-check.d.ts.map +1 -0
  1145. package/dist/utils/version-check.js +76 -0
  1146. package/dist/utils/version-check.js.map +1 -0
  1147. package/dist/utils/web-url.d.ts +12 -0
  1148. package/dist/utils/web-url.d.ts.map +1 -0
  1149. package/dist/utils/web-url.js +20 -0
  1150. package/dist/utils/web-url.js.map +1 -0
  1151. package/dist/utils/windows-self-update.d.ts +3 -0
  1152. package/dist/utils/windows-self-update.d.ts.map +1 -0
  1153. package/dist/utils/windows-self-update.js +77 -0
  1154. package/dist/utils/windows-self-update.js.map +1 -0
  1155. package/dist/utils/wsl.d.ts +8 -0
  1156. package/dist/utils/wsl.d.ts.map +1 -0
  1157. package/dist/utils/wsl.js +23 -0
  1158. package/dist/utils/wsl.js.map +1 -0
  1159. package/dist/utils/zip.d.ts +7 -0
  1160. package/dist/utils/zip.d.ts.map +1 -0
  1161. package/dist/utils/zip.js +60 -0
  1162. package/dist/utils/zip.js.map +1 -0
  1163. package/docs/cli-integration.md +106 -0
  1164. package/docs/cli.md +358 -0
  1165. package/docs/codemode.md +241 -0
  1166. package/docs/compaction.md +463 -0
  1167. package/docs/configuration.md +47 -0
  1168. package/docs/containerization.md +183 -0
  1169. package/docs/custom-provider.md +227 -0
  1170. package/docs/docs.json +224 -0
  1171. package/docs/environment-variables.md +103 -0
  1172. package/docs/extensions.md +3394 -0
  1173. package/docs/how-pi-works.md +49 -0
  1174. package/docs/images/doom-extension.png +0 -0
  1175. package/docs/images/exy.png +0 -0
  1176. package/docs/images/interactive-mode.png +0 -0
  1177. package/docs/images/tree-view.png +0 -0
  1178. package/docs/index.md +39 -0
  1179. package/docs/json.md +226 -0
  1180. package/docs/keybindings.md +195 -0
  1181. package/docs/llama-cpp.md +138 -0
  1182. package/docs/mcp.md +301 -0
  1183. package/docs/message-types.md +280 -0
  1184. package/docs/models-configuration.md +213 -0
  1185. package/docs/models.md +248 -0
  1186. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  1187. package/docs/packages.md +153 -0
  1188. package/docs/prompt-templates.md +59 -0
  1189. package/docs/providers.md +251 -0
  1190. package/docs/quickstart.md +140 -0
  1191. package/docs/rpc-commands.md +860 -0
  1192. package/docs/rpc-extension-ui.md +200 -0
  1193. package/docs/rpc.md +195 -0
  1194. package/docs/sdk.md +147 -0
  1195. package/docs/security.md +99 -0
  1196. package/docs/session-format.md +293 -0
  1197. package/docs/sessions.md +82 -0
  1198. package/docs/settings.md +175 -0
  1199. package/docs/shell-aliases.md +93 -0
  1200. package/docs/skills.md +93 -0
  1201. package/docs/slash-commands.md +61 -0
  1202. package/docs/subscriptions.md +96 -0
  1203. package/docs/terminal-setup.md +290 -0
  1204. package/docs/termux.md +117 -0
  1205. package/docs/themes.md +138 -0
  1206. package/docs/tmux.md +61 -0
  1207. package/docs/tui.md +199 -0
  1208. package/docs/usage.md +94 -0
  1209. package/docs/virtual-models.md +114 -0
  1210. package/docs/windows.md +109 -0
  1211. package/examples/README.md +36 -0
  1212. package/examples/extensions/README.md +215 -0
  1213. package/examples/extensions/auto-commit-on-exit.ts +49 -0
  1214. package/examples/extensions/bash-spawn-hook.ts +30 -0
  1215. package/examples/extensions/bookmark.ts +50 -0
  1216. package/examples/extensions/border-status-editor.ts +150 -0
  1217. package/examples/extensions/built-in-tool-renderer.ts +225 -0
  1218. package/examples/extensions/claude-rules.ts +86 -0
  1219. package/examples/extensions/commands.ts +72 -0
  1220. package/examples/extensions/confirm-destructive.ts +59 -0
  1221. package/examples/extensions/custom-compaction.ts +117 -0
  1222. package/examples/extensions/custom-footer.ts +64 -0
  1223. package/examples/extensions/custom-header.ts +73 -0
  1224. package/examples/extensions/custom-provider-anthropic/index.ts +613 -0
  1225. package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  1226. package/examples/extensions/custom-provider-anthropic/package.json +19 -0
  1227. package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
  1228. package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  1229. package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  1230. package/examples/extensions/debug-provider.ts +90 -0
  1231. package/examples/extensions/dirty-repo-guard.ts +56 -0
  1232. package/examples/extensions/doom-overlay/README.md +46 -0
  1233. package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
  1234. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  1235. package/examples/extensions/doom-overlay/doom/build.sh +152 -0
  1236. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
  1237. package/examples/extensions/doom-overlay/doom-component.ts +132 -0
  1238. package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  1239. package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  1240. package/examples/extensions/doom-overlay/index.ts +74 -0
  1241. package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
  1242. package/examples/extensions/dynamic-resources/SKILL.md +8 -0
  1243. package/examples/extensions/dynamic-resources/dynamic.json +81 -0
  1244. package/examples/extensions/dynamic-resources/dynamic.md +5 -0
  1245. package/examples/extensions/dynamic-resources/index.ts +15 -0
  1246. package/examples/extensions/dynamic-tools.ts +74 -0
  1247. package/examples/extensions/entry-renderer.ts +41 -0
  1248. package/examples/extensions/event-bus.ts +43 -0
  1249. package/examples/extensions/file-trigger.ts +41 -0
  1250. package/examples/extensions/git-checkpoint.ts +53 -0
  1251. package/examples/extensions/git-merge-and-resolve.ts +115 -0
  1252. package/examples/extensions/github-issue-autocomplete.ts +185 -0
  1253. package/examples/extensions/gondolin/index.ts +528 -0
  1254. package/examples/extensions/gondolin/package-lock.json +175 -0
  1255. package/examples/extensions/gondolin/package.json +19 -0
  1256. package/examples/extensions/handoff.ts +190 -0
  1257. package/examples/extensions/hello.ts +26 -0
  1258. package/examples/extensions/hidden-thinking-label.ts +53 -0
  1259. package/examples/extensions/inline-bash.ts +94 -0
  1260. package/examples/extensions/input-transform-streaming.ts +39 -0
  1261. package/examples/extensions/input-transform.ts +43 -0
  1262. package/examples/extensions/interactive-shell.ts +196 -0
  1263. package/examples/extensions/jev-router.ts +113 -0
  1264. package/examples/extensions/mac-system-theme.ts +47 -0
  1265. package/examples/extensions/message-renderer.ts +59 -0
  1266. package/examples/extensions/minimal-mode.ts +353 -0
  1267. package/examples/extensions/modal-editor.ts +85 -0
  1268. package/examples/extensions/model-status.ts +31 -0
  1269. package/examples/extensions/notify.ts +57 -0
  1270. package/examples/extensions/overlay-qa-tests.ts +1456 -0
  1271. package/examples/extensions/overlay-test.ts +165 -0
  1272. package/examples/extensions/permission-gate.ts +34 -0
  1273. package/examples/extensions/pirate.ts +47 -0
  1274. package/examples/extensions/plan-mode/README.md +66 -0
  1275. package/examples/extensions/plan-mode/index.ts +404 -0
  1276. package/examples/extensions/plan-mode/utils.ts +194 -0
  1277. package/examples/extensions/preset.ts +438 -0
  1278. package/examples/extensions/project-trust.ts +64 -0
  1279. package/examples/extensions/prompt-customizer.ts +49 -0
  1280. package/examples/extensions/protected-paths.ts +30 -0
  1281. package/examples/extensions/provider-payload.ts +18 -0
  1282. package/examples/extensions/qna.ts +118 -0
  1283. package/examples/extensions/question.ts +278 -0
  1284. package/examples/extensions/questionnaire.ts +440 -0
  1285. package/examples/extensions/rainbow-editor.ts +88 -0
  1286. package/examples/extensions/reload-runtime.ts +49 -0
  1287. package/examples/extensions/rpc-demo.ts +118 -0
  1288. package/examples/extensions/send-user-message.ts +97 -0
  1289. package/examples/extensions/session-name.ts +27 -0
  1290. package/examples/extensions/shutdown-command.ts +63 -0
  1291. package/examples/extensions/snake.ts +343 -0
  1292. package/examples/extensions/space-invaders.ts +560 -0
  1293. package/examples/extensions/ssh.ts +220 -0
  1294. package/examples/extensions/status-line.ts +32 -0
  1295. package/examples/extensions/structured-output.ts +65 -0
  1296. package/examples/extensions/subagent/README.md +180 -0
  1297. package/examples/extensions/subagent/agents/planner.md +37 -0
  1298. package/examples/extensions/subagent/agents/reviewer.md +35 -0
  1299. package/examples/extensions/subagent/agents/scout.md +50 -0
  1300. package/examples/extensions/subagent/agents/worker.md +24 -0
  1301. package/examples/extensions/subagent/agents.ts +157 -0
  1302. package/examples/extensions/subagent/index.ts +1258 -0
  1303. package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  1304. package/examples/extensions/subagent/prompts/implement.md +10 -0
  1305. package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  1306. package/examples/extensions/summarize.ts +199 -0
  1307. package/examples/extensions/system-prompt-header.ts +17 -0
  1308. package/examples/extensions/tic-tac-toe.ts +1008 -0
  1309. package/examples/extensions/timed-confirm.ts +70 -0
  1310. package/examples/extensions/titlebar-spinner.ts +58 -0
  1311. package/examples/extensions/todo.ts +304 -0
  1312. package/examples/extensions/tool-override.ts +144 -0
  1313. package/examples/extensions/tools.ts +148 -0
  1314. package/examples/extensions/trigger-compact.ts +50 -0
  1315. package/examples/extensions/truncated-tool.ts +195 -0
  1316. package/examples/extensions/widget-placement.ts +9 -0
  1317. package/examples/extensions/with-deps/index.ts +32 -0
  1318. package/examples/extensions/with-deps/package-lock.json +31 -0
  1319. package/examples/extensions/with-deps/package.json +22 -0
  1320. package/examples/extensions/working-indicator.ts +123 -0
  1321. package/examples/extensions/working-message-test.ts +25 -0
  1322. package/examples/rpc-client.ts +35 -0
  1323. package/examples/rpc-extension-ui.ts +662 -0
  1324. package/examples/sdk/01-minimal.ts +26 -0
  1325. package/examples/sdk/02-custom-model.ts +49 -0
  1326. package/examples/sdk/03-custom-prompt.ts +70 -0
  1327. package/examples/sdk/04-skills.ts +55 -0
  1328. package/examples/sdk/05-tools.ts +48 -0
  1329. package/examples/sdk/06-extensions.ts +94 -0
  1330. package/examples/sdk/07-context-files.ts +42 -0
  1331. package/examples/sdk/08-prompt-templates.ts +51 -0
  1332. package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
  1333. package/examples/sdk/10-settings.ts +53 -0
  1334. package/examples/sdk/11-sessions.ts +52 -0
  1335. package/examples/sdk/12-full-control.ts +74 -0
  1336. package/examples/sdk/13-session-runtime.ts +67 -0
  1337. package/examples/sdk/14-codemode-mcp.ts +61 -0
  1338. package/examples/sdk/README.md +141 -0
  1339. package/examples/tsconfig.json +208 -0
  1340. package/package.json +98 -5
  1341. package/schemas/keybindings.schema.json +393 -0
  1342. package/schemas/mcp.schema.json +306 -0
  1343. package/schemas/models.schema.json +1253 -0
  1344. package/schemas/settings.schema.json +820 -0
  1345. package/schemas/theme.schema.json +365 -0
package/docs/skills.md ADDED
@@ -0,0 +1,93 @@
1
+ # Skills
2
+
3
+ Skills give Pi specialized instructions and supporting files for a particular kind of work. Pi advertises each available skill by name and description, then loads its full instructions only when the task calls for them.
4
+
5
+ Use a skill when a workflow needs more context than a prompt template but does not need a new executable integration point. Skills can bundle scripts, references, and assets alongside their instructions.
6
+
7
+ Pi implements the [Agent Skills specification](https://agentskills.io/specification). Most invalid fields produce warnings rather than stopping startup.
8
+
9
+ ## Create a skill
10
+
11
+ A skill is a directory containing `SKILL.md`:
12
+
13
+ ```text
14
+ pdf-tools/
15
+ ├── SKILL.md
16
+ ├── scripts/
17
+ │ └── extract.sh
18
+ ├── references/
19
+ │ └── formats.md
20
+ └── assets/
21
+ └── template.json
22
+ ```
23
+
24
+ Start `SKILL.md` with frontmatter followed by direct instructions:
25
+
26
+ ```markdown
27
+ ---
28
+ name: pdf-tools
29
+ description: Extract text and tables from PDF files. Use when reading, converting, or inspecting PDFs.
30
+ ---
31
+
32
+ # PDF tools
33
+
34
+ Read `references/formats.md` before converting a document. Run scripts relative to this skill directory.
35
+ ```
36
+
37
+ The description determines when the model considers loading the skill. State both what the skill does and when it applies. Avoid descriptions such as “Helps with PDFs,” which do not provide enough routing information.
38
+
39
+ Use relative paths from the skill directory when referring to bundled files. Pi tells the model where the skill lives so it can resolve those paths.
40
+
41
+ ## Understand how skills load
42
+
43
+ At startup, Pi scans configured skill locations and adds each skill’s name, description, and path to the system prompt. It does not add the full instructions.
44
+
45
+ When a task matches, the model reads `SKILL.md` and follows its instructions. This keeps detailed guidance out of context until it is needed. A model might fail to load a relevant skill, so use `/skill:name` when you need to force it.
46
+
47
+ Arguments after `/skill:name` are appended to the loaded instructions as a user request:
48
+
49
+ ```text
50
+ /skill:pdf-tools extract report.pdf
51
+ ```
52
+
53
+ Set `disable-model-invocation: true` in frontmatter when a skill should be available only through its explicit command. The `enableSkillCommands` [setting](settings.md) controls whether skill commands appear in interactive command discovery; manually entered `/skill:name` commands still work.
54
+
55
+ <a id="choose-where-it-loads"></a>
56
+
57
+ ## Add it to Pi
58
+
59
+ Place the skill in your user or project skills directory. Directories containing `SKILL.md` are discovered recursively.
60
+
61
+ Pi also supports the Agent Skills locations `~/.agents/skills/` and `.agents/skills/`. Project `.agents/skills/` directories are discovered from the working directory through its ancestors, stopping at the repository root when one exists.
62
+
63
+ Pi accepts some standalone Markdown skills, but a directory containing `SKILL.md` is the portable form and should be preferred. See [Settings](settings.md#resources) and [Pi Packages](packages.md) for additional locations.
64
+
65
+ Project skills can instruct the model to run scripts or modify files. Review unfamiliar skills and their supporting files before granting project trust.
66
+
67
+ ## Write portable frontmatter
68
+
69
+ The Agent Skills specification defines these fields:
70
+
71
+ | Field | Purpose |
72
+ |---|---|
73
+ | `name` | Command and display name |
74
+ | `description` | Routing description shown to the model |
75
+ | `license` | License name or bundled license file |
76
+ | `compatibility` | Environment requirements |
77
+ | `metadata` | Additional key-value metadata |
78
+ | `allowed-tools` | Experimental pre-approved tool list (parsed but ignored by Pi) |
79
+ | `disable-model-invocation` | Hide the skill from automatic model selection |
80
+
81
+ Names use lowercase letters, numbers, and hyphens, with no leading, trailing, or consecutive hyphens. They can contain at most 64 characters; descriptions can contain at most 1024.
82
+
83
+ Pi neither requires nor warns when the declared name differs from the parent directory. Other Agent Skills implementations may enforce that requirement, so matching names remain the portable choice.
84
+
85
+ Malformed `SKILL.md` files and declared skills without descriptions are not loaded. Name collisions keep the first discovered skill and produce a warning.
86
+
87
+ ## Validate and share a skill
88
+
89
+ Run Pi from a location where the skill is discoverable, then inspect the startup diagnostics and `/skill:name` command. Run `/reload` after editing a skill during an active session.
90
+
91
+ Use a [Pi package](packages.md) to distribute one or more skills through npm or git. Keep environment setup inside the skill and declare any required runtime dependencies in the package.
92
+
93
+ For examples, see the [Anthropic skills collection](https://github.com/anthropics/skills) and [Pi skills collection](https://github.com/badlogic/pi-skills).
@@ -0,0 +1,61 @@
1
+ # Slash commands
2
+
3
+ Type `/` in Pi's terminal editor to search the commands available in the current session. This page lists the built-in commands in the current Pi release.
4
+
5
+ Extensions, prompt templates, and skills can add commands. The command menu in Pi is therefore the exact reference for the resources loaded in your session.
6
+
7
+ ## Models and settings
8
+
9
+ | Command | Description |
10
+ |---|---|
11
+ | `/settings` | Open settings |
12
+ | `/model [provider/model]` | Select a model |
13
+ | `/thinking [level]` | Set the thinking level |
14
+ | `/scoped-models` | Configure the models used by interactive cycling |
15
+ | `/login [provider]` | Add provider authentication |
16
+ | `/logout` | Remove provider authentication |
17
+ | `/llama` | Manage models on the configured llama.cpp router |
18
+
19
+ ## Sessions and context
20
+
21
+ | Command | Description |
22
+ |---|---|
23
+ | `/new` | Start a new session |
24
+ | `/resume` | Resume another session |
25
+ | `/name [name]` | Set the session display name, or show the current name when omitted |
26
+ | `/session` | Show current session information and statistics |
27
+ | `/tree` | Navigate the session tree |
28
+ | `/fork` | Create a new session from an earlier user message |
29
+ | `/clone` | Duplicate the current session at its current position |
30
+ | `/compact [instructions]` | Compact the current context, optionally with custom instructions |
31
+ | `/import <path>` | Import a JSONL session, preserving its ID and working directory |
32
+
33
+ ## Export and share
34
+
35
+ | Command | Description |
36
+ |---|---|
37
+ | `/copy` | Copy the last assistant message |
38
+ | `/export [path]` | Export the session as HTML or JSONL |
39
+ | `/share` | Upload the session and return a viewer link |
40
+ | `/bug [description]` | Prepare a private bug report for the Pi developers |
41
+
42
+ Review a session before exporting or sharing it. Sessions can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
43
+
44
+ ## Runtime and project
45
+
46
+ | Command | Description |
47
+ |---|---|
48
+ | `/trust` | Save a project trust decision for future Pi processes |
49
+ | `/mcp` | Manage MCP servers: sign in, reconnect, enable or disable, and change exposure |
50
+ | `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
51
+ | `/hotkeys` | Show active keyboard shortcuts |
52
+ | `/changelog` | Show changelog entries |
53
+ | `/quit` | Quit Pi |
54
+
55
+ ## Commands added by resources
56
+
57
+ - Extensions can register commands with their own arguments and completion behavior.
58
+ - Each prompt template is available under its template name.
59
+ - Skills are available as `/skill:name` when skill commands are enabled.
60
+
61
+ Use `/reload` after adding or changing a discovered command resource. See [Extensions](extensions.md), [Prompt Templates](prompt-templates.md), and [Skills](skills.md) for their loading and naming rules.
@@ -0,0 +1,96 @@
1
+ # Subscriptions
2
+
3
+ Several AI providers let you use Pi with a plan you already pay for, instead of paying per use through their API. Usage counts against the plan's limits.
4
+
5
+ Pi connects to a plan in one of two ways, depending on the provider:
6
+
7
+ - Sign in with your account: Pi opens a browser page, or shows a code to enter on the provider's site.
8
+ - Use an API key from the plan: you create a key for the plan on the provider's site and give it to Pi.
9
+
10
+ The [table below](#supported-subscriptions) shows which way each plan uses.
11
+
12
+ ## Sign in with your account
13
+
14
+ In Pi, run `/login`, choose **Sign in with an account**, then pick the subscription.
15
+
16
+ Pi opens a browser page, or shows a code to enter on the provider's site. After you sign in, Pi saves the credential in [`auth.json`](configuration.md#agent-directory) and renews it on its own while the provider allows it. Then pick a model with `/model`. The models of each subscription carry its provider ID as a tag, for example `[openai-codex]`.
17
+
18
+ On a remote or headless machine, open the sign-in link on any machine with a browser. If the browser cannot reach Pi afterwards, paste the final URL from the browser's address bar (or the code it shows) into Pi.
19
+
20
+ To sign out, run `/logout`. This removes the credential from this machine only. It does not cancel access at the provider; use the provider's account settings for that.
21
+
22
+ ## Use the plan's API key
23
+
24
+ Create an API key for the plan on the provider's site. Some providers give plans their own keys, separate from pay-per-use keys; use the plan's key.
25
+
26
+ In Pi, run `/login`, choose **Sign in with an API key**, pick the plan, and paste the key. Pi saves it in [`auth.json`](configuration.md#agent-directory).
27
+
28
+ ## Supported subscriptions
29
+
30
+ | Subscription | Provider ID | Connect with |
31
+ |---|---|---|
32
+ | [ChatGPT plan](#chatgpt-plan) | `openai`, `openai-codex` | Sign in |
33
+ | [GitHub Copilot](#github-copilot) | `github-copilot` | Sign in |
34
+ | [Kimi Code](#kimi-code) | `kimi-coding` | Sign in or API key |
35
+ | [Meta Muse](#meta-muse) | `meta` | Sign in |
36
+ | [SuperGrok or X Premium](#supergrok-or-x-premium) | `xai` | Sign in |
37
+ | [OpenCode Go](#opencode-go) | `opencode-go` | API key |
38
+ | [Z.AI GLM Coding Plan](#zai-glm-coding-plan) | `zai`, `zai-coding-cn` | API key |
39
+ | [Qwen Token Plan](#qwen-token-plan) | `qwen-token-plan`, `qwen-token-plan-individual` and their `-cn` variants | API key |
40
+ | [Xiaomi MiMo Token Plan](#xiaomi-mimo-token-plan) | `xiaomi-token-plan-ams`, `xiaomi-token-plan-sgp`, `xiaomi-token-plan-cn` | API key |
41
+
42
+ Each provider decides which plans include API use, which models you get, and how much. Check the provider's own terms.
43
+
44
+ ### ChatGPT plan
45
+
46
+ There are two ways to use a ChatGPT plan:
47
+
48
+ - Sign in with ChatGPT (`openai`): run `/login openai` and choose **Sign in with ChatGPT**. Pi uses the OpenAI API models on your ChatGPT plan. Works with the Go, Plus, Pro and Business plans. Decision models are not available with this sign-in.
49
+ - Codex (`openai-codex`): run `/login openai-codex` and choose **Sign in with an account**. Pi uses the Codex models through ChatGPT, the same service the Codex app uses, with your plan's Codex limits. See OpenAI's [Using Codex with your ChatGPT plan](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan).
50
+
51
+ ChatGPT Business workspaces have their own usage limits; when one is reached, ask the workspace admin to raise it.
52
+
53
+ ### GitHub Copilot
54
+
55
+ Run `/login github-copilot`. Pi asks for a GitHub Enterprise domain (leave it blank for github.com), then shows a code to enter on GitHub. The model list follows what your Copilot plan includes.
56
+
57
+ ### Kimi Code
58
+
59
+ Run `/login kimi-coding` and choose **Sign in with Kimi Code**. Pi shows a code to enter on kimi.com. Or use the API key from your Kimi Code membership: `/login kimi-coding`, **Sign in with an API key**, or set `KIMI_API_KEY`.
60
+
61
+ ### Meta Muse
62
+
63
+ Run `/login meta` and choose **Sign in with Meta**. Pi shows a code to enter on meta.com. Meta's sign-in cannot be renewed automatically: when it ends, Pi asks you to sign in again.
64
+
65
+ ### SuperGrok or X Premium
66
+
67
+ Run `/login xai` and choose **Sign in with SuperGrok or X Premium**. Pi shows a code to enter on x.ai.
68
+
69
+ ### OpenCode Go
70
+
71
+ Create a key on [opencode.ai](https://opencode.ai), then use `/login opencode-go` or set `OPENCODE_API_KEY`. The same variable also serves OpenCode Zen (`opencode`), which is pay-per-use, not a plan.
72
+
73
+ ### Z.AI GLM Coding Plan
74
+
75
+ Create a key for the GLM Coding Plan (not a pay-per-use key). Use `zai` with `ZAI_API_KEY` for the global service, or `zai-coding-cn` with `ZAI_CODING_CN_API_KEY` for the China service.
76
+
77
+ ### Qwen Token Plan
78
+
79
+ Token Plan comes in a Personal and a Team edition. Outside China it is sold on [QwenCloud](https://docs.qwencloud.com/token-plan/overview); in China, on Alibaba Cloud Model Studio. After subscribing, generate the plan's own API key on the Token Plan page (QwenCloud keys start with `sk-sp-`). Pay-per-use keys do not work. Pick the provider for your edition and where you bought the plan:
80
+
81
+ | Plan | Provider ID | Environment variable |
82
+ |---|---|---|
83
+ | Team | `qwen-token-plan` | `QWEN_TOKEN_PLAN_TEAM_API_KEY` |
84
+ | Team (China) | `qwen-token-plan-cn` | `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` |
85
+ | Personal | `qwen-token-plan-individual` | `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` |
86
+ | Personal (China) | `qwen-token-plan-individual-cn` | `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY` |
87
+
88
+ ### Xiaomi MiMo Token Plan
89
+
90
+ After subscribing, copy the plan's API key from the [Token Plan page](https://platform.xiaomimimo.com/#/console/plan-manage) (it starts with `tp-`, or `ttp-` for team plans). Pay-per-use keys (`sk-`) do not work. The same page shows your plan's Base URL; pick the provider whose region matches it:
91
+
92
+ | Region | Provider ID | Environment variable |
93
+ |---|---|---|
94
+ | Europe (`token-plan-ams`) | `xiaomi-token-plan-ams` | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` |
95
+ | Singapore (`token-plan-sgp`) | `xiaomi-token-plan-sgp` | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` |
96
+ | China (`token-plan-cn`) | `xiaomi-token-plan-cn` | `XIAOMI_TOKEN_PLAN_CN_API_KEY` |
@@ -0,0 +1,290 @@
1
+ # Configure your terminal
2
+
3
+ Most modern terminals work with Pi without additional setup. Use this page when modified keys, scrolling, links, images, colors, or input-method editor (IME) positioning do not behave as expected.
4
+
5
+ Pi uses extended-key protocols so terminals can distinguish combinations such as `Shift+Enter` and `Alt+Enter` from plain `Enter`. Terminal proxies, multiplexers, and built-in IDE terminals can change or discard that information.
6
+
7
+ ## Troubleshooting
8
+
9
+ | Symptom | Start here |
10
+ |---|---|
11
+ | `Shift+Enter` submits instead of inserting a line | Your terminal's section below; for tmux, see [Run Pi in tmux](tmux.md) |
12
+ | `Alt+Enter` does not queue a follow-up | [WezTerm](#wezterm), [Alacritty](#alacritty), or [Windows Terminal](#windows-terminal) |
13
+ | Fullscreen scrolling is unusually slow | [iTerm2](#iterm2) |
14
+ | Links work but show no hover preview | [Ghostty](#ghostty) |
15
+ | Inline images or colors are not detected | [Override detected capabilities](#override-detected-capabilities) |
16
+ | An IME candidate window appears in the wrong place | [WezTerm](#wezterm) or [IntelliJ IDEA](#intellij-idea-integrated-terminal) |
17
+ | Modified keys fail only inside tmux | [Run Pi in tmux](tmux.md) |
18
+ | After Pi exits, moving the mouse or typing puts text such as `[<35;12;5M` or `[;;;129:3u` into the shell prompt | [Recover the terminal after Pi was killed](#recover-the-terminal-after-pi-was-killed) |
19
+
20
+ Use `/hotkeys` to inspect Pi's active shortcuts. See [Keybindings](keybindings.md) to change them.
21
+
22
+ ## Kitty
23
+
24
+ Kitty supports the required keyboard protocol without additional configuration.
25
+
26
+ ## iTerm2
27
+
28
+ Regular terminal mode works without additional configuration.
29
+
30
+ ### Fix slow fullscreen scrolling
31
+
32
+ In fullscreen mode, Pi owns the viewport, so iTerm2 sends mouse-wheel reports instead of scrolling native terminal history. Fast trackpad gestures can then move only about one line at a time.
33
+
34
+ To change this behavior:
35
+
36
+ 1. Open **iTerm2 > Settings > Advanced**.
37
+ 2. Search for **Trackpad scrolls fast?**.
38
+ 3. Set it to **No**.
39
+
40
+ This is an iTerm2-wide setting and can also change native trackpad scrolling. The underlying behavior is tracked in [iTerm2 issue 9619](https://gitlab.com/gnachman/iterm2/-/work_items/9619).
41
+
42
+ ## Apple Terminal
43
+
44
+ Pi enables enhanced key reporting when available. If Terminal.app still sends plain Return or `ESC` + Return for `Shift+Enter`, Pi uses a local macOS modifier fallback and treats it as `Shift+Enter`. `ESC` + Return without Shift held remains `Alt+Enter`.
45
+
46
+ The fallback works only when Pi runs on the same Mac as Terminal.app. It cannot inspect the local modifier state when Pi runs on another machine over SSH.
47
+
48
+ ## Ghostty
49
+
50
+ Add this mapping to Ghostty's configuration if `Alt+Backspace` does not work:
51
+
52
+ ```text
53
+ keybind = alt+backspace=text:\x1b\x7f
54
+ ```
55
+
56
+ The configuration file is `~/Library/Application Support/com.mitchellh.ghostty/config` on macOS and `~/.config/ghostty/config` on Linux.
57
+
58
+ Older Claude Code configurations may contain:
59
+
60
+ ```text
61
+ keybind = shift+enter=text:\n
62
+ ```
63
+
64
+ This sends a raw linefeed, which Pi cannot distinguish from `Ctrl+J`. Remove the mapping if an older Claude Code installation is the only reason you added it. Pi already binds `Ctrl+J` as a newline alternative, so the mapping may appear to work while still preventing Pi and tmux from receiving a real `Shift+Enter` event.
65
+
66
+ ### Open links in fullscreen mode
67
+
68
+ Links remain clickable in fullscreen mode, but Ghostty does not show its normal hover underline or URL preview while Pi captures mouse input. Hold `Shift+Command` on macOS or `Shift+Ctrl` on Linux to use Ghostty's native link handling.
69
+
70
+ ## WezTerm
71
+
72
+ WezTerm normally reports `Shift+Enter` through xterm extended keys. To enable the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
73
+
74
+ ```lua
75
+ local wezterm = require 'wezterm'
76
+ local config = wezterm.config_builder()
77
+ config.enable_kitty_keyboard = true
78
+ return config
79
+ ```
80
+
81
+ ### Forward Alt+Enter on macOS
82
+
83
+ WezTerm binds `Option+Enter` to fullscreen by default on macOS. To use it for Pi's follow-up queue, add this entry to your `config.keys` table:
84
+
85
+ ```lua
86
+ {
87
+ key = 'Enter',
88
+ mods = 'ALT',
89
+ action = wezterm.action.SendString('\x1b[13;3u'),
90
+ }
91
+ ```
92
+
93
+ A complete minimal configuration is:
94
+
95
+ ```lua
96
+ local wezterm = require 'wezterm'
97
+ local config = wezterm.config_builder()
98
+ config.keys = {
99
+ {
100
+ key = 'Enter',
101
+ mods = 'ALT',
102
+ action = wezterm.action.SendString('\x1b[13;3u'),
103
+ },
104
+ }
105
+ return config
106
+ ```
107
+
108
+ ### Position an IME candidate window in WSL
109
+
110
+ If CJK IME candidates do not follow Pi's text cursor in WSL, show the hardware cursor:
111
+
112
+ ```bash
113
+ export PI_HARDWARE_CURSOR=1
114
+ pi
115
+ ```
116
+
117
+ You can instead set `showHardwareCursor` to `true` in Pi settings.
118
+
119
+ ## Alacritty
120
+
121
+ Alacritty normally reports `Shift+Enter`. On macOS, `Option+Enter` can arrive as plain `Enter`. Add this to `~/.config/alacritty/alacritty.toml` to forward it to Pi:
122
+
123
+ ```toml
124
+ [[keyboard.bindings]]
125
+ key = "Enter"
126
+ mods = "Alt"
127
+ chars = "\u001b[13;3u"
128
+ ```
129
+
130
+ Restart Alacritty after changing the file.
131
+
132
+ ## VS Code integrated terminal
133
+
134
+ VS Code 1.109.5 and newer enable the Kitty keyboard protocol in the integrated terminal by default.
135
+
136
+ For an older version, add a `Shift+Enter` terminal binding to `keybindings.json`:
137
+
138
+ ```json
139
+ {
140
+ "key": "shift+enter",
141
+ "command": "workbench.action.terminal.sendSequence",
142
+ "args": { "text": "\u001b[13;2u" },
143
+ "when": "terminalFocus"
144
+ }
145
+ ```
146
+
147
+ The user `keybindings.json` file is normally located at:
148
+
149
+ - macOS: `~/Library/Application Support/Code/User/keybindings.json`
150
+ - Linux: `~/.config/Code/User/keybindings.json`
151
+ - Windows: `%APPDATA%\\Code\\User\\keybindings.json`
152
+
153
+ ## Zed integrated terminal
154
+
155
+ Add these bindings to Zed's `keymap.json`:
156
+
157
+ ```json
158
+ {
159
+ "context": "Terminal",
160
+ "bindings": {
161
+ "shift-enter": ["terminal::SendText", "\u001b[13;2u"],
162
+ "ctrl--": ["terminal::SendText", "\u001b[45;5u"],
163
+ "ctrl-alt-]": ["terminal::SendText", "\u001b[93;7u"]
164
+ }
165
+ }
166
+ ```
167
+
168
+ ## Windows Terminal
169
+
170
+ Windows Terminal uses Pi's Windows and WSL shortcut defaults. See [Keybindings](keybindings.md) for the complete list.
171
+
172
+ ### Forward Shift+Enter
173
+
174
+ When Pi runs natively on Windows, it checks the local Shift key state and treats plain Return or `ESC` + Return as `Shift+Enter` while Shift is held. This fallback does not work in WSL or over SSH. If `Shift+Enter` still submits, forward it explicitly.
175
+
176
+ Open Windows Terminal's `settings.json` with `Ctrl+Shift+,` or **Settings > Open JSON file**. Add this object to its `actions` array:
177
+
178
+ ```json
179
+ {
180
+ "command": { "action": "sendInput", "input": "\u001b[13;2u" },
181
+ "keys": "shift+enter"
182
+ }
183
+ ```
184
+
185
+ Fully close and reopen Windows Terminal, then verify that `Shift+Enter` inserts a new line in Pi.
186
+
187
+ ### Use Alt+Enter for follow-ups
188
+
189
+ Windows Terminal binds `Alt+Enter` to fullscreen by default. Pi therefore uses `Ctrl+Q` for follow-ups on Windows and WSL.
190
+
191
+ To use `Alt+Enter` instead, configure Windows Terminal to forward the key and bind `app.message.followUp` to `alt+enter` in Pi's `keybindings.json`. See [Keybindings](keybindings.md#assign-keybindings).
192
+
193
+ ## xfce4-terminal and Terminator
194
+
195
+ These terminals cannot reliably distinguish modified Enter keys from plain `Enter`. Custom bindings such as `Ctrl+Enter` or `Shift+Enter` therefore may not work.
196
+
197
+ Use a terminal with modern extended-key support when you need those shortcuts, such as Kitty, Ghostty, WezTerm, iTerm2, Windows Terminal, or a compatible Alacritty build.
198
+
199
+ ## IntelliJ IDEA integrated terminal
200
+
201
+ IntelliJ IDEA's built-in terminal cannot reliably distinguish `Shift+Enter` from plain `Enter`. Use `Ctrl+J` for a newline or run Pi in a terminal with modern extended-key support.
202
+
203
+ If an IME candidate window does not follow the text cursor, show the hardware cursor:
204
+
205
+ ```bash
206
+ export PI_HARDWARE_CURSOR=1
207
+ pi
208
+ ```
209
+
210
+ ## Override detected capabilities
211
+
212
+ Pi automatically detects OSC 8 hyperlinks, inline image protocols, and truecolor support. A terminal proxy or multiplexer can make that detection inaccurate.
213
+
214
+ | Capability | Environment variable | Setting |
215
+ |---|---|---|
216
+ | Hyperlinks | `PI_HYPERLINKS=1\|0\|auto` | `terminal.hyperlinks: true\|false\|"auto"` |
217
+ | Inline images | `PI_IMAGE_PROTOCOL=kitty\|iterm2\|none\|auto` | `terminal.images: "kitty"\|"iterm2"\|false\|"auto"` |
218
+ | Truecolor | `PI_TRUE_COLOR=1\|0\|auto` | `terminal.trueColor: true\|false\|"auto"` |
219
+
220
+ Settings take precedence over environment variables. An unset value or `auto` preserves automatic detection.
221
+
222
+ GNU screen forwards truecolor only with `truecolor on` in `~/.screenrc` (screen 4.7 or later), so Pi uses 256 colors when `TERM` starts with `screen`. If you enabled it, set `PI_TRUE_COLOR=1`.
223
+
224
+ Only force a capability supported by the complete terminal path. Unsupported escape sequences can corrupt rendering. See [Environment Variables](environment-variables.md#pi-process-configuration) and [Settings](settings.md) for the canonical value definitions.
225
+
226
+ ## Recover the terminal after Pi was killed
227
+
228
+ Pi turns on key, mouse, and paste reporting while it runs, and the alternate screen in fullscreen mode. It turns them off when it exits. If Pi is killed (`kill -9`, Task Manager, out of memory), they stay on and the shell types the reports into the prompt.
229
+
230
+ The real fix is to find what kills Pi and stop it. Look for `JavaScript heap out of memory` in the terminal, or a script or IDE that ends the process, and [open an issue](https://github.com/earendil-works/pi/issues) with what you find.
231
+
232
+ To reset the terminal, run this in the affected pane. Starting and quitting Pi again is not enough.
233
+
234
+ bash or zsh:
235
+
236
+ ```bash
237
+ printf '\e[<16u\e[=0;1u\e[>4;0m\e[?2004;1000;1002;1003;1004;1006l\e[?7;25h'
238
+ ```
239
+
240
+ PowerShell:
241
+
242
+ ```powershell
243
+ $e = [char]27; [Console]::Write("$e[<16u$e[=0;1u$e[>4;0m$e[?2004;1000;1002;1003;1004;1006l$e[?7;25h")
244
+ ```
245
+
246
+ If the prompt still shows Pi's last screen, also run `printf '\e[?1049l'` or `[Console]::Write("$([char]27)[?1049l")`. Only in that case: otherwise it confuses the shell's line editor.
247
+
248
+ If you cannot type in the pane, start Pi in another tab and ask it: "Reset my other terminal tab with the reset sequence from Pi's terminal-setup docs." Then press `Ctrl+C` in the fixed tab to clear the line.
249
+
250
+ ## Program status
251
+
252
+ Pi reports its state with the [Program Status Protocol (OSC 7501)](https://www.superlogical.com/rex/docs/build/program-status), so terminals and agent dashboards can show whether it is working, waiting for you, done, or failed:
253
+
254
+ | State | When |
255
+ |---|---|
256
+ | `working` | An agent run or compaction is in progress. The message is the session name. |
257
+ | `blocked` | An extension dialog or login waits for you. The message is the dialog title. |
258
+ | `done` | A run finished. The message is the session name. |
259
+ | `error` | A run ended with an error that is not retried. The message is the first line of the error. |
260
+ | `idle` | Pi started, or you cancelled the run. |
261
+
262
+ Reports never contain prompts or model output. Pi sends them only after the terminal answers the protocol's support query; tmux and screen do not forward them. Set `PI_PROGRAM_STATUS=1` to send reports without asking, or `PI_PROGRAM_STATUS=0` to turn them off.
263
+
264
+ ## Program resume
265
+
266
+ Pi tells the terminal how to bring the session back after the terminal restarts, with the [Program Resume Protocol (OSC 7577)](https://www.superlogical.com/rex/docs/build/program-resume). Terminals that support it set `OSC7577_TOKEN` in the environment; Pi reports only when it is set.
267
+
268
+ The command contains everything needed to resume the session, because the terminal runs it without Pi's environment: the session ID (or the file path for a session opened from outside the session directory), `--agent-dir` and `--session-dir` when those folders are not the default, and the restriction and resource flags Pi was started with, as typed (tools, extensions, skills, prompt templates, themes, context files, system prompts, project trust, `--models`). For example, `pi --session <id> -t read,grep`. The terminal runs it in the session's directory. Other flags are left out, because the session keeps its model, thinking level, and name. The command Pi prints when you quit is the same without the repeated flags.
269
+
270
+ Pi updates the command when you start, resume, or fork a session, and once a new session has its first message. It removes the command while a new session has no messages, when you quit (`Ctrl+D`, `Ctrl+C` twice, `/quit`), and, if Pi was started with flags, when you open a session from another directory, because relative paths in the flags would point elsewhere. When the terminal closes or restarts and ends Pi, Pi leaves the command in place, so the terminal can resume it.
271
+
272
+ The terminal resumes a command only if a rule trusts it. Rex rules with a `flags` table do not work for Pi yet (Node overwrites the command line Rex checks them against), so add one rule per flag combination you use, with the flags in the order you type them. In Rex's `init.lua`:
273
+
274
+ ```lua
275
+ -- One rule per command: the words after `pi`, as Pi reports them.
276
+ local function trust_pi(name, ...)
277
+ rex.set("resume.trust.pi_" .. name, { command = { "pi", ... } })
278
+ end
279
+
280
+ local id = rex.match.uuid
281
+ trust_pi("plain", "--session", id)
282
+ trust_pi("readonly", "--session", id, "-t", "read,grep,find,ls")
283
+ trust_pi("readonly_noext", "--session", id, "-t", "read,grep,find,ls", "--no-extensions")
284
+ -- A separate profile set with PI_CODING_AGENT_DIR and PI_CODING_AGENT_SESSION_DIR: absolute paths, before --session
285
+ trust_pi("work", "--agent-dir", "/home/you/.pi/work/agent", "--session-dir", "/home/you/.pi/work/agent/sessions", "--session", id)
286
+ ```
287
+
288
+ A Pi started with a combination no rule lists comes back as a plain shell, not without its flags.
289
+
290
+ Pi removes `OSC7577_TOKEN` from its own environment at startup, so shells, editors, and extension processes it starts cannot replace its command or register commands of their own. Whether and when the terminal resumes a command is up to the terminal.
package/docs/termux.md ADDED
@@ -0,0 +1,117 @@
1
+ # Run Pi on Android with Termux
2
+
3
+ Pi runs on Android through [Termux](https://termux.dev/), a terminal emulator and Linux environment. Text input, file tools, and shell commands are supported. Pi can copy and paste text through the Android clipboard with Termux:API. Clipboard image paste is not supported.
4
+
5
+ ## Before you begin
6
+
7
+ Install Termux from [GitHub or F-Droid](https://github.com/termux/termux-app#installation). Do not use the deprecated Google Play build.
8
+
9
+ [Termux:API](https://github.com/termux/termux-api#installation) is optional. Install it only when you want Pi to copy or paste Android clipboard text, or when shell commands need Android device APIs.
10
+
11
+ ## Install Pi
12
+
13
+ 1. Update Termux packages:
14
+
15
+ ```bash
16
+ pkg update && pkg upgrade
17
+ ```
18
+
19
+ 2. Install Node.js and Git:
20
+
21
+ ```bash
22
+ pkg install nodejs git
23
+ ```
24
+
25
+ 3. Install Pi:
26
+
27
+ ```bash
28
+ npm install -g --ignore-scripts @dc99-tech/pi-agent-port
29
+ ```
30
+
31
+ 4. Verify the installation:
32
+
33
+ ```bash
34
+ pi --version
35
+ ```
36
+
37
+ 5. Open the folder you want to work in and start Pi:
38
+
39
+ ```bash
40
+ cd /path/to/working-folder
41
+ pi
42
+ ```
43
+
44
+ Continue with the main [Quickstart](quickstart.md#3-choose-a-model) to connect a model and run your first task.
45
+
46
+ ## Access Android shared storage
47
+
48
+ Termux cannot access shared Android storage until you grant permission. Run this once:
49
+
50
+ ```bash
51
+ termux-setup-storage
52
+ ```
53
+
54
+ After approval, Android shared storage is available under `/storage/emulated/0` and through the links Termux creates under `~/storage/`.
55
+
56
+ Only grant this permission when Pi should be able to access those files. Commands and tools running in Termux use the same storage permissions as the Termux process.
57
+
58
+ ## Use clipboard commands
59
+
60
+ Pi uses `termux-clipboard-set` to copy text and `termux-clipboard-get` for its clipboard-paste shortcut. Shell commands can use both commands directly. Install the Termux:API app and its command-line package:
61
+
62
+ ```bash
63
+ pkg install termux-api
64
+ ```
65
+
66
+ Verify the integration:
67
+
68
+ ```bash
69
+ printf 'Pi clipboard test' | termux-clipboard-set
70
+ termux-clipboard-get
71
+ ```
72
+
73
+ The second command should print `Pi clipboard test`.
74
+
75
+ The Termux clipboard API supports text only. Pi's clipboard-paste shortcut inserts that text into the editor but cannot attach clipboard images.
76
+
77
+ ## Add Termux-specific instructions
78
+
79
+ Pi detects that it is running in Termux, but it cannot infer how you want it to interact with Android. Add only the environment details relevant to your work to `~/.pi/agent/AGENTS.md`:
80
+
81
+ ````markdown
82
+ # Termux environment
83
+
84
+ - Pi runs in Termux on Android.
85
+ - Shared Android storage is under `/storage/emulated/0`.
86
+ - Open URLs with `termux-open-url "https://example.com"`.
87
+ - Open files with `termux-open <path>`.
88
+ - Do not access shared storage unless the task requires it.
89
+ ````
90
+
91
+ Run `/reload` after changing the file during an active session.
92
+
93
+ ## Troubleshooting
94
+
95
+ ### Clipboard integration fails
96
+
97
+ Confirm that you installed both components:
98
+
99
+ 1. The Termux:API Android app from the same source as Termux
100
+ 2. The `termux-api` command-line package
101
+
102
+ Then run the clipboard verification commands above outside Pi. If they fail there, fix the Termux:API installation before retrying Pi's copy command.
103
+
104
+ ### Shared storage reports permission denied
105
+
106
+ Run `termux-setup-storage`, approve the Android permission request, and retry the path under `~/storage/` or `/storage/emulated/0`.
107
+
108
+ ### Pi is not found after installation
109
+
110
+ Open a new Termux shell and run:
111
+
112
+ ```bash
113
+ npm prefix -g
114
+ command -v pi
115
+ ```
116
+
117
+ Confirm that the global npm binary directory is on `PATH`, then reinstall Pi if the package is missing.