@tomsun28/pizza 0.0.9 → 0.1.1

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 (382) hide show
  1. package/README.md +20 -143
  2. package/README.zh-CN.md +36 -0
  3. package/dist/bun/cli.d.ts +2 -0
  4. package/dist/bun/cli.js +6 -0
  5. package/dist/bun/register-bedrock.d.ts +1 -0
  6. package/dist/bun/register-bedrock.js +3 -0
  7. package/dist/cli/args.d.ts +48 -0
  8. package/dist/cli/args.js +330 -0
  9. package/dist/cli/config-selector.d.ts +13 -0
  10. package/dist/cli/config-selector.js +30 -0
  11. package/dist/cli/file-processor.d.ts +14 -0
  12. package/dist/cli/file-processor.js +82 -0
  13. package/dist/cli/initial-message.d.ts +17 -0
  14. package/dist/cli/initial-message.js +21 -0
  15. package/dist/cli/list-models.d.ts +8 -0
  16. package/dist/cli/list-models.js +96 -0
  17. package/dist/cli.d.ts +2 -0
  18. package/dist/cli.js +68 -0
  19. package/dist/config.d.ts +79 -0
  20. package/dist/config.js +223 -0
  21. package/dist/core/agent/index.d.ts +6 -0
  22. package/dist/core/agent/index.js +6 -0
  23. package/dist/core/agent/types.d.ts +202 -0
  24. package/dist/core/agent/types.js +51 -0
  25. package/dist/core/auth-storage.d.ts +135 -0
  26. package/dist/core/auth-storage.js +417 -0
  27. package/dist/core/bash-executor.d.ts +31 -0
  28. package/dist/core/bash-executor.js +107 -0
  29. package/dist/core/compaction/branch-summarization.d.ts +87 -0
  30. package/dist/core/compaction/branch-summarization.js +242 -0
  31. package/dist/core/compaction/compaction-engine.d.ts +40 -0
  32. package/dist/core/compaction/compaction-engine.js +292 -0
  33. package/dist/core/compaction/compaction.d.ts +106 -0
  34. package/dist/core/compaction/compaction.js +295 -0
  35. package/dist/core/compaction/index.d.ts +7 -0
  36. package/dist/core/compaction/index.js +7 -0
  37. package/dist/core/compaction/utils.d.ts +37 -0
  38. package/dist/core/compaction/utils.js +152 -0
  39. package/dist/core/defaults.d.ts +2 -0
  40. package/dist/core/defaults.js +1 -0
  41. package/dist/core/diagnostics.d.ts +14 -0
  42. package/dist/core/diagnostics.js +1 -0
  43. package/dist/core/event-bus.d.ts +8 -0
  44. package/dist/core/event-bus.js +24 -0
  45. package/dist/core/event-store/events.d.ts +465 -0
  46. package/dist/core/event-store/events.js +6 -0
  47. package/dist/core/event-store/index.d.ts +10 -0
  48. package/dist/core/event-store/index.js +10 -0
  49. package/dist/core/event-store/sqlite-store.d.ts +27 -0
  50. package/dist/core/event-store/sqlite-store.js +275 -0
  51. package/dist/core/event-store/store.d.ts +91 -0
  52. package/dist/core/event-store/store.js +7 -0
  53. package/dist/core/event-store/thread-scoped-store.d.ts +29 -0
  54. package/dist/core/event-store/thread-scoped-store.js +50 -0
  55. package/dist/core/event-store/types.d.ts +70 -0
  56. package/dist/core/event-store/types.js +7 -0
  57. package/dist/core/event-store/workspace.d.ts +37 -0
  58. package/dist/core/event-store/workspace.js +71 -0
  59. package/dist/core/exec.d.ts +28 -0
  60. package/dist/core/exec.js +74 -0
  61. package/dist/core/export-html/ansi-to-html.d.ts +21 -0
  62. package/dist/core/export-html/ansi-to-html.js +248 -0
  63. package/dist/core/export-html/index.d.ts +29 -0
  64. package/dist/core/export-html/index.js +186 -0
  65. package/dist/core/export-html/template.css +1017 -0
  66. package/dist/core/export-html/template.html +55 -0
  67. package/dist/core/export-html/template.js +1742 -0
  68. package/dist/core/export-html/tool-renderer.d.ts +39 -0
  69. package/dist/core/export-html/tool-renderer.js +94 -0
  70. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  71. package/dist/core/export-html/vendor/marked.min.js +6 -0
  72. package/dist/core/extensions/index.d.ts +12 -0
  73. package/dist/core/extensions/index.js +9 -0
  74. package/dist/core/extensions/loader.d.ts +24 -0
  75. package/dist/core/extensions/loader.js +492 -0
  76. package/dist/core/extensions/runner.d.ts +167 -0
  77. package/dist/core/extensions/runner.js +898 -0
  78. package/dist/core/extensions/session-context.d.ts +67 -0
  79. package/dist/core/extensions/session-context.js +272 -0
  80. package/dist/core/extensions/types.d.ts +1147 -0
  81. package/dist/core/extensions/types.js +44 -0
  82. package/dist/core/extensions/wrapper.d.ts +19 -0
  83. package/dist/core/extensions/wrapper.js +21 -0
  84. package/dist/core/footer-data-provider.d.ts +47 -0
  85. package/dist/core/footer-data-provider.js +321 -0
  86. package/dist/core/goal/index.d.ts +3 -0
  87. package/dist/core/goal/index.js +1 -0
  88. package/dist/core/goal/scheduler.d.ts +83 -0
  89. package/dist/core/goal/scheduler.js +154 -0
  90. package/dist/core/goal/types.d.ts +182 -0
  91. package/dist/core/goal/types.js +11 -0
  92. package/dist/core/index.d.ts +8 -0
  93. package/dist/core/index.js +8 -0
  94. package/dist/core/intent/classifier.d.ts +53 -0
  95. package/dist/core/intent/classifier.js +353 -0
  96. package/dist/core/intent/index.d.ts +8 -0
  97. package/dist/core/intent/index.js +8 -0
  98. package/dist/core/intent/tool-adapter.d.ts +31 -0
  99. package/dist/core/intent/tool-adapter.js +168 -0
  100. package/dist/core/intent/types.d.ts +71 -0
  101. package/dist/core/intent/types.js +6 -0
  102. package/dist/core/keybindings.d.ts +297 -0
  103. package/dist/core/keybindings.js +250 -0
  104. package/dist/core/messages.d.ts +30 -0
  105. package/dist/core/messages.js +134 -0
  106. package/dist/core/model-registry.d.ts +131 -0
  107. package/dist/core/model-registry.js +634 -0
  108. package/dist/core/model-resolver.d.ts +109 -0
  109. package/dist/core/model-resolver.js +486 -0
  110. package/dist/core/output-guard.d.ts +5 -0
  111. package/dist/core/output-guard.js +58 -0
  112. package/dist/core/package-manager.d.ts +196 -0
  113. package/dist/core/package-manager.js +1873 -0
  114. package/dist/core/projection/boundary-inferrer.d.ts +58 -0
  115. package/dist/core/projection/boundary-inferrer.js +122 -0
  116. package/dist/core/projection/event-to-message.d.ts +35 -0
  117. package/dist/core/projection/event-to-message.js +253 -0
  118. package/dist/core/projection/goal-projection.d.ts +67 -0
  119. package/dist/core/projection/goal-projection.js +339 -0
  120. package/dist/core/projection/index.d.ts +13 -0
  121. package/dist/core/projection/index.js +13 -0
  122. package/dist/core/projection/session-manager.d.ts +100 -0
  123. package/dist/core/projection/session-manager.js +331 -0
  124. package/dist/core/projection/session-projection.d.ts +58 -0
  125. package/dist/core/projection/session-projection.js +257 -0
  126. package/dist/core/projection/task-history.d.ts +13 -0
  127. package/dist/core/projection/task-history.js +61 -0
  128. package/dist/core/projection/timeline-projection.d.ts +82 -0
  129. package/dist/core/projection/timeline-projection.js +276 -0
  130. package/dist/core/projection/types.d.ts +69 -0
  131. package/dist/core/projection/types.js +6 -0
  132. package/dist/core/prompt-templates.d.ts +51 -0
  133. package/dist/core/prompt-templates.js +249 -0
  134. package/dist/core/resolve-config-value.d.ts +22 -0
  135. package/dist/core/resolve-config-value.js +125 -0
  136. package/dist/core/resource-loader.d.ts +193 -0
  137. package/dist/core/resource-loader.js +685 -0
  138. package/dist/core/runtime/ai-client.d.ts +12 -0
  139. package/dist/core/runtime/ai-client.js +153 -0
  140. package/dist/core/runtime/checkpoint.d.ts +12 -0
  141. package/dist/core/runtime/checkpoint.js +78 -0
  142. package/dist/core/runtime/index.d.ts +12 -0
  143. package/dist/core/runtime/index.js +12 -0
  144. package/dist/core/runtime/llm-types.d.ts +99 -0
  145. package/dist/core/runtime/llm-types.js +6 -0
  146. package/dist/core/runtime/local-runtime.d.ts +23 -0
  147. package/dist/core/runtime/local-runtime.js +59 -0
  148. package/dist/core/runtime/policies.d.ts +72 -0
  149. package/dist/core/runtime/policies.js +37 -0
  150. package/dist/core/runtime/reactor.d.ts +213 -0
  151. package/dist/core/runtime/reactor.js +992 -0
  152. package/dist/core/runtime/runtime.d.ts +191 -0
  153. package/dist/core/runtime/runtime.js +449 -0
  154. package/dist/core/runtime/types.d.ts +42 -0
  155. package/dist/core/runtime/types.js +1 -0
  156. package/dist/core/sdk.d.ts +12 -0
  157. package/dist/core/sdk.js +10 -0
  158. package/dist/core/session-context-builder.d.ts +9 -0
  159. package/dist/core/session-context-builder.js +87 -0
  160. package/dist/core/session-cwd.d.ts +18 -0
  161. package/dist/core/session-cwd.js +36 -0
  162. package/dist/core/session-facade-factory.d.ts +79 -0
  163. package/dist/core/session-facade-factory.js +460 -0
  164. package/dist/core/session-facade.d.ts +57 -0
  165. package/dist/core/session-facade.js +91 -0
  166. package/dist/core/session-listing.d.ts +30 -0
  167. package/dist/core/session-listing.js +168 -0
  168. package/dist/core/session-reader.d.ts +19 -0
  169. package/dist/core/session-reader.js +101 -0
  170. package/dist/core/session-ref.d.ts +7 -0
  171. package/dist/core/session-ref.js +25 -0
  172. package/dist/core/session-services.d.ts +51 -0
  173. package/dist/core/session-services.js +90 -0
  174. package/dist/core/session-stats.d.ts +43 -0
  175. package/dist/core/session-stats.js +41 -0
  176. package/dist/core/settings-manager.d.ts +236 -0
  177. package/dist/core/settings-manager.js +706 -0
  178. package/dist/core/skill-block-parser.d.ts +12 -0
  179. package/dist/core/skill-block-parser.js +15 -0
  180. package/dist/core/skills.d.ts +59 -0
  181. package/dist/core/skills.js +408 -0
  182. package/dist/core/slash-commands.d.ts +13 -0
  183. package/dist/core/slash-commands.js +17 -0
  184. package/dist/core/source-info.d.ts +17 -0
  185. package/dist/core/source-info.js +18 -0
  186. package/dist/core/system-prompt.d.ts +27 -0
  187. package/dist/core/system-prompt.js +179 -0
  188. package/dist/core/timings.d.ts +7 -0
  189. package/dist/core/timings.js +30 -0
  190. package/dist/core/tools/bash.d.ts +95 -0
  191. package/dist/core/tools/bash.js +513 -0
  192. package/dist/core/tools/builtin-commands.d.ts +75 -0
  193. package/dist/core/tools/builtin-commands.js +503 -0
  194. package/dist/core/tools/compat-commands.d.ts +12 -0
  195. package/dist/core/tools/compat-commands.js +1280 -0
  196. package/dist/core/tools/edit-diff.d.ts +59 -0
  197. package/dist/core/tools/edit-diff.js +263 -0
  198. package/dist/core/tools/edit.d.ts +49 -0
  199. package/dist/core/tools/edit.js +340 -0
  200. package/dist/core/tools/file-mutation-queue.d.ts +5 -0
  201. package/dist/core/tools/file-mutation-queue.js +36 -0
  202. package/dist/core/tools/find.d.ts +34 -0
  203. package/dist/core/tools/find.js +459 -0
  204. package/dist/core/tools/grep.d.ts +36 -0
  205. package/dist/core/tools/grep.js +422 -0
  206. package/dist/core/tools/index.d.ts +70 -0
  207. package/dist/core/tools/index.js +129 -0
  208. package/dist/core/tools/line-anchors.d.ts +33 -0
  209. package/dist/core/tools/line-anchors.js +151 -0
  210. package/dist/core/tools/ls.d.ts +36 -0
  211. package/dist/core/tools/ls.js +268 -0
  212. package/dist/core/tools/path-utils.d.ts +7 -0
  213. package/dist/core/tools/path-utils.js +80 -0
  214. package/dist/core/tools/read.d.ts +35 -0
  215. package/dist/core/tools/read.js +244 -0
  216. package/dist/core/tools/render-utils.d.ts +20 -0
  217. package/dist/core/tools/render-utils.js +48 -0
  218. package/dist/core/tools/session-split.d.ts +9 -0
  219. package/dist/core/tools/session-split.js +77 -0
  220. package/dist/core/tools/tool-definition-wrapper.d.ts +13 -0
  221. package/dist/core/tools/tool-definition-wrapper.js +32 -0
  222. package/dist/core/tools/truncate.d.ts +69 -0
  223. package/dist/core/tools/truncate.js +204 -0
  224. package/dist/core/tools/write.d.ts +25 -0
  225. package/dist/core/tools/write.js +211 -0
  226. package/dist/core/types/session-types.d.ts +123 -0
  227. package/dist/core/types/session-types.js +8 -0
  228. package/dist/index.d.ts +27 -0
  229. package/dist/index.js +38 -0
  230. package/dist/main.d.ts +11 -2
  231. package/dist/main.js +577 -149
  232. package/dist/modes/event-mapper.d.ts +115 -0
  233. package/dist/modes/event-mapper.js +200 -0
  234. package/dist/modes/gui/server.d.ts +14 -0
  235. package/dist/modes/gui/server.js +1032 -0
  236. package/dist/modes/index.d.ts +10 -0
  237. package/dist/modes/index.js +9 -0
  238. package/dist/modes/interactive/assets/clankolas.png +0 -0
  239. package/dist/modes/interactive/components/armin.d.ts +33 -0
  240. package/dist/modes/interactive/components/armin.js +328 -0
  241. package/dist/modes/interactive/components/assistant-message.d.ts +19 -0
  242. package/dist/modes/interactive/components/assistant-message.js +115 -0
  243. package/dist/modes/interactive/components/bash-execution.d.ts +33 -0
  244. package/dist/modes/interactive/components/bash-execution.js +169 -0
  245. package/dist/modes/interactive/components/bordered-loader.d.ts +15 -0
  246. package/dist/modes/interactive/components/bordered-loader.js +50 -0
  247. package/dist/modes/interactive/components/branch-summary-message.d.ts +15 -0
  248. package/dist/modes/interactive/components/branch-summary-message.js +41 -0
  249. package/dist/modes/interactive/components/brand-header.d.ts +33 -0
  250. package/dist/modes/interactive/components/brand-header.js +235 -0
  251. package/dist/modes/interactive/components/compaction-summary-message.d.ts +15 -0
  252. package/dist/modes/interactive/components/compaction-summary-message.js +42 -0
  253. package/dist/modes/interactive/components/config-selector.d.ts +70 -0
  254. package/dist/modes/interactive/components/config-selector.js +469 -0
  255. package/dist/modes/interactive/components/countdown-timer.d.ts +13 -0
  256. package/dist/modes/interactive/components/countdown-timer.js +27 -0
  257. package/dist/modes/interactive/components/custom-editor.d.ts +27 -0
  258. package/dist/modes/interactive/components/custom-editor.js +94 -0
  259. package/dist/modes/interactive/components/custom-message.d.ts +19 -0
  260. package/dist/modes/interactive/components/custom-message.js +73 -0
  261. package/dist/modes/interactive/components/daxnuts.d.ts +22 -0
  262. package/dist/modes/interactive/components/daxnuts.js +137 -0
  263. package/dist/modes/interactive/components/diff.d.ts +11 -0
  264. package/dist/modes/interactive/components/diff.js +132 -0
  265. package/dist/modes/interactive/components/dynamic-border.d.ts +14 -0
  266. package/dist/modes/interactive/components/dynamic-border.js +19 -0
  267. package/dist/modes/interactive/components/earendil-announcement.d.ts +4 -0
  268. package/dist/modes/interactive/components/earendil-announcement.js +39 -0
  269. package/dist/modes/interactive/components/extension-editor.d.ts +19 -0
  270. package/dist/modes/interactive/components/extension-editor.js +105 -0
  271. package/dist/modes/interactive/components/extension-input.d.ts +22 -0
  272. package/dist/modes/interactive/components/extension-input.js +54 -0
  273. package/dist/modes/interactive/components/extension-selector.d.ts +23 -0
  274. package/dist/modes/interactive/components/extension-selector.js +70 -0
  275. package/dist/modes/interactive/components/footer.d.ts +55 -0
  276. package/dist/modes/interactive/components/footer.js +207 -0
  277. package/dist/modes/interactive/components/index.d.ts +31 -0
  278. package/dist/modes/interactive/components/index.js +32 -0
  279. package/dist/modes/interactive/components/keybinding-hints.d.ts +7 -0
  280. package/dist/modes/interactive/components/keybinding-hints.js +21 -0
  281. package/dist/modes/interactive/components/login-dialog.d.ts +41 -0
  282. package/dist/modes/interactive/components/login-dialog.js +138 -0
  283. package/dist/modes/interactive/components/model-selector.d.ts +32 -0
  284. package/dist/modes/interactive/components/model-selector.js +209 -0
  285. package/dist/modes/interactive/components/oauth-selector.d.ts +18 -0
  286. package/dist/modes/interactive/components/oauth-selector.js +91 -0
  287. package/dist/modes/interactive/components/settings-selector.d.ts +57 -0
  288. package/dist/modes/interactive/components/settings-selector.js +299 -0
  289. package/dist/modes/interactive/components/show-images-selector.d.ts +9 -0
  290. package/dist/modes/interactive/components/show-images-selector.js +37 -0
  291. package/dist/modes/interactive/components/skill-invocation-message.d.ts +16 -0
  292. package/dist/modes/interactive/components/skill-invocation-message.js +44 -0
  293. package/dist/modes/interactive/components/theme-selector.d.ts +10 -0
  294. package/dist/modes/interactive/components/theme-selector.js +47 -0
  295. package/dist/modes/interactive/components/thinking-selector.d.ts +10 -0
  296. package/dist/modes/interactive/components/thinking-selector.js +50 -0
  297. package/dist/modes/interactive/components/timeline-view.d.ts +31 -0
  298. package/dist/modes/interactive/components/timeline-view.js +81 -0
  299. package/dist/modes/interactive/components/tool-execution.d.ts +64 -0
  300. package/dist/modes/interactive/components/tool-execution.js +305 -0
  301. package/dist/modes/interactive/components/tree-selector.d.ts +88 -0
  302. package/dist/modes/interactive/components/tree-selector.js +1072 -0
  303. package/dist/modes/interactive/components/user-message-selector.d.ts +29 -0
  304. package/dist/modes/interactive/components/user-message-selector.js +110 -0
  305. package/dist/modes/interactive/components/user-message.d.ts +9 -0
  306. package/dist/modes/interactive/components/user-message.js +27 -0
  307. package/dist/modes/interactive/components/visual-truncate.d.ts +23 -0
  308. package/dist/modes/interactive/components/visual-truncate.js +32 -0
  309. package/dist/modes/interactive/interactive-mode.d.ts +394 -0
  310. package/dist/modes/interactive/interactive-mode.js +4116 -0
  311. package/dist/modes/interactive/theme/dark.json +85 -0
  312. package/dist/modes/interactive/theme/light.json +84 -0
  313. package/dist/modes/interactive/theme/theme-schema.json +335 -0
  314. package/dist/modes/interactive/theme/theme.d.ts +80 -0
  315. package/dist/modes/interactive/theme/theme.js +973 -0
  316. package/dist/modes/print-mode.d.ts +27 -0
  317. package/dist/modes/print-mode.js +102 -0
  318. package/dist/modes/rpc/jsonl.d.ts +16 -0
  319. package/dist/modes/rpc/jsonl.js +48 -0
  320. package/dist/modes/rpc/rpc-client.d.ts +219 -0
  321. package/dist/modes/rpc/rpc-client.js +405 -0
  322. package/dist/modes/rpc/rpc-mode.d.ts +19 -0
  323. package/dist/modes/rpc/rpc-mode.js +381 -0
  324. package/dist/modes/rpc/rpc-types.d.ts +406 -0
  325. package/dist/modes/rpc/rpc-types.js +7 -0
  326. package/dist/package-manager-cli.d.ts +3 -0
  327. package/dist/package-manager-cli.js +233 -0
  328. package/dist/utils/changelog.d.ts +20 -0
  329. package/dist/utils/changelog.js +86 -0
  330. package/dist/utils/child-process.d.ts +10 -0
  331. package/dist/utils/child-process.js +77 -0
  332. package/dist/utils/clipboard-image.d.ts +10 -0
  333. package/dist/utils/clipboard-image.js +244 -0
  334. package/dist/utils/clipboard-native.d.ts +7 -0
  335. package/dist/utils/clipboard-native.js +13 -0
  336. package/dist/utils/clipboard.d.ts +1 -0
  337. package/dist/utils/clipboard.js +77 -0
  338. package/dist/utils/exif-orientation.d.ts +4 -0
  339. package/dist/utils/exif-orientation.js +157 -0
  340. package/dist/utils/frontmatter.d.ts +7 -0
  341. package/dist/utils/frontmatter.js +25 -0
  342. package/dist/utils/git.d.ts +25 -0
  343. package/dist/utils/git.js +162 -0
  344. package/dist/utils/image-convert.d.ts +8 -0
  345. package/dist/utils/image-convert.js +38 -0
  346. package/dist/utils/image-resize.d.ts +35 -0
  347. package/dist/utils/image-resize.js +136 -0
  348. package/dist/utils/mime.d.ts +1 -0
  349. package/dist/utils/mime.js +25 -0
  350. package/dist/utils/path-shims.d.ts +1 -0
  351. package/dist/utils/path-shims.js +90 -0
  352. package/dist/utils/paths.d.ts +6 -0
  353. package/dist/utils/paths.js +18 -0
  354. package/dist/utils/photon.d.ts +20 -0
  355. package/dist/utils/photon.js +120 -0
  356. package/dist/utils/shell.d.ts +29 -0
  357. package/dist/utils/shell.js +189 -0
  358. package/dist/utils/sleep.d.ts +4 -0
  359. package/dist/utils/sleep.js +16 -0
  360. package/dist/utils/tools-manager.d.ts +3 -0
  361. package/dist/utils/tools-manager.js +101 -0
  362. package/dist/vendor/bin/darwin-arm64/fd +0 -0
  363. package/dist/vendor/bin/darwin-arm64/rg +0 -0
  364. package/dist/vendor/bin/darwin-x64/fd +0 -0
  365. package/dist/vendor/bin/darwin-x64/rg +0 -0
  366. package/dist/vendor/bin/linux-arm64/fd +0 -0
  367. package/dist/vendor/bin/linux-arm64/rg +0 -0
  368. package/dist/vendor/bin/linux-x64/fd +0 -0
  369. package/dist/vendor/bin/linux-x64/rg +0 -0
  370. package/dist/vendor/bin/win32-arm64/fd.exe +0 -0
  371. package/dist/vendor/bin/win32-arm64/rg.exe +0 -0
  372. package/dist/vendor/bin/win32-x64/fd.exe +0 -0
  373. package/dist/vendor/bin/win32-x64/rg.exe +0 -0
  374. package/package.json +90 -26
  375. package/dist/extension/core.d.ts +0 -69
  376. package/dist/extension/core.js +0 -270
  377. package/dist/extension/core.js.map +0 -1
  378. package/dist/extension/index.d.ts +0 -25
  379. package/dist/extension/index.js +0 -303
  380. package/dist/extension/index.js.map +0 -1
  381. package/dist/main.js.map +0 -1
  382. package/themes/pizza.json +0 -87
