@markusylisiurunen/tau 0.1.63 → 0.2.0-alpha.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 (351) hide show
  1. package/README.md +135 -43
  2. package/dist/core/auth/auth_messages.js +6 -0
  3. package/dist/core/auth/auth_messages.js.map +1 -0
  4. package/dist/core/auth/auth_paths.js +7 -0
  5. package/dist/core/auth/auth_paths.js.map +1 -0
  6. package/dist/core/auth/auth_storage.js +91 -0
  7. package/dist/core/auth/auth_storage.js.map +1 -0
  8. package/dist/core/auth/cli.js +88 -0
  9. package/dist/core/auth/cli.js.map +1 -0
  10. package/dist/core/auth/codex_prompt.js +13 -0
  11. package/dist/core/auth/codex_prompt.js.map +1 -0
  12. package/dist/core/auth/credential_resolver.js +18 -0
  13. package/dist/core/auth/credential_resolver.js.map +1 -0
  14. package/dist/core/auth/index.js +7 -0
  15. package/dist/core/auth/index.js.map +1 -0
  16. package/dist/{cli.js → core/cli.js} +34 -15
  17. package/dist/core/cli.js.map +1 -0
  18. package/dist/core/commands/index.js +2 -0
  19. package/dist/core/commands/index.js.map +1 -0
  20. package/dist/core/commands/registry.js +304 -0
  21. package/dist/core/commands/registry.js.map +1 -0
  22. package/dist/core/config/bash_commands.js +44 -0
  23. package/dist/core/config/bash_commands.js.map +1 -0
  24. package/dist/{content_loader.js → core/config/content_loader.js} +301 -174
  25. package/dist/core/config/content_loader.js.map +1 -0
  26. package/dist/core/config/deps.js +18 -0
  27. package/dist/core/config/deps.js.map +1 -0
  28. package/dist/core/config/index.js +7 -0
  29. package/dist/core/config/index.js.map +1 -0
  30. package/dist/core/config/paths.js +54 -0
  31. package/dist/core/config/paths.js.map +1 -0
  32. package/dist/core/config/runtime.js +39 -0
  33. package/dist/core/config/runtime.js.map +1 -0
  34. package/dist/core/config/schema.js +346 -0
  35. package/dist/core/config/schema.js.map +1 -0
  36. package/dist/core/config/virtual_bundle.js +21 -0
  37. package/dist/core/config/virtual_bundle.js.map +1 -0
  38. package/dist/core/config/virtual_defaults.js +12 -0
  39. package/dist/core/config/virtual_defaults.js.map +1 -0
  40. package/dist/{debug.js → core/debug.js} +47 -18
  41. package/dist/core/debug.js.map +1 -0
  42. package/dist/core/events/index.js +2 -0
  43. package/dist/core/events/index.js.map +1 -0
  44. package/dist/core/events/types.js +8 -0
  45. package/dist/core/events/types.js.map +1 -0
  46. package/dist/core/index.js +22 -0
  47. package/dist/core/index.js.map +1 -0
  48. package/dist/core/modes/index.js +2 -0
  49. package/dist/core/modes/index.js.map +1 -0
  50. package/dist/core/modes/mode_adapter.js +2 -0
  51. package/dist/core/modes/mode_adapter.js.map +1 -0
  52. package/dist/core/modes/rpc_adapter.js +17 -0
  53. package/dist/core/modes/rpc_adapter.js.map +1 -0
  54. package/dist/{personas.js → core/personas.js} +20 -48
  55. package/dist/core/personas.js.map +1 -0
  56. package/dist/core/prompts.js.map +1 -0
  57. package/dist/core/runtime/deps.js +26 -0
  58. package/dist/core/runtime/deps.js.map +1 -0
  59. package/dist/core/session/core_session.js +32 -0
  60. package/dist/core/session/core_session.js.map +1 -0
  61. package/dist/core/session/message_accumulator.js.map +1 -0
  62. package/dist/core/session/runner.js +313 -0
  63. package/dist/core/session/runner.js.map +1 -0
  64. package/dist/core/session/session_engine.js +176 -0
  65. package/dist/core/session/session_engine.js.map +1 -0
  66. package/dist/core/subagents/explore.js.map +1 -0
  67. package/dist/core/subagents/registry.js.map +1 -0
  68. package/dist/{subagents → core/subagents}/subagent_engine.js +103 -98
  69. package/dist/core/subagents/subagent_engine.js.map +1 -0
  70. package/dist/{subagents → core/subagents}/types.js.map +1 -1
  71. package/dist/core/subagents/web.js.map +1 -0
  72. package/dist/{tools → core/tools}/bash.js +91 -114
  73. package/dist/core/tools/bash.js.map +1 -0
  74. package/dist/core/tools/catalog.js +37 -0
  75. package/dist/core/tools/catalog.js.map +1 -0
  76. package/dist/core/tools/edit.js +283 -0
  77. package/dist/core/tools/edit.js.map +1 -0
  78. package/dist/core/tools/execution_backend.js +356 -0
  79. package/dist/core/tools/execution_backend.js.map +1 -0
  80. package/dist/{tools → core/tools}/fork.js +8 -11
  81. package/dist/core/tools/fork.js.map +1 -0
  82. package/dist/{tools → core/tools}/grep.js +81 -47
  83. package/dist/core/tools/grep.js.map +1 -0
  84. package/dist/{tools → core/tools}/list.js +33 -12
  85. package/dist/core/tools/list.js.map +1 -0
  86. package/dist/{tools → core/tools}/read.js +57 -18
  87. package/dist/core/tools/read.js.map +1 -0
  88. package/dist/core/tools/registry.js +18 -0
  89. package/dist/core/tools/registry.js.map +1 -0
  90. package/dist/core/tools/sandbox/docker_sandbox.js +181 -0
  91. package/dist/core/tools/sandbox/docker_sandbox.js.map +1 -0
  92. package/dist/{tools → core/tools}/task.js +12 -39
  93. package/dist/core/tools/task.js.map +1 -0
  94. package/dist/core/tools/task_schema.js +29 -0
  95. package/dist/core/tools/task_schema.js.map +1 -0
  96. package/dist/{tools → core/tools}/web_fetch.js +9 -11
  97. package/dist/core/tools/web_fetch.js.map +1 -0
  98. package/dist/{tools → core/tools}/web_search.js +8 -10
  99. package/dist/core/tools/web_search.js.map +1 -0
  100. package/dist/{tools → core/tools}/write.js +33 -14
  101. package/dist/core/tools/write.js.map +1 -0
  102. package/dist/{types.js → core/types.js} +1 -1
  103. package/dist/core/types.js.map +1 -0
  104. package/dist/core/utils/agent_environment.js +48 -0
  105. package/dist/core/utils/agent_environment.js.map +1 -0
  106. package/dist/core/utils/agents_files.js +137 -0
  107. package/dist/core/utils/agents_files.js.map +1 -0
  108. package/dist/core/utils/color.js.map +1 -0
  109. package/dist/{utils → core/utils}/context.js +1 -1
  110. package/dist/core/utils/context.js.map +1 -0
  111. package/dist/{utils → core/utils}/context_builder.js +15 -18
  112. package/dist/core/utils/context_builder.js.map +1 -0
  113. package/dist/core/utils/flex_retry.js.map +1 -0
  114. package/dist/core/utils/fork.js.map +1 -0
  115. package/dist/core/utils/format.js.map +1 -0
  116. package/dist/core/utils/fuzzy.js.map +1 -0
  117. package/dist/core/utils/git.js.map +1 -0
  118. package/dist/core/utils/messages.js.map +1 -0
  119. package/dist/{utils → core/utils}/model_stream.js +10 -3
  120. package/dist/core/utils/model_stream.js.map +1 -0
  121. package/dist/core/utils/never.js.map +1 -0
  122. package/dist/core/utils/parallel_api.js.map +1 -0
  123. package/dist/{utils → core/utils}/project_files.js +7 -25
  124. package/dist/core/utils/project_files.js.map +1 -0
  125. package/dist/core/utils/sandbox_paths.js +29 -0
  126. package/dist/core/utils/sandbox_paths.js.map +1 -0
  127. package/dist/core/utils/sanitize_env.js +14 -0
  128. package/dist/core/utils/sanitize_env.js.map +1 -0
  129. package/dist/{utils → core/utils}/spawn_capture.js +6 -1
  130. package/dist/core/utils/spawn_capture.js.map +1 -0
  131. package/dist/core/utils/streaming_settings.js.map +1 -0
  132. package/dist/core/utils/subagent_utils.js.map +1 -0
  133. package/dist/core/utils/token.js.map +1 -0
  134. package/dist/core/utils/tool_preview.js +45 -0
  135. package/dist/core/utils/tool_preview.js.map +1 -0
  136. package/dist/core/utils/truncate.js.map +1 -0
  137. package/dist/core/utils/zod.js.map +1 -0
  138. package/dist/core/version.js +2 -0
  139. package/dist/core/version.js.map +1 -0
  140. package/dist/main.js +173 -62
  141. package/dist/main.js.map +1 -1
  142. package/dist/tui/app.js +52 -0
  143. package/dist/tui/app.js.map +1 -0
  144. package/dist/{app.js → tui/chat_controller.js} +578 -661
  145. package/dist/tui/chat_controller.js.map +1 -0
  146. package/dist/tui/chat_view.js +233 -0
  147. package/dist/tui/chat_view.js.map +1 -0
  148. package/dist/tui/clipboard.js.map +1 -0
  149. package/dist/tui/export/engine_history.js.map +1 -0
  150. package/dist/{export → tui/export}/html.js +1 -1
  151. package/dist/tui/export/html.js.map +1 -0
  152. package/dist/{export → tui/export}/index.js +1 -1
  153. package/dist/tui/export/index.js.map +1 -0
  154. package/dist/{export → tui/export}/types.js.map +1 -1
  155. package/dist/tui/index.js +2 -0
  156. package/dist/tui/index.js.map +1 -0
  157. package/dist/tui/terminal.js.map +1 -0
  158. package/dist/tui/tool_ui_router.js +284 -0
  159. package/dist/tui/tool_ui_router.js.map +1 -0
  160. package/dist/tui/ui/app_intro.js +18 -0
  161. package/dist/tui/ui/app_intro.js.map +1 -0
  162. package/dist/{ui → tui/ui}/assistant_message.js +12 -4
  163. package/dist/tui/ui/assistant_message.js.map +1 -0
  164. package/dist/tui/ui/bash_execution.js +129 -0
  165. package/dist/tui/ui/bash_execution.js.map +1 -0
  166. package/dist/{ui → tui/ui}/chat_container.js +31 -23
  167. package/dist/tui/ui/chat_container.js.map +1 -0
  168. package/dist/tui/ui/chat_message_model.js +138 -0
  169. package/dist/tui/ui/chat_message_model.js.map +1 -0
  170. package/dist/tui/ui/components/dynamic_border.js.map +1 -0
  171. package/dist/tui/ui/components/editor.js +1233 -0
  172. package/dist/tui/ui/components/editor.js.map +1 -0
  173. package/dist/tui/ui/components/header_box.js.map +1 -0
  174. package/dist/tui/ui/components/header_line.js.map +1 -0
  175. package/dist/tui/ui/components/one_line_segments.js.map +1 -0
  176. package/dist/tui/ui/components/padded_container.js.map +1 -0
  177. package/dist/tui/ui/components/ui_component.js +2 -0
  178. package/dist/tui/ui/components/ui_component.js.map +1 -0
  179. package/dist/{ui → tui/ui}/custom_editor.js +105 -88
  180. package/dist/tui/ui/custom_editor.js.map +1 -0
  181. package/dist/tui/ui/file_execution.js +100 -0
  182. package/dist/tui/ui/file_execution.js.map +1 -0
  183. package/dist/{ui → tui/ui}/footer.js +17 -6
  184. package/dist/tui/ui/footer.js.map +1 -0
  185. package/dist/{ui → tui/ui}/queued_messages.js +3 -0
  186. package/dist/tui/ui/queued_messages.js.map +1 -0
  187. package/dist/tui/ui/restricted_execution.js +194 -0
  188. package/dist/tui/ui/restricted_execution.js.map +1 -0
  189. package/dist/tui/ui/session_divider.js +28 -0
  190. package/dist/tui/ui/session_divider.js.map +1 -0
  191. package/dist/{ui → tui/ui}/session_summary.js +11 -3
  192. package/dist/tui/ui/session_summary.js.map +1 -0
  193. package/dist/{ui → tui/ui}/slash_autocomplete.js +87 -62
  194. package/dist/tui/ui/slash_autocomplete.js.map +1 -0
  195. package/dist/tui/ui/system_message.js +22 -0
  196. package/dist/tui/ui/system_message.js.map +1 -0
  197. package/dist/{ui → tui/ui}/task_execution.js +2 -2
  198. package/dist/tui/ui/task_execution.js.map +1 -0
  199. package/dist/tui/ui/theme/index.js +4 -0
  200. package/dist/tui/ui/theme/index.js.map +1 -0
  201. package/dist/tui/ui/theme/palette.js +209 -0
  202. package/dist/tui/ui/theme/palette.js.map +1 -0
  203. package/dist/tui/ui/theme/theme.js +134 -0
  204. package/dist/tui/ui/theme/theme.js.map +1 -0
  205. package/dist/{ui/palette_tokens.js → tui/ui/theme/tokens.js} +1 -2
  206. package/dist/{ui/palette_tokens.js.map → tui/ui/theme/tokens.js.map} +1 -1
  207. package/dist/{ui/tool_output_layout.js → tui/ui/tool_output.js} +68 -4
  208. package/dist/tui/ui/tool_output.js.map +1 -0
  209. package/dist/tui/ui/tool_ui_registry.js +146 -0
  210. package/dist/tui/ui/tool_ui_registry.js.map +1 -0
  211. package/dist/tui/ui/user_message.js +23 -0
  212. package/dist/tui/ui/user_message.js.map +1 -0
  213. package/package.json +5 -4
  214. package/dist/app.js.map +0 -1
  215. package/dist/bash_commands.js +0 -102
  216. package/dist/bash_commands.js.map +0 -1
  217. package/dist/cli.js.map +0 -1
  218. package/dist/clipboard.js.map +0 -1
  219. package/dist/commands.js +0 -202
  220. package/dist/commands.js.map +0 -1
  221. package/dist/config.js +0 -74
  222. package/dist/config.js.map +0 -1
  223. package/dist/content_loader.js.map +0 -1
  224. package/dist/debug.js.map +0 -1
  225. package/dist/export/engine_history.js.map +0 -1
  226. package/dist/export/html.js.map +0 -1
  227. package/dist/export/index.js.map +0 -1
  228. package/dist/personas.js.map +0 -1
  229. package/dist/prompts.js.map +0 -1
  230. package/dist/session/message_accumulator.js.map +0 -1
  231. package/dist/session/session_engine.js +0 -357
  232. package/dist/session/session_engine.js.map +0 -1
  233. package/dist/subagents/explore.js.map +0 -1
  234. package/dist/subagents/registry.js.map +0 -1
  235. package/dist/subagents/subagent_engine.js.map +0 -1
  236. package/dist/subagents/web.js.map +0 -1
  237. package/dist/terminal.js.map +0 -1
  238. package/dist/tool_ui_router.js +0 -274
  239. package/dist/tool_ui_router.js.map +0 -1
  240. package/dist/tools/bash.js.map +0 -1
  241. package/dist/tools/edit.js +0 -148
  242. package/dist/tools/edit.js.map +0 -1
  243. package/dist/tools/fork.js.map +0 -1
  244. package/dist/tools/grep.js.map +0 -1
  245. package/dist/tools/list.js.map +0 -1
  246. package/dist/tools/read.js.map +0 -1
  247. package/dist/tools/registry.js +0 -23
  248. package/dist/tools/registry.js.map +0 -1
  249. package/dist/tools/task.js.map +0 -1
  250. package/dist/tools/web_fetch.js.map +0 -1
  251. package/dist/tools/web_search.js.map +0 -1
  252. package/dist/tools/write.js.map +0 -1
  253. package/dist/types.js.map +0 -1
  254. package/dist/ui/app_intro.js +0 -12
  255. package/dist/ui/app_intro.js.map +0 -1
  256. package/dist/ui/assistant_message.js.map +0 -1
  257. package/dist/ui/bash_execution.js +0 -232
  258. package/dist/ui/bash_execution.js.map +0 -1
  259. package/dist/ui/chat_container.js.map +0 -1
  260. package/dist/ui/chat_message_model.js +0 -57
  261. package/dist/ui/chat_message_model.js.map +0 -1
  262. package/dist/ui/components/dynamic_border.js.map +0 -1
  263. package/dist/ui/components/header_box.js.map +0 -1
  264. package/dist/ui/components/header_line.js.map +0 -1
  265. package/dist/ui/components/one_line_segments.js.map +0 -1
  266. package/dist/ui/components/padded_container.js.map +0 -1
  267. package/dist/ui/custom_editor.js.map +0 -1
  268. package/dist/ui/file_execution.js +0 -248
  269. package/dist/ui/file_execution.js.map +0 -1
  270. package/dist/ui/footer.js.map +0 -1
  271. package/dist/ui/inline.js +0 -4
  272. package/dist/ui/inline.js.map +0 -1
  273. package/dist/ui/queued_messages.js.map +0 -1
  274. package/dist/ui/restricted_execution.js +0 -251
  275. package/dist/ui/restricted_execution.js.map +0 -1
  276. package/dist/ui/session_divider.js +0 -18
  277. package/dist/ui/session_divider.js.map +0 -1
  278. package/dist/ui/session_summary.js.map +0 -1
  279. package/dist/ui/slash_autocomplete.js.map +0 -1
  280. package/dist/ui/system_message.js +0 -16
  281. package/dist/ui/system_message.js.map +0 -1
  282. package/dist/ui/task_execution.js.map +0 -1
  283. package/dist/ui/theme.js +0 -269
  284. package/dist/ui/theme.js.map +0 -1
  285. package/dist/ui/theme_preview.js +0 -154
  286. package/dist/ui/theme_preview.js.map +0 -1
  287. package/dist/ui/tool_output.js +0 -29
  288. package/dist/ui/tool_output.js.map +0 -1
  289. package/dist/ui/tool_output_helpers.js +0 -30
  290. package/dist/ui/tool_output_helpers.js.map +0 -1
  291. package/dist/ui/tool_output_layout.js.map +0 -1
  292. package/dist/ui/tool_output_preview.js +0 -26
  293. package/dist/ui/tool_output_preview.js.map +0 -1
  294. package/dist/ui/tool_truncation.js +0 -21
  295. package/dist/ui/tool_truncation.js.map +0 -1
  296. package/dist/ui/user_message.js +0 -15
  297. package/dist/ui/user_message.js.map +0 -1
  298. package/dist/utils/agents_files.js +0 -156
  299. package/dist/utils/agents_files.js.map +0 -1
  300. package/dist/utils/color.js.map +0 -1
  301. package/dist/utils/context.js.map +0 -1
  302. package/dist/utils/context_builder.js.map +0 -1
  303. package/dist/utils/flex_retry.js.map +0 -1
  304. package/dist/utils/fork.js.map +0 -1
  305. package/dist/utils/format.js.map +0 -1
  306. package/dist/utils/fuzzy.js.map +0 -1
  307. package/dist/utils/git.js.map +0 -1
  308. package/dist/utils/messages.js.map +0 -1
  309. package/dist/utils/model_stream.js.map +0 -1
  310. package/dist/utils/never.js.map +0 -1
  311. package/dist/utils/parallel_api.js.map +0 -1
  312. package/dist/utils/project_files.js.map +0 -1
  313. package/dist/utils/restricted_fs.js +0 -55
  314. package/dist/utils/restricted_fs.js.map +0 -1
  315. package/dist/utils/spawn_capture.js.map +0 -1
  316. package/dist/utils/streaming_settings.js.map +0 -1
  317. package/dist/utils/subagent_utils.js.map +0 -1
  318. package/dist/utils/token.js.map +0 -1
  319. package/dist/utils/truncate.js.map +0 -1
  320. package/dist/utils/zod.js.map +0 -1
  321. package/dist/version.js +0 -2
  322. package/dist/version.js.map +0 -1
  323. /package/dist/{prompts.js → core/prompts.js} +0 -0
  324. /package/dist/{session → core/session}/message_accumulator.js +0 -0
  325. /package/dist/{subagents → core/subagents}/explore.js +0 -0
  326. /package/dist/{subagents → core/subagents}/registry.js +0 -0
  327. /package/dist/{export → core/subagents}/types.js +0 -0
  328. /package/dist/{subagents → core/subagents}/web.js +0 -0
  329. /package/dist/{utils → core/utils}/color.js +0 -0
  330. /package/dist/{utils → core/utils}/flex_retry.js +0 -0
  331. /package/dist/{utils → core/utils}/fork.js +0 -0
  332. /package/dist/{utils → core/utils}/format.js +0 -0
  333. /package/dist/{utils → core/utils}/fuzzy.js +0 -0
  334. /package/dist/{utils → core/utils}/git.js +0 -0
  335. /package/dist/{utils → core/utils}/messages.js +0 -0
  336. /package/dist/{utils → core/utils}/never.js +0 -0
  337. /package/dist/{utils → core/utils}/parallel_api.js +0 -0
  338. /package/dist/{utils → core/utils}/streaming_settings.js +0 -0
  339. /package/dist/{utils → core/utils}/subagent_utils.js +0 -0
  340. /package/dist/{utils → core/utils}/token.js +0 -0
  341. /package/dist/{utils → core/utils}/truncate.js +0 -0
  342. /package/dist/{utils → core/utils}/zod.js +0 -0
  343. /package/dist/{clipboard.js → tui/clipboard.js} +0 -0
  344. /package/dist/{export → tui/export}/engine_history.js +0 -0
  345. /package/dist/{subagents → tui/export}/types.js +0 -0
  346. /package/dist/{terminal.js → tui/terminal.js} +0 -0
  347. /package/dist/{ui → tui/ui}/components/dynamic_border.js +0 -0
  348. /package/dist/{ui → tui/ui}/components/header_box.js +0 -0
  349. /package/dist/{ui → tui/ui}/components/header_line.js +0 -0
  350. /package/dist/{ui → tui/ui}/components/one_line_segments.js +0 -0
  351. /package/dist/{ui → tui/ui}/components/padded_container.js +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  a terminal-based AI chat client for working with code. tau gives you access to Claude, GPT, and Gemini models, each equipped with tools to explore, write, and edit files in your project, plus optional sub-agents for deeper codebase investigation and web research.
