@punch-bot/cli 0.85.1 → 1.3.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 (1121) hide show
  1. package/CHANGELOG.md +609 -3
  2. package/README.md +82 -174
  3. package/dist/bun/cli.d.ts.map +1 -1
  4. package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
  5. package/dist/bun/restore-sandbox-env.js.map +1 -1
  6. package/dist/bun/runtime-setup.d.ts.map +1 -1
  7. package/dist/bun/runtime-setup.js +4 -1
  8. package/dist/bun/runtime-setup.js.map +1 -1
  9. package/dist/bun/sandbox-env-setup.d.ts.map +1 -1
  10. package/dist/bundle/chunks/anthropic-messages-BUUFZMRE.js +6 -0
  11. package/dist/bundle/chunks/anthropic.js +2 -2
  12. package/dist/bundle/chunks/azure-openai-responses-WZ4GZHD2.js +2 -0
  13. package/dist/bundle/chunks/bedrock-converse-stream.js +10 -2
  14. package/dist/bundle/chunks/chunk-22CYIUS4.js +2 -0
  15. package/dist/bundle/chunks/chunk-2M76JOVH.js +8 -0
  16. package/dist/bundle/chunks/chunk-6C5VKHGV.js +50 -0
  17. package/dist/bundle/chunks/chunk-6WNF4BLC.js +2 -0
  18. package/dist/bundle/chunks/chunk-6YKFJ7FQ.js +1188 -0
  19. package/dist/bundle/chunks/chunk-BYHXHV4K.js +11 -0
  20. package/dist/bundle/chunks/chunk-F5ZABL6Z.js +20 -0
  21. package/dist/bundle/chunks/chunk-HACVPRBJ.js +11 -0
  22. package/dist/bundle/chunks/chunk-ITZNWD4K.js +2 -0
  23. package/dist/bundle/chunks/chunk-J7I2NFJ7.js +82 -0
  24. package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  25. package/dist/bundle/chunks/chunk-OO6DJ3CL.js +31 -0
  26. package/dist/bundle/chunks/chunk-OWCYH5W2.js +2 -0
  27. package/dist/bundle/chunks/chunk-PMRZO46Y.js +2 -0
  28. package/dist/bundle/chunks/{chunk-TRDNDS6A.js → chunk-PYGXRV27.js} +5 -2
  29. package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  30. package/dist/bundle/chunks/{chunk-XDUWOHPL.js → chunk-S3GGRYIO.js} +2 -2
  31. package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
  32. package/dist/bundle/chunks/chunk-WUIPA42N.js +14 -0
  33. package/dist/bundle/chunks/chunk-XIX7LUWI.js +2 -0
  34. package/dist/bundle/chunks/{chunk-3DNTDXPG.js → chunk-YGGF2ZM6.js} +3 -3
  35. package/dist/bundle/chunks/chunk-YWHGLBPB.js +2 -0
  36. package/dist/bundle/chunks/chunk-ZBURYEWF.js +2 -0
  37. package/dist/bundle/chunks/cli-QAQLORRY.js +51 -0
  38. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +2 -0
  39. package/dist/bundle/chunks/codemode-worker.js +478 -0
  40. package/dist/bundle/chunks/execute-2Z6BN5R3.js +499 -0
  41. package/dist/bundle/chunks/github-copilot.js +1 -1
  42. package/dist/bundle/chunks/google-generative-ai-S2KXX5PQ.js +2 -0
  43. package/dist/bundle/chunks/google-vertex-LQOUTFJN.js +2 -0
  44. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  45. package/dist/bundle/chunks/jiti-loader-C3NU2SDH.js +21 -0
  46. package/dist/bundle/chunks/jiti-static-loader-E6ANQD5T.js +2 -0
  47. package/dist/bundle/chunks/{lib-HGQMNYVT.js → lib-TEDK3E5I.js} +2 -2
  48. package/dist/bundle/chunks/llama-cpp-classify-FYN623RH.js +22 -0
  49. package/dist/bundle/chunks/meta.js +2 -0
  50. package/dist/bundle/chunks/mistral-conversations-VNJYBSRF.js +5 -0
  51. package/dist/bundle/chunks/node-N5BSDOA5.js +16 -0
  52. package/dist/bundle/chunks/{node-4PXJTSWH.js → node-TWVVAGPO.js} +1 -1
  53. package/dist/bundle/chunks/openai-chatgpt.js +75 -0
  54. package/dist/bundle/chunks/openai-codex-responses-E6BLZPYJ.js +10 -0
  55. package/dist/bundle/chunks/openai-codex.js +2 -2
  56. package/dist/bundle/chunks/openai-completions-LUDIAWSG.js +7 -0
  57. package/dist/bundle/chunks/openai-decisions-WVPMQ4JD.js +5 -0
  58. package/dist/bundle/chunks/openai-responses-IOCBEIVC.js +3 -0
  59. package/dist/bundle/chunks/{openrouter-images-N4XVVFSD.js → openrouter-images-YU24TD7D.js} +1 -1
  60. package/dist/bundle/chunks/openrouter.js +2 -2
  61. package/dist/bundle/chunks/{pi-messages-ZRYGTSON.js → pi-messages-V27DSLVC.js} +2 -2
  62. package/dist/bundle/chunks/radius.js +2 -2
  63. package/dist/bundle/chunks/runtime-R6O72Q4R.js +2 -0
  64. package/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +2 -0
  65. package/dist/bundle/chunks/virtual-modules-GZVZPCK3.js +2 -0
  66. package/dist/bundle/cli-runtime.js +3 -0
  67. package/dist/bundle/cli.js +4 -2
  68. package/dist/bundle/index.js +1 -1
  69. package/dist/bundle/rpc-entry.js +1 -1
  70. package/dist/cli/args.d.ts +1 -2
  71. package/dist/cli/args.d.ts.map +1 -1
  72. package/dist/cli/args.js +73 -53
  73. package/dist/cli/args.js.map +1 -1
  74. package/dist/cli/auth-check.d.ts.map +1 -1
  75. package/dist/cli/auth-check.js.map +1 -1
  76. package/dist/cli/auth-command.d.ts.map +1 -1
  77. package/dist/cli/auth-command.js.map +1 -1
  78. package/dist/cli/credential-print.d.ts.map +1 -1
  79. package/dist/cli/credential-print.js +4 -4
  80. package/dist/cli/credential-print.js.map +1 -1
  81. package/dist/cli/experimental/transport-address.d.ts +21 -0
  82. package/dist/cli/experimental/transport-address.d.ts.map +1 -0
  83. package/dist/cli/experimental/transport-address.js +89 -0
  84. package/dist/cli/experimental/transport-address.js.map +1 -0
  85. package/dist/cli/file-processor.d.ts +1 -1
  86. package/dist/cli/file-processor.d.ts.map +1 -1
  87. package/dist/cli/file-processor.js.map +1 -1
  88. package/dist/cli/initial-message.d.ts +1 -1
  89. package/dist/cli/initial-message.d.ts.map +1 -1
  90. package/dist/cli/initial-message.js.map +1 -1
  91. package/dist/cli/list-models.d.ts.map +1 -1
  92. package/dist/cli/list-models.js +1 -1
  93. package/dist/cli/list-models.js.map +1 -1
  94. package/dist/cli/project-trust.d.ts.map +1 -1
  95. package/dist/cli/project-trust.js +5 -35
  96. package/dist/cli/project-trust.js.map +1 -1
  97. package/dist/cli/setup.d.ts.map +1 -1
  98. package/dist/cli/setup.js.map +1 -1
  99. package/dist/cli.d.ts.map +1 -1
  100. package/dist/config.d.ts +30 -11
  101. package/dist/config.d.ts.map +1 -1
  102. package/dist/config.js +72 -21
  103. package/dist/config.js.map +1 -1
  104. package/dist/core/agent-session-runtime.d.ts +4 -3
  105. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  106. package/dist/core/agent-session-runtime.js +37 -27
  107. package/dist/core/agent-session-runtime.js.map +1 -1
  108. package/dist/core/agent-session-services.d.ts.map +1 -1
  109. package/dist/core/agent-session-services.js +13 -0
  110. package/dist/core/agent-session-services.js.map +1 -1
  111. package/dist/core/agent-session.d.ts +270 -22
  112. package/dist/core/agent-session.d.ts.map +1 -1
  113. package/dist/core/agent-session.js +1174 -410
  114. package/dist/core/agent-session.js.map +1 -1
  115. package/dist/core/auth-guidance.d.ts.map +1 -1
  116. package/dist/core/auth-guidance.js.map +1 -1
  117. package/dist/core/auth-storage.d.ts.map +1 -1
  118. package/dist/core/auth-storage.js +20 -13
  119. package/dist/core/auth-storage.js.map +1 -1
  120. package/dist/core/bash-executor.d.ts.map +1 -1
  121. package/dist/core/bash-executor.js +42 -52
  122. package/dist/core/bash-executor.js.map +1 -1
  123. package/dist/core/bug-report-upload.d.ts +12 -0
  124. package/dist/core/bug-report-upload.d.ts.map +1 -0
  125. package/dist/core/bug-report-upload.js +22 -0
  126. package/dist/core/bug-report-upload.js.map +1 -0
  127. package/dist/core/bug-report.d.ts +184 -0
  128. package/dist/core/bug-report.d.ts.map +1 -0
  129. package/dist/core/bug-report.js +292 -0
  130. package/dist/core/bug-report.js.map +1 -0
  131. package/dist/core/cache-stats.d.ts.map +1 -1
  132. package/dist/core/cache-stats.js +12 -1
  133. package/dist/core/cache-stats.js.map +1 -1
  134. package/dist/core/cache-warmer.d.ts +103 -0
  135. package/dist/core/cache-warmer.d.ts.map +1 -0
  136. package/dist/core/cache-warmer.js +356 -0
  137. package/dist/core/cache-warmer.js.map +1 -0
  138. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  139. package/dist/core/compaction/branch-summarization.js +2 -2
  140. package/dist/core/compaction/branch-summarization.js.map +1 -1
  141. package/dist/core/compaction/compaction.d.ts +5 -3
  142. package/dist/core/compaction/compaction.d.ts.map +1 -1
  143. package/dist/core/compaction/compaction.js +164 -88
  144. package/dist/core/compaction/compaction.js.map +1 -1
  145. package/dist/core/compaction/index.d.ts.map +1 -1
  146. package/dist/core/compaction/utils.d.ts +8 -1
  147. package/dist/core/compaction/utils.d.ts.map +1 -1
  148. package/dist/core/compaction/utils.js +32 -26
  149. package/dist/core/compaction/utils.js.map +1 -1
  150. package/dist/core/crash-log.d.ts +27 -0
  151. package/dist/core/crash-log.d.ts.map +1 -0
  152. package/dist/core/crash-log.js +140 -0
  153. package/dist/core/crash-log.js.map +1 -0
  154. package/dist/core/defaults.d.ts.map +1 -1
  155. package/dist/core/delivery.d.ts.map +1 -1
  156. package/dist/core/delivery.js.map +1 -1
  157. package/dist/core/diagnostics.d.ts.map +1 -1
  158. package/dist/core/event-bus.d.ts.map +1 -1
  159. package/dist/core/event-bus.js.map +1 -1
  160. package/dist/core/exec.d.ts.map +1 -1
  161. package/dist/core/exec.js.map +1 -1
  162. package/dist/core/experimental.d.ts.map +1 -1
  163. package/dist/core/experimental.js.map +1 -1
  164. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
  165. package/dist/core/export-html/ansi-to-html.js.map +1 -1
  166. package/dist/core/export-html/index.d.ts.map +1 -1
  167. package/dist/core/export-html/index.js +1 -1
  168. package/dist/core/export-html/index.js.map +1 -1
  169. package/dist/core/export-html/template.css +10 -0
  170. package/dist/core/export-html/template.js +93 -34
  171. package/dist/core/export-html/tool-renderer.d.ts +5 -11
  172. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  173. package/dist/core/export-html/tool-renderer.js +8 -99
  174. package/dist/core/export-html/tool-renderer.js.map +1 -1
  175. package/dist/core/extensions/index.d.ts +1 -1
  176. package/dist/core/extensions/index.d.ts.map +1 -1
  177. package/dist/core/extensions/index.js.map +1 -1
  178. package/dist/core/extensions/jiti-loader.d.ts +2 -0
  179. package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
  180. package/dist/core/extensions/jiti-loader.js +4 -0
  181. package/dist/core/extensions/jiti-loader.js.map +1 -0
  182. package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
  183. package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
  184. package/dist/core/extensions/jiti-static-loader.js +4 -0
  185. package/dist/core/extensions/jiti-static-loader.js.map +1 -0
  186. package/dist/core/extensions/loader.d.ts.map +1 -1
  187. package/dist/core/extensions/loader.js +102 -74
  188. package/dist/core/extensions/loader.js.map +1 -1
  189. package/dist/core/extensions/runner.d.ts +44 -14
  190. package/dist/core/extensions/runner.d.ts.map +1 -1
  191. package/dist/core/extensions/runner.js +297 -169
  192. package/dist/core/extensions/runner.js.map +1 -1
  193. package/dist/core/extensions/types.d.ts +482 -238
  194. package/dist/core/extensions/types.d.ts.map +1 -1
  195. package/dist/core/extensions/types.js.map +1 -1
  196. package/dist/core/extensions/virtual-modules.d.ts +3 -0
  197. package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
  198. package/dist/core/extensions/virtual-modules.js +35 -0
  199. package/dist/core/extensions/virtual-modules.js.map +1 -0
  200. package/dist/core/extensions/wrapper.d.ts +2 -2
  201. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  202. package/dist/core/extensions/wrapper.js +3 -22
  203. package/dist/core/extensions/wrapper.js.map +1 -1
  204. package/dist/core/footer-data-provider.d.ts.map +1 -1
  205. package/dist/core/footer-data-provider.js.map +1 -1
  206. package/dist/core/http-dispatcher.d.ts +13 -0
  207. package/dist/core/http-dispatcher.d.ts.map +1 -1
  208. package/dist/core/http-dispatcher.js +13 -4
  209. package/dist/core/http-dispatcher.js.map +1 -1
  210. package/dist/core/index.d.ts +2 -1
  211. package/dist/core/index.d.ts.map +1 -1
  212. package/dist/core/index.js.map +1 -1
  213. package/dist/core/mcp-servers.d.ts +139 -0
  214. package/dist/core/mcp-servers.d.ts.map +1 -0
  215. package/dist/core/mcp-servers.js +232 -0
  216. package/dist/core/mcp-servers.js.map +1 -0
  217. package/dist/core/messages.d.ts.map +1 -1
  218. package/dist/core/messages.js +1 -0
  219. package/dist/core/messages.js.map +1 -1
  220. package/dist/{modes/interactive → core}/model-catalog-refresh.d.ts +2 -2
  221. package/dist/core/model-catalog-refresh.d.ts.map +1 -0
  222. package/dist/{modes/interactive → core}/model-catalog-refresh.js +2 -2
  223. package/dist/core/model-catalog-refresh.js.map +1 -0
  224. package/dist/core/model-config.d.ts +886 -80
  225. package/dist/core/model-config.d.ts.map +1 -1
  226. package/dist/core/model-config.js +33 -148
  227. package/dist/core/model-config.js.map +1 -1
  228. package/dist/core/model-registry.d.ts +15 -1
  229. package/dist/core/model-registry.d.ts.map +1 -1
  230. package/dist/core/model-registry.js +29 -0
  231. package/dist/core/model-registry.js.map +1 -1
  232. package/dist/core/model-resolver.d.ts +61 -46
  233. package/dist/core/model-resolver.d.ts.map +1 -1
  234. package/dist/core/model-resolver.js +338 -363
  235. package/dist/core/model-resolver.js.map +1 -1
  236. package/dist/core/model-runtime.d.ts +51 -3
  237. package/dist/core/model-runtime.d.ts.map +1 -1
  238. package/dist/core/model-runtime.js +211 -44
  239. package/dist/core/model-runtime.js.map +1 -1
  240. package/dist/core/model-suffix-variants.d.ts +14 -0
  241. package/dist/core/model-suffix-variants.d.ts.map +1 -0
  242. package/dist/core/model-suffix-variants.js +27 -0
  243. package/dist/core/model-suffix-variants.js.map +1 -0
  244. package/dist/core/models-store.d.ts.map +1 -1
  245. package/dist/core/models-store.js.map +1 -1
  246. package/dist/core/nested-tool-calls.d.ts +103 -0
  247. package/dist/core/nested-tool-calls.d.ts.map +1 -0
  248. package/dist/core/nested-tool-calls.js +179 -0
  249. package/dist/core/nested-tool-calls.js.map +1 -0
  250. package/dist/core/output-guard.d.ts.map +1 -1
  251. package/dist/core/output-guard.js.map +1 -1
  252. package/dist/core/package-manager.d.ts +4 -0
  253. package/dist/core/package-manager.d.ts.map +1 -1
  254. package/dist/core/package-manager.js +62 -15
  255. package/dist/core/package-manager.js.map +1 -1
  256. package/dist/core/pi-manifest.d.ts.map +1 -1
  257. package/dist/core/pi-manifest.js.map +1 -1
  258. package/dist/core/project-trust.d.ts.map +1 -1
  259. package/dist/core/project-trust.js +2 -1
  260. package/dist/core/project-trust.js.map +1 -1
  261. package/dist/core/prompt-templates.d.ts +6 -1
  262. package/dist/core/prompt-templates.d.ts.map +1 -1
  263. package/dist/core/prompt-templates.js +68 -37
  264. package/dist/core/prompt-templates.js.map +1 -1
  265. package/dist/core/provider-attribution.d.ts.map +1 -1
  266. package/dist/core/provider-attribution.js.map +1 -1
  267. package/dist/core/provider-composer.d.ts +42 -20
  268. package/dist/core/provider-composer.d.ts.map +1 -1
  269. package/dist/core/provider-composer.js +126 -40
  270. package/dist/core/provider-composer.js.map +1 -1
  271. package/dist/core/radius.d.ts +5 -0
  272. package/dist/core/radius.d.ts.map +1 -1
  273. package/dist/core/radius.js +8 -0
  274. package/dist/core/radius.js.map +1 -1
  275. package/dist/core/remote-catalog-provider.d.ts +19 -1
  276. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  277. package/dist/core/remote-catalog-provider.js +102 -34
  278. package/dist/core/remote-catalog-provider.js.map +1 -1
  279. package/dist/core/resolve-config-value.d.ts.map +1 -1
  280. package/dist/core/resolve-config-value.js.map +1 -1
  281. package/dist/core/resource-loader.d.ts +11 -2
  282. package/dist/core/resource-loader.d.ts.map +1 -1
  283. package/dist/core/resource-loader.js +170 -42
  284. package/dist/core/resource-loader.js.map +1 -1
  285. package/dist/core/runtime-credentials.d.ts.map +1 -1
  286. package/dist/core/runtime-credentials.js.map +1 -1
  287. package/dist/core/sdk.d.ts +14 -5
  288. package/dist/core/sdk.d.ts.map +1 -1
  289. package/dist/core/sdk.js +108 -52
  290. package/dist/core/sdk.js.map +1 -1
  291. package/dist/core/session-cwd.d.ts.map +1 -1
  292. package/dist/core/session-cwd.js.map +1 -1
  293. package/dist/core/session-export.d.ts +6 -2
  294. package/dist/core/session-export.d.ts.map +1 -1
  295. package/dist/core/session-export.js +14 -13
  296. package/dist/core/session-export.js.map +1 -1
  297. package/dist/core/session-manager.d.ts +72 -13
  298. package/dist/core/session-manager.d.ts.map +1 -1
  299. package/dist/core/session-manager.js +277 -124
  300. package/dist/core/session-manager.js.map +1 -1
  301. package/dist/core/settings-defaults.d.ts +65 -0
  302. package/dist/core/settings-defaults.d.ts.map +1 -0
  303. package/dist/core/settings-defaults.js +66 -0
  304. package/dist/core/settings-defaults.js.map +1 -0
  305. package/dist/core/settings-diagnostics.d.ts.map +1 -1
  306. package/dist/core/settings-diagnostics.js.map +1 -1
  307. package/dist/core/settings-manager.d.ts +41 -126
  308. package/dist/core/settings-manager.d.ts.map +1 -1
  309. package/dist/core/settings-manager.js +165 -52
  310. package/dist/core/settings-manager.js.map +1 -1
  311. package/dist/core/settings-schema.d.ts +224 -0
  312. package/dist/core/settings-schema.d.ts.map +1 -0
  313. package/dist/core/settings-schema.js +285 -0
  314. package/dist/core/settings-schema.js.map +1 -0
  315. package/dist/core/skills.d.ts +4 -1
  316. package/dist/core/skills.d.ts.map +1 -1
  317. package/dist/core/skills.js +6 -1
  318. package/dist/core/skills.js.map +1 -1
  319. package/dist/core/slash-commands.d.ts.map +1 -1
  320. package/dist/core/slash-commands.js +3 -2
  321. package/dist/core/slash-commands.js.map +1 -1
  322. package/dist/core/source-info.d.ts +8 -0
  323. package/dist/core/source-info.d.ts.map +1 -1
  324. package/dist/core/source-info.js +16 -0
  325. package/dist/core/source-info.js.map +1 -1
  326. package/dist/core/system-prompt.d.ts +55 -6
  327. package/dist/core/system-prompt.d.ts.map +1 -1
  328. package/dist/core/system-prompt.js +128 -93
  329. package/dist/core/system-prompt.js.map +1 -1
  330. package/dist/core/telemetry.d.ts +2 -0
  331. package/dist/core/telemetry.d.ts.map +1 -1
  332. package/dist/core/telemetry.js +45 -0
  333. package/dist/core/telemetry.js.map +1 -1
  334. package/dist/core/theme/dark.json +78 -0
  335. package/dist/core/theme/light.json +78 -0
  336. package/dist/core/theme/system-theme.d.ts +54 -0
  337. package/dist/core/theme/system-theme.d.ts.map +1 -0
  338. package/dist/core/theme/system-theme.js +547 -0
  339. package/dist/core/theme/system-theme.js.map +1 -0
  340. package/dist/core/theme/theme-schema.d.ts +28 -0
  341. package/dist/core/theme/theme-schema.d.ts.map +1 -0
  342. package/dist/core/theme/theme-schema.js +105 -0
  343. package/dist/core/theme/theme-schema.js.map +1 -0
  344. package/dist/core/theme/theme-tokens.d.ts +257 -0
  345. package/dist/core/theme/theme-tokens.d.ts.map +1 -0
  346. package/dist/core/theme/theme-tokens.js +94 -0
  347. package/dist/core/theme/theme-tokens.js.map +1 -0
  348. package/dist/core/theme/theme.d.ts +162 -0
  349. package/dist/core/theme/theme.d.ts.map +1 -0
  350. package/dist/{modes/interactive → core}/theme/theme.js +265 -402
  351. package/dist/core/theme/theme.js.map +1 -0
  352. package/dist/core/timings.d.ts.map +1 -1
  353. package/dist/core/timings.js.map +1 -1
  354. package/dist/core/tools/bash.d.ts +14 -1
  355. package/dist/core/tools/bash.d.ts.map +1 -1
  356. package/dist/core/tools/bash.js +43 -6
  357. package/dist/core/tools/bash.js.map +1 -1
  358. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  359. package/dist/core/tools/edit-diff.js.map +1 -1
  360. package/dist/core/tools/edit.d.ts +1 -2
  361. package/dist/core/tools/edit.d.ts.map +1 -1
  362. package/dist/core/tools/edit.js +0 -3
  363. package/dist/core/tools/edit.js.map +1 -1
  364. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
  365. package/dist/core/tools/file-mutation-queue.js.map +1 -1
  366. package/dist/core/tools/find.d.ts.map +1 -1
  367. package/dist/core/tools/find.js +0 -2
  368. package/dist/core/tools/find.js.map +1 -1
  369. package/dist/core/tools/grep.d.ts.map +1 -1
  370. package/dist/core/tools/grep.js +0 -2
  371. package/dist/core/tools/grep.js.map +1 -1
  372. package/dist/core/tools/index.d.ts.map +1 -1
  373. package/dist/core/tools/index.js.map +1 -1
  374. package/dist/core/tools/ls.d.ts.map +1 -1
  375. package/dist/core/tools/ls.js +0 -2
  376. package/dist/core/tools/ls.js.map +1 -1
  377. package/dist/core/tools/output-accumulator.d.ts +11 -0
  378. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  379. package/dist/core/tools/output-accumulator.js +40 -10
  380. package/dist/core/tools/output-accumulator.js.map +1 -1
  381. package/dist/core/tools/path-utils.d.ts.map +1 -1
  382. package/dist/core/tools/path-utils.js.map +1 -1
  383. package/dist/core/tools/powershell.d.ts.map +1 -1
  384. package/dist/core/tools/powershell.js.map +1 -1
  385. package/dist/core/tools/read.d.ts +17 -1
  386. package/dist/core/tools/read.d.ts.map +1 -1
  387. package/dist/core/tools/read.js +23 -4
  388. package/dist/core/tools/read.js.map +1 -1
  389. package/dist/core/tools/tool-definition-wrapper.d.ts +5 -3
  390. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  391. package/dist/core/tools/tool-definition-wrapper.js +3 -1
  392. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  393. package/dist/core/tools/truncate.d.ts +14 -0
  394. package/dist/core/tools/truncate.d.ts.map +1 -1
  395. package/dist/core/tools/truncate.js +29 -0
  396. package/dist/core/tools/truncate.js.map +1 -1
  397. package/dist/core/tools/write.d.ts.map +1 -1
  398. package/dist/core/tools/write.js +0 -2
  399. package/dist/core/tools/write.js.map +1 -1
  400. package/dist/core/trust-manager.d.ts.map +1 -1
  401. package/dist/core/trust-manager.js +1 -0
  402. package/dist/core/trust-manager.js.map +1 -1
  403. package/dist/core/usage-totals.d.ts +3 -1
  404. package/dist/core/usage-totals.d.ts.map +1 -1
  405. package/dist/core/usage-totals.js +28 -1
  406. package/dist/core/usage-totals.js.map +1 -1
  407. package/dist/core/virtual-models.d.ts +117 -0
  408. package/dist/core/virtual-models.d.ts.map +1 -0
  409. package/dist/core/virtual-models.js +124 -0
  410. package/dist/core/virtual-models.js.map +1 -0
  411. package/dist/extensions/browser/index.d.ts.map +1 -1
  412. package/dist/extensions/browser/index.js.map +1 -1
  413. package/dist/extensions/codemode/execute.d.ts +16 -0
  414. package/dist/extensions/codemode/execute.d.ts.map +1 -0
  415. package/dist/extensions/codemode/execute.js +665 -0
  416. package/dist/extensions/codemode/execute.js.map +1 -0
  417. package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
  418. package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
  419. package/dist/extensions/codemode/execute.lazy.js +3 -0
  420. package/dist/extensions/codemode/execute.lazy.js.map +1 -0
  421. package/dist/extensions/codemode/index.d.ts +21 -0
  422. package/dist/extensions/codemode/index.d.ts.map +1 -0
  423. package/dist/extensions/codemode/index.js +33 -0
  424. package/dist/extensions/codemode/index.js.map +1 -0
  425. package/dist/extensions/codemode/tool.d.ts +124 -0
  426. package/dist/extensions/codemode/tool.d.ts.map +1 -0
  427. package/dist/extensions/codemode/tool.js +286 -0
  428. package/dist/extensions/codemode/tool.js.map +1 -0
  429. package/dist/extensions/codemode/worker.d.ts +7 -0
  430. package/dist/extensions/codemode/worker.d.ts.map +1 -0
  431. package/dist/extensions/codemode/worker.js +7 -0
  432. package/dist/extensions/codemode/worker.js.map +1 -0
  433. package/dist/extensions/context-pruning/compress_context.d.ts.map +1 -1
  434. package/dist/extensions/context-pruning/compress_context.js +1 -3
  435. package/dist/extensions/context-pruning/compress_context.js.map +1 -1
  436. package/dist/extensions/context-pruning/context-pruning-state.d.ts.map +1 -1
  437. package/dist/extensions/context-pruning/context-pruning-state.js.map +1 -1
  438. package/dist/extensions/index.d.ts.map +1 -1
  439. package/dist/extensions/index.js +6 -2
  440. package/dist/extensions/index.js.map +1 -1
  441. package/dist/extensions/llama/client.d.ts +2 -0
  442. package/dist/extensions/llama/client.d.ts.map +1 -1
  443. package/dist/extensions/llama/client.js +7 -3
  444. package/dist/extensions/llama/client.js.map +1 -1
  445. package/dist/extensions/llama/huggingface.d.ts.map +1 -1
  446. package/dist/extensions/llama/huggingface.js.map +1 -1
  447. package/dist/extensions/llama/index.d.ts.map +1 -1
  448. package/dist/extensions/llama/index.js +0 -4
  449. package/dist/extensions/llama/index.js.map +1 -1
  450. package/dist/extensions/llama/provider.d.ts +1 -1
  451. package/dist/extensions/llama/provider.d.ts.map +1 -1
  452. package/dist/extensions/llama/provider.js +103 -13
  453. package/dist/extensions/llama/provider.js.map +1 -1
  454. package/dist/extensions/llama/ui.d.ts +3 -2
  455. package/dist/extensions/llama/ui.d.ts.map +1 -1
  456. package/dist/extensions/llama/ui.js +106 -364
  457. package/dist/extensions/llama/ui.js.map +1 -1
  458. package/dist/extensions/mcp/cli.d.ts +21 -0
  459. package/dist/extensions/mcp/cli.d.ts.map +1 -0
  460. package/dist/extensions/mcp/cli.js +494 -0
  461. package/dist/extensions/mcp/cli.js.map +1 -0
  462. package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
  463. package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
  464. package/dist/extensions/mcp/cli.lazy.js +3 -0
  465. package/dist/extensions/mcp/cli.lazy.js.map +1 -0
  466. package/dist/extensions/mcp/config.d.ts +84 -0
  467. package/dist/extensions/mcp/config.d.ts.map +1 -0
  468. package/dist/extensions/mcp/config.js +196 -0
  469. package/dist/extensions/mcp/config.js.map +1 -0
  470. package/dist/extensions/mcp/index.d.ts +71 -2
  471. package/dist/extensions/mcp/index.d.ts.map +1 -1
  472. package/dist/extensions/mcp/index.js +839 -131
  473. package/dist/extensions/mcp/index.js.map +1 -1
  474. package/dist/extensions/mcp/log.d.ts +16 -0
  475. package/dist/extensions/mcp/log.d.ts.map +1 -0
  476. package/dist/extensions/mcp/log.js +66 -0
  477. package/dist/extensions/mcp/log.js.map +1 -0
  478. package/dist/extensions/mcp/oauth.d.ts +102 -0
  479. package/dist/extensions/mcp/oauth.d.ts.map +1 -0
  480. package/dist/extensions/mcp/oauth.js +428 -0
  481. package/dist/extensions/mcp/oauth.js.map +1 -0
  482. package/dist/extensions/mcp/resources.d.ts +36 -0
  483. package/dist/extensions/mcp/resources.d.ts.map +1 -0
  484. package/dist/extensions/mcp/resources.js +261 -0
  485. package/dist/extensions/mcp/resources.js.map +1 -0
  486. package/dist/extensions/mcp/runtime.d.ts +98 -0
  487. package/dist/extensions/mcp/runtime.d.ts.map +1 -0
  488. package/dist/extensions/mcp/runtime.js +378 -0
  489. package/dist/extensions/mcp/runtime.js.map +1 -0
  490. package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
  491. package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
  492. package/dist/extensions/mcp/runtime.lazy.js +3 -0
  493. package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
  494. package/dist/extensions/mcp/tools.d.ts +84 -0
  495. package/dist/extensions/mcp/tools.d.ts.map +1 -0
  496. package/dist/extensions/mcp/tools.js +263 -0
  497. package/dist/extensions/mcp/tools.js.map +1 -0
  498. package/dist/extensions/punch/a2a-listen.d.ts +9 -0
  499. package/dist/extensions/punch/a2a-listen.d.ts.map +1 -0
  500. package/dist/extensions/punch/a2a-listen.js +88 -0
  501. package/dist/extensions/punch/a2a-listen.js.map +1 -0
  502. package/dist/extensions/punch/a2a.d.ts +12 -0
  503. package/dist/extensions/punch/a2a.d.ts.map +1 -0
  504. package/dist/extensions/punch/a2a.js +106 -0
  505. package/dist/extensions/punch/a2a.js.map +1 -0
  506. package/dist/extensions/punch/auth.d.ts +2 -1
  507. package/dist/extensions/punch/auth.d.ts.map +1 -1
  508. package/dist/extensions/punch/auth.js +5 -1
  509. package/dist/extensions/punch/auth.js.map +1 -1
  510. package/dist/extensions/punch/collabs.d.ts.map +1 -1
  511. package/dist/extensions/punch/collabs.js.map +1 -1
  512. package/dist/extensions/punch/index.d.ts.map +1 -1
  513. package/dist/extensions/punch/index.js +11 -15
  514. package/dist/extensions/punch/index.js.map +1 -1
  515. package/dist/extensions/punch/routines.d.ts +1 -3
  516. package/dist/extensions/punch/routines.d.ts.map +1 -1
  517. package/dist/extensions/punch/routines.js +1 -121
  518. package/dist/extensions/punch/routines.js.map +1 -1
  519. package/dist/extensions/punch/server.d.ts +3 -0
  520. package/dist/extensions/punch/server.d.ts.map +1 -1
  521. package/dist/extensions/punch/server.js +41 -3
  522. package/dist/extensions/punch/server.js.map +1 -1
  523. package/dist/extensions/punch/timezone.d.ts.map +1 -1
  524. package/dist/extensions/punch/timezone.js.map +1 -1
  525. package/dist/extensions/punch/todo-store.d.ts +15 -0
  526. package/dist/extensions/punch/todo-store.d.ts.map +1 -0
  527. package/dist/extensions/punch/todo-store.js +208 -0
  528. package/dist/extensions/punch/todo-store.js.map +1 -0
  529. package/dist/extensions/punch/todos.d.ts +7 -3
  530. package/dist/extensions/punch/todos.d.ts.map +1 -1
  531. package/dist/extensions/punch/todos.js +40 -17
  532. package/dist/extensions/punch/todos.js.map +1 -1
  533. package/dist/extensions/report-progress/index.d.ts.map +1 -1
  534. package/dist/extensions/report-progress/index.js.map +1 -1
  535. package/dist/extensions/subagent/agents.d.ts.map +1 -1
  536. package/dist/extensions/subagent/agents.js.map +1 -1
  537. package/dist/extensions/subagent/index.d.ts.map +1 -1
  538. package/dist/extensions/subagent/index.js +0 -372
  539. package/dist/extensions/subagent/index.js.map +1 -1
  540. package/dist/extensions/tool-search/index.d.ts +12 -0
  541. package/dist/extensions/tool-search/index.d.ts.map +1 -0
  542. package/dist/extensions/tool-search/index.js +15 -0
  543. package/dist/extensions/tool-search/index.js.map +1 -0
  544. package/dist/extensions/tool-search/tool.d.ts +71 -0
  545. package/dist/extensions/tool-search/tool.d.ts.map +1 -0
  546. package/dist/extensions/tool-search/tool.js +187 -0
  547. package/dist/extensions/tool-search/tool.js.map +1 -0
  548. package/dist/extensions/webfetch/index.d.ts.map +1 -1
  549. package/dist/extensions/webfetch/index.js.map +1 -1
  550. package/dist/extensions/websearch/index.d.ts.map +1 -1
  551. package/dist/extensions/websearch/index.js.map +1 -1
  552. package/dist/index.d.ts +13 -6
  553. package/dist/index.d.ts.map +1 -1
  554. package/dist/index.js +9 -6
  555. package/dist/index.js.map +1 -1
  556. package/dist/main.d.ts +1 -1
  557. package/dist/main.d.ts.map +1 -1
  558. package/dist/main.js +140 -173
  559. package/dist/main.js.map +1 -1
  560. package/dist/migrations.d.ts.map +1 -1
  561. package/dist/migrations.js +0 -20
  562. package/dist/migrations.js.map +1 -1
  563. package/dist/modes/index.d.ts +0 -1
  564. package/dist/modes/index.d.ts.map +1 -1
  565. package/dist/modes/index.js +0 -1
  566. package/dist/modes/index.js.map +1 -1
  567. package/dist/modes/json-event.d.ts.map +1 -1
  568. package/dist/modes/json-event.js.map +1 -1
  569. package/dist/modes/print-mode.d.ts.map +1 -1
  570. package/dist/modes/print-mode.js +4 -0
  571. package/dist/modes/print-mode.js.map +1 -1
  572. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  573. package/dist/modes/rpc/jsonl.js.map +1 -1
  574. package/dist/modes/rpc/rpc-client.d.ts +10 -6
  575. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  576. package/dist/modes/rpc/rpc-client.js +19 -8
  577. package/dist/modes/rpc/rpc-client.js.map +1 -1
  578. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  579. package/dist/modes/rpc/rpc-mode.js +30 -48
  580. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  581. package/dist/modes/rpc/rpc-types.d.ts +21 -1
  582. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  583. package/dist/modes/rpc/rpc-types.js.map +1 -1
  584. package/dist/package-manager-cli.d.ts.map +1 -1
  585. package/dist/package-manager-cli.js +43 -43
  586. package/dist/package-manager-cli.js.map +1 -1
  587. package/dist/rpc-entry.d.ts.map +1 -1
  588. package/dist/rpc-entry.js.map +1 -1
  589. package/dist/server/a2a/harness-runner.d.ts.map +1 -1
  590. package/dist/server/a2a/harness-runner.js.map +1 -1
  591. package/dist/server/a2a/run-server.d.ts.map +1 -1
  592. package/dist/server/a2a/run-server.js.map +1 -1
  593. package/dist/utils/abort.d.ts.map +1 -1
  594. package/dist/utils/abort.js.map +1 -1
  595. package/dist/utils/ansi.d.ts +8 -0
  596. package/dist/utils/ansi.d.ts.map +1 -1
  597. package/dist/utils/ansi.js +30 -11
  598. package/dist/utils/ansi.js.map +1 -1
  599. package/dist/utils/changelog.d.ts.map +1 -1
  600. package/dist/utils/changelog.js +5 -2
  601. package/dist/utils/changelog.js.map +1 -1
  602. package/dist/utils/child-process.d.ts.map +1 -1
  603. package/dist/utils/child-process.js.map +1 -1
  604. package/dist/utils/clipboard-command.d.ts.map +1 -1
  605. package/dist/utils/clipboard-command.js.map +1 -1
  606. package/dist/utils/clipboard-image.d.ts.map +1 -1
  607. package/dist/utils/clipboard-image.js +15 -41
  608. package/dist/utils/clipboard-image.js.map +1 -1
  609. package/dist/utils/clipboard.d.ts.map +1 -1
  610. package/dist/utils/clipboard.js +96 -38
  611. package/dist/utils/clipboard.js.map +1 -1
  612. package/dist/utils/colors.d.ts +73 -0
  613. package/dist/utils/colors.d.ts.map +1 -0
  614. package/dist/utils/colors.js +273 -0
  615. package/dist/utils/colors.js.map +1 -0
  616. package/dist/utils/deprecation.d.ts.map +1 -1
  617. package/dist/utils/deprecation.js.map +1 -1
  618. package/dist/utils/exif-orientation.d.ts.map +1 -1
  619. package/dist/utils/exif-orientation.js.map +1 -1
  620. package/dist/utils/frontmatter.d.ts.map +1 -1
  621. package/dist/utils/frontmatter.js.map +1 -1
  622. package/dist/utils/fs-watch.d.ts.map +1 -1
  623. package/dist/utils/fs-watch.js.map +1 -1
  624. package/dist/utils/fuzzy.d.ts +16 -0
  625. package/dist/utils/fuzzy.d.ts.map +1 -0
  626. package/dist/utils/fuzzy.js +111 -0
  627. package/dist/utils/fuzzy.js.map +1 -0
  628. package/dist/utils/git.d.ts.map +1 -1
  629. package/dist/utils/git.js.map +1 -1
  630. package/dist/utils/html.d.ts.map +1 -1
  631. package/dist/utils/html.js.map +1 -1
  632. package/dist/utils/image-convert.d.ts.map +1 -1
  633. package/dist/utils/image-convert.js.map +1 -1
  634. package/dist/utils/image-process.d.ts.map +1 -1
  635. package/dist/utils/image-process.js.map +1 -1
  636. package/dist/utils/image-resize-core.d.ts +12 -0
  637. package/dist/utils/image-resize-core.d.ts.map +1 -1
  638. package/dist/utils/image-resize-core.js +5 -0
  639. package/dist/utils/image-resize-core.js.map +1 -1
  640. package/dist/utils/image-resize-worker.d.ts.map +1 -1
  641. package/dist/utils/image-resize-worker.js +3 -2
  642. package/dist/utils/image-resize-worker.js.map +1 -1
  643. package/dist/utils/image-resize.d.ts.map +1 -1
  644. package/dist/utils/image-resize.js +9 -10
  645. package/dist/utils/image-resize.js.map +1 -1
  646. package/dist/utils/json.d.ts.map +1 -1
  647. package/dist/utils/json.js.map +1 -1
  648. package/dist/utils/management-http.d.ts.map +1 -1
  649. package/dist/utils/management-http.js.map +1 -1
  650. package/dist/utils/mime.d.ts.map +1 -1
  651. package/dist/utils/mime.js +1 -1
  652. package/dist/utils/mime.js.map +1 -1
  653. package/dist/utils/oklab.d.ts +43 -0
  654. package/dist/utils/oklab.d.ts.map +1 -0
  655. package/dist/utils/oklab.js +210 -0
  656. package/dist/utils/oklab.js.map +1 -0
  657. package/dist/utils/open-browser.d.ts.map +1 -1
  658. package/dist/utils/open-browser.js.map +1 -1
  659. package/dist/utils/output-files.d.ts +15 -0
  660. package/dist/utils/output-files.d.ts.map +1 -0
  661. package/dist/utils/output-files.js +30 -0
  662. package/dist/utils/output-files.js.map +1 -0
  663. package/dist/utils/paths.d.ts +3 -3
  664. package/dist/utils/paths.d.ts.map +1 -1
  665. package/dist/utils/paths.js +5 -4
  666. package/dist/utils/paths.js.map +1 -1
  667. package/dist/utils/photon.d.ts.map +1 -1
  668. package/dist/utils/photon.js.map +1 -1
  669. package/dist/utils/pi-user-agent.d.ts.map +1 -1
  670. package/dist/utils/pi-user-agent.js.map +1 -1
  671. package/dist/utils/shell.d.ts +1 -3
  672. package/dist/utils/shell.d.ts.map +1 -1
  673. package/dist/utils/shell.js +3 -30
  674. package/dist/utils/shell.js.map +1 -1
  675. package/dist/utils/sleep.d.ts.map +1 -1
  676. package/dist/utils/sleep.js.map +1 -1
  677. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  678. package/dist/utils/syntax-highlight.js +8 -1
  679. package/dist/utils/syntax-highlight.js.map +1 -1
  680. package/dist/utils/text.d.ts.map +1 -1
  681. package/dist/utils/text.js.map +1 -1
  682. package/dist/utils/tool-result-images.d.ts +3 -1
  683. package/dist/utils/tool-result-images.d.ts.map +1 -1
  684. package/dist/utils/tool-result-images.js +4 -1
  685. package/dist/utils/tool-result-images.js.map +1 -1
  686. package/dist/utils/tools-manager.d.ts.map +1 -1
  687. package/dist/utils/tools-manager.js.map +1 -1
  688. package/dist/utils/version-check.d.ts.map +1 -1
  689. package/dist/utils/version-check.js.map +1 -1
  690. package/dist/utils/windows-self-update.d.ts.map +1 -1
  691. package/dist/utils/windows-self-update.js.map +1 -1
  692. package/dist/utils/wsl.d.ts +3 -0
  693. package/dist/utils/wsl.d.ts.map +1 -0
  694. package/dist/utils/wsl.js +15 -0
  695. package/dist/utils/wsl.js.map +1 -0
  696. package/dist/utils/zip.d.ts +7 -0
  697. package/dist/utils/zip.d.ts.map +1 -0
  698. package/dist/utils/zip.js +60 -0
  699. package/dist/utils/zip.js.map +1 -0
  700. package/docs/cli-integration.md +106 -0
  701. package/docs/cli.md +333 -0
  702. package/docs/codemode.md +230 -0
  703. package/docs/compaction.md +47 -28
  704. package/docs/configuration.md +47 -0
  705. package/docs/containerization.md +109 -82
  706. package/docs/custom-provider.md +109 -713
  707. package/docs/docs.json +152 -96
  708. package/docs/environment-variables.md +18 -3
  709. package/docs/extensions.md +284 -604
  710. package/docs/how-pi-works.md +49 -0
  711. package/docs/images/interactive-mode.png +0 -0
  712. package/docs/index.md +24 -69
  713. package/docs/json.md +193 -65
  714. package/docs/keybindings.md +58 -103
  715. package/docs/llama-cpp.md +24 -4
  716. package/docs/mcp.md +272 -0
  717. package/docs/message-types.md +279 -0
  718. package/docs/models.md +124 -489
  719. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  720. package/docs/packages.md +67 -166
  721. package/docs/prompt-templates.md +31 -68
  722. package/docs/providers.md +158 -228
  723. package/docs/punch-todos.md +24 -0
  724. package/docs/quickstart.md +61 -106
  725. package/docs/rpc-commands.md +888 -0
  726. package/docs/rpc-extension-ui.md +200 -0
  727. package/docs/rpc.md +131 -1554
  728. package/docs/sdk.md +79 -1158
  729. package/docs/security.md +72 -32
  730. package/docs/session-format.md +58 -215
  731. package/docs/sessions.md +35 -114
  732. package/docs/settings.md +98 -326
  733. package/docs/shell-aliases.md +85 -5
  734. package/docs/skills.md +51 -190
  735. package/docs/slash-commands.md +60 -0
  736. package/docs/subagents.md +2 -0
  737. package/docs/terminal-setup.md +7 -182
  738. package/docs/termux.md +74 -83
  739. package/docs/themes.md +89 -273
  740. package/docs/tmux.md +31 -39
  741. package/docs/tui.md +74 -910
  742. package/docs/usage.md +52 -129
  743. package/docs/virtual-models.md +114 -0
  744. package/docs/windows.md +45 -17
  745. package/examples/README.md +13 -5
  746. package/examples/extensions/README.md +4 -30
  747. package/examples/extensions/custom-provider-anthropic/index.ts +18 -12
  748. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  749. package/examples/extensions/custom-provider-anthropic/package.json +17 -17
  750. package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
  751. package/examples/extensions/custom-provider-gitlab-duo/package.json +14 -14
  752. package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
  753. package/examples/extensions/debug-provider.ts +69 -0
  754. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  755. package/examples/extensions/gondolin/package-lock.json +5 -5
  756. package/examples/extensions/gondolin/package.json +1 -1
  757. package/examples/extensions/jev-router.ts +113 -0
  758. package/examples/extensions/prompt-customizer.ts +19 -67
  759. package/examples/extensions/sandbox/package-lock.json +2 -2
  760. package/examples/extensions/sandbox/package.json +1 -1
  761. package/examples/extensions/with-deps/package-lock.json +2 -2
  762. package/examples/extensions/with-deps/package.json +20 -20
  763. package/examples/rpc-client.ts +35 -0
  764. package/examples/sdk/14-codemode-mcp.ts +61 -0
  765. package/examples/sdk/README.md +3 -2
  766. package/npm-shrinkwrap.json +2425 -0
  767. package/package.json +30 -29
  768. package/schemas/models.schema.json +1157 -0
  769. package/schemas/settings.schema.json +734 -0
  770. package/schemas/theme.schema.json +365 -0
  771. package/src/extensions/punch/sqlite-bun.mjs +1 -0
  772. package/src/extensions/punch/sqlite-driver.d.mts +15 -0
  773. package/src/extensions/punch/sqlite-node.mjs +1 -0
  774. package/dist/bundle/chunks/anthropic-messages-ASRU76PT.js +0 -6
  775. package/dist/bundle/chunks/azure-openai-responses-UGF6LMEX.js +0 -2
  776. package/dist/bundle/chunks/chunk-5PRUVL6W.js +0 -1770
  777. package/dist/bundle/chunks/chunk-6R7UI4IY.js +0 -2
  778. package/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
  779. package/dist/bundle/chunks/chunk-CHB3CEFP.js +0 -2
  780. package/dist/bundle/chunks/chunk-ELBMWBDG.js +0 -11
  781. package/dist/bundle/chunks/chunk-GMWCTUPB.js +0 -2
  782. package/dist/bundle/chunks/chunk-GTBU4EAF.js +0 -2
  783. package/dist/bundle/chunks/chunk-NUHFSC37.js +0 -25
  784. package/dist/bundle/chunks/chunk-UIWY7TU5.js +0 -42
  785. package/dist/bundle/chunks/chunk-XNGRGP62.js +0 -2
  786. package/dist/bundle/chunks/google-generative-ai-VCD2PGIY.js +0 -2
  787. package/dist/bundle/chunks/google-vertex-L6U34ZRC.js +0 -2
  788. package/dist/bundle/chunks/mistral-conversations-IXWQ2YKN.js +0 -5
  789. package/dist/bundle/chunks/node-5YXRXMVN.js +0 -16
  790. package/dist/bundle/chunks/openai-codex-responses-P7HKQLIT.js +0 -10
  791. package/dist/bundle/chunks/openai-completions-O7BFLP3U.js +0 -7
  792. package/dist/bundle/chunks/openai-responses-QAKWAYVG.js +0 -2
  793. package/dist/cli/config-selector.d.ts +0 -16
  794. package/dist/cli/config-selector.d.ts.map +0 -1
  795. package/dist/cli/config-selector.js +0 -32
  796. package/dist/cli/config-selector.js.map +0 -1
  797. package/dist/cli/session-picker.d.ts +0 -10
  798. package/dist/cli/session-picker.d.ts.map +0 -1
  799. package/dist/cli/session-picker.js +0 -36
  800. package/dist/cli/session-picker.js.map +0 -1
  801. package/dist/cli/startup-ui.d.ts +0 -20
  802. package/dist/cli/startup-ui.d.ts.map +0 -1
  803. package/dist/cli/startup-ui.js +0 -185
  804. package/dist/cli/startup-ui.js.map +0 -1
  805. package/dist/core/keybindings.d.ts +0 -428
  806. package/dist/core/keybindings.d.ts.map +0 -1
  807. package/dist/core/keybindings.js +0 -321
  808. package/dist/core/keybindings.js.map +0 -1
  809. package/dist/core/tools/render-utils.d.ts +0 -24
  810. package/dist/core/tools/render-utils.d.ts.map +0 -1
  811. package/dist/core/tools/render-utils.js +0 -65
  812. package/dist/core/tools/render-utils.js.map +0 -1
  813. package/dist/core/tools/renderers/bash.d.ts +0 -12
  814. package/dist/core/tools/renderers/bash.d.ts.map +0 -1
  815. package/dist/core/tools/renderers/bash.js +0 -130
  816. package/dist/core/tools/renderers/bash.js.map +0 -1
  817. package/dist/core/tools/renderers/edit.d.ts +0 -23
  818. package/dist/core/tools/renderers/edit.d.ts.map +0 -1
  819. package/dist/core/tools/renderers/edit.js +0 -167
  820. package/dist/core/tools/renderers/edit.js.map +0 -1
  821. package/dist/core/tools/renderers/find.d.ts +0 -10
  822. package/dist/core/tools/renderers/find.d.ts.map +0 -1
  823. package/dist/core/tools/renderers/find.js +0 -64
  824. package/dist/core/tools/renderers/find.js.map +0 -1
  825. package/dist/core/tools/renderers/grep.d.ts +0 -10
  826. package/dist/core/tools/renderers/grep.d.ts.map +0 -1
  827. package/dist/core/tools/renderers/grep.js +0 -69
  828. package/dist/core/tools/renderers/grep.js.map +0 -1
  829. package/dist/core/tools/renderers/index.d.ts +0 -28
  830. package/dist/core/tools/renderers/index.d.ts.map +0 -1
  831. package/dist/core/tools/renderers/index.js +0 -47
  832. package/dist/core/tools/renderers/index.js.map +0 -1
  833. package/dist/core/tools/renderers/ls.d.ts +0 -10
  834. package/dist/core/tools/renderers/ls.d.ts.map +0 -1
  835. package/dist/core/tools/renderers/ls.js +0 -58
  836. package/dist/core/tools/renderers/ls.js.map +0 -1
  837. package/dist/core/tools/renderers/read.d.ts +0 -11
  838. package/dist/core/tools/renderers/read.d.ts.map +0 -1
  839. package/dist/core/tools/renderers/read.js +0 -129
  840. package/dist/core/tools/renderers/read.js.map +0 -1
  841. package/dist/core/tools/renderers/write.d.ts +0 -10
  842. package/dist/core/tools/renderers/write.d.ts.map +0 -1
  843. package/dist/core/tools/renderers/write.js +0 -153
  844. package/dist/core/tools/renderers/write.js.map +0 -1
  845. package/dist/extensions/mcp/mcp-client.d.ts +0 -31
  846. package/dist/extensions/mcp/mcp-client.d.ts.map +0 -1
  847. package/dist/extensions/mcp/mcp-client.js +0 -149
  848. package/dist/extensions/mcp/mcp-client.js.map +0 -1
  849. package/dist/extensions/mcp/mcp-config.d.ts +0 -47
  850. package/dist/extensions/mcp/mcp-config.d.ts.map +0 -1
  851. package/dist/extensions/mcp/mcp-config.js +0 -281
  852. package/dist/extensions/mcp/mcp-config.js.map +0 -1
  853. package/dist/extensions/mcp/mcp-transport.d.ts +0 -65
  854. package/dist/extensions/mcp/mcp-transport.d.ts.map +0 -1
  855. package/dist/extensions/mcp/mcp-transport.js +0 -278
  856. package/dist/extensions/mcp/mcp-transport.js.map +0 -1
  857. package/dist/modes/interactive/assets/clankolas.png +0 -0
  858. package/dist/modes/interactive/chat-viewport.d.ts +0 -20
  859. package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
  860. package/dist/modes/interactive/chat-viewport.js +0 -28
  861. package/dist/modes/interactive/chat-viewport.js.map +0 -1
  862. package/dist/modes/interactive/components/armin.d.ts +0 -34
  863. package/dist/modes/interactive/components/armin.d.ts.map +0 -1
  864. package/dist/modes/interactive/components/armin.js +0 -333
  865. package/dist/modes/interactive/components/armin.js.map +0 -1
  866. package/dist/modes/interactive/components/assistant-message.d.ts +0 -26
  867. package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
  868. package/dist/modes/interactive/components/assistant-message.js +0 -158
  869. package/dist/modes/interactive/components/assistant-message.js.map +0 -1
  870. package/dist/modes/interactive/components/bash-execution.d.ts +0 -34
  871. package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
  872. package/dist/modes/interactive/components/bash-execution.js +0 -175
  873. package/dist/modes/interactive/components/bash-execution.js.map +0 -1
  874. package/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
  875. package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
  876. package/dist/modes/interactive/components/bordered-loader.js +0 -54
  877. package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
  878. package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
  879. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
  880. package/dist/modes/interactive/components/branch-summary-message.js +0 -44
  881. package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
  882. package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
  883. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
  884. package/dist/modes/interactive/components/compaction-summary-message.js +0 -45
  885. package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
  886. package/dist/modes/interactive/components/config-selector.d.ts +0 -102
  887. package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
  888. package/dist/modes/interactive/components/config-selector.js +0 -761
  889. package/dist/modes/interactive/components/config-selector.js.map +0 -1
  890. package/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
  891. package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
  892. package/dist/modes/interactive/components/countdown-timer.js +0 -33
  893. package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
  894. package/dist/modes/interactive/components/custom-editor.d.ts +0 -30
  895. package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
  896. package/dist/modes/interactive/components/custom-editor.js +0 -115
  897. package/dist/modes/interactive/components/custom-editor.js.map +0 -1
  898. package/dist/modes/interactive/components/custom-entry.d.ts +0 -19
  899. package/dist/modes/interactive/components/custom-entry.d.ts.map +0 -1
  900. package/dist/modes/interactive/components/custom-entry.js +0 -52
  901. package/dist/modes/interactive/components/custom-entry.js.map +0 -1
  902. package/dist/modes/interactive/components/custom-message.d.ts +0 -22
  903. package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
  904. package/dist/modes/interactive/components/custom-message.js +0 -87
  905. package/dist/modes/interactive/components/custom-message.js.map +0 -1
  906. package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
  907. package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
  908. package/dist/modes/interactive/components/daxnuts.js +0 -140
  909. package/dist/modes/interactive/components/daxnuts.js.map +0 -1
  910. package/dist/modes/interactive/components/diff.d.ts +0 -12
  911. package/dist/modes/interactive/components/diff.d.ts.map +0 -1
  912. package/dist/modes/interactive/components/diff.js +0 -133
  913. package/dist/modes/interactive/components/diff.js.map +0 -1
  914. package/dist/modes/interactive/components/dynamic-border.d.ts +0 -15
  915. package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
  916. package/dist/modes/interactive/components/dynamic-border.js +0 -21
  917. package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
  918. package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
  919. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
  920. package/dist/modes/interactive/components/earendil-announcement.js +0 -40
  921. package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
  922. package/dist/modes/interactive/components/extension-editor.d.ts +0 -21
  923. package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
  924. package/dist/modes/interactive/components/extension-editor.js +0 -98
  925. package/dist/modes/interactive/components/extension-editor.js.map +0 -1
  926. package/dist/modes/interactive/components/extension-input.d.ts +0 -23
  927. package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
  928. package/dist/modes/interactive/components/extension-input.js +0 -61
  929. package/dist/modes/interactive/components/extension-input.js.map +0 -1
  930. package/dist/modes/interactive/components/extension-selector.d.ts +0 -26
  931. package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
  932. package/dist/modes/interactive/components/extension-selector.js +0 -83
  933. package/dist/modes/interactive/components/extension-selector.js.map +0 -1
  934. package/dist/modes/interactive/components/first-time-setup.d.ts +0 -25
  935. package/dist/modes/interactive/components/first-time-setup.d.ts.map +0 -1
  936. package/dist/modes/interactive/components/first-time-setup.js +0 -103
  937. package/dist/modes/interactive/components/first-time-setup.js.map +0 -1
  938. package/dist/modes/interactive/components/footer.d.ts +0 -32
  939. package/dist/modes/interactive/components/footer.d.ts.map +0 -1
  940. package/dist/modes/interactive/components/footer.js +0 -222
  941. package/dist/modes/interactive/components/footer.js.map +0 -1
  942. package/dist/modes/interactive/components/index.d.ts +0 -34
  943. package/dist/modes/interactive/components/index.d.ts.map +0 -1
  944. package/dist/modes/interactive/components/index.js +0 -35
  945. package/dist/modes/interactive/components/index.js.map +0 -1
  946. package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -13
  947. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
  948. package/dist/modes/interactive/components/keybinding-hints.js +0 -36
  949. package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
  950. package/dist/modes/interactive/components/login-dialog.d.ts +0 -52
  951. package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
  952. package/dist/modes/interactive/components/login-dialog.js +0 -188
  953. package/dist/modes/interactive/components/login-dialog.js.map +0 -1
  954. package/dist/modes/interactive/components/markdown-transform.d.ts +0 -3
  955. package/dist/modes/interactive/components/markdown-transform.d.ts.map +0 -1
  956. package/dist/modes/interactive/components/markdown-transform.js +0 -19
  957. package/dist/modes/interactive/components/markdown-transform.js.map +0 -1
  958. package/dist/modes/interactive/components/mermaid.d.ts +0 -11
  959. package/dist/modes/interactive/components/mermaid.d.ts.map +0 -1
  960. package/dist/modes/interactive/components/mermaid.js +0 -75
  961. package/dist/modes/interactive/components/mermaid.js.map +0 -1
  962. package/dist/modes/interactive/components/model-selector.d.ts +0 -60
  963. package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
  964. package/dist/modes/interactive/components/model-selector.js +0 -361
  965. package/dist/modes/interactive/components/model-selector.js.map +0 -1
  966. package/dist/modes/interactive/components/oauth-selector.d.ts +0 -33
  967. package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
  968. package/dist/modes/interactive/components/oauth-selector.js +0 -163
  969. package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
  970. package/dist/modes/interactive/components/question-selector.d.ts +0 -24
  971. package/dist/modes/interactive/components/question-selector.d.ts.map +0 -1
  972. package/dist/modes/interactive/components/question-selector.js +0 -158
  973. package/dist/modes/interactive/components/question-selector.js.map +0 -1
  974. package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -46
  975. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
  976. package/dist/modes/interactive/components/scoped-models-selector.js +0 -326
  977. package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
  978. package/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
  979. package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
  980. package/dist/modes/interactive/components/session-selector-search.js +0 -155
  981. package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
  982. package/dist/modes/interactive/components/session-selector.d.ts +0 -95
  983. package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
  984. package/dist/modes/interactive/components/session-selector.js +0 -867
  985. package/dist/modes/interactive/components/session-selector.js.map +0 -1
  986. package/dist/modes/interactive/components/settings-selector.d.ts +0 -92
  987. package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
  988. package/dist/modes/interactive/components/settings-selector.js +0 -709
  989. package/dist/modes/interactive/components/settings-selector.js.map +0 -1
  990. package/dist/modes/interactive/components/settings-submenu.d.ts +0 -72
  991. package/dist/modes/interactive/components/settings-submenu.d.ts.map +0 -1
  992. package/dist/modes/interactive/components/settings-submenu.js +0 -165
  993. package/dist/modes/interactive/components/settings-submenu.js.map +0 -1
  994. package/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
  995. package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
  996. package/dist/modes/interactive/components/show-images-selector.js +0 -39
  997. package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
  998. package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
  999. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
  1000. package/dist/modes/interactive/components/skill-invocation-message.js +0 -47
  1001. package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
  1002. package/dist/modes/interactive/components/status-indicator.d.ts +0 -30
  1003. package/dist/modes/interactive/components/status-indicator.d.ts.map +0 -1
  1004. package/dist/modes/interactive/components/status-indicator.js +0 -67
  1005. package/dist/modes/interactive/components/status-indicator.js.map +0 -1
  1006. package/dist/modes/interactive/components/theme-selector.d.ts +0 -11
  1007. package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
  1008. package/dist/modes/interactive/components/theme-selector.js +0 -50
  1009. package/dist/modes/interactive/components/theme-selector.js.map +0 -1
  1010. package/dist/modes/interactive/components/thinking-selector.d.ts +0 -23
  1011. package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
  1012. package/dist/modes/interactive/components/thinking-selector.js +0 -109
  1013. package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
  1014. package/dist/modes/interactive/components/tool-execution.d.ts +0 -80
  1015. package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
  1016. package/dist/modes/interactive/components/tool-execution.js +0 -328
  1017. package/dist/modes/interactive/components/tool-execution.js.map +0 -1
  1018. package/dist/modes/interactive/components/tree-selector.d.ts +0 -94
  1019. package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
  1020. package/dist/modes/interactive/components/tree-selector.js +0 -1245
  1021. package/dist/modes/interactive/components/tree-selector.js.map +0 -1
  1022. package/dist/modes/interactive/components/trust-selector.d.ts +0 -23
  1023. package/dist/modes/interactive/components/trust-selector.d.ts.map +0 -1
  1024. package/dist/modes/interactive/components/trust-selector.js +0 -91
  1025. package/dist/modes/interactive/components/trust-selector.js.map +0 -1
  1026. package/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
  1027. package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
  1028. package/dist/modes/interactive/components/user-message-selector.js +0 -114
  1029. package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
  1030. package/dist/modes/interactive/components/user-message.d.ts +0 -16
  1031. package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
  1032. package/dist/modes/interactive/components/user-message.js +0 -49
  1033. package/dist/modes/interactive/components/user-message.js.map +0 -1
  1034. package/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
  1035. package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
  1036. package/dist/modes/interactive/components/visual-truncate.js +0 -33
  1037. package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
  1038. package/dist/modes/interactive/external-editor.d.ts +0 -12
  1039. package/dist/modes/interactive/external-editor.d.ts.map +0 -1
  1040. package/dist/modes/interactive/external-editor.js +0 -38
  1041. package/dist/modes/interactive/external-editor.js.map +0 -1
  1042. package/dist/modes/interactive/interactive-mode.d.ts +0 -443
  1043. package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
  1044. package/dist/modes/interactive/interactive-mode.js +0 -5604
  1045. package/dist/modes/interactive/interactive-mode.js.map +0 -1
  1046. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
  1047. package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
  1048. package/dist/modes/interactive/model-search.d.ts +0 -12
  1049. package/dist/modes/interactive/model-search.d.ts.map +0 -1
  1050. package/dist/modes/interactive/model-search.js +0 -15
  1051. package/dist/modes/interactive/model-search.js.map +0 -1
  1052. package/dist/modes/interactive/session-share.d.ts +0 -16
  1053. package/dist/modes/interactive/session-share.d.ts.map +0 -1
  1054. package/dist/modes/interactive/session-share.js +0 -184
  1055. package/dist/modes/interactive/session-share.js.map +0 -1
  1056. package/dist/modes/interactive/theme/dark.json +0 -91
  1057. package/dist/modes/interactive/theme/light.json +0 -90
  1058. package/dist/modes/interactive/theme/theme-controller.d.ts +0 -41
  1059. package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
  1060. package/dist/modes/interactive/theme/theme-controller.js +0 -130
  1061. package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
  1062. package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
  1063. package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  1064. package/dist/modes/interactive/theme/theme-json.js +0 -130
  1065. package/dist/modes/interactive/theme/theme-json.js.map +0 -1
  1066. package/dist/modes/interactive/theme/theme-schema.json +0 -356
  1067. package/dist/modes/interactive/theme/theme.d.ts +0 -131
  1068. package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
  1069. package/dist/modes/interactive/theme/theme.js.map +0 -1
  1070. package/dist/modes/interactive/tui-renderer.d.ts +0 -21
  1071. package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
  1072. package/dist/modes/interactive/tui-renderer.js +0 -66
  1073. package/dist/modes/interactive/tui-renderer.js.map +0 -1
  1074. package/docs/development.md +0 -90
  1075. package/examples/extensions/border-status-editor.ts +0 -145
  1076. package/examples/extensions/built-in-tool-renderer.ts +0 -249
  1077. package/examples/extensions/custom-footer.ts +0 -64
  1078. package/examples/extensions/custom-header.ts +0 -73
  1079. package/examples/extensions/doom-overlay/README.md +0 -46
  1080. package/examples/extensions/doom-overlay/doom/build/doom.js +0 -21
  1081. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  1082. package/examples/extensions/doom-overlay/doom/build.sh +0 -152
  1083. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
  1084. package/examples/extensions/doom-overlay/doom-component.ts +0 -132
  1085. package/examples/extensions/doom-overlay/doom-engine.ts +0 -173
  1086. package/examples/extensions/doom-overlay/doom-keys.ts +0 -104
  1087. package/examples/extensions/doom-overlay/index.ts +0 -74
  1088. package/examples/extensions/doom-overlay/wad-finder.ts +0 -55
  1089. package/examples/extensions/entry-renderer.ts +0 -41
  1090. package/examples/extensions/github-issue-autocomplete.ts +0 -185
  1091. package/examples/extensions/handoff.ts +0 -190
  1092. package/examples/extensions/interactive-shell.ts +0 -196
  1093. package/examples/extensions/kimi-deferred-tools.ts +0 -61
  1094. package/examples/extensions/message-renderer.ts +0 -59
  1095. package/examples/extensions/minimal-mode.ts +0 -426
  1096. package/examples/extensions/modal-editor.ts +0 -85
  1097. package/examples/extensions/overlay-qa-tests.ts +0 -1450
  1098. package/examples/extensions/overlay-test.ts +0 -153
  1099. package/examples/extensions/plan-mode/README.md +0 -66
  1100. package/examples/extensions/plan-mode/index.ts +0 -390
  1101. package/examples/extensions/plan-mode/utils.ts +0 -168
  1102. package/examples/extensions/preset.ts +0 -436
  1103. package/examples/extensions/qna.ts +0 -118
  1104. package/examples/extensions/question.ts +0 -278
  1105. package/examples/extensions/questionnaire.ts +0 -440
  1106. package/examples/extensions/rainbow-editor.ts +0 -88
  1107. package/examples/extensions/snake.ts +0 -343
  1108. package/examples/extensions/space-invaders.ts +0 -560
  1109. package/examples/extensions/structured-output.ts +0 -65
  1110. package/examples/extensions/summarize.ts +0 -199
  1111. package/examples/extensions/tic-tac-toe.ts +0 -1008
  1112. package/examples/extensions/todo.ts +0 -297
  1113. package/examples/extensions/tools.ts +0 -146
  1114. package/examples/extensions/truncated-tool.ts +0 -195
  1115. package/examples/plugins/pi-example-plugin/README.md +0 -38
  1116. package/examples/plugins/pi-example-plugin/package.json +0 -10
  1117. package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
  1118. package/examples/plugins/pi-example-plugin/src/session.ts +0 -23
  1119. package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
  1120. package/examples/rpc-extension-ui.ts +0 -641
  1121. /package/dist/bundle/chunks/{chunk-PATAL4PO.js → chunk-7ZC4UXSL.js} +0 -0