package/README.md CHANGED
@@ -1,158 +1,35 @@
1
- # 🍕 Pizza
1
+ # Pizza
2
2
 
3
- > **CLI display for pi**
3
+ Pizza is an event-driven agent. Every conversation, tool call, and file edit is an event in an immutable log. Your UI, the LLM context, and the session tree are all projections of that log.
4
4
 
5
- Pizza is a command-line AI assistant that displays pi's native tool calls in a clean `[CLI]` tag format. Built on top of [pi-coding-agent](https://github.com/badlogic/pi-coding-agent), it provides developers with an efficient terminal interaction experience.
5
+ [简体中文](./README.zh-CN.md)
6
6
 
7
- ---
7
+ ## About It
8
8
 
9
- ## Features
9
+ Pizza is named after Pi -> Pizza. Thanks to Pi for open sourcing.
10
10
 
11
- - **[CLI] Display Format** — Tool calls are displayed in clean [CLI] tag format instead of raw JSON
12
- - **Interactive TUI** Beautiful terminal interface based on pi-tui with keyboard shortcuts
13
- - **Multi-Model Support** — Compatible with OpenAI, Anthropic, and other LLM providers
14
- - **Session Management** — Automatic saving and management of conversation history
11
+ - **Reactor-driven turn cycle**
12
+ Unlike `Pi, Claude Code, and Codex`, Pizza does not run the agent loop as a brittle `while true` loop. Each turn is a state machine driven by an event-handler table. The result: interrupts, retries, parallel tool calls, and mid-turn failures can all be handled reliably.
15
13
 