4
4
 
5
- ![tau](./assets/tau.png)
5
+ ![tau](https://raw.githubusercontent.com/markusylisiurunen/tau/main/assets/tau.png)
6
6
 
7
7
  ## installation
8
8
 
@@ -34,15 +34,37 @@ environment variables take precedence over the config file.
34
34
 
35
35
  `parallel` is only needed for the web sub-agent tools (`web_search`/`web_fetch`).
36
36
 
37
+ ### OpenAI Codex subscription (ChatGPT Plus/Pro)
38
+
39
+ to use the OpenAI Codex subscription provider (`openai-codex`), run:
40
+
41
+ ```sh
42
+ tau login openai-codex
43
+ ```
44
+
45
+ this prints a login URL and starts a local callback server on `127.0.0.1:1455`. complete the
46
+ login in your browser and tau will store tokens in `~/.config/tau/auth.json`. if port `1455`
47
+ is already in use, or the browser callback fails, tau will prompt you to paste the redirect
48
+ URL/code. if you see token refresh errors later, run the login command again to re-authenticate.
49
+
50
+ to remove stored credentials:
51
+
52
+ ```sh
53
+ tau logout openai-codex
54
+ ```
55
+
56
+ `openai-codex` does **not** use `OPENAI_API_KEY` or `apiKeys.openai`; it relies on the OAuth
57
+ tokens in `~/.config/tau/auth.json`.
58
+
37
59
  ## security notice
38
60
 
39
61
  **the risk level system is a UX guardrail, not a hard security boundary.** it helps prevent accidental writes and guides model behavior, but it has significant limitations:
40
62
 
41
63
  - **model trust**: the bash tool relies on the model honestly declaring whether a command is a read or write. there's no runtime validation that the command actually matches the declared intent. a model could declare `safetyLevel="read"` while running `rm -rf /`.
42
64
  - **no command analysis**: the system doesn't inspect command content. it trusts the declared safety level without verifying what the command actually does.
43
- - **full system access**: there is no sandboxing or directory restriction. the model can access any file on your system that your user account can read or write, not just the current working directory.
65
+ - **full system access (by default)**: without sandboxing, the model can access any file on your system that your user account can read or write, not just the current working directory. use `--sandbox` to run tool calls inside a docker container with the project mounted.
44
66
  - **no tty / non-interactive tools**: tool commands run with stdin ignored and no TTY. anything that prompts for input or opens an editor can hang or fail (for example `sudo`, `ssh` password prompts, `git` credential prompts). tau also forces git into non-interactive mode (no prompt/editor/pager, batch-mode ssh).
45
- - **user bypasses**: the `!` prefix executes shell commands directly, completely bypassing risk level checks. this is intentional for direct use, but means risk levels only constrain the model, not the user.
67
+ - **user bypasses**: the `!` prefix executes shell commands directly and completely bypasses risk level checks. this is intentional for direct use, but means risk levels only constrain the model, not the user. when `--sandbox` is enabled, these commands still run inside the sandbox.
46
68
 
47
69
  note that there is no confirmation step before tool execution. the model runs commands immediately, and you can only observe the results after the fact.
48
70
 
@@ -58,22 +80,48 @@ npm run build
58
80
  npm start
59
81
  ```
60
82
 
61
- ## theme preview
83
+ `npm start` launches the interactive TUI and expects a real terminal.
62
84
 
63
- run a model-free UI preview for theme iteration:
85
+ ## themes
64
86
 
65
- ```sh
66
- tau --theme-preview
87
+ tau can load custom palette overrides from theme files. create a theme at:
88
+
89
+ - `.tau/themes/<id>.json` (project)
90
+ - `~/.config/tau/themes/<id>.json` (global)
91
+
92
+ then set `"defaultTheme": "<id>"` in config. any palette token not defined in the file renders as plain text.
93
+ theme values accept `#rgb`, `#rrggbb`, `rgb(r, g, b)`, or `hsl(h, s%, l%)`. hex without `#` is ignored.
94
+
95
+ available palette tokens (theme keys):
96
+
97
+ - core: `brandAccent`, `textMuted`, `textDim`, `linkText`, `thinkingText`, `codeInlineText`, `codeBlockText`
98
+ - status: `statusWarn`, `statusError`, `modeMemory`, `modeBash`
99
+ - action: `actionRunning`, `actionSuccess`, `actionError`, `actionOutput`
100
+ - diff: `diffAdd`, `diffRemove`
101
+ - toasts: `toastSuccess`, `toastWarn`, `toastError`, `toastSuccessBg`, `toastWarnBg`, `toastErrorBg`, `toastMutedBg`
102
+ - user: `userSurface`, `userMemorySurface`, `userMemoryText`
103
+ - risk: `riskReadOnlyText`, `riskReadWriteText`
104
+
105
+ example theme file (`.tau/themes/solarized.json`):
106
+
107
+ ```json
108
+ {
109
+ "brandAccent": "#b58900",
110
+ "textMuted": "#586e75",
111
+ "textDim": "#657b83"
112
+ }
67
113
  ```
68
114
 
69
- theme preview renders a fixed set of UI fixtures and disables model calls so you can tweak colors and spacing
70
- without asking the model for visible content.
115
+ and in config (`.tau/config.json` or `~/.config/tau/config.json`):
116
+
117
+ ```json
118
+ { "defaultTheme": "solarized" }
119
+ ```
71
120
 
72
121
  ## risk levels
73
122
 
74
123
  tau uses risk levels to control what the model can do. this lets you stay in control while working alongside AI.
75
124
 
76
- - **restricted**: model can only use safe inspection tools (`read`, `grep`, `list`)
77
125
  - **read-only** (default): model can run read-only tools (no file modifications)
78
126
  - **read-write**: model can create, edit, and delete files
79
127
 
@@ -83,18 +131,42 @@ start with a specific risk level:
83
131
  tau --risk read-write
84
132
  ```
85
133
 
86
- or change it during a session with `/risk:restricted`, `/risk:read-only`, or `/risk:read-write`.
134
+ or change it during a session with `/risk:read-only` or `/risk:read-write`.
87
135
 
88
136
  the default is read-only because it lets the model investigate your code and answer questions without risk of unintended changes. bump it to read-write when you're ready to let the model make edits.
89
137
 
90
- custom personas (loaded from disk) only allow `read-only` and `read-write` risk levels. if you try to use `restricted` with a custom persona, tau will keep the risk level at `read-only`.
138
+ ## sandboxing
139
+
140
+ when started with `--sandbox`, tau runs all tool calls inside a session-scoped docker container. the project root (git root or cwd) is mounted into the container, and the working directory matches your current subdirectory. only `/workspace` is bound to the host; absolute paths outside `/workspace` refer to the container filesystem.
141
+
142
+ requirements:
143
+ - docker must be available on the host
144
+ - config must include `sandbox.image`
145
+ - sandboxing is only enabled at startup with `--sandbox` (no runtime toggle)
146
+
147
+ example config:
148
+
149
+ ```json
150
+ {
151
+ "sandbox": {
152
+ "image": "ghcr.io/your-org/tau-sandbox:latest",
153
+ "mountPath": "/workspace",
154
+ "pruneAfterHours": 72,
155
+ "extraDockerArgs": ["--network=none"],
156
+ "environmentInfo": "tools run inside a container. project mounted at /workspace."
157
+ }
158
+ }
159
+ ```
160
+
161
+ note: when `--sandbox` is enabled, `!` commands also run inside the container.
91
162
 
92
163
  ## personas
93
164
 
94
165
  tau comes with several built-in personas across different models:
95
166
 
96
167
  - **Claude Opus 4.5** and **Haiku 4.5** (Anthropic)
97
- - **GPT-5.2** and **GPT-5.2 Codex** (OpenAI)
168
+ - **GPT-5.2** and **GPT-5.2 flex** (OpenAI)
169
+ - **GPT-5.2 Codex** (OpenAI Codex subscription)
98
170
  - **Gemini 3 Pro** and **Gemini 3 Flash** (Google)
99
171
 
100
172
  each model has two variants: a chat variant for general-purpose assistance, and a coder variant optimized for software engineering. GPT-5.2 Codex is a single coder persona. both variants include the `web` sub-agent for web research, and coder variants also include the `explore` sub-agent for multi-turn codebase investigation.
@@ -112,9 +184,9 @@ some personas can run isolated sub-agents via the internal `task` tool.
112
184
  tau also supports an internal `fork` tool, which runs an autonomous fork of the current session using the full conversation history and returns the fork's final answer.
113
185
 
114
186
  - `explore`: read-only, multi-turn codebase investigation
115
- - `web`: high-threshold web research using Parallel Search/Extract (`web_search`/`web_fetch`)
187
+ - `web`: high-threshold web research using Parallel Search/Extract (`web_search`/`web_fetch`) plus read-only bash for curl/filtering
116
188
 
117
- to use the web sub-agent, set `apiKeys.parallel` in `~/.config/tau/config.json` (see above). tau will only make web calls when needed or when you explicitly ask for web research.
189
+ to use the web sub-agent, set `apiKeys.parallel` in `~/.config/tau/config.json` (see above). tau will only make web calls when you explicitly ask for web research.
118
190
 
119
191
  ## trigger sensitivity
120
192
 
@@ -145,18 +217,18 @@ reference skills by typing `$` followed by the skill name (for example, `$skill-
145
217
  you can also pipe content directly:
146
218
 
147
219
  ```sh
148
- cat src/app.ts | tau --persona opus-4.5-chat
220
+ cat src/tui/app.ts | tau --persona opus-4.5-chat
149
221
  ```
150
222
 
151
- for project-aware sessions, use `--with-context` to inject your AGENTS.md into the system prompt. tau searches for this file in the current directory and parent directories up to your home folder.
223
+ by default, tau injects your AGENTS.md into the system prompt. use `--no-agent-context-files` to disable this behavior. tau searches for AGENTS.md in the current directory and parent directories up to your home folder (or filesystem root if cwd is outside home).
152
224
 
153
- you can also include additional `AGENTS.md` files via `.tau/config.json` (when that config is in scope for the current working directory):
225
+ you can also include additional `AGENTS.md` files via config (when that config is in scope for the current working directory):
154
226
 
155
227
  ```json
156
- { "agents": ["packages/pkg1/AGENTS.md"] }
228
+ { "agentContextFiles": ["packages/pkg1/AGENTS.md"] }
157
229
  ```
158
230
 
159
- paths are resolved relative to the directory containing `.tau/`.
231
+ paths are resolved relative to the directory containing `.tau/` (or relative to home for the global config when it is in scope). entries are only included when their directory is an ancestor or descendant of the current working directory (sibling paths are ignored).
160
232
 
161
233
  run `tau --help` to see all available options, or `tau --debug` to inspect loaded personas, prompts, skills, and the full system prompt for debugging configuration issues.
162
234
 
@@ -168,7 +240,7 @@ prefix a message with `#` to update your project's AGENTS.md file. this is usefu
168
240
  # prefer explicit error messages with context about what operation failed
169
241
  ```
170
242
 
171
- tau will create or update AGENTS.md at your project root, integrating the new information into the existing structure. over time, this builds a knowledge base about your project. combine it with `--with-context` so future sessions understand your conventions without re-explaining them.
243
+ tau will create or update AGENTS.md at your project root, integrating the new information into the existing structure. over time, this builds a knowledge base about your project. this file is loaded automatically in future sessions unless you pass `--no-agent-context-files`.
172
244
 
173
245
  ## commands
174
246
 
@@ -181,14 +253,15 @@ tau supports slash commands for common actions:
181
253
  | `/copy` | copy the last assistant message |
182
254
  | `/copy:code` | copy just the code blocks |
183
255
  | `/export:html` | export chat history to html |
184
- | `/reload` | reload personas, prompts, and skills from disk |
256
+ | `/reload` | reload personas, prompts, skills, and themes from disk |
185
257
  | `/compact:only-summary` | compress history and continue with a summary |
186
258
  | `/compact:with-last-turn` | compress history but keep the last exchange |
187
259
  | `/persona:<id>` | switch to a different persona |
188
260
  | `/prompt:<id>` | insert a saved prompt template |
261
+ | `/theme:<id>` | switch to a loaded theme |
189
262
  | `/bash:<id>` | run a saved shell command |
190
263
  | `/risk:<level>` | change the risk level |
191
- | `!<cmd>` | run a shell command directly |
264
+ | `!<cmd>` | run a shell command directly (bypasses risk checks; uses sandbox if enabled) |
192
265
 
193
266
  the compact commands are useful when conversations get long. they compress everything into a summary so the model retains context without the overhead of a full history.
194
267
 
@@ -211,7 +284,10 @@ the compact commands are useful when conversations get long. they compress every
211
284
 
212
285
  ### global config
213
286
 
214
- store settings in `~/.config/tau/config.json`:
287
+ tau loads config from `~/.config/tau/config.json` only when the current working directory is
288
+ inside your home directory. it also loads any `.tau/config.json` found by walking up from the
289
+ current working directory to home (or to the filesystem root when cwd is outside home).
290
+ settings merge from least-specific to most-specific.
215
291
 
216
292
  ```json
217
293
  {
@@ -223,29 +299,27 @@ store settings in `~/.config/tau/config.json`:
223
299
  },
224
300
  "defaultPersona": "gpt-5.2-chat",
225
301
  "defaultRisk": "read-write",
226
- "toolDisplayMode": "compact",
227
302
  "disableBuiltinPersonas": false,
228
- "userPreferences": "prefer concise responses. use TypeScript for examples."
303
+ "disableBuiltinPrompts": false,
304
+ "defaultTheme": "solarized"
229
305
  }
