@humain/humain-code 0.8.0 → 0.8.2

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 (281) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/bundle/chunks/{anthropic-messages-UZB5HJE3.js → anthropic-messages-XFCDMGD6.js} +4 -4
  3. package/dist/bundle/chunks/{azure-openai-responses-J3LCMWPQ.js → azure-openai-responses-F4KQM3NK.js} +3 -3
  4. package/dist/bundle/chunks/{chunk-7EONJCBE.js → chunk-2JNJJ6SZ.js} +1 -1
  5. package/dist/bundle/chunks/{chunk-3CGMVKHA.js → chunk-3E37CJCE.js} +1 -1
  6. package/dist/bundle/chunks/{chunk-SQ7NTRLJ.js → chunk-3PJ7NPWN.js} +20 -17
  7. package/dist/bundle/chunks/{chunk-WRYGY5XG.js → chunk-4MKATHT2.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-ATFZAFMS.js → chunk-65FLSKDA.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-P2Y2H7SD.js → chunk-6JTCRCNF.js} +2 -2
  10. package/dist/bundle/chunks/{chunk-CET2MXXN.js → chunk-6P6MMQUH.js} +1 -1
  11. package/dist/bundle/chunks/{chunk-APNPBT7Y.js → chunk-BRSLXHED.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-KONLZKPL.js → chunk-E4VUW4RI.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-R3VDXQW2.js → chunk-EFY2QPVP.js} +6 -6
  14. package/dist/bundle/chunks/{chunk-4EV7CK26.js → chunk-F2H47FRF.js} +1 -1
  15. package/dist/bundle/chunks/{chunk-KQXXBQ57.js → chunk-G2QMON4O.js} +382 -331
  16. package/dist/bundle/chunks/{chunk-TYN46EVI.js → chunk-GPLWWO5Q.js} +1 -1
  17. package/dist/bundle/chunks/{chunk-JV7VHOAY.js → chunk-H2B3WLIM.js} +2 -2
  18. package/dist/bundle/chunks/chunk-H7UPU2SH.js +2093 -0
  19. package/dist/bundle/chunks/{chunk-NNWNIBLG.js → chunk-JKX5EGOT.js} +1 -1
  20. package/dist/bundle/chunks/{chunk-4SFWYKL5.js → chunk-JQBZUFH7.js} +467 -440
  21. package/dist/bundle/chunks/{chunk-D3KYOSQY.js → chunk-JSHKS7VH.js} +1 -1
  22. package/dist/bundle/chunks/{chunk-C4DHVDYT.js → chunk-JX6YIPNK.js} +1 -1
  23. package/dist/bundle/chunks/{chunk-Z5UFSRO4.js → chunk-KI7CHPWC.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-VKQNYZUA.js → chunk-KRBELWQH.js} +1 -1
  25. package/dist/bundle/chunks/{chunk-AI7EHDAX.js → chunk-LSRXA7OS.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-WBSGWISD.js → chunk-M5TVWJ5T.js} +5 -4
  27. package/dist/bundle/chunks/{chunk-XVIQYONJ.js → chunk-MIAXMK5F.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-WGXMYMPE.js → chunk-PFBAIRCY.js} +2 -2
  29. package/dist/bundle/chunks/{chunk-CU6KU7JK.js → chunk-PJXBU6CR.js} +47 -44
  30. package/dist/bundle/chunks/{chunk-OVDMYBIT.js → chunk-PWFM6AQQ.js} +1 -1
  31. package/dist/bundle/chunks/{chunk-PGVDL4KB.js → chunk-QFDZEUFU.js} +2 -2
  32. package/dist/bundle/chunks/{chunk-DD5UT56Y.js → chunk-R2KD2HFT.js} +67 -66
  33. package/dist/bundle/chunks/{chunk-EMBIUIQ2.js → chunk-T2ZGMEMV.js} +46 -45
  34. package/dist/bundle/chunks/{chunk-IOLLZXQN.js → chunk-U4EAJPMO.js} +138 -126
  35. package/dist/bundle/chunks/chunk-UZOIHLNU.js +23 -0
  36. package/dist/bundle/chunks/{chunk-QRYDGY5I.js → chunk-ZSWU5KKA.js} +1 -1
  37. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-ETKC6B2S.js → cloudflare-workers-ai-system-one-JEZVYITT.js} +1 -1
  38. package/dist/bundle/chunks/{compat-HS4ARZK3.js → compat-ELBUCH6U.js} +6 -6
  39. package/dist/bundle/chunks/{curator-server-TC7RVVN2.js → curator-server-QB4GITGS.js} +1 -1
  40. package/dist/bundle/chunks/{dist-NMEXYUP3.js → dist-CBODG4CA.js} +5 -5
  41. package/dist/bundle/chunks/{dist-5AQPJ2TI.js → dist-NERIS6SW.js} +1 -1
  42. package/dist/bundle/chunks/{dist-DYB3AR7C.js → dist-QSYDYE3Y.js} +7 -7
  43. package/dist/bundle/chunks/{easter-egg-3d-VVUF3C3X.js → easter-egg-3d-VZC5WOYV.js} +1 -1
  44. package/dist/bundle/chunks/{execute-I3WGGPWL.js → execute-6MEJJF2T.js} +2 -2
  45. package/dist/bundle/chunks/{extract-QHZTEVJP.js → extract-L373D6O7.js} +2 -2
  46. package/dist/bundle/chunks/{flow-implementer-QMN3HKE2.js → flow-implementer-3P3BHQ7E.js} +4 -4
  47. package/dist/bundle/chunks/github-copilot.js +53 -56
  48. package/dist/bundle/chunks/{google-generative-ai-ZND73WDQ.js → google-generative-ai-WIASMWS3.js} +2 -2
  49. package/dist/bundle/chunks/{google-vertex-YAH62YRM.js → google-vertex-WSPHRZIZ.js} +3 -3
  50. package/dist/bundle/chunks/{host-Q565BCXB.js → host-WOLZCWQQ.js} +1 -1
  51. package/dist/bundle/chunks/{inprocess-453SLFL5.js → inprocess-3PDJKE5F.js} +5 -5
  52. package/dist/bundle/chunks/interactive-mode-SDUO5OLD.js +5 -0
  53. package/dist/bundle/chunks/{llama-cpp-classify-Z4GZY4GC.js → llama-cpp-classify-KYZT532X.js} +1 -1
  54. package/dist/bundle/chunks/{mistral-conversations-7I5JURDP.js → mistral-conversations-7JYDDRUT.js} +2 -2
  55. package/dist/bundle/chunks/{node-IMSYVRPL.js → node-N7TPBUJB.js} +1 -1
  56. package/dist/bundle/chunks/{openai-codex-responses-LTHOMN37.js → openai-codex-responses-7PAML4NF.js} +3 -3
  57. package/dist/bundle/chunks/{openai-completions-W2X635EE.js → openai-completions-UJDAIGTK.js} +3 -3
  58. package/dist/bundle/chunks/{openai-decisions-TN2GNOYI.js → openai-decisions-JMSDGR7K.js} +1 -1
  59. package/dist/bundle/chunks/{openai-responses-DVY4QXOG.js → openai-responses-2WNCE6AY.js} +3 -3
  60. package/dist/bundle/chunks/{openrouter-images-SE2JMS44.js → openrouter-images-V3UCCO6X.js} +1 -1
  61. package/dist/bundle/chunks/{pi-messages-WAS6Z5L5.js → pi-messages-TQ7LJUNQ.js} +2 -2
  62. package/dist/bundle/chunks/{session-picker-XNVLSJ22.js → session-picker-EYKCMFQR.js} +1 -1
  63. package/dist/bundle/chunks/{startup-ui-3TCT465D.js → startup-ui-7ODOR34R.js} +2 -2
  64. package/dist/bundle/chunks/{trace-command-7ORDQ3JS.js → trace-command-VM7FBWPE.js} +4 -4
  65. package/dist/bundle/chunks/{typesafe-system-one-AAZH6S3I.js → typesafe-system-one-YP7GGN4C.js} +1 -1
  66. package/dist/bundle/chunks/{virtual-modules-CIVXCEAN.js → virtual-modules-IU5KWB2C.js} +10 -10
  67. package/dist/bundle/cli-runtime.js +5 -5
  68. package/dist/bundle/index.js +8 -8
  69. package/dist/bundle/rpc-entry.js +4 -4
  70. package/dist/cli/args.js +1 -1
  71. package/dist/cli/args.js.map +1 -1
  72. package/dist/cli/list-models.d.ts.map +1 -1
  73. package/dist/cli/list-models.js +16 -1
  74. package/dist/cli/list-models.js.map +1 -1
  75. package/dist/cli/setup.d.ts +1 -1
  76. package/dist/cli/setup.d.ts.map +1 -1
  77. package/dist/cli/setup.js +3 -2
  78. package/dist/cli/setup.js.map +1 -1
  79. package/dist/cli.js.map +1 -1
  80. package/dist/core/agent-session-runtime.d.ts +3 -0
  81. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  82. package/dist/core/agent-session-runtime.js +11 -2
  83. package/dist/core/agent-session-runtime.js.map +1 -1
  84. package/dist/core/keybindings.d.ts +24 -0
  85. package/dist/core/keybindings.d.ts.map +1 -1
  86. package/dist/core/keybindings.js +3 -0
  87. package/dist/core/keybindings.js.map +1 -1
  88. package/dist/core/model-registry.d.ts.map +1 -1
  89. package/dist/core/model-registry.js +12 -1
  90. package/dist/core/model-registry.js.map +1 -1
  91. package/dist/core/model-resolver.d.ts.map +1 -1
  92. package/dist/core/model-resolver.js +13 -9
  93. package/dist/core/model-resolver.js.map +1 -1
  94. package/dist/core/model-runtime.d.ts +11 -2
  95. package/dist/core/model-runtime.d.ts.map +1 -1
  96. package/dist/core/model-runtime.js +23 -6
  97. package/dist/core/model-runtime.js.map +1 -1
  98. package/dist/core/oauth-account-pool.d.ts +4 -0
  99. package/dist/core/oauth-account-pool.d.ts.map +1 -1
  100. package/dist/core/oauth-account-pool.js +104 -20
  101. package/dist/core/oauth-account-pool.js.map +1 -1
  102. package/dist/core/sdk.js +2 -2
  103. package/dist/core/sdk.js.map +1 -1
  104. package/dist/core/settings-manager.d.ts +4 -0
  105. package/dist/core/settings-manager.d.ts.map +1 -1
  106. package/dist/core/settings-manager.js +17 -0
  107. package/dist/core/settings-manager.js.map +1 -1
  108. package/dist/core/settings-schema.d.ts +2 -0
  109. package/dist/core/settings-schema.d.ts.map +1 -1
  110. package/dist/core/settings-schema.js +10 -0
  111. package/dist/core/settings-schema.js.map +1 -1
  112. package/dist/core/slash-commands.d.ts.map +1 -1
  113. package/dist/core/slash-commands.js +1 -0
  114. package/dist/core/slash-commands.js.map +1 -1
  115. package/dist/extensions/usage/confirmation.d.ts.map +1 -1
  116. package/dist/extensions/usage/confirmation.js +1 -1
  117. package/dist/extensions/usage/confirmation.js.map +1 -1
  118. package/dist/extensions/usage/index.js +6 -6
  119. package/dist/extensions/usage/index.js.map +1 -1
  120. package/dist/extensions/usage/panes.d.ts +5 -0
  121. package/dist/extensions/usage/panes.d.ts.map +1 -0
  122. package/dist/extensions/usage/panes.js +10 -0
  123. package/dist/extensions/usage/panes.js.map +1 -0
  124. package/dist/extensions/usage/popup.d.ts.map +1 -1
  125. package/dist/extensions/usage/popup.js +9 -18
  126. package/dist/extensions/usage/popup.js.map +1 -1
  127. package/dist/humain/gateway/client.d.ts.map +1 -1
  128. package/dist/humain/gateway/client.js +36 -9
  129. package/dist/humain/gateway/client.js.map +1 -1
  130. package/dist/humain/gateway/http.d.ts.map +1 -1
  131. package/dist/humain/gateway/http.js +26 -6
  132. package/dist/humain/gateway/http.js.map +1 -1
  133. package/dist/humain/gateway/provider.d.ts.map +1 -1
  134. package/dist/humain/gateway/provider.js +9 -2
  135. package/dist/humain/gateway/provider.js.map +1 -1
  136. package/dist/humain/hcode/contracts.d.ts +15 -0
  137. package/dist/humain/hcode/contracts.d.ts.map +1 -1
  138. package/dist/humain/hcode/contracts.js +85 -10
  139. package/dist/humain/hcode/contracts.js.map +1 -1
  140. package/dist/humain/hcode/environment.d.ts.map +1 -1
  141. package/dist/humain/hcode/environment.js +4 -2
  142. package/dist/humain/hcode/environment.js.map +1 -1
  143. package/dist/humain/hcode/facade.d.ts +12 -1
  144. package/dist/humain/hcode/facade.d.ts.map +1 -1
  145. package/dist/humain/hcode/facade.js +35 -8
  146. package/dist/humain/hcode/facade.js.map +1 -1
  147. package/dist/humain/hcode/images.d.ts.map +1 -1
  148. package/dist/humain/hcode/images.js +4 -2
  149. package/dist/humain/hcode/images.js.map +1 -1
  150. package/dist/humain/hcode/login-copy.d.ts.map +1 -1
  151. package/dist/humain/hcode/login-copy.js +11 -1
  152. package/dist/humain/hcode/login-copy.js.map +1 -1
  153. package/dist/humain/hcode/notices.d.ts +22 -1
  154. package/dist/humain/hcode/notices.d.ts.map +1 -1
  155. package/dist/humain/hcode/notices.js +34 -3
  156. package/dist/humain/hcode/notices.js.map +1 -1
  157. package/dist/humain/hcode/provider.d.ts +3 -1
  158. package/dist/humain/hcode/provider.d.ts.map +1 -1
  159. package/dist/humain/hcode/provider.js +126 -46
  160. package/dist/humain/hcode/provider.js.map +1 -1
  161. package/dist/humain/hcode/run-credential.d.ts +21 -0
  162. package/dist/humain/hcode/run-credential.d.ts.map +1 -0
  163. package/dist/humain/hcode/run-credential.js +140 -0
  164. package/dist/humain/hcode/run-credential.js.map +1 -0
  165. package/dist/humain/hcode/sandbox.d.ts +6 -0
  166. package/dist/humain/hcode/sandbox.d.ts.map +1 -0
  167. package/dist/humain/hcode/sandbox.js +139 -0
  168. package/dist/humain/hcode/sandbox.js.map +1 -0
  169. package/dist/humain/hcode/selection.d.ts +7 -2
  170. package/dist/humain/hcode/selection.d.ts.map +1 -1
  171. package/dist/humain/hcode/selection.js +29 -5
  172. package/dist/humain/hcode/selection.js.map +1 -1
  173. package/dist/humain/hcode/transport.d.ts +3 -2
  174. package/dist/humain/hcode/transport.d.ts.map +1 -1
  175. package/dist/humain/hcode/transport.js +22 -7
  176. package/dist/humain/hcode/transport.js.map +1 -1
  177. package/dist/humain/remote/broker.d.ts +84 -0
  178. package/dist/humain/remote/broker.d.ts.map +1 -0
  179. package/dist/humain/remote/broker.js +427 -0
  180. package/dist/humain/remote/broker.js.map +1 -0
  181. package/dist/humain/remote/deny-store.d.ts +12 -0
  182. package/dist/humain/remote/deny-store.d.ts.map +1 -0
  183. package/dist/humain/remote/deny-store.js +164 -0
  184. package/dist/humain/remote/deny-store.js.map +1 -0
  185. package/dist/humain/remote/enablement.d.ts +5 -0
  186. package/dist/humain/remote/enablement.d.ts.map +1 -0
  187. package/dist/humain/remote/enablement.js +8 -0
  188. package/dist/humain/remote/enablement.js.map +1 -0
  189. package/dist/humain/remote/environment.d.ts +11 -0
  190. package/dist/humain/remote/environment.d.ts.map +1 -0
  191. package/dist/humain/remote/environment.js +19 -0
  192. package/dist/humain/remote/environment.js.map +1 -0
  193. package/dist/humain/remote/host-watch.d.ts +21 -0
  194. package/dist/humain/remote/host-watch.d.ts.map +1 -0
  195. package/dist/humain/remote/host-watch.js +186 -0
  196. package/dist/humain/remote/host-watch.js.map +1 -0
  197. package/dist/humain/remote/ipc-posix.d.ts +5 -0
  198. package/dist/humain/remote/ipc-posix.d.ts.map +1 -0
  199. package/dist/humain/remote/ipc-posix.js +29 -0
  200. package/dist/humain/remote/ipc-posix.js.map +1 -0
  201. package/dist/humain/remote/ipc-windows.d.ts +3 -0
  202. package/dist/humain/remote/ipc-windows.d.ts.map +1 -0
  203. package/dist/humain/remote/ipc-windows.js +5 -0
  204. package/dist/humain/remote/ipc-windows.js.map +1 -0
  205. package/dist/humain/remote/ipc.d.ts +10 -0
  206. package/dist/humain/remote/ipc.d.ts.map +1 -0
  207. package/dist/humain/remote/ipc.js +19 -0
  208. package/dist/humain/remote/ipc.js.map +1 -0
  209. package/dist/humain/remote/protocol.d.ts +43 -0
  210. package/dist/humain/remote/protocol.d.ts.map +1 -0
  211. package/dist/humain/remote/protocol.js +76 -0
  212. package/dist/humain/remote/protocol.js.map +1 -0
  213. package/dist/humain/remote/relay-socket.d.ts +30 -0
  214. package/dist/humain/remote/relay-socket.d.ts.map +1 -0
  215. package/dist/humain/remote/relay-socket.js +137 -0
  216. package/dist/humain/remote/relay-socket.js.map +1 -0
  217. package/dist/humain/remote/secure-channel.d.ts +10 -0
  218. package/dist/humain/remote/secure-channel.d.ts.map +1 -0
  219. package/dist/humain/remote/secure-channel.js +5 -0
  220. package/dist/humain/remote/secure-channel.js.map +1 -0
  221. package/dist/humain/remote/terminal.d.ts +48 -0
  222. package/dist/humain/remote/terminal.d.ts.map +1 -0
  223. package/dist/humain/remote/terminal.js +119 -0
  224. package/dist/humain/remote/terminal.js.map +1 -0
  225. package/dist/humain/remote/tickets.d.ts +35 -0
  226. package/dist/humain/remote/tickets.d.ts.map +1 -0
  227. package/dist/humain/remote/tickets.js +132 -0
  228. package/dist/humain/remote/tickets.js.map +1 -0
  229. package/dist/main.d.ts +1 -1
  230. package/dist/main.d.ts.map +1 -1
  231. package/dist/main.js +13 -1
  232. package/dist/main.js.map +1 -1
  233. package/dist/modes/interactive/components/account-picker.d.ts +31 -0
  234. package/dist/modes/interactive/components/account-picker.d.ts.map +1 -0
  235. package/dist/modes/interactive/components/account-picker.js +150 -0
  236. package/dist/modes/interactive/components/account-picker.js.map +1 -0
  237. package/dist/modes/interactive/components/settings-selector.d.ts +6 -0
  238. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  239. package/dist/modes/interactive/components/settings-selector.js +26 -0
  240. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  241. package/dist/modes/interactive/components/status-indicator.d.ts +35 -1
  242. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  243. package/dist/modes/interactive/components/status-indicator.js +179 -3
  244. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  245. package/dist/modes/interactive/components/working-indicator-engine.d.ts +32 -0
  246. package/dist/modes/interactive/components/working-indicator-engine.d.ts.map +1 -0
  247. package/dist/modes/interactive/components/working-indicator-engine.js +112 -0
  248. package/dist/modes/interactive/components/working-indicator-engine.js.map +1 -0
  249. package/dist/modes/interactive/fullscreen.d.ts +13 -0
  250. package/dist/modes/interactive/fullscreen.d.ts.map +1 -0
  251. package/dist/modes/interactive/fullscreen.js +25 -0
  252. package/dist/modes/interactive/fullscreen.js.map +1 -0
  253. package/dist/modes/interactive/interactive-mode.d.ts +19 -3
  254. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  255. package/dist/modes/interactive/interactive-mode.js +341 -54
  256. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  257. package/dist/modes/interactive/oauth-account-format.d.ts +9 -0
  258. package/dist/modes/interactive/oauth-account-format.d.ts.map +1 -1
  259. package/dist/modes/interactive/oauth-account-format.js +31 -22
  260. package/dist/modes/interactive/oauth-account-format.js.map +1 -1
  261. package/dist/modes/interactive/theme/humain-dark.json +5 -4
  262. package/dist/modes/interactive/theme/humain-light.json +6 -5
  263. package/docs/cli.md +1 -1
  264. package/docs/development.md +7 -0
  265. package/docs/forge-run-bootstrap.md +46 -0
  266. package/docs/humain-code.md +2 -2
  267. package/docs/index.md +2 -1
  268. package/docs/keybindings.md +10 -0
  269. package/docs/providers.md +16 -6
  270. package/docs/quickstart.md +16 -2
  271. package/docs/settings.md +20 -0
  272. package/docs/slash-commands.md +4 -2
  273. package/docs/usage.md +2 -0
  274. package/npm-shrinkwrap.json +2 -2
  275. package/package.json +1 -1
  276. package/schemas/keybindings.schema.json +12 -0
  277. package/schemas/settings.schema.json +29 -0
  278. package/dist/bundle/chunks/chunk-IXQYPQRQ.js +0 -2079
  279. package/dist/bundle/chunks/chunk-J5TSAJGC.js +0 -22
  280. package/dist/bundle/chunks/chunk-YPZPCHNV.js +0 -3
  281. package/dist/bundle/chunks/interactive-mode-MVZOJ5OU.js +0 -5