package/docs/termux.md CHANGED
@@ -1,126 +1,117 @@
1
- # Termux (Android) Setup
1
+ # Run Pi on Android with Termux
2
2
 
3
- Pi runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android.
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
4
 
5
- ## Prerequisites
5
+ ## Before you begin
6
6
 
7
- 1. Install [Termux](https://github.com/termux/termux-app#installation) from GitHub or F-Droid (not Google Play, that version is deprecated)
8
- 2. Install [Termux:API](https://github.com/termux/termux-api#installation) from GitHub or F-Droid for clipboard and other device integrations
7
+ Install Termux from [GitHub or F-Droid](https://github.com/termux/termux-app#installation). Do not use the deprecated Google Play build.
9
8
 
10
- ## Installation
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.
11
10
 
12
- ```bash
13
- # Update packages
14
- pkg update && pkg upgrade
11
+ ## Install Pi
15
12
 
16
- # Install dependencies
17
- pkg install nodejs termux-api git
13
+ 1. Update Termux packages:
18
14
 
19
- # Install pi
20
- npm install -g --ignore-scripts @punch-bot/cli
15
+ ```bash
16
+ pkg update && pkg upgrade
17
+ ```
21
18
 
22
- # Create config directory
23
- mkdir -p ~/.pi/agent
19
+ 2. Install Node.js and Git:
24
20
 
25
- # Run pi
26
- pi
27
- ```
21
+ ```bash
22
+ pkg install nodejs git
23
+ ```
28
24
 
29
- ## Clipboard Support
25
+ 3. Install Pi:
30
26
 
31
- Clipboard operations use `termux-clipboard-set` and `termux-clipboard-get` when running in Termux. The Termux:API app must be installed for these to work.
27
+ ```bash
28
+ npm install -g --ignore-scripts @punch-bot/cli
29
+ ```
32
30
 
33
- Image clipboard is not supported on Termux (the `ctrl+v` image paste feature will not work).
31
+ 4. Verify the installation:
34
32
 
35
- ## Example AGENTS.md for Termux
33
+ ```bash
34
+ pi --version
35
+ ```
36
36
 
37
- Create `~/.pi/agent/AGENTS.md` to help the agent understand the Termux environment:
37
+ 5. Open the folder you want to work in and start Pi:
38
38
 
39
- ````markdown
40
- # Agent Environment: Termux on Android
39
+ ```bash
40
+ cd /path/to/working-folder
41
+ pi
42
+ ```
41
43
 
42
- ## Location
43
- - **OS**: Android (Termux terminal emulator)
44
- - **Home**: `/data/data/com.termux/files/home`
45
- - **Prefix**: `/data/data/com.termux/files/usr`
46
- - **Shared storage**: `/storage/emulated/0` (Downloads, Documents, etc.)
44
+ Continue with the main [Quickstart](quickstart.md#3-choose-a-model) to connect a model and run your first task.
47
45
 
48
- ## Opening URLs
49
- ```bash
50
- termux-open-url "https://example.com"
51
- ```
46
+ ## Access Android shared storage
52
47
 
53
- ## Opening Files
54
- ```bash
55
- termux-open file.pdf # Opens with default app
56
- termux-open --chooser image.jpg # Choose app
57
- ```
48
+ Termux cannot access shared Android storage until you grant permission. Run this once:
58
49
 
59
- ## Clipboard
60
50
  ```bash
61
- termux-clipboard-set "text" # Copy
62
- termux-clipboard-get # Paste
51
+ termux-setup-storage
63
52
  ```
64
53
 
65
- ## Notifications
66
- ```bash
67
- termux-notification -t "Title" -c "Content"
68
- ```
54
+ After approval, Android shared storage is available under `/storage/emulated/0` and through the links Termux creates under `~/storage/`.
69
55
 
70
- ## Device Info
71
- ```bash
72
- termux-battery-status # Battery info
73
- termux-wifi-connectioninfo # WiFi info
74
- termux-telephony-deviceinfo # Device info
75
- ```
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:
76
61
 
77
- ## Sharing
78
62
  ```bash
79
- termux-share -a send file.txt # Share file
63
+ pkg install termux-api
80
64
  ```
81
65
 
82
- ## Other Useful Commands
66
+ Verify the integration:
67
+
83
68
  ```bash
84
- termux-toast "message" # Quick toast popup
85
- termux-vibrate # Vibrate device
86
- termux-tts-speak "hello" # Text to speech
87
- termux-camera-photo out.jpg # Take photo
69
+ printf 'Pi clipboard test' | termux-clipboard-set
70
+ termux-clipboard-get
88
71
  ```
89
72
 
90
- ## Notes
91
- - Termux:API app must be installed for `termux-*` commands
92
- - Use `pkg install termux-api` for the command-line tools
93
- - Storage permission needed for `/storage/emulated/0` access
94
- ````
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`:
95
80
 
96
- ## Limitations
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
+ ````
97
90
 
98
- - **No image clipboard**: Termux clipboard API only supports text
99
- - **Storage access**: To access files in `/storage/emulated/0` (Downloads, etc.), run `termux-setup-storage` once to grant permissions
91
+ Run `/reload` after changing the file during an active session.
100
92
 
101
93
  ## Troubleshooting
102
94
 
103
- ### Clipboard not working
95
+ ### Clipboard integration fails
104
96
 
105
- Ensure both apps are installed:
106
- 1. Termux (from GitHub or F-Droid)
107
- 2. Termux:API (from GitHub or F-Droid)
97
+ Confirm that you installed both components:
108
98
 
109
- Then install the CLI tools:
110
- ```bash
111
- pkg install termux-api
112
- ```
99
+ 1. The Termux:API Android app from the same source as Termux
100
+ 2. The `termux-api` command-line package
113
101
 
114
- ### Permission denied for shared storage
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.
115
103
 
116
- Run once to grant storage permissions:
117
- ```bash
118
- termux-setup-storage
119
- ```
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`.
120
107
 
121
- ### Node.js installation issues
108
+ ### Pi is not found after installation
109
+
110
+ Open a new Termux shell and run:
122
111
 
123
- If npm fails, try clearing the cache:
124
112
  ```bash
125
- npm cache clean --force
113
+ npm prefix -g
114
+ command -v pi
126
115
  ```
116
+
117
+ Confirm that the global npm binary directory is on `PATH`, then reinstall Pi if the package is missing.
package/docs/themes.md CHANGED
@@ -1,322 +1,138 @@
1
- > pi can create themes. Ask it to build one for your setup.
1
+ # Customize Pi with themes
2
2
 
3
- # Themes
3
+ Themes control the colors Pi uses in interactive mode and HTML exports. Pi includes the `system`, `dark`, and `light` themes. You can select one theme, follow your terminal's light or dark appearance, or create your own palette.
4
4
 
5
- Themes are JSON files that define colors for the TUI.
5
+ ## Use your terminal's colors
6
6
 
7
- ## Table of Contents
7
+ The `system` theme is the default. It builds Pi's colors from your terminal's theme, so Pi matches the terminal instead of bringing its own palette:
8
8
 
9
- - [Locations](#locations)
10
- - [Selecting a Theme](#selecting-a-theme)
11
- - [Creating a Custom Theme](#creating-a-custom-theme)
12
- - [Theme Format](#theme-format)
13
- - [Color Tokens](#color-tokens)
14
- - [Color Values](#color-values)
15
- - [Tips](#tips)
9
+ - Pi queries the terminal's default foreground and background colors and its 16 ANSI colors.
10
+ - Each Pi color takes its hue from one ANSI color, for example errors from red and links from blue.
11
+ - Pi sets each color's lightness so that it stands out from the background by a minimum contrast. Body text keeps at least a 4.5:1 WCAG contrast ratio on the background and every panel.
12
+ - When the terminal switches between light and dark, Pi queries the colors again and rebuilds the theme.
16
13
 
17
- ## Locations
14
+ The theme adapts to what the terminal reports:
18
15
 
19
- Pi loads themes from:
16
+ | Terminal reports | Result |
17
+ |---|---|
18
+ | Background and ANSI colors | Colors from the terminal palette, placed for the actual background. |
19
+ | Background only | Pi's own hues, placed for the actual background. |
20
+ | Nothing | ANSI color indices and the terminal's default colors, which the terminal renders itself. Secondary text is faint, and panels have no background color. |
20
21
 
21
- - Built-in: `dark`, `light`
22
- - Global: `~/.pi/agent/themes/*.json`
23
- - Project: `.pi/themes/*.json` (only after the project is trusted)
24
- - Packages: `themes/` directories or `pi.themes` entries in `package.json`
25
- - Settings: `themes` array with files or directories
26
- - CLI: `--theme <path>` (repeatable)
22
+ Pi asks the terminal for its colors when it starts. Terminals usually answer within a few milliseconds, and Pi waits at most 100 ms before showing the startup header. If the terminal does not answer in time, Pi uses the ANSI color fallback, and it still applies the colors if they arrive later, for example over a slow SSH connection. `system` is a reserved name: a custom theme with that name is ignored.
27
23
 
28
- Disable discovery with `--no-themes`.
24
+ <a id="selecting-a-theme"></a>
29
25
 
30
- ## Selecting a Theme
26
+ ## Choose a theme
31
27
 
32
- Select a theme via `/settings` or in `settings.json`:
28
+ Open `/settings` and select **Theme**. You can use one theme for every terminal appearance or choose separate themes for light and dark terminals.
29
+
30
+ The selection is saved as the `theme` [setting](settings.md#terminal-and-display):
33
31
 
34
32
  ```json
35
33
  {
36
- "theme": "my-theme"
34
+ "theme": "dark"
37
35
  }
38
36
  ```
39
37
 
40
- On first run, pi detects your terminal background and defaults to `dark` or `light`.
41
-
42
- ### Initial Theme
38
+ Without a `theme` setting, Pi uses `system`.
43
39
 
44
- Start an interactive run with a theme without changing the saved setting:
40
+ Automatic mode stores the light theme first and the dark theme second:
45
41
 
46
- ```bash
47
- pi --use-theme light
42
+ ```json
43
+ {
44
+ "theme": "light/dark"
45
+ }
48
46
  ```
49
47
 
50
- To follow terminal appearance, use `lightTheme/darkTheme` syntax:
48
+ Pi decides whether the terminal is light or dark from its reported background and foreground colors. If the terminal does not report its background, Pi uses the terminal's light/dark notification, then the `COLORFGBG` environment variable, then dark. The same decision picks the theme of a light/dark pair and the appearance of `system`. When automatic mode is active, Pi changes themes when the terminal reports an appearance change. Theme names cannot contain `/` because Pi reserves it for this setting format.
49
+
50
+ Use `--use-theme` to choose the initial theme for one invocation without changing the saved setting:
51
51
 
52
52
  ```bash
53
+ pi --use-theme light
53
54
  pi --use-theme light/dark
54
55
  ```
55
56
 
56
- The CLI value is the initial theme for that run. Choosing another theme later in `/settings` applies it immediately
57
- and saves it normally.
57
+ See [CLI resources](cli.md#resources) for the command-line option.
58
58
 
59
- ## Creating a Custom Theme
59
+ ## Create a custom theme
60
60
 
61
- 1. Create a theme file:
61
+ Copy one of the [built-in themes](https://github.com/punch-bot/core/tree/main/packages/coding-agent/src/core/theme) or create a new JSON file conforming to the [schema](https://raw.githubusercontent.com/punch-bot/core/main/packages/coding-agent/schemas/theme.schema.json). The built-in themes use OKHSL colors, with variables for colors that several roles share, so you can adjust a hue, saturation, or lightness directly.
62
62
 
63
- ```bash
64
- mkdir -p ~/.pi/agent/themes
65
- vim ~/.pi/agent/themes/my-theme.json
66
- ```
63
+ 1. Save the file as `<agent-dir>/themes/my-theme.json`. The agent directory defaults to `~/.pi/agent`.
64
+ 2. Set its `name` to `my-theme`.
65
+ 3. Change values in `vars` and `colors`.
66
+ 4. Select `my-theme` through `/settings`.
67
67
 
68
- 2. Define the theme with all required colors (see [Color Tokens](#color-tokens)):
68
+ Use the theme name as the filename. Pi hot-reloads the active user theme only from `<agent-dir>/themes/<name>.json`. Run `/reload` after adding or changing a theme from any other source.
69
69
 
70
- ```json
71
- {
72
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
73
- "name": "my-theme",
74
- "vars": {
75
- "primary": "#00aaff",
76
- "secondary": 242
77
- },
78
- "colors": {
79
- "accent": "primary",
80
- "border": "primary",
81
- "borderAccent": "#00ffff",
82
- "borderMuted": "secondary",
83
- "success": "#00ff00",
84
- "error": "#ff0000",
85
- "warning": "#ffff00",
86
- "muted": "secondary",
87
- "dim": 240,
88
- "text": "",
89
- "thinkingText": "secondary",
90
- "selectedBg": "#2d2d30",
91
- "scrollbarTrack": "secondary",
92
- "scrollbarThumb": "",
93
- "searchMatchBg": "#2d2d30",
94
- "searchMatchText": "",
95
- "userMessageBg": "#2d2d30",
96
- "userMessageText": "",
97
- "customMessageBg": "#2d2d30",
98
- "customMessageText": "",
99
- "customMessageLabel": "primary",
100
- "toolPendingBg": "#1e1e2e",
101
- "toolSuccessBg": "#1e2e1e",
102
- "toolErrorBg": "#2e1e1e",
103
- "toolTitle": "primary",
104
- "toolOutput": "",
105
- "mdHeading": "#ffaa00",
106
- "mdLink": "primary",
107
- "mdLinkUrl": "secondary",
108
- "mdCode": "#00ffff",
109
- "mdCodeBlock": "",
110
- "mdCodeBlockBorder": "secondary",
111
- "mdQuote": "secondary",
112
- "mdQuoteBorder": "secondary",
113
- "mdHr": "secondary",
114
- "mdListBullet": "#00ffff",
115
- "toolDiffAdded": "#00ff00",
116
- "toolDiffRemoved": "#ff0000",
117
- "toolDiffContext": "secondary",
118
- "syntaxComment": "secondary",
119
- "syntaxKeyword": "primary",
120
- "syntaxFunction": "#00aaff",
121
- "syntaxVariable": "#ffaa00",
122
- "syntaxString": "#00ff00",
123
- "syntaxNumber": "#ff00ff",
124
- "syntaxType": "#00aaff",
125
- "syntaxOperator": "primary",
126
- "syntaxPunctuation": "secondary",
127
- "thinkingOff": "secondary",
128
- "thinkingMinimal": "primary",
129
- "thinkingLow": "#00aaff",
130
- "thinkingMedium": "#00ffff",
131
- "thinkingHigh": "#ff00ff",
132
- "thinkingXhigh": "#ff0000",
133
- "thinkingMax": "#ff0088",
134
- "bashMode": "#ffaa00"
135
- }
136
- }
137
- ```
70
+ ## Understand the theme file
138
71
 
139
- 3. Select the theme via `/settings`.
72
+ | Property | Required | Responsibility |
73
+ |---|---|---|
74
+ | `$schema` | No | Enables editor validation and completion against Pi's published schema. |
75
+ | `name` | Yes | Identifies the theme in selectors and settings. It must be unique, cannot contain `/`, and cannot be `system`. |
76
+ | `appearance` | No | `"dark"` or `"light"`: the background the theme is designed for. Pi detects it from the theme colors when omitted. |
77
+ | `vars` | No | Defines reusable color values. Variables can reference other variables. |
78
+ | `colors` | Yes | Assigns colors to terminal UI roles. The schema identifies required and optional roles. |
79
+ | `export` | No | Overrides page and panel backgrounds in HTML exports. |
140
80
 
141
- **Hot reload:** When you edit the currently active custom theme file, pi reloads it automatically for immediate visual feedback.
81
+ Theme objects are strict: only documented top-level fields and color tokens are accepted. Define reusable custom colors under `vars`; custom keys under `colors` or `export` and additional top-level metadata are rejected.
142
82
 
143
- ## Theme Format
83
+ A color can be written in six forms:
144
84
 
145
- ```json
146
- {
147
- "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
148
- "name": "my-theme",
149
- "vars": {
150
- "blue": "#0066cc",
151
- "gray": 242
152
- },
153
- "colors": {
154
- "accent": "blue",
155
- "muted": "gray",
156
- "text": "",
157
- ...
158
- }
159
- }
160
- ```
161
-
162
- - `name` is required, must be unique, and must not contain `/`.
163
- - `vars` is optional. Define reusable colors here, then reference them in `colors`.
164
- - `colors` must define all 53 required tokens. `thinkingMax` and the two search highlight tokens are optional and use the fallbacks listed below.
165
-
166
- The `$schema` field enables editor auto-completion and validation.
167
-
168
- ## Color Tokens
169
-
170
- Every theme must define all 53 required color tokens. The optional tokens preserve compatibility with existing themes: `thinkingMax` falls back to `thinkingXhigh`, `searchMatchBg` falls back to `selectedBg`, and `searchMatchText` falls back to `text`. Other search matches use `searchMatchText` on `searchMatchBg` with an underline; the current match reverses that foreground/background pair and uses bold text.
171
-
172
- ### Core UI (13 colors)
173
-
174
- | Token | Purpose |
175
- |-------|---------|
176
- | `accent` | Primary accent (logo, selected items, cursor) |
177
- | `border` | Normal borders |
178
- | `borderAccent` | Highlighted borders |
179
- | `borderMuted` | Subtle borders (editor) |
180
- | `success` | Success states |
181
- | `error` | Error states |
182
- | `warning` | Warning states |
183
- | `muted` | Secondary text |
184
- | `dim` | Tertiary text |
185
- | `text` | Default text (usually `""`) |
186
- | `thinkingText` | Thinking block text |
187
- | `scrollbarTrack` | Fullscreen scrollbar track foreground |
188
- | `scrollbarThumb` | Fullscreen scrollbar thumb foreground, shared by normal and expanded states |
189
-
190
- ### Backgrounds & Content (11 required, 2 optional)
191
-
192
- | Token | Purpose |
193
- |-------|---------|
194
- | `selectedBg` | Selected line background |
195
- | `searchMatchBg` | Transcript search match background and current-match text; optional, falls back to `selectedBg` |
196
- | `searchMatchText` | Transcript search match text and current-match background; optional, falls back to `text` |
197
- | `userMessageBg` | User message background |
198
- | `userMessageText` | User message text |
199
- | `customMessageBg` | Extension message background |
200
- | `customMessageText` | Extension message text |
201
- | `customMessageLabel` | Extension message label |
202
- | `toolPendingBg` | Tool box (pending) |
203
- | `toolSuccessBg` | Tool box (success) |
204
- | `toolErrorBg` | Tool box (error) |
205
- | `toolTitle` | Tool title |
206
- | `toolOutput` | Tool output text |
207
-
208
- ### Markdown (10 colors)
209
-
210
- | Token | Purpose |
211
- |-------|---------|
212
- | `mdHeading` | Headings |
213
- | `mdLink` | Link text |
214
- | `mdLinkUrl` | Link URL |
215
- | `mdCode` | Inline code |
216
- | `mdCodeBlock` | Code block content |
217
- | `mdCodeBlockBorder` | Code block fences |
218
- | `mdQuote` | Blockquote text |
219
- | `mdQuoteBorder` | Blockquote border |
220
- | `mdHr` | Horizontal rule |
221
- | `mdListBullet` | List bullets |
222
-
223
- ### Tool Diffs (3 colors)
224
-
225
- | Token | Purpose |
226
- |-------|---------|
227
- | `toolDiffAdded` | Added lines |
228
- | `toolDiffRemoved` | Removed lines |
229
- | `toolDiffContext` | Context lines |
230
-
231
- ### Syntax Highlighting (9 colors)
232
-
233
- | Token | Purpose |
234
- |-------|---------|
235
- | `syntaxComment` | Comments |
236
- | `syntaxKeyword` | Keywords |
237
- | `syntaxFunction` | Function names |
238
- | `syntaxVariable` | Variables |
239
- | `syntaxString` | Strings |
240
- | `syntaxNumber` | Numbers |
241
- | `syntaxType` | Types |
242
- | `syntaxOperator` | Operators |
243
- | `syntaxPunctuation` | Punctuation |
244
-
245
- ### Thinking Level Borders (6 required, 1 optional)
246
-
247
- Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):
248
-
249
- | Token | Purpose |
250
- |-------|---------|
251
- | `thinkingOff` | Thinking off |
252
- | `thinkingMinimal` | Minimal thinking |
253
- | `thinkingLow` | Low thinking |
254
- | `thinkingMedium` | Medium thinking |
255
- | `thinkingHigh` | High thinking |
256
- | `thinkingXhigh` | Extra high thinking |
257
- | `thinkingMax` | Maximum thinking; optional, falls back to `thinkingXhigh` |
258
-
259
- ### Bash Mode (1 color)
260
-
261
- | Token | Purpose |
262
- |-------|---------|
263
- | `bashMode` | Editor border in bash mode (`!` prefix) |
264
-
265
- ### HTML Export (optional)
266
-
267
- The `export` section controls colors for `/export` HTML output. If omitted, colors are derived from `userMessageBg`.
268
-
269
- ```json
270
- {
271
- "export": {
272
- "pageBg": "#18181e",
273
- "cardBg": "#1e1e24",
274
- "infoBg": "#3c3728"
275
- }
276
- }
277
- ```
278
-
279
- ## Color Values
85
+ | Form | Example | Meaning |
86
+ |---|---|---|
87
+ | RGB hexadecimal | `"#0af"` or `"#00aaff"` | A three- or six-digit sRGB color. |
88
+ | OKLCH | `"oklch(62% 0.1 200)"` | Perceptual lightness, chroma, and hue. |
89
+ | OKHSL | `"okhsl(250 60% 55%)"` | Hue, saturation, and lightness. Saturation is relative to the most the sRGB gamut allows at that hue and lightness, so every value is in gamut and equal saturation looks equally colorful. |
90
+ | 256-color index | `39` | An ANSI palette index from `0` through `255`. |
91
+ | Variable reference | `"primary"` | The value of an entry in `vars`. |
92
+ | Terminal default | `""` | The terminal's default foreground or background color. |
280
93
 
281
- Four formats are supported:
94
+ Terminal default colors render as the terminal's own colors. Where Pi needs a concrete value, such as HTML export or extension color math, it uses the default colors the terminal reports, or a black or white guess based on the theme's appearance.
282
95
 
283
- | Format | Example | Description |
284
- |--------|---------|-------------|
285
- | Hex | `"#ff0000"` | 6-digit hex RGB |
286
- | 256-color | `39` | xterm 256-color palette index (0-255) |
287
- | Variable | `"primary"` | Reference to a `vars` entry |
288
- | Default | `""` | Terminal's default color |
96
+ Pi resolves chained variable references. A missing variable or circular reference makes the theme invalid. Pi uses truecolor when available, gamut-maps OKLCH to sRGB, and approximates colors for 256-color terminals. HTML exports convert OKHSL values to hexadecimal because CSS does not support them. If colors differ from their source values, check your terminal's truecolor detection and contrast settings. See [Configure Your Terminal](terminal-setup.md#override-detected-capabilities).
289
97
 
290
- ### 256-Color Palette
98
+ Use the [theme JSON schema](https://raw.githubusercontent.com/punch-bot/core/main/packages/coding-agent/schemas/theme.schema.json) for the exact properties, required colors, and accepted value types.
291
99
 
292
- - `0-15`: Basic ANSI colors (terminal-dependent)
293
- - `16-231`: 6×6×6 RGB cube (`16 + 36×R + 6×G + B` where R,G,B are 0-5)
294
- - `232-255`: Grayscale ramp
100
+ Pi reports invalid theme files during startup and `/reload`.
295
101
 
296
- ### Terminal Compatibility
102
+ ## Find the color to change
297
103
 
298
- Pi uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, pi falls back to the nearest approximation.
104
+ Theme colors describe interface roles rather than individual components. Use these groups to find the relevant part of the schema:
299
105
 
300
- Check truecolor support:
301
-
302
- ```bash
303
- echo $COLORTERM # Should output "truecolor" or "24bit"
304
- ```
106
+ | Area | Color names |
107
+ |---|---|
108
+ | General interface | `accent`, `border*`, `text`, `muted`, `dim`, `success`, `error`, `warning` |
109
+ | Selection and fullscreen | `selectedBg`, `searchMatch*`, `scrollbar*` |
110
+ | Messages | `userMessage*`, `customMessage*`, `thinkingText` |
111
+ | Tool execution | `toolPendingBg`, `toolSuccessBg`, `toolErrorBg`, `toolTitle`, `toolOutput` |
112
+ | Markdown | `md*` |
113
+ | Tool diffs | `toolDiff*` |
114
+ | Syntax highlighting | `syntax*` |
115
+ | Editor modes | `thinking*`, `bashMode` |
116
+ | HTML export | `export.pageBg`, `export.cardBg`, `export.infoBg` |
305
117
 
306
- ## Tips
118
+ The schema is the format reference. The built-in themes provide complete values that you can copy and adjust.
307
119
 
308
- **Dark terminals:** Use bright, saturated colors with higher contrast.
120
+ Five colors are optional and inherit another color when omitted:
309
121
 
310
- **Light terminals:** Use darker, muted colors with lower contrast.
122
+ | Optional color | Fallback |
123
+ |---|---|
124
+ | `scrollbarTrack` | `muted` |
125
+ | `scrollbarThumb` | `text` |
126
+ | `searchMatchBg` | `selectedBg` |
127
+ | `searchMatchText` | `text` |
128
+ | `thinkingMax` | `thinkingXhigh` |
311
129
 
312
- **Color harmony:** Start with a base palette (Nord, Gruvbox, Tokyo Night), define it in `vars`, and reference consistently.
130
+ If `export` colors are omitted, Pi derives HTML page and panel backgrounds from `userMessageBg`.
313
131
 
314
- **Testing:** Check your theme with different message types, tool states, markdown content, and long wrapped text.
132
+ ## Load a theme from a project or package
315
133
 
316
- **VS Code:** Set `terminal.integrated.minimumContrastRatio` to `1` for accurate colors.
134
+ Place a project theme in `.pi/themes/`. Project themes load only after [project trust](security.md#understand-project-trust) is granted.
317
135
 
318
- ## Examples
136
+ You can also load theme files and directories through the `themes` setting or distribute them in a Pi package. See [Configuration](configuration.md), [Settings](settings.md#resources), and [Pi Packages](packages.md).
319
137
 
320
- See the built-in themes:
321
- - [dark.json](../src/modes/interactive/theme/dark.json)
322
- - [light.json](../src/modes/interactive/theme/light.json)
138
+ Each loaded theme must have a unique name. Pi reports duplicate names as resource collisions.