230
306
  ```
231
307
 
232
308
  the `defaultPersona` field specifies which persona to use when starting the app. the `--persona` flag overrides this setting.
233
309
 
234
- the `defaultRisk` field sets the initial risk level (`restricted`, `read-only`, or `read-write`). the `--risk` flag overrides this setting. if not specified, defaults to `read-only`.
235
-
236
- the `userPreferences` field lets you set guidance that applies to every conversation: preferred languages, response style, or domain context.
310
+ the `defaultRisk` field sets the initial risk level (`read-only` or `read-write`). the `--risk` flag overrides this setting. if not specified, defaults to `read-only`.
237
311
 
238
- `toolDisplayMode` controls how tool calls appear: `"compact"` (default) shows one-line summaries, `"full"` shows detailed blocks.
312
+ if `disableBuiltinPersonas` is set to `true`, tau will not load built-in personas. if `disableBuiltinPrompts` is set to `true`, tau will not load built-in prompts. only entries from `~/.config/tau/` and `.tau/` will be available for those categories. you can also set these flags in any `.tau/config.json`; the most specific value wins.
239
313
 
240
- if `disableBuiltinPersonas` is set to `true`, tau will not load any built-in personas. only personas from `~/.config/tau/personas/` and `.tau/personas/` will be available. you can also set `disableBuiltinPersonas` in `.tau/config.json` at the repo root to disable built-ins for that project (overrides the global value).
314
+ the `sandbox` field configures docker sandboxing. `sandbox.image` is required when you start tau with `--sandbox`. `sandbox.mountPath` defaults to `/workspace`. `sandbox.pruneAfterHours` controls when old containers are auto-pruned (default `72`). `sandbox.extraDockerArgs` lets you pass additional `docker run` flags. `sandbox.environmentInfo` (optional) is injected into the system prompt to describe the container environment to the model.
241
315
 
242
316
  ### project bash commands
243
317
 
244
- define shortcuts for common shell commands in `.tau/config.json` at your project root (or `~/.tau/config.json` globally). tau resolves the project root via git, so you can run tau from subdirectories and it will still pick up `.tau/config.json`:
318
+ define shortcuts for common shell commands in any in-scope config file (`~/.config/tau/config.json` when cwd is under home, or `.tau/config.json` in the cwd ancestry). entries merge by `id` with the most specific level winning:
245
319
 
246
320
  ```json