@@ -19,6 +19,15 @@ export type OAuthAccountUsageState = {
19
19
  export declare function formatSubscriptionCredits(credits: SubscriptionCreditsStatus | undefined): string;
20
20
  /** Concise per-account comparison from the same provider snapshot used by /usage. */
21
21
  export declare function formatSubscriptionAccountSummary(result: CodexUsageDetailsResult | AnthropicUsageResult | undefined): string;
22
+ export declare function subscriptionAccountUsage(result: CodexUsageDetailsResult | AnthropicUsageResult | undefined): {
23
+ expired: boolean;
24
+ weeklyLeft: number | undefined;
25
+ reset: string | undefined;
26
+ availability: ("allowed" | "blocked" | "unknown") | undefined;
27
+ savedResets: string;
28
+ paidCredits: string;
29
+ extraUsage: string | undefined;
30
+ };
22
31
  export declare function formatNextQuotaReset(windows: readonly {
23
32
  resetsAt?: number;
24
33
  }[], now?: number): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-account-format.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/oauth-account-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AACxH,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAiC,KAAK,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAEnH,MAAM,MAAM,sBAAsB,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAA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AAE,MAAM,oCAAoC,CAAC;AAEnH,MAAM,MAAM,sBAAsB,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,uBAAuB,GAAG,oBAAoB,GAAG,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7G;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,2BAA2B,GAAG,+BAA+B,CAAA;CAAE,GAC/F,CAAC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,gBAAgB,CAAC,CAAC;AAE9C,uFAAuF;AACvF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,yBAAyB,GAAG,SAAS,GAAG,MAAM,CAShG;AAED,qFAAqF;AACrF,wBAAgB,gCAAgC,CAC/C,MAAM,EAAE,uBAAuB,GAAG,oBAAoB,GAAG,SAAS,GAChE,MAAM,CAWR;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,uBAAuB,GAAG,oBAAoB,GAAG,SAAS;;;;;;;;EAqB1G;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,GAAG,SAAa,GAAG,MAAM,GAAG,SAAS,CAMpH;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAInE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAmB7E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAG7F"}
@@ -17,28 +17,37 @@ export function formatSubscriptionCredits(credits) {
17
17
  }
18
18
  /** Concise per-account comparison from the same provider snapshot used by /usage. */
19
19
  export function formatSubscriptionAccountSummary(result) {
20
- let weekly = formatOAuthAccountUsage({
21
- kind: "unavailable",
22
- ...(result?.status === "unavailable" ? { reason: result.reason } : {}),
23
- });
24
- if (result?.status !== "ok")
25
- return `${weekly}, saved resets: unavailable, paid credits: unavailable`;
26
- if ("fetchedAt" in result) {
27
- const window = result.windows.find((window) => window.id === "seven_day");
28
- if (window) {
29
- weekly = `weekly: ${Math.round(100 - window.usedPercent)}% left`;
30
- }
31
- const reset = formatNextQuotaReset(result.windows);
32
- if (reset)
33
- weekly += `, Next reset ${reset}`;
34
- }
35
- else if (result.usage) {
36
- weekly = formatOAuthAccountUsage({ kind: "available", ...result.usage });
37
- }
38
- const count = result.resets?.availableCount;
39
- const resets = count === undefined ? "unavailable" : count === 0 ? "none" : String(count);
40
- const enabled = result.credits?.enabled;
41
- return `${weekly}, saved resets: ${resets}, paid credits: ${formatSubscriptionCredits(result.credits)}${enabled === undefined ? "" : `, extra usage: ${enabled ? "enabled" : "disabled"}`}`;
20
+ const usage = subscriptionAccountUsage(result);
21
+ let weekly = usage.weeklyLeft === undefined
22
+ ? `weekly usage: unavailable${usage.expired ? " (sign-in expired)" : ""}`
23
+ : `weekly: ${usage.weeklyLeft}% left`;
24
+ if (usage.availability)
25
+ weekly += `, provider: ${usage.availability}`;
26
+ if (usage.reset)
27
+ weekly += usage.availability ? `, resets ${usage.reset}` : `, Next reset ${usage.reset}`;
28
+ return `${weekly}, saved resets: ${usage.savedResets}, paid credits: ${usage.paidCredits}${usage.extraUsage === undefined ? "" : `, extra usage: ${usage.extraUsage}`}`;
29
+ }
30
+ export function subscriptionAccountUsage(result) {
31
+ const ok = result?.status === "ok" ? result : undefined;
32
+ const claude = ok && "fetchedAt" in ok ? ok : undefined;
33
+ const codex = ok && "usage" in ok ? ok.usage : undefined;
34
+ const weekly = claude?.windows.find((window) => window.id === "seven_day");
35
+ const percent = weekly ? 100 - weekly.usedPercent : codex?.remainingPercent;
36
+ const count = ok?.resets?.availableCount;
37
+ const enabled = ok?.credits?.enabled;
38
+ return {
39
+ expired: result?.status === "unavailable" && result.reason === "expired_credential",
40
+ weeklyLeft: percent === undefined ? undefined : Math.round(percent),
41
+ reset: claude
42
+ ? formatNextQuotaReset(claude.windows)
43
+ : codex?.resetsAt === undefined
44
+ ? undefined
45
+ : formatOAuthAccountResetTime(codex.resetsAt),
46
+ availability: codex ? getCodexAvailability(codex) : undefined,
47
+ savedResets: count === undefined ? "unavailable" : count === 0 ? "none" : String(count),
48
+ paidCredits: formatSubscriptionCredits(ok?.credits),
49
+ extraUsage: enabled === undefined ? undefined : enabled ? "enabled" : "disabled",
50
+ };
42
51
  }
43
52
  export function formatNextQuotaReset(windows, now = Date.now()) {
44
53
  let nearest = Infinity;
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-account-format.js","sourceRoot":"","sources":["../../../src/modes/interactive/oauth-account-format.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,oBAAoB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,6BAA6B,EAAkC,MAAM,oCAAoC,CAAC;AASnH,uFAAuF;AACvF,MAAM,UAAU,yBAAyB,CAAC,OAA8C;IACvF,IAAI,OAAO,EAAE,SAAS,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IACpD,IAAI,OAAO,EAAE,UAAU,KAAK,KAAK;QAAE,OAAO,MAAM,CAAC;IACjD,MAAM,OAAO,GAAG,6BAA6B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS;QAAE,OAAO,aAAa,CAAC;IAC/E,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IACzC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,C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ACtD,CAAC","sourcesContent":["import type { AnthropicUsageResult, AnthropicUsageUnavailableReason } from \"../../core/anthropic-subscription-usage.ts\";\nimport {\n\ttype CodexUsageDetailsResult,\n\ttype CodexUsageUnavailableReason,\n\ttype CodexWeeklyUsage,\n\tgetCodexAvailability,\n} from \"../../core/codex-usage.ts\";\nimport { parseSubscriptionCreditAmount, type SubscriptionCreditsStatus } from \"../../core/subscription-credits.ts\";\n\nexport type OAuthAccountUsageState =\n\t| { kind: \"none\" }\n\t| { kind: \"loading\" }\n\t| { kind: \"subscription\"; result: CodexUsageDetailsResult | AnthropicUsageResult | undefined; status?: string }\n\t| { kind: \"unavailable\"; reason?: CodexUsageUnavailableReason | AnthropicUsageUnavailableReason }\n\t| ({ kind: \"available\" } & CodexWeeklyUsage);\n\n/** Paid balance only: billing enablement and saved reset grants are separate facts. */\nexport function formatSubscriptionCredits(credits: SubscriptionCreditsStatus | undefined): string {\n\tif (credits?.unlimited === true) return \"unlimited\";\n\tif (credits?.hasCredits === false) return \"none\";\n\tconst balance = parseSubscriptionCreditAmount(credits?.balance);\n\tif (balance === undefined || credits?.unit === undefined) return \"unavailable\";\n\tif (Number(balance) === 0) return \"none\";\n\tconst [integer, fraction] = balance.split(\".\");\n\tconst amount = `${Number(integer).toLocaleString(\"en-US\")}${fraction === undefined ? \"\" : `.${fraction}`}`;\n\treturn credits.unit === \"USD\" ? `$${amount}` : `${amount} credits`;\n}\n\n/** Concise per-account comparison from the same provider snapshot used by /usage. */\nexport function formatSubscriptionAccountSummary(\n\tresult: CodexUsageDetailsResult | AnthropicUsageResult | undefined,\n): string {\n\tlet weekly = formatOAuthAccountUsage({\n\t\tkind: \"unavailable\",\n\t\t...(result?.status === \"unavailable\" ? { reason: result.reason } : {}),\n\t});\n\tif (result?.status !== \"ok\") return `${weekly}, saved resets: unavailable, paid credits: unavailable`;\n\tif (\"fetchedAt\" in result) {\n\t\tconst window = result.windows.find((window) => window.id === \"seven_day\");\n\t\tif (window) {\n\t\t\tweekly = `weekly: ${Math.round(100 - window.usedPercent)}% left`;\n\t\t}\n\t\tconst reset = formatNextQuotaReset(result.windows);\n\t\tif (reset) weekly += `, Next reset ${reset}`;\n\t} else if (result.usage) {\n\t\tweekly = formatOAuthAccountUsage({ kind: \"available\", ...result.usage });\n\t}\n\tconst count = result.resets?.availableCount;\n\tconst resets = count === undefined ? \"unavailable\" : count === 0 ? \"none\" : String(count);\n\tconst enabled = result.credits?.enabled;\n\treturn `${weekly}, saved resets: ${resets}, paid credits: ${formatSubscriptionCredits(result.credits)}${\n\t\tenabled === undefined ? \"\" : `, extra usage: ${enabled ? \"enabled\" : \"disabled\"}`\n\t}`;\n}\n\nexport function formatNextQuotaReset(windows: readonly { resetsAt?: number }[], now = Date.now()): string | undefined {\n\tlet nearest = Infinity;\n\tfor (const { resetsAt } of windows) {\n\t\tif (resetsAt !== undefined && resetsAt > now && resetsAt < nearest) nearest = resetsAt;\n\t}\n\treturn nearest === Infinity ? undefined : formatOAuthAccountResetTime(nearest);\n}\n\nexport function formatOAuthAccountResetTime(epochMs: number): string {\n\tconst date = new Date(epochMs);\n\tconst time = `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`;\n\treturn date.toDateString() === new Date().toDateString() ? time : `${time} on ${date.toLocaleDateString()}`;\n}\n\nexport function formatOAuthAccountUsage(usage: OAuthAccountUsageState): string {\n\tswitch (usage.kind) {\n\t\tcase \"none\":\n\t\t\treturn \"\";\n\t\tcase \"loading\":\n\t\t\treturn \"weekly usage: loading…\";\n\t\tcase \"subscription\":\n\t\t\treturn [usage.status, formatSubscriptionAccountSummary(usage.result)].filter(Boolean).join(\", \");\n\t\tcase \"unavailable\":\n\t\t\treturn usage.reason === \"expired_credential\"\n\t\t\t\t? \"weekly usage: unavailable (sign-in expired)\"\n\t\t\t\t: \"weekly usage: unavailable\";\n\t\tcase \"available\": {\n\t\t\tconst remaining = `weekly: ${Math.round(usage.remainingPercent)}% left, provider: ${getCodexAvailability(usage)}`;\n\t\t\treturn usage.resetsAt !== undefined\n\t\t\t\t? `${remaining}, resets ${formatOAuthAccountResetTime(usage.resetsAt)}`\n\t\t\t\t: remaining;\n\t\t}\n\t}\n}\n\nexport function formatOAuthAccountOption(label: string, usage: OAuthAccountUsageState): string {\n\tconst usageText = formatOAuthAccountUsage(usage);\n\treturn usageText ? `${label} (${usageText})` : label;\n}\n"]}
1
+ {"version":3,"file":"oauth-account-format.js","sourceRoot":"","sources":["../../../src/modes/interactive/oauth-account-format.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,oBAAoB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,6BAA6B,EAAkC,MAAM,oCAAoC,CAAC;AASnH,uFAAuF;AACvF,MAAM,UAAU,yBAAyB,CAAC,OAA8C;IACvF,IAAI,OAAO,EAAE,SAAS,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IACpD,IAAI,OAAO,EAAE,UAAU,KAAK,KAAK;QAAE,OAAO,MAAM,CAAC;IACjD,MAAM,OAAO,GAAG,6BAA6B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS;QAAE,OAAO,aAAa,CAAC;IAC/E,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IACzC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,CAAC;IAC3G,OAAO,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAA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C,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClG,KAAK,aAAa;YACjB,OAAO,KAAK,CAAC,MAAM,KAAK,oBAAoB;gBAC3C,CAAC,CAAC,6CAA6C;gBAC/C,CAAC,CAAC,2BAA2B,CAAC;QAChC,KAAK,WAAW,EAAE,CAAC;YAClB,MAAM,SAAS,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,qBAAqB,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;YAClH,OAAO,KAAK,CAAC,QAAQ,KAAK,SAAS;gBAClC,CAAC,CAAC,GAAG,SAAS,YAAY,2BAA2B,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACvE,CAAC,CAAC,SAAS,CAAC;QACd,CAAC;IACF,CAAC;AACF,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,KAA6B;IACpF,MAAM,SAAS,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,SAAS,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;AACtD,CAAC","sourcesContent":["import type { AnthropicUsageResult, AnthropicUsageUnavailableReason } from \"../../core/anthropic-subscription-usage.ts\";\nimport {\n\ttype CodexUsageDetailsResult,\n\ttype CodexUsageUnavailableReason,\n\ttype CodexWeeklyUsage,\n\tgetCodexAvailability,\n} from \"../../core/codex-usage.ts\";\nimport { parseSubscriptionCreditAmount, type SubscriptionCreditsStatus } from \"../../core/subscription-credits.ts\";\n\nexport type OAuthAccountUsageState =\n\t| { kind: \"none\" }\n\t| { kind: \"loading\" }\n\t| { kind: \"subscription\"; result: CodexUsageDetailsResult | AnthropicUsageResult | undefined; status?: string }\n\t| { kind: \"unavailable\"; reason?: CodexUsageUnavailableReason | AnthropicUsageUnavailableReason }\n\t| ({ kind: \"available\" } & CodexWeeklyUsage);\n\n/** Paid balance only: billing enablement and saved reset grants are separate facts. */\nexport function formatSubscriptionCredits(credits: SubscriptionCreditsStatus | undefined): string {\n\tif (credits?.unlimited === true) return \"unlimited\";\n\tif (credits?.hasCredits === false) return \"none\";\n\tconst balance = parseSubscriptionCreditAmount(credits?.balance);\n\tif (balance === undefined || credits?.unit === undefined) return \"unavailable\";\n\tif (Number(balance) === 0) return \"none\";\n\tconst [integer, fraction] = balance.split(\".\");\n\tconst amount = `${Number(integer).toLocaleString(\"en-US\")}${fraction === undefined ? \"\" : `.${fraction}`}`;\n\treturn credits.unit === \"USD\" ? `$${amount}` : `${amount} credits`;\n}\n\n/** Concise per-account comparison from the same provider snapshot used by /usage. */\nexport function formatSubscriptionAccountSummary(\n\tresult: CodexUsageDetailsResult | AnthropicUsageResult | undefined,\n): string {\n\tconst usage = subscriptionAccountUsage(result);\n\tlet weekly =\n\t\tusage.weeklyLeft === undefined\n\t\t\t? `weekly usage: unavailable${usage.expired ? \" (sign-in expired)\" : \"\"}`\n\t\t\t: `weekly: ${usage.weeklyLeft}% left`;\n\tif (usage.availability) weekly += `, provider: ${usage.availability}`;\n\tif (usage.reset) weekly += usage.availability ? `, resets ${usage.reset}` : `, Next reset ${usage.reset}`;\n\treturn `${weekly}, saved resets: ${usage.savedResets}, paid credits: ${usage.paidCredits}${\n\t\tusage.extraUsage === undefined ? \"\" : `, extra usage: ${usage.extraUsage}`\n\t}`;\n}\n\nexport function subscriptionAccountUsage(result: CodexUsageDetailsResult | AnthropicUsageResult | undefined) {\n\tconst ok = result?.status === \"ok\" ? result : undefined;\n\tconst claude = ok && \"fetchedAt\" in ok ? ok : undefined;\n\tconst codex = ok && \"usage\" in ok ? ok.usage : undefined;\n\tconst weekly = claude?.windows.find((window) => window.id === \"seven_day\");\n\tconst percent = weekly ? 100 - weekly.usedPercent : codex?.remainingPercent;\n\tconst count = ok?.resets?.availableCount;\n\tconst enabled = ok?.credits?.enabled;\n\treturn {\n\t\texpired: result?.status === \"unavailable\" && result.reason === \"expired_credential\",\n\t\tweeklyLeft: percent === undefined ? undefined : Math.round(percent),\n\t\treset: claude\n\t\t\t? formatNextQuotaReset(claude.windows)\n\t\t\t: codex?.resetsAt === undefined\n\t\t\t\t? undefined\n\t\t\t\t: formatOAuthAccountResetTime(codex.resetsAt),\n\t\tavailability: codex ? getCodexAvailability(codex) : undefined,\n\t\tsavedResets: count === undefined ? \"unavailable\" : count === 0 ? \"none\" : String(count),\n\t\tpaidCredits: formatSubscriptionCredits(ok?.credits),\n\t\textraUsage: enabled === undefined ? undefined : enabled ? \"enabled\" : \"disabled\",\n\t};\n}\n\nexport function formatNextQuotaReset(windows: readonly { resetsAt?: number }[], now = Date.now()): string | undefined {\n\tlet nearest = Infinity;\n\tfor (const { resetsAt } of windows) {\n\t\tif (resetsAt !== undefined && resetsAt > now && resetsAt < nearest) nearest = resetsAt;\n\t}\n\treturn nearest === Infinity ? undefined : formatOAuthAccountResetTime(nearest);\n}\n\nexport function formatOAuthAccountResetTime(epochMs: number): string {\n\tconst date = new Date(epochMs);\n\tconst time = `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`;\n\treturn date.toDateString() === new Date().toDateString() ? time : `${time} on ${date.toLocaleDateString()}`;\n}\n\nexport function formatOAuthAccountUsage(usage: OAuthAccountUsageState): string {\n\tswitch (usage.kind) {\n\t\tcase \"none\":\n\t\t\treturn \"\";\n\t\tcase \"loading\":\n\t\t\treturn \"weekly usage: loading…\";\n\t\tcase \"subscription\":\n\t\t\treturn [usage.status, formatSubscriptionAccountSummary(usage.result)].filter(Boolean).join(\", \");\n\t\tcase \"unavailable\":\n\t\t\treturn usage.reason === \"expired_credential\"\n\t\t\t\t? \"weekly usage: unavailable (sign-in expired)\"\n\t\t\t\t: \"weekly usage: unavailable\";\n\t\tcase \"available\": {\n\t\t\tconst remaining = `weekly: ${Math.round(usage.remainingPercent)}% left, provider: ${getCodexAvailability(usage)}`;\n\t\t\treturn usage.resetsAt !== undefined\n\t\t\t\t? `${remaining}, resets ${formatOAuthAccountResetTime(usage.resetsAt)}`\n\t\t\t\t: remaining;\n\t\t}\n\t}\n}\n\nexport function formatOAuthAccountOption(label: string, usage: OAuthAccountUsageState): string {\n\tconst usageText = formatOAuthAccountUsage(usage);\n\treturn usageText ? `${label} (${usageText})` : label;\n}\n"]}
@@ -66,11 +66,12 @@
66
66
  "syntaxOperator": "text",
67
67
  "syntaxPunctuation": "text",
68
68
  "thinkingOff": "dimText",
69
- "thinkingMinimal": "#6e817e",
70
- "thinkingLow": "#5ea99f",
71
- "thinkingMedium": "air",
69
+ "thinkingMinimal": "#7d8c89",
70
+ "thinkingLow": "#00b89c",
71
+ "thinkingMedium": "#3fb8e6",
72
72
  "thinkingHigh": "oasis",
73
- "thinkingXhigh": "#e8ff74",
73
+ "thinkingXhigh": "#f2b134",
74
+ "thinkingMax": "#ff6b4a",
74
75
  "bashMode": "green"
75
76
  },