16
- ---
14
+ - **The log is the single source of truth**
15
+ Every message, model call, tool result, and file change is written to an immutable `EventStore` (SQLite). The UI, the LLM context, and the session tree are all live projections of that log. State is no longer hidden in mutable objects — it can be rebuilt, audited, and replayed, because the log is the single source of truth.
17
16
 
18
- ## Installation
17
+ - **Only one execution tool — the CLI**
18
+ JSON is program-friendly at the API level but not model-friendly. Pizza aggressively gives the model only one tool: the `CLI Tool`. The model uses it to call `read`, `write`, `edit`, and other command-line commands. Surprisingly, it performs better and is more stable.
19
19
 
20
- ```bash
21
- npm install -g @tomsun28/pizza
22
- ```
20
+ - **Why New Session**
21
+ In Pizza, you do not need to manually create a new session. Think of it as a long-term task for a friend you can chat with for ten years. A friend will manage their own context — not through compression.
23
22
 
24
- ---
23
+ - **All interfaces share the same runtime**
24
+ The interactive TUI, JSON-RPC server, and one-shot print mode all consume the same `SessionFacade` event stream. Script it, embed it, or chat with it directly in the terminal — it is the same agent.
25
25
 
26
- ## Usage
26
+ - **Git log-like branch tree memory**
27
+ Sessions can fork from any earlier message. Rewind, branch, compare. Restart your life anytime, anywhere.
27
28
 