247
321
  {
248
- "bash": [
322
+ "bashCommands": [
249
323
  { "id": "check", "description": "lint + typecheck", "cmd": "npm run check" },
250
324
  { "id": "test", "cmd": "npm test" }
251
325
  ]
@@ -254,19 +328,22 @@ define shortcuts for common shell commands in `.tau/config.json` at your project
254
328
 
255
329
  run them with `/bash:check` or `/bash:test`.
256
330
 
331
+ commands run with cwd set to the config level root (directory containing `.tau`, or home for the global config).
332
+
257
333
  ### additional agents context
258
334
 
259
- if you use `--with-context`, you can tell tau to always include extra `AGENTS.md` files by adding an `agents` list to `.tau/config.json`:
335
+ you can tell tau to always include extra `AGENTS.md` files by adding an `agentContextFiles` list to a config file in scope:
260
336
 
261
337
  ```json
262
- { "agents": ["packages/pkg1/AGENTS.md"] }
338
+ { "agentContextFiles": ["packages/pkg1/AGENTS.md"] }
263
339
  ```
264
340
 
265
- paths are resolved relative to the directory containing `.tau/`.
341
+ paths are resolved relative to the directory containing `.tau/` (or relative to home for the global config when it is in scope). entries must point at `AGENTS.md`.
342
+ entries are only included when their directory is an ancestor or descendant of the current working directory (sibling paths are ignored).
266
343
 
267
344
  ### custom personas
268
345
 
269
- create your own personas by adding markdown files to `~/.config/tau/personas/` (user-level) or `.tau/personas/` (project-level). project-level `.tau/` directories are discovered by walking up from the current working directory to the git repo root:
346
+ create your own personas by adding markdown files to `~/.config/tau/personas/` (global, only when cwd is under home) or `.tau/personas/` (project). `.tau/` directories are discovered by walking up from the current working directory to home (or filesystem root if cwd is outside home):
270
347
 
271
348
  ```markdown
272
349
  ---
@@ -285,6 +362,8 @@ the frontmatter defines the persona. required fields:
285
362
  - `provider`: model provider id (for example `openai`, `anthropic`, `google`)
286
363
  - `model`: model id for the provider (for example `gpt-5.2`, `claude-opus-4-5`)
287
364
 
365
+ the persona file name (without the `.md` extension) must match the `id`.
366
+
288
367
  optional frontmatter fields:
289
368
 
290
369
  - `label`: display name shown in the ui (defaults to the base persona label if `extends` is used)
@@ -301,7 +380,7 @@ optional frontmatter fields:
301
380
  model: claude-haiku-4-5
302
381
  reasoning: medium
303
382
  ```
304
- - `tools`: list of tool names to enable for this persona. allowed: `bash`, `write`, `edit`, `read`, `list`, `grep`, `task`, `fork`. if omitted, defaults to `bash`, `write`, `edit` (and `task` when subagents are enabled). risk levels still apply.
383
+ - `tools`: list of tool names to enable for this persona. allowed: `bash`, `write`, `edit`, `task`, `fork`. if omitted, defaults to `bash`, `write`, `edit` (and `task` when subagents are enabled). risk levels still apply.
305
384
 
306
385
  the markdown body becomes the system prompt.
307
386
 
@@ -319,11 +398,11 @@ model: claude-haiku-4-5
319
398
 
320
399
  ```
321
400
 
322
- by default, user-level personas can’t use built-in persona ids. if you set `disableBuiltinPersonas: true`, those ids become available for custom personas.
401
+ when persona ids collide across levels, the most specific level wins (for example, a `.tau/personas/` entry overrides a global or built-in persona).
323
402
 
324
403
  ### custom prompts
325
404
 
326
- save reusable prompt templates in `~/.config/tau/prompts/` (user-level) or `.tau/prompts/` (project-level). project-level `.tau/` directories are discovered by walking up from the current working directory to the git repo root:
405
+ save reusable prompt templates in `~/.config/tau/prompts/` (global, only when cwd is under home) or `.tau/prompts/` (project). `.tau/` directories are discovered by walking up from the current working directory to home (or filesystem root if cwd is outside home):
327
406
 
328
407
  ```markdown
329
408
  ---
@@ -334,11 +413,13 @@ review this code for bugs, edge cases, and style issues.
334
413
  suggest specific improvements with code examples.
335
414
  ```
336
415
 
337
- insert them with `/prompt:review`. if a project prompt id conflicts with a user or built-in prompt, the project prompt wins.
416
+ insert them with `/prompt:review`. if a prompt id conflicts across levels (including built-ins), the most specific level wins.
417
+
418
+ the prompt file name (without the `.md` extension) must match the `id`.
338
419
 
339
420
  ### skills
340
421
 
341
- skills are optional directories discovered at `$XDG_CONFIG_HOME/tau/skills/` (defaults to `~/.config/tau/skills/`) and `.tau/skills/`. project-level `.tau/` directories are discovered by walking up from the current working directory to the git repo root. each skill is a directory containing `SKILL.md`. tau follows the [agent skills spec](https://agentskills.io/home).
422
+ skills are optional directories discovered at `~/.config/tau/skills/` (only when cwd is under home) and `.tau/skills/` in the cwd ancestry (up to home, or filesystem root if cwd is outside home). each skill is a directory containing `SKILL.md`. tau follows the [agent skills spec](https://agentskills.io/home).
342
423
 
343
424
  `SKILL.md` must start with yaml frontmatter:
344
425
 
@@ -349,7 +430,7 @@ optional fields: `license`, `compatibility` (<=500 chars), `metadata` (string ma
349
430
 
350
431
  enable skills per persona with the `skills` frontmatter field. you can list specific skill names (matched by `name` in skill frontmatter), or use `"*"` to enable all discovered skills. all built-in personas have `skills: "*"` by default. if a project skill conflicts with a user skill by name, the project skill wins. tau injects an index of enabled skills into the system prompt containing only each skill's `name`, `description`, and absolute file path.
351
432
 
352
- use `/reload` to pick up changes to personas, prompts, and skills without restarting.
433
+ use `/reload` to pick up changes to personas, prompts, skills, and themes without restarting.
353
434
 
354
435
  ## how it works
355
436
 
@@ -390,3 +471,14 @@ git push --follow-tags
390
471
  ```sh
391
472
  gh release create v$(node -p "require('./package.json').version") --generate-notes
392
473
  ```
474
+
475
+ alpha prereleases are published under the npm `alpha` tag (not `latest`):
476
+
477
+ ```sh
478
+ if node -p "require('./package.json').version.includes('-alpha.')"; then
479
+ npm version prerelease --preid alpha
480
+ else
481
+ npm version preminor --preid alpha
482
+ fi
483
+ gh release create v$(node -p "require('./package.json').version") --generate-notes --prerelease
484
+ ```
@@ -0,0 +1,6 @@
1
+ export function formatCodexAuthError(authPath, detail) {
2
+ const base = "OpenAI Codex credentials are missing or expired.";
3
+ const hint = `run "tau login openai-codex" to authenticate and store tokens in ${authPath}.`;
4
+ return detail ? `${base} ${detail} ${hint}` : `${base} ${hint}`;
5
+ }
6
+ //# sourceMappingURL=auth_messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth_messages.js","sourceRoot":"","sources":["../../../src/core/auth/auth_messages.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,MAAe;IACpE,MAAM,IAAI,GAAG,kDAAkD,CAAC;IAChE,MAAM,IAAI,GAAG,oEAAoE,QAAQ,GAAG,CAAC;IAC7F,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;AAClE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { homedir } from "node:os";
2
+ import { join } from "node:path";
3
+ export function getAuthPath(homeDir) {
4
+ const home = homeDir ?? homedir();
5
+ return join(home, ".config", "tau", "auth.json");
6
+ }
7
+ //# sourceMappingURL=auth_paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth_paths.js","sourceRoot":"","sources":["../../../src/core/auth/auth_paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,EAAE,CAAC;IAClC,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
3
+ import { dirname } from "node:path";
4
+ import { getOAuthApiKey } from "@mariozechner/pi-ai";
5
+ export class AuthStorage {
6
+ authPath;
7
+ data = {};
8
+ static refreshLocks = new Map();
9
+ constructor(authPath) {
10
+ this.authPath = authPath;
11
+ this.reload();
12
+ }
13
+ reload() {
14
+ if (!existsSync(this.authPath)) {
15
+ this.data = {};
16
+ return;
17
+ }
18
+ try {
19
+ const parsed = JSON.parse(readFileSync(this.authPath, "utf-8"));
20
+ this.data = parsed ?? {};
21
+ }
22
+ catch {
23
+ this.data = {};
24
+ }
25
+ }
26
+ save() {
27
+ const dir = dirname(this.authPath);
28
+ if (!existsSync(dir)) {
29
+ mkdirSync(dir, { recursive: true, mode: 0o700 });
30
+ }
31
+ const tmpPath = `${this.authPath}.${randomUUID()}.tmp`;
32
+ writeFileSync(tmpPath, JSON.stringify(this.data, null, 2), { encoding: "utf-8", mode: 0o600 });
33
+ renameSync(tmpPath, this.authPath);
34
+ chmodSync(this.authPath, 0o600);
35
+ }
36
+ get(provider) {
37
+ return this.data[provider] ?? undefined;
38
+ }
39
+ set(provider, credential) {
40
+ this.data[provider] = credential;
41
+ this.save();
42
+ }
43
+ remove(provider) {
44
+ delete this.data[provider];
45
+ this.save();
46
+ }
47
+ list() {
48
+ return Object.keys(this.data);
49
+ }
50
+ hasAuth(provider) {
51
+ return provider in this.data;
52
+ }
53
+ async getApiKey(provider) {
54
+ return this.withRefreshLock(provider, async () => {
55
+ this.reload();
56
+ const credential = this.data[provider];
57
+ if (!credential) {
58
+ return undefined;
59
+ }
60
+ if (credential.type === "api_key") {
61
+ return credential.key;
62
+ }
63
+ const oauthCredentials = {};
64
+ for (const [key, value] of Object.entries(this.data)) {
65
+ if (value.type === "oauth") {
66
+ oauthCredentials[key] = value;
67
+ }
68
+ }
69
+ const result = await getOAuthApiKey(provider, oauthCredentials);
70
+ if (!result) {
71
+ return undefined;
72
+ }
73
+ this.data[provider] = { type: "oauth", ...result.newCredentials };
74
+ this.save();
75
+ return result.apiKey;
76
+ });
77
+ }
78
+ async withRefreshLock(provider, action) {
79
+ const lockKey = `${this.authPath}:${provider}`;
80
+ const existing = AuthStorage.refreshLocks.get(lockKey);
81
+ if (existing) {
82
+ return existing;
83
+ }
84
+ const inFlight = action().finally(() => {
85
+ AuthStorage.refreshLocks.delete(lockKey);
86
+ });
87
+ AuthStorage.refreshLocks.set(lockKey, inFlight);
88
+ return inFlight;
89
+ }
90
+ }
91
+ //# sourceMappingURL=auth_storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth_storage.js","sourceRoot":"","sources":["../../../src/core/auth/auth_storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAA6C,MAAM,qBAAqB,CAAC;AAehG,MAAM,OAAO,WAAW;IAIO;IAHrB,IAAI,GAAoB,EAAE,CAAC;IAC3B,MAAM,CAAC,YAAY,GAAG,IAAI,GAAG,EAAuC,CAAC;IAE7E,YAA6B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;YACf,OAAO;QACT,CAAC;QAED,IAAI,CAAC;Y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C,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,eAAe,CAC3B,QAAgB,EAChB,MAAyC;QAEzC,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAG,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;YACrC,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QACH,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChD,OAAO,QAAQ,CAAC;IAClB,CAAC"}
@@ -0,0 +1,88 @@
1
+ import { loginOpenAICodex } from "@mariozechner/pi-ai";
2
+ export const SUPPORTED_OAUTH_PROVIDERS = [
3
+ { id: "openai-codex", label: "OpenAI Codex (ChatGPT Plus/Pro)" },
4
+ ];
5
+ const DEFAULT_LOGIN_HANDLERS = {
6
+ "openai-codex": (callbacks) => loginOpenAICodex({
7
+ onAuth: callbacks.onAuth,
8
+ onPrompt: callbacks.onPrompt,
9
+ onProgress: callbacks.onProgress,
10
+ }),
11
+ };
12
+ function normalizeProvider(value) {
13
+ return value.trim().toLowerCase();
14
+ }
15
+ function formatProviderList(providers) {
16
+ return providers.map((provider, index) => ` ${index + 1}. ${provider.label}`).join("\n");
17
+ }
18
+ async function promptForProvider(prompt, log, providers) {
19
+ log("select a provider:\n");
20
+ log(formatProviderList(providers));
21
+ log("");
22
+ const selection = await prompt({ message: `enter number (1-${providers.length}):` });
23
+ const index = Number.parseInt(selection, 10) - 1;
24
+ if (!Number.isFinite(index) || index < 0 || index >= providers.length) {
25
+ throw new Error("invalid selection.");
26
+ }
27
+ return providers[index].id;
28
+ }
29
+ function resolveProvider(providerArg, providers) {
30
+ if (!providerArg)
31
+ return undefined;
32
+ const normalized = normalizeProvider(providerArg);
33
+ const resolved = providers.find((provider) => provider.id === normalized)?.id;
34
+ if (!resolved) {
35
+ const available = providers.map((entry) => entry.id).join(", ");
36
+ throw new Error(`unknown provider "${providerArg}". available: ${available}`);
37
+ }
38
+ return resolved;
39
+ }
40
+ export async function runLoginCommand(options) {
41
+ const log = options.log ?? console.log;
42
+ const providers = options.providers ?? SUPPORTED_OAUTH_PROVIDERS;
43
+ let provider = resolveProvider(options.providerArg, providers);
44
+ if (!provider) {
45
+ provider = await promptForProvider(options.prompt, log, providers);
46
+ }
47
+ const handlers = { ...DEFAULT_LOGIN_HANDLERS, ...options.loginHandlers };
48
+ const handler = handlers[provider];
49
+ if (!handler) {
50
+ const available = providers.map((entry) => entry.id).join(", ");
51
+ throw new Error(`unknown provider "${provider}". available: ${available}`);
52
+ }
53
+ log(`logging in to ${provider}...`);
54
+ const credentials = await handler({
55
+ onAuth: (info) => {
56
+ log("");
57
+ if (provider === "openai-codex") {
58
+ log("copy this url into your browser to complete login:");
59
+ }
60
+ else {
61
+ log("open this url in your browser:");
62
+ }
63
+ log(info.url);
64
+ if (info.instructions) {
65
+ log(info.instructions);
66
+ }
67
+ if (provider === "openai-codex") {
68
+ log("if the browser callback fails, you'll be prompted to paste the redirect url/code.");
69
+ }
70
+ log("");
71
+ },
72
+ onPrompt: async (prompt) => options.prompt(prompt),
73
+ onProgress: (message) => log(message),
74
+ });
75
+ options.authStorage.set(provider, { type: "oauth", ...credentials });
76
+ log(`credentials saved to ${options.authPath}`);
77
+ }
78
+ export async function runLogoutCommand(options) {
79
+ const log = options.log ?? console.log;
80
+ const providers = options.providers ?? SUPPORTED_OAUTH_PROVIDERS;
81
+ let provider = resolveProvider(options.providerArg, providers);
82
+ if (!provider) {
83
+ provider = await promptForProvider(options.prompt, log, providers);
84
+ }
85
+ options.authStorage.remove(provider);
86
+ log(`removed credentials for ${provider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AC;KACtC,CAAC,CAAC;IAEH,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC;IACrE,GAAG,CAAC,wBAAwB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAOtC;IACC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,yBAAyB,CAAC;IAEjE,IAAI,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC/D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACrC,GAAG,CAAC,2BAA2B,QAAQ,SAAS,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { PI_STATIC_INSTRUCTIONS } from "@mariozechner/pi-ai";
2
+ const STATIC_PREFIX = PI_STATIC_INSTRUCTIONS.trim();
3
+ export function ensureCodexSystemPrompt(systemPrompt) {
4
+ const trimmedStart = systemPrompt.trimStart();
5
+ if (trimmedStart.startsWith(STATIC_PREFIX)) {
6
+ return STATIC_PREFIX + trimmedStart.slice(STATIC_PREFIX.length);
7
+ }
8
+ if (!systemPrompt.trim()) {
9
+ return STATIC_PREFIX;
10
+ }
11
+ return `${STATIC_PREFIX}\n\n${systemPrompt.trim()}`;
12
+ }
13
+ //# sourceMappingURL=codex_prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex_prompt.js","sourceRoot":"","sources":["../../../src/core/auth/codex_prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,aAAa,GAAG,sBAAsB,CAAC,IAAI,EAAE,CAAC;AAEpD,MAAM,UAAU,uBAAuB,CAAC,YAAoB;IAC1D,MAAM,YAAY,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC;IAC9C,IAAI,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAC3C,OAAO,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;QACzB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,OAAO,GAAG,aAAa,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;AACtD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { getEnvApiKey } from "@mariozechner/pi-ai";
2
+ import { getApiKeyForProvider } from "../config/schema.js";
3
+ export function createCredentialResolver(options) {
4
+ return {
5
+ getApiKey: async (provider) => {
6
+ const authKey = await options.authStorage.getApiKey(provider);
7
+ if (authKey) {
8
+ return authKey;
9
+ }
10
+ const configKey = getApiKeyForProvider(options.getConfig(), provider);
11
+ if (configKey) {
12
+ return configKey;
13
+ }
14
+ return getEnvApiKey(provider);
15
+ },
16
+ };
17
+ }
18
+ //# sourceMappingURL=credential_resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential_resolver.js","sourceRoot":"","sources":["../../../src/core/auth/credential_resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAO3D,MAAM,UAAU,wBAAwB,CAAC,OAGxC;IACC,OAAO;QACL,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;YAC5B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC9D,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,OAAO,CAAC;YACjB,CAAC;YAED,MAAM,SAAS,GAAG,oBAAoB,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAC;YACtE,IAAI,SAAS,EAAE,CAAC;gBACd,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { formatCodexAuthError } from "./auth_messages.js";
2
+ export { getAuthPath } from "./auth_paths.js";
3
+ export { AuthStorage } from "./auth_storage.js";
4
+ export { runLoginCommand, runLogoutCommand, SUPPORTED_OAUTH_PROVIDERS, } from "./cli.js";
5
+ export { ensureCodexSystemPrompt } from "./codex_prompt.js";
6
+ export { createCredentialResolver } from "./credential_resolver.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC"}