76
77
  "export": {
@@ -65,12 +65,13 @@
65
65
  "syntaxType": "#009688",
66
66
  "syntaxOperator": "text",
67
67
  "syntaxPunctuation": "text",
68
- "thinkingOff": "dimText",
68
+ "thinkingOff": "#647170",
69
69
  "thinkingMinimal": "#74827f",
70
- "thinkingLow": "#427f77",
71
- "thinkingMedium": "aqua",
72
- "thinkingHigh": "#7aa200",
73
- "thinkingXhigh": "#93bd13",
70
+ "thinkingLow": "#008570",
71
+ "thinkingMedium": "#007da3",
72
+ "thinkingHigh": "#638500",
73
+ "thinkingXhigh": "#a56a00",
74
+ "thinkingMax": "#c44628",
74
75
  "bashMode": "green"
75
76
  },
76
77
  "export": {
package/docs/cli.md CHANGED
@@ -55,7 +55,7 @@ RPC mode rejects `@file` arguments. JSON and RPC modes reserve stdout for protoc
55
55
 
56
56
  ## HUMAIN Code environment
57
57
 
58
- Use `--env dev|staging|stg|production` (default: production) before starting any mode or credential command. `stg` is an alias for `staging`. It selects only native provider `humain-code-account`: dev uses `https://code.dev.humain.com`, staging uses `https://code.stg.humain.com`, production uses `https://code.humain.com`. Invalid, missing or repeated values fail before network or credential access. No custom origin or fallback is accepted; independent providers are unchanged.
58
+ Use `--env dev|staging|stg|production|prod` (default: production) before starting any mode or credential command. `stg` is an alias for `staging`, and `prod` is an alias for `production`. It selects only native provider `humain-code-account`: dev uses `https://code.dev.humain.com`, staging uses `https://code.stg.humain.com`, production uses `https://code.humain.com`. Invalid, missing or repeated values fail before network or credential access. No custom origin or fallback is accepted; independent providers are unchanged.
59
59
 
60
60
  Native Code appears in `/login` only after a fresh public readiness check. Direct `/login humain-code-account` uses the same guard. Session-only consent, encrypted storage, bounded normal-exit revocation and removed legacy provider behavior are documented under [HUMAIN Code](providers.md#humain-code). Session-only grants do not survive a new CLI process; `--no-session` controls transcript persistence, not credential lifetime. Unconfirmed exit revocation goes to stderr, never JSON/RPC stdout.
61
61
 
@@ -61,6 +61,13 @@ npm test # Run all tests
61
61
  npm test -- test/specific.test.ts # Run specific test
62
62
  ```
63
63
 
64
+ Account and login selectors use fullscreen overlays. Test hosts that exercise the real `InteractiveMode.showSelector` must provide `ui.terminal.rows` and `ui.showOverlay()` with a hide handle, and read the opened overlay instead of an editor child. Keep usage/freshness assertions on the real components. After changing account or usage presentation, run the freshness regression as well as the fullscreen tests from the repository root:
65
+
66
+ ```bash
67
+ npm run hydrate:model-data:pinned
68
+ (cd packages/coding-agent && ../../test.sh node ../../node_modules/vitest/dist/cli.js --run test/suite/regressions/183-claude-usage-freshness.test.ts test/accounts-fullscreen.test.ts)
69
+ ```
70
+
64
71
  ### Efficiency budgets
65
72
 
66
73
  Before releases and for performance changes, run `npm run build` followed by `npm run bench:budgets` from the repository root on an idle machine. The offline workloads measure built Node startup, optional compiled Bun startup, session loading/rendering, streaming Markdown, shell spill output and fullscreen search, with one warm-up and seven measured runs. Any median more than 15% above `bench/budgets/<platform>-<arch>.json` fails; a missing baseline is informational. Review the ranges before establishing or deliberately replacing it with `npm run bench:budgets -- --write-baseline`; this check is not part of `npm run check` or CI.
@@ -0,0 +1,46 @@
1
+ # Forge run bootstrap (OFF in CLI 0.8.1)
2
+
3
+ EPIC13T is OFF by default and cannot be enabled by launch configuration. The
4
+ source-controlled private-channel qualification gate remains disabled until
5
+ DeployNow #176 supplies and qualifies private credential custody. The sandbox
6
+ marker is not attestation and an environment token is not a qualified channel.
7
+ No replacement channel is implemented or implied here.
8
+
9
+ When either `HUMAIN_CODE_FORGE_ORIGIN` or `HUMAIN_CODE_RUN_TOKEN` is present,
10
+ including empty values or case variants, bootstrap removes both variables and
11
+ fails closed before CLI setup/resource loading/child launch. Even a syntactically
12
+ valid token, canonical origin and `HUMAIN_CODE_SANDBOX=1` cannot authorize a run.
13
+ With neither variable, normal desktop startup remains unchanged. Scrubbing does
14
+ not protect the original launch environment from process inspection; launchers
15
+ must not inject tokens through this unqualified path.
16
+
17
+ Never put a token in argv, logs, or shared files. Do not enable the Forge flag
18
+ based on these tests. Reopening admission requires implementing and qualifying
19
+ the private channel from DeployNow #176, not merely changing the gate or adding
20
+ an environment override. No npm release or version bump is included.
21
+
22
+ The dormant implementation is retained for future integration. It compares
23
+ origins literally against the built-in destinations:
24
+
25
+ - `https://code.dev.humain.com`
26
+ - `https://code.stg.humain.com`
27
+ - `https://code.humain.com`
28
+
29
+ No paths, trailing slash, explicit port, URL credentials, query or fragment are
30
+ accepted. Only the native `humain-code-account` provider has send authority, for
31
+ `GET /api/inference/models` and `POST /api/inference/messages`. Redirects are
32
+ refused, cookies omitted, and the account store, account sign-in, provider-key
33
+ fallback and provider metadata are not used. The session/model registry are in
34
+ memory, with automatic retries disabled. Forge remains authoritative for scope,
35
+ expiry, revocation and metering.
36
+
37
+ The retained path targets Node single-shot `-p` or `--mode json`, one literal
38
+ prompt, and an explicit exact catalog model. Extensions, project resources and
39
+ subagent execution are disabled. Bun, RPC, frozen admission and Flow fail closed
40
+ before inference. Flow worker custody and Build artifact compatibility remain
41
+ unqualified. These are implementation constraints, not supported launch modes
42
+ while the gate is disabled.
43
+
44
+ A 401 from Forge is reported as an expired or revoked Build token (no retry, no
45
+ fallback, token never printed). Ambient `SYSTEM.md` and `APPEND_SYSTEM.md` in the
46
+ agent directory or project are not loaded into the session.
@@ -1,6 +1,6 @@
1
1
  # HUMAIN Code CLI
2
2
 
3
- HUMAIN Code CLI is the branded distribution of the coding agent. The primary command is `humain-code`; `humain-code-cli`, `humain`, `hc`, `hcc`, and `ht` are executable aliases for the same CLI. The old `humain-terminal` command still works but is deprecated: it prints `humain-terminal is deprecated; use humain-code.` to stderr (suppress with `HUMAIN_SUPPRESS_DEPRECATION=1`; never printed with `--mode json`, `--mode rpc`, `--mode agent-exec`, or `-p` with piped stdout). See [Migrating to humain-code](../../../docs/migration-humain-code.md#compatibility) for what keeps the old name.
3
+ HUMAIN Code CLI is the branded distribution of the coding agent. The primary command is `humain-code`; `humain-code-cli`, `humain`, `hc`, `hcc`, `hcode`, and `ht` are executable aliases for the same CLI. The old `humain-terminal` command still works but is deprecated: it prints `humain-terminal is deprecated; use humain-code.` to stderr (suppress with `HUMAIN_SUPPRESS_DEPRECATION=1`; never printed with `--mode json`, `--mode rpc`, `--mode agent-exec`, or `-p` with piped stdout). See [Migrating to humain-code](../../../docs/migration-humain-code.md#compatibility) for what keeps the old name.
4
4
 
5
5
  ## Config
6
6
 
@@ -83,7 +83,7 @@ Sending `normal mode` as the whole message disables all three for the session. A
83
83
 
84
84
  ## Native HUMAIN Code
85
85
 
86
- Use `/login` → **Sign in with HUMAIN**. Provider `humain-code-account` is presented as **HUMAIN Code** in production (the default), **HUMAIN Code (DEV)** with `--env dev`, or **HUMAIN Code (STG)** with `--env staging` (alias `stg`). The menu orders Code, Node, Gateway, Fuse. Code shows `checking connection…` until the selected environment's sign-in configuration is verified; if unavailable, the entry gives a reason and offers Retry. Incompatible sign-in settings offer Details instead. If production sign-in is unavailable, the CLI does not switch to DEV. Direct `/login humain-code-account` checks readiness too. Startup and unrelated providers do not wait for native readiness or private account discovery.
86
+ Use `/login` → **Sign in with HUMAIN**. Provider `humain-code-account` is presented as **HUMAIN Code** in production (the default), **HUMAIN Code (Dev)** with `--env dev`, or **HUMAIN Code (Staging)** with `--env staging` (alias `stg`). The menu orders Code, Node, Gateway, Fuse. Code shows `checking connection…` until the selected environment's sign-in configuration is verified; if unavailable, the entry gives a reason and offers Retry. Incompatible sign-in settings offer Details instead. If production sign-in is unavailable, the CLI does not switch to DEV. Direct `/login humain-code-account` checks readiness too. Startup and unrelated providers do not wait for native readiness or private account discovery.
87
87
 
88
88
  Native login uses browser/device authorization and MFA, not an API key. Persistent grants use encrypted private account files and an OS-keychain purpose key. If the secure keychain is unavailable, explicit session-only consent is offered before acquiring a grant. Nothing from that sign-in is saved; normal interactive, print, JSON and RPC exits attempt one bounded device-family revocation within 3,000 ms. Unconfirmed revocation is reported on stderr; a crash leaves validity until expiry. Persistent accounts survive ordinary exit. See [HUMAIN Code setup](providers.md#humain-code) for environments, storage boundaries, Retry/Cancel and activation limits.
89
89
 
package/docs/index.md CHANGED
@@ -6,7 +6,7 @@ Use HUMAIN Code CLI for software development, research notes, writing projects,
6
6
 
7
7
  ## Start using HUMAIN Code CLI
8
8
 
9
- New to HUMAIN Code CLI? Follow the [Quickstart](quickstart.md) to install HUMAIN Code CLI, connect a model, and complete your first task.
9
+ New to HUMAIN Code CLI? Follow the [Quickstart](quickstart.md) to install HUMAIN Code CLI, connect a model, make a small change, and review your first diff.
10
10
 
11
11
  If HUMAIN Code CLI is already installed, choose what you want to do:
12
12
 
@@ -27,6 +27,7 @@ Use the [Quickstart customization chooser](quickstart.md#choose-how-to-customize
27
27
  - Use [JSON event stream mode](json.md) to consume structured events from one run.
28
28
  - Use [RPC mode](rpc.md) to control a separate HUMAIN Code CLI process.
29
29
  - Check [headless admission and terminal outcomes](run-preflight.md) before relying on exit codes or automated completion.
30
+ - Read the [Forge run bootstrap](forge-run-bootstrap.md) for the sandbox-only Build-token start.
30
31
  - Use the [TypeScript SDK](sdk.md) to run HUMAIN Code CLI inside an application.
31
32
 
32
33
  ## Find reference and setup information
@@ -182,6 +182,16 @@ To keep `Tab` exclusively for completion, disable the busy-only action:
182
182
 
183
183
  You can also rebind this action independently of `tui.input.tab` and `app.message.followUp`.
184
184
 
185
+ ### Account Picker
186
+
187
+ In `/accounts`, use the select movement and confirm keys to highlight and use an account or open a list action. Page Up/Page Down scroll the highlighted item's details.
188
+
189
+ | Keybinding id | Default | Description |
190
+ |--------|---------|-------------|
191
+ | `app.accounts.reconnect` | `r` | Re-sign in to the selected account |
192
+ | `app.accounts.remove` | `d` | Review removal of the selected account; requires confirmation |
193
+ | `app.accounts.more` | `m` | Open more actions for the selected account |
194
+
185
195
  ### Usage Popup
186
196
 
187
197
  Used inside `/usage`'s full-terminal overlay, independent of extension widgets and input dock height. Accounts is the default when saved Codex or Claude accounts exist; otherwise Session opens.
package/docs/providers.md CHANGED
@@ -17,6 +17,8 @@ On a remote or headless machine, an OAuth callback may not reach the local proce
17
17
 
18
18
  Run `/accounts [provider]` to switch, rename, add, reauthenticate, or remove saved OAuth and API-key accounts. `/logout` can select a saved account to remove. Removing an active account selects the next account of the same credential type, or signs the provider out when none remains. It never silently selects an API key after removing OAuth. Removal defaults to keeping the account and does not revoke access at the provider.
19
19
 
20
+ Account selection, `/login` authentication-method and provider choices, and `/logout` provider selection use the same full-width, full-height opaque overlay as `/usage`. Escape closes the selector and restores the underlying chat; account confirmations also cover the chat.
21
+
20
22
  Environment, runtime and configuration sources appear as read-only entries. Change those sources outside `/accounts`; removing an account does not unset them.
21
23
 
22
24
  `auth.json` and `oauth-accounts.json` can contain API keys and OAuth tokens. Keep both files and their migration backups private and do not commit them.
@@ -261,15 +263,17 @@ To use a service-account key file instead, set `GOOGLE_APPLICATION_CREDENTIALS`
261
263
 
262
264
  ## HUMAIN Code
263
265
 
264
- Native provider `humain-code-account` is shown as **HUMAIN Code** in production, **HUMAIN Code (DEV)** in dev, and **HUMAIN Code (STG)** in staging. Under **Sign in with HUMAIN**, order is Code, Node, Gateway, Fuse. All entries render at once. Code shows `checking connection…` (greyed) until the selected environment's `/api/cli/config` proves the complete qualified native device/issuer/audience/scopes/expiry/revocation profile and the issuer's discovery document matches it; it then shows `✓ connected`. HUMAIN Code CLI starts this check at startup and reuses a ready result for 5 minutes, so the menu is usually already connected; otherwise opening the menu checks again and updates it without losing search or selection. Selecting Code while the check runs waits inline with a spinner and continues to sign-in when it succeeds. Failures never block independent providers and name the cause:
266
+ Native provider `humain-code-account` is shown as **HUMAIN Code** in production, **HUMAIN Code (Dev)** in dev, and **HUMAIN Code (Staging)** in staging. Under **Sign in with HUMAIN**, order is Code, Node, Gateway, Fuse. All entries render at once. Code shows `checking connection…` (greyed) until the selected environment's `/api/cli/config` proves the complete qualified native device/issuer/audience/scopes/expiry/revocation profile and the issuer's discovery document matches it; it then shows `✓ connected`. HUMAIN Code CLI starts this check at startup and reuses a ready result for 5 minutes, so the menu is usually already connected; otherwise opening the menu checks again and updates it without losing search or selection. Selecting Code while the check runs waits inline with a spinner and continues to sign-in when it succeeds. Failures never block independent providers and name the cause:
265
267
 
266
- - `✗ Can't reach <host>: check VPN/Zscaler [Retry]`: DNS, connection, TLS, timeout or a server error. Enter retries and continues when ready.
268
+ - `✗ Can't reach <host>: check VPN/Zscaler [Retry]`: DNS, connection, TLS or timeout; not an HTTP rejection. Enter retries and continues when ready.
269
+ - `✗ HUMAIN Code isn't available on <environment> yet (server: hcode_unavailable). Try another environment or contact support. [Retry]`: `/api/cli/config` returned HTTP 503 with `code: hcode_unavailable`; this is not a VPN failure.
270
+ - `✗ Sign-in server returned HTTP <status>: <message> [Retry]`: another HTTP rejection, with a bounded, sanitized server message when available; without a message, only the status is shown.
267
271
  - `✗ Server sign-in settings don't match this CLI version [Details]`: the server answered with settings this CLI does not accept. Enter explains: update the CLI, or ask the HUMAIN Code platform team to check the server's CLI sign-in configuration.
268
- - `✗ Sign-in is unavailable right now [Retry]`: offline mode or another failure.
272
+ - `✗ Sign-in is not available in this environment [Retry]`: offline mode or another failure.
269
273
 
270
274
  Start with `humain-code --env dev`, `--env staging` (alias `stg`), or `--env production`. Origins are `https://code.dev.humain.com`, `https://code.stg.humain.com`, and `https://code.humain.com`; production is the default. There is no arbitrary endpoint override or cross-environment fallback. This flag does not redirect Node, Gateway, Fuse, Local or DeployNow.
271
275
 
272
- Use `/login humain-code-account`. An unreachable server says `Can't reach <host>: check VPN/Zscaler, then try /login again.`; other unavailable readiness says `HUMAIN Code is unavailable for this environment. Try /login again later.` (with the selected environment suffix when applicable). Readiness proves presentation only, not account eligibility or model availability. Browser/device sign-in always displays the validated verification URI and user code for remote use; MFA remains issuer-controlled. Device-code polling retries DNS, connection and 5xx errors with backoff (1 s doubling to 30 s) until the code expires; an invalid token response still fails at once.
276
+ Use `/login humain-code-account`. A classified `503 hcode_unavailable` shows the same not-available-on-this-environment explanation as the menu; other HTTP rejections show the same status and sanitized message. Direct commands omit the menu's `[Retry]` label; run `/login humain-code-account` again to retry. An unreachable server still says `Can't reach <host>: check VPN/Zscaler, then try /login again.`; other unavailable readiness says `HUMAIN Code is unavailable for this environment. Try /login again later.` (with the selected environment suffix when applicable). Readiness proves presentation only, not account eligibility or model availability. Browser/device sign-in always displays the validated verification URI and user code for remote use; MFA remains issuer-controlled. Device-code polling retries DNS, connection and 5xx errors with backoff (1 s doubling to 30 s) until the code expires; an invalid token response still fails at once.
273
277
 
274
278
  Persistent login encrypts private account files under the agent directory's `hcode/accounts/<environment>` with a purpose key in the OS keychain. Generic auth holds only an environment/account/generation reference, never access or refresh tokens. One native account is active per environment; native grants are not pooled or automatically switched. The saved sign-in is shared by every `humain-code` process that uses the same agent directory and environment: a terminal opened later starts signed in, and `/login` and `/model` re-read a sign-in or sign-out made in another terminal. A terminal started without `--env` targets production; when only another environment has a saved sign-in, startup and `/login status` name it and the `--env` flag that selects it.
275
279
 
@@ -277,7 +281,7 @@ Only genuine keychain unavailability permits the prompt **Secure keychain unavai
277
281
 
278
282
  Normal interactive, print, JSON and RPC completion attempts one device-family revocation within 3,000 ms before erasing memory. Persistent login is not revoked on ordinary exit. Unconfirmed revocation writes only to stderr: `HUMAIN Code session revocation could not be confirmed. The session will expire automatically.` There is no disk revoke spool or background retry. Crashes and network loss do not guarantee revocation; qualified short expiry and isolated-family revocation require separate live activation evidence.
279
283
 
280
- After sign-in, use `/model` to choose an approved native model; login does not change your current model. If the account has no models yet, sign-in still succeeds and you return to the prompt with a notice; the current model is kept and other providers stay usable. The notice says why and who can fix it when Forge sends a reason: no model is approved for CLI (ask an admin to set a model to Web + CLI or CLI only in Settings > Model Access), the provider key isn't enabled for CLI (ask an admin to enable CLI on the key in Settings > Provider Keys), or this server hasn't finished CLI setup for the approved models (ask an admin to report it to the HUMAIN Code platform team). Without a reason it says your admin hasn't enabled CLI models yet; a load failure says the model list couldn't be loaded and to check your network, VPN or Zscaler. The status line shows `HUMAIN Code: signed in · 0 models`. HUMAIN Code CLI checks again every 60 seconds for 10 minutes, then only when `/model` opens, and announces `N HUMAIN Code models are now available` when they appear. `/model` lists the account as `HUMAIN Code (DEV) · 0 available: <reason> [Retry]`; Enter on that row reloads it. `/login status` shows the account, model count, reason and sign-in server check. If the list becomes empty in the account picker opened after a fresh sign-in, it shows the same reasons with Retry/Cancel.
284
+ After sign-in, use `/model` to choose an approved native model; login does not change your current model. If the account has no models yet, sign-in still succeeds and you return to the prompt with a notice; the current model is kept and other providers stay usable. The notice says why and who can fix it when Forge sends a reason: no model is approved for CLI (ask an admin to set a model to Web + CLI or CLI only in Settings > Model Access), the provider key isn't enabled for CLI (ask an admin to enable CLI on the key in Settings > Provider Keys), or this server hasn't finished CLI setup for the approved models (ask an admin to report it to the HUMAIN Code platform team). Without a reason it says your admin hasn't enabled CLI models yet; a load failure says the model list couldn't be loaded and to check your network, VPN or Zscaler. The status line shows `HUMAIN Code: signed in · 0 models`. HUMAIN Code CLI checks again every 60 seconds for 10 minutes, then only when `/model` opens, and announces `N HUMAIN Code models are now available` when they appear. `/model` lists the account as `HUMAIN Code (Dev) · 0 available: <reason> [Retry]`; Enter on that row reloads it. `/login status` shows the account, model count, reason and sign-in server check. If the list becomes empty in the account picker opened after a fresh sign-in, it shows the same reasons with Retry/Cancel.
281
285
 
282
286
  Native inference uses the managed `pi-messages` transport at the selected origin's `/api/inference/messages`. The account owner adds authorization only at final dispatch. Each invocation submits once, with no automatic inference retry, account/model fallback, or response replay. Stream queue overflow cancels the request; an ambiguous outcome may still charge, so check `/usage` before retrying manually.
283
287
 
@@ -328,6 +332,8 @@ Both Gateway hosts are reachable only from the HUMAIN corporate network.
328
332
 
329
333
  Over SSH, or if the browser or local callback is unavailable, open the **HUMAIN Gateway sign-in (paste code)** link printed in the terminal. Sign in and paste the one-time `hc_...` code into the masked prompt. The code expires after 2 minutes, and any exchange attempt uses it up.
330
334
 
335
+ Sign-in exchanges the one-time code with `POST /ai-gateway/handoff/exchange`. A server error (5xx) leaves local sign-in unchanged: no new session is saved. The CLI may start one fresh sign-in, but never resends the same exchange code.
336
+
331
337
  The Gateway issues a personal session key, which HUMAIN Code CLI stores in the OS keychain: macOS Keychain, Linux Secret Service, or Windows Credential Manager. WSL uses Windows Credential Manager through Windows PowerShell, not a Linux desktop keyring. `auth.json` keeps only the environment, a session ID, and your email. Before opening the browser, sign-in writes, reads back, and deletes a temporary non-session value to verify the store. It never falls back to a plaintext file or another credential backend.
332
338
 
333
339
  #### Linux and WSL prerequisites
@@ -341,6 +347,8 @@ To smoke-test WSL persistence, sign in, exit HUMAIN Code CLI, save work, and run
341
347
 
342
348
  ### 3. Choose a model
343
349
 
350
+ After saving the session, the CLI discovers models with `GET /ai-gateway/v1/models` and account restrictions with `GET /ai-gateway/api/cli/me/access`. These read-only requests retry HTTP 500, 502, 503 and 504 at most twice, with 500 ms then 1 s backoff. A valid `Retry-After` can extend each wait to at most 2 s; a longer or unreadable delay, or `x-should-retry: false`, stops retries. Discovery failures do not undo a successful sign-in or erase the last model list for that session. Wait and reopen `/model`; you do not need to enter another key or sign in again for a 5xx.
351
+
344
352
  Run `/model` and pick a `humain-gateway` model. Only chat models your account is entitled to appear; models the Gateway blocks for HUMAIN Code are hidden and named in a warning with the reason. Press `Ctrl+S` on a model to make it the default for new sessions.
345
353
 
346
354
  For print mode, sign in interactively once, then pass the provider and model:
@@ -367,7 +375,9 @@ CI and unattended runs are not supported: every session needs an interactive Mic
367
375
  | --- | --- |
368
376
  | `Could not reach HUMAIN Gateway to finish sign-in.` / browser shows `ERR_CONNECTION_CLOSED` | Connect to the HUMAIN corporate network. Staging may require separate access from the Gateway team. |
369
377
  | `HUMAIN Gateway sign-in code is invalid or expired.` | Run `/login` again; codes last 2 minutes and work once. |
370
- | `HUMAIN Gateway sign-in is temporarily unavailable.` | Complete the fresh sign-in if prompted. If the error persists, wait and run `/login` again. Do not reuse an earlier code. |
378
+ | `HUMAIN Gateway is temporarily unavailable (503); no new session was saved.` (or another 5xx) | Complete the fresh sign-in if prompted. If the error persists, wait and run `/login` again. Any existing local sign-in is unchanged. Do not reuse an earlier code. |
379
+ | `HUMAIN Gateway is temporarily unavailable (503); your saved sign-in is unchanged.` (or another 5xx) | Sign-in was already saved. Wait and reopen `/model` to retry discovery; do not delete credentials. If failures persist, ask the Gateway team to inspect the failing path and timestamp. |
380
+ | `HUMAIN Gateway is temporarily unavailable (HTTP 503). Try again in a moment.` (or another 5xx during a model call) | Wait before trying the prompt again. The CLI does not add inference retries for these outages: a request may already have reached a billed model. Saved sign-in is unchanged. HTTP status, request ID/error code when supplied, and a sanitized upstream reason (at most 120 characters) remain in diagnostics for the Gateway team. |
371
381
  | Keychain or Secret Service error | Unlock the keychain. On Linux, check `secret-tool`, the current D-Bus session, and the running Secret Service keyring. |
372
382
  | WSL Windows Credential Manager error | Check that Windows `powershell.exe` runs from WSL and Windows interoperability is enabled. Sign in as the Windows user whose credential store holds the session. |
373
383
  | `HUMAIN Gateway CLI session unavailable. Sign in again.` | Your access was revoked or rotated; run `/login` again. |
@@ -58,11 +58,25 @@ Run `/model` afterward to choose a model: **Enter** uses it for this session, an
58
58
 
59
59
  See [Choose a model and provider](models.md) for supported providers, environment-variable authentication, local models, and custom endpoints.
60
60
 
61
- ## 4. Give HUMAIN Code CLI a task
61
+ ## 4. Make a small change and review the diff
62
62
 
63
63
  HUMAIN Code CLI shows each file read, search, command, and edit it performs. It does not ask before every tool call.
64
64
 
65
- Enter a task that matches your work, for example:
65
+ For a first run, use a disposable Git repository with a committed `README.md` containing the heading `# Demo`. In HUMAIN Code CLI, enter:
66
+
67
+ ```text
68
+ Change only the heading in README.md from Demo to My first CLI change.
69
+ ```
70
+
71
+ After the response, run this from the repository in another terminal or after exiting the CLI:
72
+
73
+ ```bash
74
+ git diff -- README.md
75
+ ```
76
+
77
+ Check that the diff shows only the heading change. If it shows anything else, inspect it before keeping or committing the change.
78
+
79
+ For other tasks, try:
66
80
 
67
81
  ```text
68
82
  Summarize @meeting-notes.md and save the action items to action-items.md.
package/docs/settings.md CHANGED
@@ -158,6 +158,8 @@ See [Compaction Reference](compaction.md) for trigger, summarization, and valida
158
158
  | Setting | Type | Default | Description |
159
159
  |---|---|---|---|
160
160
  | `theme` | string | `"system"` | Built-in or custom theme name. `system` derives colors from the terminal theme. |
161
+ | `workingIndicator` | `"rotate" \| "classic" \| "life" \| "rain" \| "decode"` | `"rotate"` | One session-stable random binary indicator, or a pinned style; live preview in `/settings`. |
162
+ | `reducedMotion` | boolean | `false` | Use a still working-indicator frame instead of animation. |
161
163
  | `quietStartup` | boolean \| `"header"` | `false` | `true` hides the startup header and loaded-resource listing. `"header"` keeps the header (version and key hints) but hides the model scope line and loaded-resource listing. |
162
164
  | `tuiMode` | `"regular" \| "fullscreen"` | `"fullscreen"` | Interactive terminal UI mode. |
163
165
  | `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
@@ -182,6 +184,24 @@ See [Compaction Reference](compaction.md) for trigger, summarization, and valida
182
184
 
183
185
  See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and platform details.
184
186
 
187
+ `workingIndicator` defaults to `rotate`: one random choice of `life`, `rain`, or `decode` per interactive session, stable across turns and settings previews. Set an explicit style to pin it; switching back to `rotate` restores the session's original choice without another random draw. Supported pins are `classic` (the existing braille frames, capped at 10 updates/s like all working indicators), `life` (6/8/10 binary cells with a Working suffix, 3–10 updates/s), `rain` (4–12 falling-bit columns with elapsed time and level on the right), or `decode` (binary scramble resolving left to right into the current action). Higher thinking levels lengthen decode scrambling and increase rain speed (4–12 rows/s, computed at a fixed 10 Hz) and trail length. Rain's inner rule uses the same thinking-level color as the editor border. Decoded labels hold until the phase changes: Thinking for reasoning, Writing for text, and Reading/Editing/Running/Searching for tools. Animation uses only the active model's thinking level; non-reasoning models use off.
188
+
189
+ `reducedMotion: true` disables working animation (default `false`). Redirected output and `NO_COLOR` also use a still frame of the selected style (decode shows the resolved phase). Print and JSON modes do not create these interactive animations. `/settings` offers both settings and previews changes immediately; the preview stops when settings close. A still-running response restores its working indicator only when no retry, compaction, or summary indicator owns the status area. While settings are open, the preview replaces the working animation rather than running alongside it. Thinking-level and theme changes update the visible animation without resetting elapsed time; decoded words stop ticking while held. Extension-supplied working-indicator frames retain precedence over built-in styles.
190
+
191
+ The built-in HUMAIN thinking-border colors follow this ramp. Light colors are darkened for at least 3:1 contrast against white and the theme's export/editor-panel backgrounds (minimum measured ratio: 3.435:1). Terminal background overrides can change contrast.
192
+
193
+ | Level | `humain-dark` | `humain-light` |
194
+ |---|---|---|
195
+ | off | `#647170` | `#647170` |
196
+ | minimal | `#7d8c89` | `#74827f` |
197
+ | low | `#00b89c` | `#008570` |
198
+ | medium | `#3fb8e6` | `#007da3` |
199
+ | high | `#b8e636` | `#638500` |
200
+ | xhigh | `#f2b134` | `#a56a00` |
201
+ | max (`thinkingMax`) | `#ff6b4a` | `#c44628` |
202
+
203
+ Each visible working indicator owns at most one timer, capped at 10 frames/s and stopped on disposal or while a decoded word is held. Only timer ticks advance preallocated engine buffers; input and theme renders never advance simulation. Rain computes only visible columns, reuses glyph/color strings and a scratch buffer, and caches its border rule until width, metadata length or theme changes. Elapsed metadata changes only once per second. Its known-width ASCII border bypasses generic ANSI wrapping; only changed terminal lines require new strings. Frames use the existing TUI diff renderer, so unchanged transcript and input lines are not rewritten. Performance regressions cover 10,000 ticks per binary engine under 100 ms thread CPU, each style's scheduled/rendered frames under 0.15 ms thread CPU per frame (median of five 10,000-frame runs after 1,000 warm-up frames, including scheduler overhead), and real-TUI typing/render latency under 100 ms. Run them from `packages/coding-agent` with `../../test.sh node ../../node_modules/vitest/dist/cli.js --run test/working-indicator-performance.test.ts test/status-indicator.test.ts` (Node 26 supports the thread CPU clock).
204
+
185
205
  ## Network and retries
186
206
 
187
207
  | Setting | Type | Default | Description |
@@ -34,7 +34,7 @@ Extensions, prompt templates, and skills can add commands. The command menu in H
34
34
 
35
35
  ### /usage
36
36
 
37
- In interactive mode, `/usage` opens a full-terminal overlay through `ctx.ui.custom`, independent of extension widgets and input dock height. It defaults to **Accounts** when saved Codex or Claude OAuth accounts exist, otherwise **Session**. Accounts appear in a provider-grouped list with selected-account details, not a truncated tab strip. They are shown regardless of the selected model, provider or API-key use. These are subscription limits, not API-key quotas; other providers' subscription limits are not shown. **Session** shows tokens, cost, context use and duration.
37
+ In interactive mode, `/usage` opens a full-terminal overlay through `ctx.ui.custom`, independent of extension widgets and input dock height. It and its confirmation dialogs hide the chat until closed. It defaults to **Accounts** when saved Codex or Claude OAuth accounts exist, otherwise **Session**. Accounts appear in a provider-grouped list with selected-account details, not a truncated tab strip. They are shown regardless of the selected model, provider or API-key use. These are subscription limits, not API-key quotas; other providers' subscription limits are not shown. **Session** shows tokens, cost, context use and duration.
38
38
 
39
39
  `humain-code -p "/usage"` prints an aligned, read-only snapshot of session statistics and every saved Codex and Claude account's reported limits. `humain-code --mode json "/usage"` emits a JSONL record with `type: "usage"`, `session` and `accounts`; each account includes its label, active status and complete usage overview. Noninteractive snapshots cannot redeem resets, open billing pages or switch accounts. RPC does not support this command.
40
40
 
@@ -79,7 +79,9 @@ Confirmed redemption refreshes that account's usage. Only fresh, explicitly prov
79
79
 
80
80
  ### /accounts
81
81
 
82
- `/accounts` retains account management and cooldown recovery. Its Codex and Claude account summaries share `/usage`'s weekly allowance, saved-reset and paid-credit interpretation. Missing values remain unavailable; Claude extra-usage enablement is separate from purchased credits. Refreshing Codex availability retains guarded cooldown recovery: only fresh provider-allowed limits can clear an unchanged saved cooldown, without selecting a different account. Adding, selecting and removing accounts remain explicit management actions; `/usage` never performs them.
82
+ `/accounts` shows a compact account list and details for the highlighted item, side by side at 76 columns or wider and stacked below that. Use Up/Down to move, Page Up/Page Down to scroll details, and Enter to use an account for future requests or open a highlighted list action. The default shortcuts are R to re-sign in, D to review removal (a separate confirmation), and M for more actions such as rename and Claude usage refresh. Add another account and Provider policy remain list actions. Highlighting an account never switches to it. The picker keeps full account labels and wraps status when needed. Both views group only provider-verified identity aliases, never accounts that merely share an email. On login, an expired alias is removed only if the same refresh token is represented by a live credential; independently refreshable slots are retained. Its Codex and Claude account summaries share `/usage`'s weekly allowance, saved-reset and paid-credit interpretation. Missing values remain unavailable; Claude extra-usage enablement is separate from purchased credits. Refreshing Codex availability retains guarded cooldown recovery: only fresh provider-allowed limits can clear an unchanged saved cooldown, without selecting a different account. Adding, selecting and removing accounts remain explicit management actions; `/usage` never performs them.
83
+
84
+ If browser sign-in returns a different known account or workspace, re-sign-in stops without replacing the selected credential. Sign in to the selected account or use **Add another account** to save a separate login.
83
85
 
84
86
  ## Export and share
85
87
 
package/docs/usage.md CHANGED
@@ -87,6 +87,8 @@ Type `/` to search the available commands. The commands you will use most often
87
87
  - `/login` and `/logout` manage provider access.
88
88
  - `/settings` changes common preferences.
89
89
 
90
+ Account selection (including `/login` account choices and `/accounts`) and Usage's Accounts view use the same full-width, fullscreen overlay. The opaque black surface covers the transcript, editor, and status area; Usage confirmations also cover the underlying view. Press `Escape` to go back without changing an account.
91
+
90
92
  Automatic effort is off by default. Enable it under `/settings` → **Automation**. Selection shows `Choosing effort…` before dispatch; on failure it keeps the current effort. Explicitly enable **Auto effort this session** to resume automation after a manual choice. See [Automatic effort](settings.md#automatic-effort) for latency and usage costs.
91
93
 
92
94
  Prompt templates, skills, and extensions can add more commands to the same menu. See [Choose a Model](models.md), [Configuration](configuration.md), or the complete [Slash Commands reference](slash-commands.md).
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@humain/humain-code",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@humain/humain-code",
9
- "version": "0.8.0",
9
+ "version": "0.8.2",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@humain/humain-code-contracts": "0.4.22",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humain/humain-code",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "humainTerminalConfig": {
@@ -279,6 +279,18 @@
279
279
  "$ref": "#/$defs/KeybindingValue",
280
280
  "description": "Reconnect the selected Claude account"
281
281
  },
282
+ "app.accounts.reconnect": {
283
+ "$ref": "#/$defs/KeybindingValue",
284
+ "description": "Re-sign in to the selected account"
285
+ },
286
+ "app.accounts.remove": {
287
+ "$ref": "#/$defs/KeybindingValue",
288
+ "description": "Review removal of the selected account"
289
+ },
290
+ "app.accounts.more": {
291
+ "$ref": "#/$defs/KeybindingValue",
292
+ "description": "Open more actions for the selected account"
293
+ },
282
294
  "app.thinking.toggle": {
283
295
  "$ref": "#/$defs/KeybindingValue",
284
296
  "description": "Toggle thinking blocks"
@@ -103,6 +103,35 @@
103
103
  ],
104
104
  "default": "one-at-a-time"
105
105
  },
106
+ "workingIndicator": {
107
+ "anyOf": [
108
+ {
109
+ "type": "string",
110
+ "const": "rotate"
111
+ },
112
+ {
113
+ "type": "string",
114
+ "const": "classic"
115
+ },
116
+ {
117
+ "type": "string",
118
+ "const": "life"
119
+ },
120
+ {
121
+ "type": "string",
122
+ "const": "rain"
123
+ },
124
+ {
125
+ "type": "string",
126
+ "const": "decode"
127
+ }
128
+ ],
129
+ "default": "rotate"
130
+ },
131
+ "reducedMotion": {
132
+ "type": "boolean",
133
+ "default": false
134
+ },
106
135
  "theme": {
107
136
  "type": "string"
108
137
  },