28
- ### Start
29
+ ## Quick Start
29
30
 
30
31
  ```bash
31
- # Interactive mode
32
+ npm install -g pizza
33
+ export ZAI_API_KEY=your_zai_api_key
32
34
  pizza
33
-
34
- # Execute a single command
35
- pizza "analyze the current project structure"
36
- ```
37
-
38
- ### Command Line Options
39
-
40
- ```
41
- pizza [options] [message]
42
-
43
- OPTIONS:
44
- --provider <name> LLM provider (reads from config by default)
45
- -m, --model <id> Model ID
46
- -p, --print Print mode (non-interactive, single-shot)
47
- -h, --help Show help information
48
- ```
49
-
50
- ### Keyboard Shortcuts
51
-
52
- | Shortcut | Function |
53
- |----------|----------|
54
- | `Ctrl+P` | Switch model |
55
- | `Ctrl+T` | Think mode |
56
- | `Ctrl+C` | Stop current operation |
57
-
58
- ### In-Session Commands
59
-
60
- - `/cli-mode` — Toggle CLI tag mode (enabled by default)
61
- - `/help` — Show help
62
-
63
- ---
64
-
65
- ## [CLI] Display Format
66
-
67
- Pizza displays pi's native tool calls in a clean `[CLI]` tag format for better readability:
68
-
69
- ### Display Format
70
-
71
- When the model calls tools, they are displayed as:
72
-
73
- ```
74
- [CLI] read package.json[/CLI]
75
- [CLI] bash node --version[/CLI]
76
35
  ```
77
-
78
- ### Result Display
79
-
80
- Tool results are displayed as:
81
-
82
- ```
83
- [RESULT]
84
- {
85
- "name": "pizza",
86
- "version": "0.0.9"
87
- }
88
- [/RESULT]
89
- ```
90
-
91
- ### Supported Tools
92
-
93
- Pizza uses pi's built-in tools:
94
-
95
- | Tool | Description |
96
- |------|-------------|
97
- | `read` | Read file contents |
98
- | `write` | Write to a file |
99
- | `edit` | Edit a file by replacing text |
100
- | `bash` | Execute shell commands |
101
-
102
- ---
103
-
104
- ## Development
105
-
106
- ### Project Structure
107
-
108
- ```
109
- .
110
- ├── src/
111
- │ ├── main.ts # Entry file
112
- │ └── extension/
113
- │ └── index.ts # Extension main logic (CLI display formatting)
114
- ├── themes/
115
- │ └── pizza.json # Theme configuration
116
- ├── package.json
117
- └── tsconfig.json
118
- ```
119
-
120
- ### Local Development
121
-
122
- ```bash
123
- # Clone the repository
124
- git clone <repo-url>
125
- cd pizza
126
-
127
- # Install dependencies
128
- pnpm install
129
-
130
- # Development mode
131
- pnpm dev
132
-
133
- # Build
134
- pnpm build
135
-
136
- # Run
137
- pnpm start
138
- ```
139
-
140
- ---
141
-
142
- ## Dependencies
143
-
144
- - [pi-coding-agent](https://github.com/badlogic/pi-coding-agent) — Agent session management and extension system
145
- - [pi-ai](https://github.com/badlogic/pi-coding-agent) — AI model interface
146
- - [pi-tui](https://github.com/badlogic/pi-coding-agent) — Terminal user interface
147
-
148
- ---
149
-
150
- ## Configuration
151
-
152
- Pizza uses the `.pizza` directory to store configuration and session data. It is created automatically on first run.
153
-
154
- ---
155
-
156
- ## License
157
-
158
- MIT
@@ -0,0 +1,36 @@
1
+ # Pizza
2
+
3
+ Pizza 是一个事件驱动的 agent。你的每一次对话、工具调用和文件修改,都是不可变日志里的一条事件。UI、LLM 上下文和会话树,都只是这条日志的投影。
4
+
5
+
6
+ [English](./README.md)
7
+
8
+ ## 关于它
9
+
10
+ Pizza 的表壳来源于 Pi -> Pizza, 感谢 Pi 的开源。
11
+
12
+ - **Reactor 驱动的 turn 循环**
13
+ 区别于 `Pi, Claude Code, Codex`,Pizza 没有用一个脆弱的 `while true` 循环来跑 agent 主循环。每一次 turn 都是一张事件-处理器表驱动的状态机。结果是:中断、重试、并行工具调用、turn 内失败都能被可靠处理。
14
+
15
+ - **日志是唯一事实来源**
16
+ 每一条消息、每一次模型调用、每一个工具结果、每一次文件变更,都会被写入不可变的 `EventStore`(SQLite)。UI、LLM 上下文、会话树都是这条日志的实时投影。状态不再藏在可变对象里 —— 它可以被重建、审计、回放,因为日志就是唯一的事实来源。
17
+
18
+ - **只有一个执行工具 - CLI**
19
+ JSON 在 API 层对程序处理友好但对模型可不是,Pizza 激进的只提供给模型一个工具 - `CLI Tool`, 模型通过其来调用 `read`、`write`、`edit` 和其它命令行命令,出乎意料的是,它表现的更好更稳。
20
+
21
+ - **为什么要 New Session**
22
+ 在 Pizza 中你不需要手工去新建会话,把它看作你可以持续聊十年的朋友的长程任务,朋友自己会去管理好自己的上下文不是通过压缩。
23
+
24
+ - **所有界面共享同一个运行时**
25
+ 交互式 TUI、JSON-RPC 服务、单次打印模式都消费同一个 `SessionFacade` 的事件流。你可以脚本化它、嵌入它,或者直接在终端聊天 —— 它是同一个 agent。
26
+
27
+ - **Git Log 一样的分支树记忆**
28
+ 会话可以从任意一条历史消息分叉。回退、分支、对比。随时随地重开人生。
29
+
30
+ ## 快速开始
31
+
32
+ ```bash
33
+ npm install -g pizza
34
+ export ZAI_API_KEY=your_zai_api_key
35
+ pizza
36
+ ```
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ process.title = "pizza";
3
+ process.emitWarning = (() => { });
4
+ await import("./register-bedrock.js");
5
+ await import("../cli.js");
6
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { setBedrockProviderModule } from "@earendil-works/pi-ai/api/bedrock-converse-stream.lazy";
2
+ import { bedrockProviderModule } from "@earendil-works/pi-ai/bedrock-provider";
3
+ setBedrockProviderModule(bedrockProviderModule);
@@ -0,0 +1,48 @@
1
+ /**
2
+ * CLI argument parsing and help display
3
+ */
4
+ import type { ThinkingLevel } from "../core/agent/types.js";
5
+ import type { ExtensionFlag } from "../core/extensions/types.js";
6
+ export type Mode = "text" | "json" | "rpc" | "gui";
7
+ export interface Args {
8
+ provider?: string;
9
+ model?: string;
10
+ apiKey?: string;
11
+ systemPrompt?: string;
12
+ appendSystemPrompt?: string[];
13
+ thinking?: ThinkingLevel;
14
+ rewind?: string | true;
15
+ help?: boolean;
16
+ version?: boolean;
17
+ mode?: Mode;
18
+ noSession?: boolean;
19
+ sessionDir?: string;
20
+ models?: string[];
21
+ tools?: string[];
22
+ noTools?: boolean;
23
+ extensions?: string[];
24
+ noExtensions?: boolean;
25
+ print?: boolean;
26
+ export?: string;
27
+ noSkills?: boolean;
28
+ skills?: string[];
29
+ promptTemplates?: string[];
30
+ noPromptTemplates?: boolean;
31
+ themes?: string[];
32
+ noThemes?: boolean;
33
+ noContextFiles?: boolean;
34
+ listModels?: string | true;
35
+ offline?: boolean;
36
+ verbose?: boolean;
37
+ messages: string[];
38
+ fileArgs: string[];
39
+ /** Unknown flags (potentially extension flags) - map of flag name to value */
40
+ unknownFlags: Map<string, boolean | string>;
41
+ diagnostics: Array<{
42
+ type: "warning" | "error";
43
+ message: string;
44
+ }>;
45
+ }
46
+ export declare function isValidThinkingLevel(level: string): level is ThinkingLevel;
47
+ export declare function parseArgs(args: string[]): Args;
48
+ export declare function printHelp(extensionFlags?: ExtensionFlag[]): void;
@@ -0,0 +1,330 @@
1
+ /**
2
+ * CLI argument parsing and help display
3
+ */
4
+ import chalk from "chalk";
5
+ import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "../config.js";
6
+ const VALID_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
7
+ export function isValidThinkingLevel(level) {
8
+ return VALID_THINKING_LEVELS.includes(level);
9
+ }
10
+ export function parseArgs(args) {
11
+ const result = {
12
+ messages: [],
13
+ fileArgs: [],
14
+ unknownFlags: new Map(),
15
+ diagnostics: [],
16
+ };
17
+ for (let i = 0; i < args.length; i++) {
18
+ const arg = args[i];
19
+ if (i === 0 && arg === "gui") {
20
+ result.mode = "gui";
21
+ }
22
+ else if (arg === "--help" || arg === "-h") {
23
+ result.help = true;
24
+ }
25
+ else if (arg === "--version" || arg === "-v") {
26
+ result.version = true;
27
+ }
28
+ else if (arg === "--mode" && i + 1 < args.length) {
29
+ const mode = args[++i];
30
+ if (mode === "text" || mode === "json" || mode === "rpc" || mode === "gui") {
31
+ result.mode = mode;
32
+ }
33
+ }
34
+ else if (arg === "--rewind") {
35
+ // --rewind [id]: alone = auto-resume latest, with id = jump to branch
36
+ if (i + 1 < args.length && !args[i + 1].startsWith("-") && !args[i + 1].startsWith("@")) {
37
+ result.rewind = args[++i];
38
+ }
39
+ else {
40
+ result.rewind = true;
41
+ }
42
+ }
43
+ else if (arg === "--provider" && i + 1 < args.length) {
44
+ result.provider = args[++i];
45
+ }
46
+ else if (arg === "--model" && i + 1 < args.length) {
47
+ result.model = args[++i];
48
+ }
49
+ else if (arg === "--api-key" && i + 1 < args.length) {
50
+ result.apiKey = args[++i];
51
+ }
52
+ else if (arg === "--system-prompt" && i + 1 < args.length) {
53
+ result.systemPrompt = args[++i];
54
+ }
55
+ else if (arg === "--append-system-prompt" && i + 1 < args.length) {
56
+ result.appendSystemPrompt = result.appendSystemPrompt ?? [];
57
+ result.appendSystemPrompt.push(args[++i]);
58
+ }
59
+ else if (arg === "--no-session") {
60
+ result.noSession = true;
61
+ }
62
+ else if (arg === "--session-dir" && i + 1 < args.length) {
63
+ result.sessionDir = args[++i];
64
+ }
65
+ else if (arg === "--models" && i + 1 < args.length) {
66
+ result.models = args[++i].split(",").map((s) => s.trim());
67
+ }
68
+ else if (arg === "--no-tools") {
69
+ result.noTools = true;
70
+ }
71
+ else if (arg === "--tools" && i + 1 < args.length) {
72
+ result.tools = args[++i]
73
+ .split(",")
74
+ .map((s) => s.trim())
75
+ .filter((name) => name.length > 0);
76
+ }
77
+ else if (arg === "--thinking" && i + 1 < args.length) {
78
+ const level = args[++i];
79
+ if (isValidThinkingLevel(level)) {
80
+ result.thinking = level;
81
+ }
82
+ else {
83
+ result.diagnostics.push({
84
+ type: "warning",
85
+ message: `Invalid thinking level "${level}". Valid values: ${VALID_THINKING_LEVELS.join(", ")}`,
86
+ });
87
+ }
88
+ }
89
+ else if (arg === "--print" || arg === "-p") {
90
+ result.print = true;
91
+ }
92
+ else if (arg === "--export" && i + 1 < args.length) {
93
+ result.export = args[++i];
94
+ }
95
+ else if ((arg === "--extension" || arg === "-e") && i + 1 < args.length) {
96
+ result.extensions = result.extensions ?? [];
97
+ result.extensions.push(args[++i]);
98
+ }
99
+ else if (arg === "--no-extensions" || arg === "-ne") {
100
+ result.noExtensions = true;
101
+ }
102
+ else if (arg === "--skill" && i + 1 < args.length) {
103
+ result.skills = result.skills ?? [];
104
+ result.skills.push(args[++i]);
105
+ }
106
+ else if (arg === "--prompt-template" && i + 1 < args.length) {
107
+ result.promptTemplates = result.promptTemplates ?? [];
108
+ result.promptTemplates.push(args[++i]);
109
+ }
110
+ else if (arg === "--theme" && i + 1 < args.length) {
111
+ result.themes = result.themes ?? [];
112
+ result.themes.push(args[++i]);
113
+ }
114
+ else if (arg === "--no-skills" || arg === "-ns") {
115
+ result.noSkills = true;
116
+ }
117
+ else if (arg === "--no-prompt-templates" || arg === "-np") {
118
+ result.noPromptTemplates = true;
119
+ }
120
+ else if (arg === "--no-themes") {
121
+ result.noThemes = true;
122
+ }
123
+ else if (arg === "--no-context-files" || arg === "-nc") {
124
+ result.noContextFiles = true;
125
+ }
126
+ else if (arg === "--list-models") {
127
+ // Check if next arg is a search pattern (not a flag or file arg)
128
+ if (i + 1 < args.length && !args[i + 1].startsWith("-") && !args[i + 1].startsWith("@")) {
129
+ result.listModels = args[++i];
130
+ }
131
+ else {
132
+ result.listModels = true;
133
+ }
134
+ }
135
+ else if (arg === "--verbose") {
136
+ result.verbose = true;
137
+ }
138
+ else if (arg === "--offline") {
139
+ result.offline = true;
140
+ }
141
+ else if (arg.startsWith("@")) {
142
+ result.fileArgs.push(arg.slice(1)); // Remove @ prefix
143
+ }
144
+ else if (arg.startsWith("--")) {
145
+ const eqIndex = arg.indexOf("=");
146
+ if (eqIndex !== -1) {
147
+ result.unknownFlags.set(arg.slice(2, eqIndex), arg.slice(eqIndex + 1));
148
+ }
149
+ else {
150
+ const flagName = arg.slice(2);
151
+ const next = args[i + 1];
152
+ if (next !== undefined && !next.startsWith("-") && !next.startsWith("@")) {
153
+ result.unknownFlags.set(flagName, next);
154
+ i++;
155
+ }
156
+ else {
157
+ result.unknownFlags.set(flagName, true);
158
+ }
159
+ }
160
+ }
161
+ else if (arg.startsWith("-") && !arg.startsWith("--")) {
162
+ result.diagnostics.push({ type: "error", message: `Unknown option: ${arg}` });
163
+ }
164
+ else if (!arg.startsWith("-")) {
165
+ result.messages.push(arg);
166
+ }
167
+ }
168
+ return result;
169
+ }
170
+ export function printHelp(extensionFlags) {
171
+ const extensionFlagsText = extensionFlags && extensionFlags.length > 0
172
+ ? `\n${chalk.bold("Extension CLI Flags:")}\n${extensionFlags
173
+ .map((flag) => {
174
+ const value = flag.type === "string" ? " <value>" : "";
175
+ const description = flag.description ?? `Registered by ${flag.extensionPath}`;
176
+ return ` --${flag.name}${value}`.padEnd(30) + description;
177
+ })
178
+ .join("\n")}\n`
179
+ : "";
180
+ console.log(`${chalk.bold(APP_NAME)} - AI coding assistant with cli tool and built-in commands
181
+
182
+ ${chalk.bold("Usage:")}
183
+ ${APP_NAME} [options] [@files...] [messages...]
184
+
185
+ ${chalk.bold("Built-in Commands (handled internally by the cli tool):")}
186
+ builtin read <path> [--offset N] [--limit N] # Read file with 2-hex line anchors
187
+ builtin write <path> <content> # Write file
188
+ builtin edit <path> <op> <range> [new] # Edit anchored whole line(s)
189
+
190
+ All other commands (grep, find, ls, git, npm, etc.) are passed to the system shell as-is.
191
+ If grep/find/ls are missing from PATH, Pizza injects temporary shims only for those missing commands.
192
+
193
+ ${chalk.bold("Commands:")}
194
+ ${APP_NAME} gui Open the local GUI workbench
195
+ ${APP_NAME} install <source> [-l] Install extension source and add to settings
196
+ ${APP_NAME} remove <source> [-l] Remove extension source from settings
197
+ ${APP_NAME} uninstall <source> [-l] Alias for remove
198
+ ${APP_NAME} update [source] Update installed extensions (skips pinned sources)
199
+ ${APP_NAME} list List installed extensions from settings
200
+ ${APP_NAME} config Open TUI to enable/disable package resources
201
+ ${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list
202
+
203
+ ${chalk.bold("Options:")}
204
+ --provider <name> Provider name (default: google)
205
+ --model <pattern> Model pattern or ID (supports "provider/id" and optional ":<thinking>")
206
+ --api-key <key> API key (defaults to env vars)
207
+ --system-prompt <text> System prompt (default: coding assistant prompt)
208
+ --append-system-prompt <text> Append text or file contents to the system prompt (can be used multiple times)
209
+ --mode <mode> Output mode: text (default), json, rpc, or gui
210
+ --print, -p Non-interactive mode: process prompt and exit
211
+ --rewind [id] Resume eternal conversation (default), or jump to a branch by id
212
+ --session-dir <dir> Directory for session storage and lookup
213
+ --no-session Don't save session (ephemeral)
214
+ --models <patterns> Comma-separated model patterns for Ctrl+P cycling
215
+ Supports globs (anthropic/*, *sonnet*) and fuzzy matching
216
+ --no-tools Disable all tools by default (built-in and extension)
217
+ --tools <tools> Comma-separated allowlist of tool names to enable
218
+ Applies to built-in and extension tools
219
+ --thinking <level> Set thinking level: off, minimal, low, medium, high, xhigh
220
+ --extension, -e <path> Load an extension file (can be used multiple times)
221
+ --no-extensions, -ne Disable extension discovery (explicit -e paths still work)
222
+ --skill <path> Load a skill file or directory (can be used multiple times)
223
+ --no-skills, -ns Disable skills discovery and loading
224
+ --prompt-template <path> Load a prompt template file or directory (can be used multiple times)
225
+ --no-prompt-templates, -np Disable prompt template discovery and loading
226
+ --theme <path> Load a theme file or directory (can be used multiple times)
227
+ --no-themes Disable theme discovery and loading
228
+ --no-context-files, -nc Disable AGENTS.md and CLAUDE.md discovery and loading
229
+ --export <file> Export session file to HTML and exit
230
+ --list-models [search] List available models (with optional fuzzy search)
231
+ --verbose Force verbose startup (overrides quietStartup setting)
232
+ --offline Disable startup network operations (same as PIZZA_OFFLINE=1)
233
+ --help, -h Show this help
234
+ --version, -v Show version number
235
+
236
+ Extensions can register additional flags (e.g., --plan from plan-mode extension).${extensionFlagsText}
237
+
238
+ ${chalk.bold("Examples:")}
239
+ # Interactive mode
240
+ ${APP_NAME}
241
+
242
+ # Local GUI
243
+ ${APP_NAME} gui
244
+
245
+ # Interactive mode with initial prompt
246
+ ${APP_NAME} "List all .ts files in src/"
247
+
248
+ # Include files in initial message
249
+ ${APP_NAME} @prompt.md @image.png "What color is the sky?"
250
+
251
+ # Non-interactive mode (process and exit)
252
+ ${APP_NAME} -p "List all .ts files in src/"
253
+
254
+ # Multiple messages (interactive)
255
+ ${APP_NAME} "Read package.json" "What dependencies do we have?"
256
+
257
+ # Continue previous session
258
+ ${APP_NAME} --continue "What did we discuss?"
259
+
260
+ # Use different model
261
+ ${APP_NAME} --provider openai --model gpt-4o-mini "Help me refactor this code"
262
+
263
+ # Use model with provider prefix (no --provider needed)
264
+ ${APP_NAME} --model openai/gpt-4o "Help me refactor this code"
265
+
266
+ # Use model with thinking level shorthand
267
+ ${APP_NAME} --model sonnet:high "Solve this complex problem"
268
+
269
+ # Limit model cycling to specific models
270
+ ${APP_NAME} --models claude-sonnet,claude-haiku,gpt-4o
271
+
272
+ # Limit to a specific provider with glob pattern
273
+ ${APP_NAME} --models "github-copilot/*"
274
+
275
+ # Cycle models with fixed thinking levels
276
+ ${APP_NAME} --models sonnet:high,haiku:low
277
+
278
+ # Start with a specific thinking level
279
+ ${APP_NAME} --thinking high "Solve this complex problem"
280
+
281
+ # Read-only mode (no file modifications possible)
282
+ ${APP_NAME} --tools read,grep,find,ls -p "Review the code in src/"
283
+
284
+ # Export an event session to HTML
285
+ ${APP_NAME} --export event-session:<workspace-id>:<session-id>
286
+ ${APP_NAME} --export <session-id> output.html
287
+
288
+ ${chalk.bold("Environment Variables:")}
289
+ ANTHROPIC_API_KEY - Anthropic Claude API key
290
+ ANTHROPIC_OAUTH_TOKEN - Anthropic OAuth token (alternative to API key)
291
+ OPENAI_API_KEY - OpenAI GPT API key
292
+ AZURE_OPENAI_API_KEY - Azure OpenAI API key
293
+ AZURE_OPENAI_BASE_URL - Azure OpenAI base URL (https://{resource}.openai.azure.com/openai/v1)
294
+ AZURE_OPENAI_RESOURCE_NAME - Azure OpenAI resource name (alternative to base URL)
295
+ AZURE_OPENAI_API_VERSION - Azure OpenAI API version (default: v1)
296
+ AZURE_OPENAI_DEPLOYMENT_NAME_MAP - Azure OpenAI model=deployment map (comma-separated)
297
+ GEMINI_API_KEY - Google Gemini API key
298
+ GROQ_API_KEY - Groq API key
299
+ CEREBRAS_API_KEY - Cerebras API key
300
+ XAI_API_KEY - xAI Grok API key
301
+ FIREWORKS_API_KEY - Fireworks API key
302
+ OPENROUTER_API_KEY - OpenRouter API key
303
+ AI_GATEWAY_API_KEY - Vercel AI Gateway API key
304
+ ZAI_API_KEY - ZAI API key
305
+ MISTRAL_API_KEY - Mistral API key
306
+ MINIMAX_API_KEY - MiniMax API key
307
+ OPENCODE_API_KEY - OpenCode Zen/OpenCode Go API key
308
+ KIMI_API_KEY - Kimi For Coding API key
309
+ AWS_PROFILE - AWS profile for Amazon Bedrock
310
+ AWS_ACCESS_KEY_ID - AWS access key for Amazon Bedrock
311
+ AWS_SECRET_ACCESS_KEY - AWS secret key for Amazon Bedrock
312
+ AWS_BEARER_TOKEN_BEDROCK - Bedrock API key (bearer token)
313
+ AWS_REGION - AWS region for Amazon Bedrock (e.g., us-east-1)
314
+ ${ENV_AGENT_DIR.padEnd(32)} - Session storage directory (default: ~/${CONFIG_DIR_NAME}/agent)
315
+ PIZZA_PACKAGE_DIR - Override package directory (for Nix/Guix store paths)
316
+ PIZZA_OFFLINE - Disable startup network operations when set to 1/true/yes
317
+ PIZZA_TELEMETRY - Override install telemetry when set to 1/true/yes or 0/false/no
318
+ PIZZA_SHARE_VIEWER_URL - Base URL for /share command (default: https://pizza.dev/session/)
319
+ PIZZA_AI_ANTIGRAVITY_VERSION - Override Antigravity User-Agent version (e.g., 1.23.0)
320
+
321
+ ${chalk.bold("Built-in Tool Names:")}
322
+ read - Read file contents
323
+ cli - Execute CLI commands
324
+ edit - Edit files with find/replace
325
+ write - Write files (creates/overwrites)
326
+ grep - Search file contents (read-only, off by default)
327
+ find - Find files by glob pattern (read-only, off by default)
328
+ ls - List directory contents (read-only, off by default)
329
+ `);
330
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * TUI config selector for `pizza config` command
3
+ */
4
+ import type { ResolvedPaths } from "../core/package-manager.js";
5
+ import type { SettingsManager } from "../core/settings-manager.js";
6
+ export interface ConfigSelectorOptions {
7
+ resolvedPaths: ResolvedPaths;
8
+ settingsManager: SettingsManager;
9
+ cwd: string;
10
+ agentDir: string;
11
+ }
12
+ /** Show TUI config selector and return when closed */
13
+ export declare function selectConfig(options: ConfigSelectorOptions): Promise<void>;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * TUI config selector for `pizza config` command
3
+ */
4
+ import { ProcessTerminal, TUI } from "@earendil-works/pi-tui";
5
+ import { ConfigSelectorComponent } from "../modes/interactive/components/config-selector.js";
6
+ import { initTheme, stopThemeWatcher } from "../modes/interactive/theme/theme.js";
7
+ /** Show TUI config selector and return when closed */
8
+ export async function selectConfig(options) {
9
+ // Initialize theme before showing TUI
10
+ initTheme(options.settingsManager.getTheme(), true);
11
+ return new Promise((resolve) => {
12
+ const ui = new TUI(new ProcessTerminal());
13
+ let resolved = false;
14
+ const selector = new ConfigSelectorComponent(options.resolvedPaths, options.settingsManager, options.cwd, options.agentDir, () => {
15
+ if (!resolved) {
16
+ resolved = true;
17
+ ui.stop();
18
+ stopThemeWatcher();
19
+ resolve();
20
+ }
21
+ }, () => {
22
+ ui.stop();
23
+ stopThemeWatcher();
24
+ process.exit(0);
25
+ }, () => ui.requestRender());
26
+ ui.addChild(selector);
27
+ ui.setFocus(selector.getResourceList());
28
+ ui.start();
29
+ });
30
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Process @file CLI arguments into text content and image attachments
3
+ */
4
+ import type { ImageContent } from "@earendil-works/pi-ai/compat";
5
+ export interface ProcessedFiles {
6
+ text: string;
7
+ images: ImageContent[];
8
+ }
9
+ export interface ProcessFileOptions {
10
+ /** Whether to auto-resize images to 2000x2000 max. Default: true */
11
+ autoResizeImages?: boolean;
12
+ }
13
+ /** Process @file arguments into text content and image attachments */
14
+ export declare function processFileArguments(fileArgs: string[], options?: ProcessFileOptions): Promise<ProcessedFiles>;