@songsid/agend 2.3.0-beta.2 → 2.3.0-beta.21

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 (502) hide show
  1. package/README.md +7 -1
  2. package/README.zh-TW.md +7 -1
  3. package/dist/agent-cli-instructions.md +9 -2
  4. package/dist/agent-cli.js +63 -2
  5. package/dist/agent-cli.js.map +1 -1
  6. package/dist/agent-endpoint.js +4 -0
  7. package/dist/agent-endpoint.js.map +1 -1
  8. package/dist/agent-file-read.d.ts +4 -1
  9. package/dist/agent-file-read.js +189 -16
  10. package/dist/agent-file-read.js.map +1 -1
  11. package/dist/agent-whats-new.d.ts +11 -0
  12. package/dist/agent-whats-new.js +29 -5
  13. package/dist/agent-whats-new.js.map +1 -1
  14. package/dist/auth-api.d.ts +30 -1
  15. package/dist/auth-api.js +45 -13
  16. package/dist/auth-api.js.map +1 -1
  17. package/dist/authority/authority-state.d.ts +38 -0
  18. package/dist/authority/authority-state.js +114 -0
  19. package/dist/authority/authority-state.js.map +1 -0
  20. package/dist/authority/session-authorizations.d.ts +43 -0
  21. package/dist/authority/session-authorizations.js +102 -0
  22. package/dist/authority/session-authorizations.js.map +1 -0
  23. package/dist/authority/web-authority.d.ts +120 -0
  24. package/dist/authority/web-authority.js +157 -0
  25. package/dist/authority/web-authority.js.map +1 -0
  26. package/dist/backend/claude-code.d.ts +2 -2
  27. package/dist/backend/claude-code.js +18 -8
  28. package/dist/backend/claude-code.js.map +1 -1
  29. package/dist/backend/codex-metadata.d.ts +8 -0
  30. package/dist/backend/codex-metadata.js +74 -17
  31. package/dist/backend/codex-metadata.js.map +1 -1
  32. package/dist/backend/codex.js +15 -2
  33. package/dist/backend/codex.js.map +1 -1
  34. package/dist/backend/credential-profile.d.ts +2 -0
  35. package/dist/backend/credential-profile.js +2 -0
  36. package/dist/backend/credential-profile.js.map +1 -1
  37. package/dist/backend/types.d.ts +6 -0
  38. package/dist/backend/types.js +15 -0
  39. package/dist/backend/types.js.map +1 -1
  40. package/dist/backend-availability.d.ts +120 -0
  41. package/dist/backend-availability.js +396 -0
  42. package/dist/backend-availability.js.map +1 -0
  43. package/dist/backend-command.d.ts +23 -3
  44. package/dist/backend-command.js +25 -4
  45. package/dist/backend-command.js.map +1 -1
  46. package/dist/bug-report-cli.d.ts +30 -0
  47. package/dist/bug-report-cli.js +138 -0
  48. package/dist/bug-report-cli.js.map +1 -0
  49. package/dist/bug-report.d.ts +47 -0
  50. package/dist/bug-report.js +136 -0
  51. package/dist/bug-report.js.map +1 -0
  52. package/dist/bundled-skills.d.ts +14 -0
  53. package/dist/bundled-skills.js +29 -0
  54. package/dist/bundled-skills.js.map +1 -0
  55. package/dist/cache-ledger.d.ts +16 -3
  56. package/dist/cache-ledger.js +33 -13
  57. package/dist/cache-ledger.js.map +1 -1
  58. package/dist/cache-service.d.ts +55 -3
  59. package/dist/cache-service.js +152 -16
  60. package/dist/cache-service.js.map +1 -1
  61. package/dist/channel/adapters/discord-client-retirement.d.ts +5 -0
  62. package/dist/channel/adapters/discord-client-retirement.js +57 -0
  63. package/dist/channel/adapters/discord-client-retirement.js.map +1 -0
  64. package/dist/channel/adapters/discord.d.ts +9 -0
  65. package/dist/channel/adapters/discord.js +49 -4
  66. package/dist/channel/adapters/discord.js.map +1 -1
  67. package/dist/channel/mcp-tools.js +22 -11
  68. package/dist/channel/mcp-tools.js.map +1 -1
  69. package/dist/channel/types.d.ts +6 -0
  70. package/dist/classic-channel-manager.d.ts +10 -5
  71. package/dist/classic-channel-manager.js +12 -9
  72. package/dist/classic-channel-manager.js.map +1 -1
  73. package/dist/cli.js +224 -111
  74. package/dist/cli.js.map +1 -1
  75. package/dist/config-validator.d.ts +6 -0
  76. package/dist/config-validator.js +129 -3
  77. package/dist/config-validator.js.map +1 -1
  78. package/dist/config.d.ts +13 -1
  79. package/dist/config.js +14 -5
  80. package/dist/config.js.map +1 -1
  81. package/dist/cross-instance-notice.d.ts +7 -0
  82. package/dist/cross-instance-notice.js +10 -0
  83. package/dist/cross-instance-notice.js.map +1 -1
  84. package/dist/daemon.d.ts +24 -1
  85. package/dist/daemon.js +151 -19
  86. package/dist/daemon.js.map +1 -1
  87. package/dist/decision-list.d.ts +25 -0
  88. package/dist/decision-list.js +30 -0
  89. package/dist/decision-list.js.map +1 -0
  90. package/dist/delivery-outbox.d.ts +10 -0
  91. package/dist/delivery-outbox.js +17 -1
  92. package/dist/delivery-outbox.js.map +1 -1
  93. package/dist/diagnostic-redaction.d.ts +10 -0
  94. package/dist/diagnostic-redaction.js +167 -0
  95. package/dist/diagnostic-redaction.js.map +1 -0
  96. package/dist/fleet-context.d.ts +10 -0
  97. package/dist/fleet-manager.d.ts +505 -15
  98. package/dist/fleet-manager.js +1870 -204
  99. package/dist/fleet-manager.js.map +1 -1
  100. package/dist/fleet-process-handlers.d.ts +18 -0
  101. package/dist/fleet-process-handlers.js +69 -0
  102. package/dist/fleet-process-handlers.js.map +1 -0
  103. package/dist/fleet-traffic.d.ts +74 -0
  104. package/dist/fleet-traffic.js +196 -0
  105. package/dist/fleet-traffic.js.map +1 -0
  106. package/dist/general-knowledge/skills/bug-report/SKILL.md +31 -0
  107. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +17 -6
  108. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -1
  109. package/dist/general-knowledge/skills/fleet-config/SKILL.md +2 -0
  110. package/dist/general-knowledge/skills/multi-channel/SKILL.md +3 -2
  111. package/dist/general-knowledge/skills/persona-emoji/SKILL.md +1 -1
  112. package/dist/general-knowledge/skills/scheduling/SKILL.md +4 -0
  113. package/dist/general-knowledge/skills/web-appearance/SKILL.md +190 -47
  114. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +545 -0
  115. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  116. package/dist/human-delivery-receipts.d.ts +24 -1
  117. package/dist/human-delivery-receipts.js +64 -11
  118. package/dist/human-delivery-receipts.js.map +1 -1
  119. package/dist/instance-config-impact.js +7 -1
  120. package/dist/instance-config-impact.js.map +1 -1
  121. package/dist/instance-lifecycle.d.ts +10 -1
  122. package/dist/instance-lifecycle.js +79 -18
  123. package/dist/instance-lifecycle.js.map +1 -1
  124. package/dist/instance-names.d.ts +4 -0
  125. package/dist/instance-names.js +12 -0
  126. package/dist/instance-names.js.map +1 -0
  127. package/dist/instructions.d.ts +12 -1
  128. package/dist/instructions.js +13 -2
  129. package/dist/instructions.js.map +1 -1
  130. package/dist/locale.js +173 -12
  131. package/dist/locale.js.map +1 -1
  132. package/dist/log-steps.d.ts +1 -0
  133. package/dist/log-steps.js +15 -0
  134. package/dist/log-steps.js.map +1 -1
  135. package/dist/login-controller.d.ts +45 -0
  136. package/dist/login-controller.js +101 -5
  137. package/dist/login-controller.js.map +1 -1
  138. package/dist/ls-attach-resolve.d.ts +96 -0
  139. package/dist/ls-attach-resolve.js +180 -0
  140. package/dist/ls-attach-resolve.js.map +1 -0
  141. package/dist/ls-rows.d.ts +12 -0
  142. package/dist/ls-rows.js +82 -3
  143. package/dist/ls-rows.js.map +1 -1
  144. package/dist/memory-hogs.d.ts +27 -0
  145. package/dist/memory-hogs.js +124 -0
  146. package/dist/memory-hogs.js.map +1 -0
  147. package/dist/needs-you.d.ts +10 -0
  148. package/dist/needs-you.js +2 -1
  149. package/dist/needs-you.js.map +1 -1
  150. package/dist/outbound-handlers.d.ts +11 -0
  151. package/dist/outbound-handlers.js +139 -11
  152. package/dist/outbound-handlers.js.map +1 -1
  153. package/dist/outbound-schemas.d.ts +200 -4
  154. package/dist/outbound-schemas.js +124 -11
  155. package/dist/outbound-schemas.js.map +1 -1
  156. package/dist/public-web-gateway.js +17 -4
  157. package/dist/public-web-gateway.js.map +1 -1
  158. package/dist/public-web-link.d.ts +9 -0
  159. package/dist/public-web-link.js +8 -0
  160. package/dist/public-web-link.js.map +1 -1
  161. package/dist/quickstart-api.d.ts +19 -1
  162. package/dist/quickstart-api.js +94 -4
  163. package/dist/quickstart-api.js.map +1 -1
  164. package/dist/reply-buttons-controller.d.ts +4 -0
  165. package/dist/reply-buttons-controller.js +2 -2
  166. package/dist/reply-buttons-controller.js.map +1 -1
  167. package/dist/restart-progress.d.ts +80 -1
  168. package/dist/restart-progress.js +306 -21
  169. package/dist/restart-progress.js.map +1 -1
  170. package/dist/rollout-index.d.ts +5 -0
  171. package/dist/rollout-index.js +26 -5
  172. package/dist/rollout-index.js.map +1 -1
  173. package/dist/scheduler/db.d.ts +40 -13
  174. package/dist/scheduler/db.js +123 -89
  175. package/dist/scheduler/db.js.map +1 -1
  176. package/dist/scheduler/task-board-text.d.ts +26 -0
  177. package/dist/scheduler/task-board-text.js +135 -0
  178. package/dist/scheduler/task-board-text.js.map +1 -0
  179. package/dist/scheduler/task-board.d.ts +650 -0
  180. package/dist/scheduler/task-board.js +1938 -0
  181. package/dist/scheduler/task-board.js.map +1 -0
  182. package/dist/scheduler/types.d.ts +6 -1
  183. package/dist/search/search-docs.d.ts +58 -0
  184. package/dist/search/search-docs.js +63 -0
  185. package/dist/search/search-docs.js.map +1 -0
  186. package/dist/search/search-index.d.ts +141 -0
  187. package/dist/search/search-index.js +440 -0
  188. package/dist/search/search-index.js.map +1 -0
  189. package/dist/search/search-store.d.ts +122 -0
  190. package/dist/search/search-store.js +236 -0
  191. package/dist/search/search-store.js.map +1 -0
  192. package/dist/search/search-worker.d.ts +1 -0
  193. package/dist/search/search-worker.js +163 -0
  194. package/dist/search/search-worker.js.map +1 -0
  195. package/dist/service-installer.js +12 -0
  196. package/dist/service-installer.js.map +1 -1
  197. package/dist/settings-api.d.ts +23 -0
  198. package/dist/settings-api.js +164 -3
  199. package/dist/settings-api.js.map +1 -1
  200. package/dist/settings-change.js +104 -0
  201. package/dist/settings-change.js.map +1 -1
  202. package/dist/settings-confirmation.d.ts +3 -1
  203. package/dist/settings-confirmation.js +2 -0
  204. package/dist/settings-confirmation.js.map +1 -1
  205. package/dist/settings-effect.js +34 -3
  206. package/dist/settings-effect.js.map +1 -1
  207. package/dist/settings-http-confirmation.d.ts +11 -0
  208. package/dist/settings-http-confirmation.js +10 -0
  209. package/dist/settings-http-confirmation.js.map +1 -1
  210. package/dist/setup-form.d.ts +1 -1
  211. package/dist/setup-form.js +23 -7
  212. package/dist/setup-form.js.map +1 -1
  213. package/dist/spawn-gate.d.ts +1 -0
  214. package/dist/spawn-gate.js +13 -3
  215. package/dist/spawn-gate.js.map +1 -1
  216. package/dist/task-board-tool.d.ts +25 -0
  217. package/dist/task-board-tool.js +154 -0
  218. package/dist/task-board-tool.js.map +1 -0
  219. package/dist/task-board-waker.d.ts +44 -0
  220. package/dist/task-board-waker.js +128 -0
  221. package/dist/task-board-waker.js.map +1 -0
  222. package/dist/tmux-exec-helper.d.ts +94 -0
  223. package/dist/tmux-exec-helper.js +407 -0
  224. package/dist/tmux-exec-helper.js.map +1 -0
  225. package/dist/tmux-manager.d.ts +5 -0
  226. package/dist/tmux-manager.js +42 -11
  227. package/dist/tmux-manager.js.map +1 -1
  228. package/dist/tool-permissions.d.ts +0 -7
  229. package/dist/tool-permissions.js +44 -5
  230. package/dist/tool-permissions.js.map +1 -1
  231. package/dist/topic-commands.d.ts +17 -1
  232. package/dist/topic-commands.js +45 -19
  233. package/dist/topic-commands.js.map +1 -1
  234. package/dist/tunnel/cloudflared.js +37 -2
  235. package/dist/tunnel/cloudflared.js.map +1 -1
  236. package/dist/tunnel/types.d.ts +3 -1
  237. package/dist/tunnel/types.js.map +1 -1
  238. package/dist/types.d.ts +63 -1
  239. package/dist/ui/app-effects.js +90 -32
  240. package/dist/ui/backend-signin.js +297 -0
  241. package/dist/ui/chat-ambient.js +307 -0
  242. package/dist/ui/chat-effect-posters.js +8 -8
  243. package/dist/ui/chat-effects.js +110 -15
  244. package/dist/ui/chat-msg-actions.js +176 -0
  245. package/dist/ui/chat-render.js +21 -3
  246. package/dist/ui/chat-store.js +64 -12
  247. package/dist/ui/chat-strings.js +85 -8
  248. package/dist/ui/chat-thread.js +204 -21
  249. package/dist/ui/effect-trial-controller.js +13 -8
  250. package/dist/ui/effect-trial-panel.js +19 -16
  251. package/dist/ui/effects-waker.js +70 -0
  252. package/dist/ui/fleet-canvas-layout.js +117 -0
  253. package/dist/ui/fleet-canvas.js +555 -0
  254. package/dist/ui/fleet-org.js +27 -12
  255. package/dist/ui/fleet-route-scene.js +207 -0
  256. package/dist/ui/fleet-route-worker.js +21 -0
  257. package/dist/ui/fleet-route.js +88 -0
  258. package/dist/ui/fleet-task-card.js +436 -0
  259. package/dist/ui/fleet-task-common.js +448 -0
  260. package/dist/ui/fleet-tasks.js +535 -0
  261. package/dist/ui/fleet-traffic.js +359 -0
  262. package/dist/ui/fleet-usage.js +435 -0
  263. package/dist/ui/panel-chat.js +264 -66
  264. package/dist/ui/panel-details.js +2 -1
  265. package/dist/ui/panel-fleet.js +65 -83
  266. package/dist/ui/panel-needs.js +4 -2
  267. package/dist/ui/panel-settings.js +56 -11
  268. package/dist/ui/preview.js +3 -2
  269. package/dist/ui/search-dialog.js +349 -0
  270. package/dist/ui/settings-appearance.js +44 -19
  271. package/dist/ui/settings-apply.js +3 -3
  272. package/dist/ui/settings-catalog.js +92 -0
  273. package/dist/ui/settings-confirm.js +7 -2
  274. package/dist/ui/settings-dialogs.js +40 -12
  275. package/dist/ui/settings-effects.js +4 -3
  276. package/dist/ui/settings-guests.js +117 -0
  277. package/dist/ui/settings-learn.js +25 -0
  278. package/dist/ui/settings-model.js +15 -6
  279. package/dist/ui/settings-mods.js +23 -9
  280. package/dist/ui/settings-owner-effects.js +15 -13
  281. package/dist/ui/settings-strings.js +122 -42
  282. package/dist/ui/settings-web-authority.js +91 -0
  283. package/dist/ui/shared/agend-auth.js +1 -1
  284. package/dist/ui/shared/app-i18n.js +11 -2
  285. package/dist/ui/shared/app-prefs.js +17 -4
  286. package/dist/ui/shared/app-route.js +19 -1
  287. package/dist/ui/shared/app-session.js +2 -0
  288. package/dist/ui/shared/app-shell.js +174 -30
  289. package/dist/ui/shared/app-store.js +26 -1
  290. package/dist/ui/shared/app-stream.js +5 -1
  291. package/dist/ui/shared/app-themes.js +140 -7
  292. package/dist/ui/shared/app.css +705 -20
  293. package/dist/ui/shared/app.js +26 -15
  294. package/dist/ui/shared/card-strings.js +8 -0
  295. package/dist/ui/shared/effect-app-runtime.js +68 -19
  296. package/dist/ui/shared/effect-chat-runtime.js +16 -3
  297. package/dist/ui/shared/effect-frame.js +26 -7
  298. package/dist/ui/shared/effect-geometry.js +24 -9
  299. package/dist/ui/shared/effect-owner-source.js +8 -1
  300. package/dist/ui/shared/effect-policy.js +21 -7
  301. package/dist/ui/shared/effect-profiler.js +31 -9
  302. package/dist/ui/shared/effect-registry.js +97 -50
  303. package/dist/ui/shared/effect-stock-snapshot.js +9 -0
  304. package/dist/ui/shared/effect-stock-trust.js +62 -10
  305. package/dist/ui/shared/effect-trial-shadow.js +62 -0
  306. package/dist/ui/shared/effect-trial-source.js +1 -1
  307. package/dist/ui/shared/effect-trial-stage.js +54 -31
  308. package/dist/ui/shared/effect-trial.css +40 -0
  309. package/dist/ui/shared/fx-motion.js +67 -0
  310. package/dist/ui/shared/identity-card.js +100 -11
  311. package/dist/ui/shared/identity-color.js +14 -10
  312. package/dist/ui/shared/instance-nav.js +179 -23
  313. package/dist/ui/shared/owner-css.js +30 -1
  314. package/dist/ui/shared/panel-view.js +24 -4
  315. package/dist/ui/shared/tokens.css +9 -3
  316. package/dist/ui/shared/ui-icons.js +2 -0
  317. package/dist/ui/shared/ui-menu.js +20 -7
  318. package/dist/ui/shared/ui-toast.js +16 -3
  319. package/dist/ui/shared/usage-dialog.js +34 -3
  320. package/dist/ui/shared/view-strings.js +72 -0
  321. package/dist/ui/shared/web-authorize.js +198 -0
  322. package/dist/ui/web-terminal/terminal.css +4 -4
  323. package/dist/ui/web-terminal/terminal.html +1 -1
  324. package/dist/update-launch.d.ts +9 -0
  325. package/dist/update-launch.js +38 -12
  326. package/dist/update-launch.js.map +1 -1
  327. package/dist/usage/format-rich.js +6 -3
  328. package/dist/usage/format-rich.js.map +1 -1
  329. package/dist/usage/i18n-keys.d.ts +1 -1
  330. package/dist/usage/i18n-keys.js +2 -1
  331. package/dist/usage/i18n-keys.js.map +1 -1
  332. package/dist/usage/i18n.d.ts +13 -1
  333. package/dist/usage/i18n.js +29 -0
  334. package/dist/usage/i18n.js.map +1 -1
  335. package/dist/usage/providers.d.ts +81 -2
  336. package/dist/usage/providers.js +240 -38
  337. package/dist/usage/providers.js.map +1 -1
  338. package/dist/usage/usage-api.d.ts +5 -1
  339. package/dist/usage/usage-api.js +184 -58
  340. package/dist/usage/usage-api.js.map +1 -1
  341. package/dist/usage-report.d.ts +158 -0
  342. package/dist/usage-report.js +226 -0
  343. package/dist/usage-report.js.map +1 -0
  344. package/dist/usage-rollup.d.ts +51 -0
  345. package/dist/usage-rollup.js +168 -0
  346. package/dist/usage-rollup.js.map +1 -0
  347. package/dist/user-systemd.d.ts +24 -0
  348. package/dist/user-systemd.js +75 -0
  349. package/dist/user-systemd.js.map +1 -0
  350. package/dist/view-api.d.ts +39 -0
  351. package/dist/view-api.js +69 -6
  352. package/dist/view-api.js.map +1 -1
  353. package/dist/web-ambient.d.ts +72 -0
  354. package/dist/web-ambient.js +161 -0
  355. package/dist/web-ambient.js.map +1 -0
  356. package/dist/web-api.d.ts +98 -14
  357. package/dist/web-api.js +1027 -83
  358. package/dist/web-api.js.map +1 -1
  359. package/dist/web-appearance-policy.d.ts +4 -6
  360. package/dist/web-appearance-policy.js +5 -12
  361. package/dist/web-appearance-policy.js.map +1 -1
  362. package/dist/web-appearance-tools.d.ts +3 -0
  363. package/dist/web-appearance-tools.js +22 -3
  364. package/dist/web-appearance-tools.js.map +1 -1
  365. package/dist/web-appearance-view.d.ts +27 -2
  366. package/dist/web-appearance-view.js +129 -14
  367. package/dist/web-appearance-view.js.map +1 -1
  368. package/dist/web-appearance.d.ts +17 -3
  369. package/dist/web-appearance.js +85 -8
  370. package/dist/web-appearance.js.map +1 -1
  371. package/dist/web-asset-parts.d.ts +2 -2
  372. package/dist/web-asset-parts.js +3 -3
  373. package/dist/web-asset-parts.js.map +1 -1
  374. package/dist/web-auth.js +3 -1
  375. package/dist/web-auth.js.map +1 -1
  376. package/dist/web-backend-login.d.ts +130 -0
  377. package/dist/web-backend-login.js +225 -0
  378. package/dist/web-backend-login.js.map +1 -0
  379. package/dist/web-card.d.ts +14 -0
  380. package/dist/web-card.js +40 -6
  381. package/dist/web-card.js.map +1 -1
  382. package/dist/web-channel-echo.d.ts +7 -1
  383. package/dist/web-channel-echo.js +6 -2
  384. package/dist/web-channel-echo.js.map +1 -1
  385. package/dist/web-chat-history.d.ts +83 -0
  386. package/dist/web-chat-history.js +137 -5
  387. package/dist/web-chat-history.js.map +1 -1
  388. package/dist/web-commands.d.ts +6 -1
  389. package/dist/web-commands.js +1 -1
  390. package/dist/web-commands.js.map +1 -1
  391. package/dist/web-effect-bootstrap.d.ts +12 -0
  392. package/dist/web-effect-bootstrap.js +49 -0
  393. package/dist/web-effect-bootstrap.js.map +1 -0
  394. package/dist/web-effect-bundle.js +46 -1
  395. package/dist/web-effect-bundle.js.map +1 -1
  396. package/dist/web-effect-playback.d.ts +30 -0
  397. package/dist/web-effect-playback.js +71 -0
  398. package/dist/web-effect-playback.js.map +1 -0
  399. package/dist/web-effect-profiles.d.ts +4 -4
  400. package/dist/web-effect-service.d.ts +11 -4
  401. package/dist/web-effect-service.js +25 -4
  402. package/dist/web-effect-service.js.map +1 -1
  403. package/dist/web-effect-tools.d.ts +1 -0
  404. package/dist/web-effect-tools.js +4 -4
  405. package/dist/web-effect-tools.js.map +1 -1
  406. package/dist/web-effect-trials.d.ts +2 -2
  407. package/dist/web-effect-trials.js +3 -3
  408. package/dist/web-effect-trials.js.map +1 -1
  409. package/dist/web-effect-upload.js +1 -1
  410. package/dist/web-effect-upload.js.map +1 -1
  411. package/dist/web-effect-worker.d.ts +1 -1
  412. package/dist/web-effect-worker.js +2 -2
  413. package/dist/web-effect-worker.js.map +1 -1
  414. package/dist/web-effect.d.ts +1 -1
  415. package/dist/web-guest-access.d.ts +126 -0
  416. package/dist/web-guest-access.js +238 -0
  417. package/dist/web-guest-access.js.map +1 -0
  418. package/dist/web-guest-rooms.d.ts +82 -0
  419. package/dist/web-guest-rooms.js +135 -0
  420. package/dist/web-guest-rooms.js.map +1 -0
  421. package/dist/web-host-guard.d.ts +11 -0
  422. package/dist/web-host-guard.js +11 -0
  423. package/dist/web-host-guard.js.map +1 -1
  424. package/dist/web-identity-color.d.ts +1 -1
  425. package/dist/web-identity-color.js +2 -2
  426. package/dist/web-identity-color.js.map +1 -1
  427. package/dist/web-identity-palette.d.ts +1 -1
  428. package/dist/web-identity-palette.js +2 -2
  429. package/dist/web-identity-palette.js.map +1 -1
  430. package/dist/web-image-meta.d.ts +13 -0
  431. package/dist/web-image-meta.js +62 -0
  432. package/dist/web-image-meta.js.map +1 -1
  433. package/dist/web-libavoid.d.ts +14 -0
  434. package/dist/web-libavoid.js +46 -0
  435. package/dist/web-libavoid.js.map +1 -0
  436. package/dist/web-login.d.ts +47 -0
  437. package/dist/web-login.js +115 -0
  438. package/dist/web-login.js.map +1 -1
  439. package/dist/web-mod-agent.d.ts +1 -1
  440. package/dist/web-mod-agent.js +7 -5
  441. package/dist/web-mod-agent.js.map +1 -1
  442. package/dist/web-mod-bundle.d.ts +9 -1
  443. package/dist/web-mod-bundle.js +62 -3
  444. package/dist/web-mod-bundle.js.map +1 -1
  445. package/dist/web-mod-export.d.ts +9 -0
  446. package/dist/web-mod-export.js +21 -0
  447. package/dist/web-mod-export.js.map +1 -1
  448. package/dist/web-mod-store.d.ts +7 -1
  449. package/dist/web-mod-store.js +19 -6
  450. package/dist/web-mod-store.js.map +1 -1
  451. package/dist/web-owner-css-store.d.ts +44 -1
  452. package/dist/web-owner-css-store.js +70 -9
  453. package/dist/web-owner-css-store.js.map +1 -1
  454. package/dist/web-prefs.d.ts +14 -0
  455. package/dist/web-prefs.js +37 -4
  456. package/dist/web-prefs.js.map +1 -1
  457. package/dist/web-preview.d.ts +6 -2
  458. package/dist/web-preview.js +4 -2
  459. package/dist/web-preview.js.map +1 -1
  460. package/dist/web-returning-device.d.ts +41 -0
  461. package/dist/web-returning-device.js +57 -5
  462. package/dist/web-returning-device.js.map +1 -1
  463. package/dist/web-session-authorization.d.ts +132 -0
  464. package/dist/web-session-authorization.js +193 -0
  465. package/dist/web-session-authorization.js.map +1 -0
  466. package/dist/web-session.d.ts +70 -10
  467. package/dist/web-session.js +137 -22
  468. package/dist/web-session.js.map +1 -1
  469. package/dist/web-settings-patch.d.ts +49 -2
  470. package/dist/web-settings-patch.js +145 -1
  471. package/dist/web-settings-patch.js.map +1 -1
  472. package/dist/web-settings-tools.d.ts +94 -0
  473. package/dist/web-settings-tools.js +301 -0
  474. package/dist/web-settings-tools.js.map +1 -0
  475. package/dist/web-shell-routes.d.ts +1 -1
  476. package/dist/web-shell-routes.js +1 -1
  477. package/dist/web-shell-routes.js.map +1 -1
  478. package/dist/web-terminal-http.js +15 -2
  479. package/dist/web-terminal-http.js.map +1 -1
  480. package/dist/web-theme-store.d.ts +39 -0
  481. package/dist/web-theme-store.js +122 -11
  482. package/dist/web-theme-store.js.map +1 -1
  483. package/dist/web-theme.d.ts +31 -0
  484. package/dist/web-theme.js +99 -2
  485. package/dist/web-theme.js.map +1 -1
  486. package/dist/web-upload.d.ts +13 -0
  487. package/dist/web-upload.js +39 -3
  488. package/dist/web-upload.js.map +1 -1
  489. package/dist/windows-shortcuts.d.ts +78 -0
  490. package/dist/windows-shortcuts.js +203 -0
  491. package/dist/windows-shortcuts.js.map +1 -0
  492. package/dist/workflow-templates/default.md +4 -1
  493. package/dist/yaml-shared-nodes.d.ts +25 -0
  494. package/dist/yaml-shared-nodes.js +185 -0
  495. package/dist/yaml-shared-nodes.js.map +1 -0
  496. package/launcher/agend-install.cjs +553 -0
  497. package/launcher/install-admission.cjs +4 -39
  498. package/launcher/postinstall.cjs +14 -12
  499. package/package.json +4 -2
  500. package/scripts/preinstall-guard.cjs +2 -5
  501. package/templates/windows-shortcuts.ps1 +181 -0
  502. package/launcher/old-updater-note.cjs +0 -48
@@ -20,12 +20,12 @@
20
20
  */
21
21
  import { readFile, writeFile, access, constants } from "node:fs/promises";
22
22
  import { readFileSync, readdirSync } from "node:fs";
23
- import { join, resolve, sep } from "node:path";
23
+ import { dirname, join, resolve, sep } from "node:path";
24
24
  import { execFile } from "node:child_process";
25
25
  import { getAgendHome } from "../paths.js";
26
26
  import { loadFleetConfig } from "../config.js";
27
27
  import { classicProfile, profileName, readClassicBindings } from "../classic-bindings.js";
28
- import { CHAT_PROFILE_LOGIN_BACKENDS, credentialHomeSpec, credentialProfileLoginCommand, credentialProfileStoreHome, instanceCredentialProfile, } from "../backend/credential-profile.js";
28
+ import { CHAT_PROFILE_LOGIN_BACKENDS, credentialHomeSpec, credentialProfileHome, credentialProfileLoginCommand, credentialProfileStoreHome, instanceCredentialProfile, isCredentialProfileName, } from "../backend/credential-profile.js";
29
29
  import { claudeKeychainService } from "../backend/claude-code.js";
30
30
  import { readKiroAuthTokens } from "../backend/kiro-auth-store.js";
31
31
  import { homedir, userInfo } from "node:os";
@@ -364,6 +364,9 @@ export async function fetchClaudeUsage(storeHome, scope = {}) {
364
364
  // limits down. This is the case the whole statusline source exists for.
365
365
  if (statusline)
366
366
  return statuslineUsage(statusline, null);
367
+ // #2236: a profile on the host that no instance uses, signed out: not set up here — no row.
368
+ if (profileHome !== null && scope.hostOnly)
369
+ return { status: "no-credentials", hint: "Not logged in.", metrics: [] };
367
370
  if (profileHome !== null) {
368
371
  // On screen (`ok`, as kiro's signed-out row), with what signs this profile in — never a fallback: from chat
369
372
  // (`/login claude-code <profile>`, #1699 part 2), or the exact line on the host — the same words as the auth alert.
@@ -510,10 +513,31 @@ export async function fetchClaudeUsage(storeHome, scope = {}) {
510
513
  // the app), so embedding it is the accepted norm, not a leaked key. It is
511
514
  // required for the refresh-token grant.
512
515
  const AGY_TOKEN_FILE = ["antigravity-cli", "antigravity-oauth-token"];
516
+ /**
517
+ * The daily base first, the production base as the fallback. Checked live 2026-10-20 (#2240, a user's Google AI Pro
518
+ * account, read-only) against agy's own /quota: only the daily base, asked as agy's CLI asks (agyUserAgent), answers with
519
+ * the plan's Gemini quota and the Gemini 4 Argon group — agy's numbers exactly. The production base answers with a
520
+ * free-tier Gemini bucket and no Argon whatever the client says.
521
+ */
513
522
  const AGY_CLOUDCODE_URLS = [
514
523
  "https://daily-cloudcode-pa.googleapis.com",
515
524
  "https://cloudcode-pa.googleapis.com",
516
525
  ];
526
+ /**
527
+ * The agy CLI version AgEnD names itself as, in agy's own User-Agent (`antigravity/cli/<version> (aidev_client; …)`, as
528
+ * captured from agy 1.4.3's /quota, #2240, 2026-10-20). The daily base gates its summary on it: as `antigravity/cli/1.2.0`
529
+ * there was no Argon group, from 1.3.0 on there was; as `antigravity/cli/1.0.0` no Gemini group either; without the
530
+ * `cli/` segment (`antigravity/2.24.0`, OpenUsage's value) Gemini but never Argon. If Google raises the gate past it, a
531
+ * group disappears again and the row falls back to the busiest model's quota — a visible gap, never wrong numbers.
532
+ * Bump it here.
533
+ */
534
+ export const AGY_CLIENT_VERSION = "1.4.3";
535
+ /** agy's own User-Agent shape (`antigravity/cli/%s (aidev_client; os_type=…; arch=…)`), for this host. */
536
+ export function agyUserAgent(platform = process.platform, arch = process.arch) {
537
+ const os = platform === "win32" ? "windows" : platform;
538
+ const cpu = arch === "x64" ? "amd64" : arch;
539
+ return `antigravity/cli/${AGY_CLIENT_VERSION} (aidev_client; os_type=${os}; arch=${cpu})`;
540
+ }
517
541
  /**
518
542
  * The Google installed-app OAuth client pair, READ FROM THE INSTALLED agy
519
543
  * BINARY rather than committed here.
@@ -555,17 +579,48 @@ export function agyQuotaBuckets(body) {
555
579
  const grouped = (body.groups ?? []).flatMap(g => (g.buckets ?? []).map(b => ({ ...b, group: g.displayName?.trim() || undefined })));
556
580
  return grouped.length ? grouped : (body.buckets ?? []);
557
581
  }
582
+ /**
583
+ * Each model's quota as a per-model bucket. Only models with a reset time count: agy's internal models (tab completion,
584
+ * `chat_…`) report a bare 1 with none, which is no limit anyone runs into.
585
+ */
586
+ export function agyModelBuckets(body) {
587
+ return Object.entries(body.models ?? {}).flatMap(([id, m]) => m?.quotaInfo?.resetTime
588
+ ? [{ bucketId: id, remainingFraction: m.quotaInfo.remainingFraction, resetTime: m.quotaInfo.resetTime, provider: m.modelProvider }]
589
+ : []);
590
+ }
591
+ /**
592
+ * The buckets to show: the summary's, then — for each pool the summary does not name — the models' own quotas
593
+ * (#2174). agy 1.4 (2026-10-19, this machine's live account) answered the summary with only the "Claude and GPT
594
+ * models" group while every Gemini model still had a quota of its own, so the Gemini pool vanished from the row.
595
+ */
596
+ export function agyUsageBuckets(summary, models) {
597
+ const fromSummary = agyQuotaBuckets(summary);
598
+ const named = new Set(fromSummary.map(b => { const id = agyBucketId(b); return id ? agyPool(b, id) : null; }));
599
+ return [...fromSummary, ...(models ? agyModelBuckets(models).filter(b => !named.has(agyPool(b, b.bucketId))) : [])];
600
+ }
601
+ function agyBucketId(b) {
602
+ return b.bucketId?.trim() || (b.group ? b.displayName?.trim() : undefined);
603
+ }
558
604
  const AGY_POOLED = {
559
605
  "gemini-5h": { pool: "Gemini", window: "session" },
560
606
  "gemini-weekly": { pool: "Gemini", window: "weekly" },
561
607
  "3p-5h": { pool: "Claude & others", window: "session" },
562
608
  "3p-weekly": { pool: "Claude & others", window: "weekly" },
563
609
  };
564
- /** The pool a bucket belongs to: its group when the summary names one (#1898), else a guess from the bucket id. */
610
+ /**
611
+ * The pool a bucket belongs to: its group when the summary names one (#1898), else its model's provider, else its id.
612
+ * One nobody recognises is a pool of its own under its own name — never folded into another, so a vendor rename shows
613
+ * up as a new row instead of hiding one (#2174).
614
+ */
565
615
  function agyPool(b, id) {
566
616
  const pooled = AGY_POOLED[id];
567
617
  if (pooled)
568
618
  return pooled.pool;
619
+ // #2240: Gemini 4 Argon has a quota of its own on paid Pro plans ("Argon quota is separate", as agy shows it): its own pool,
620
+ // from a summary group or from its models (gemini-4-argon-*), never folded into Gemini's worst-of by the rule below.
621
+ const argon = agyArgonPool(b.group) ?? agyArgonPool(id);
622
+ if (argon)
623
+ return argon;
569
624
  const group = b.group;
570
625
  if (group) {
571
626
  if (/gemini/i.test(group))
@@ -574,7 +629,27 @@ function agyPool(b, id) {
574
629
  return "Claude & others";
575
630
  return group;
576
631
  }
577
- return id.startsWith("gemini") ? "Gemini" : "Claude & others";
632
+ const provider = b.provider?.replace(/^MODEL_PROVIDER_/, "");
633
+ if (provider) {
634
+ if (provider === "GOOGLE")
635
+ return "Gemini";
636
+ if (provider === "ANTHROPIC" || provider === "OPENAI")
637
+ return "Claude & others";
638
+ if (provider !== "UNSPECIFIED")
639
+ return provider.replace(/_/g, " ");
640
+ }
641
+ if (/^gemini/i.test(id))
642
+ return "Gemini";
643
+ if (/^(claude|gpt|3p)\b/i.test(id))
644
+ return "Claude & others";
645
+ return id;
646
+ }
647
+ /** "Gemini 4 Argon", "GEMINI 4 ARGON", "gemini-4-argon-high" → "Gemini 4 Argon"; any other Argon → "Argon"; else null. */
648
+ function agyArgonPool(text) {
649
+ if (!text || !/argon/i.test(text))
650
+ return null;
651
+ const version = /gemini[\s_-]*(\d+(?:\.\d+)?)[\s_-]*argon/i.exec(text);
652
+ return version ? `Gemini ${version[1]} Argon` : "Argon";
578
653
  }
579
654
  /** The limit a bucket counts against ("Five Hour Limit", window "5h" …), or null for a per-model bucket. */
580
655
  function agyWindow(b, id) {
@@ -626,7 +701,7 @@ function agyLabel(pool, window) {
626
701
  export function agyPoolMetrics(buckets) {
627
702
  const entries = new Map();
628
703
  for (const b of buckets) {
629
- const id = b.bucketId?.trim() || (b.group ? b.displayName?.trim() : undefined);
704
+ const id = agyBucketId(b);
630
705
  if (!id || b.disabled === true || typeof b.remainingFraction !== "number" || !Number.isFinite(b.remainingFraction))
631
706
  continue;
632
707
  const pool = agyPool(b, id);
@@ -737,7 +812,76 @@ async function agyAccessToken() {
737
812
  return { error: "Could not reach oauth2.googleapis.com.", errorI18n: i18n("usage.error.unreachable", "oauth2.googleapis.com") };
738
813
  }
739
814
  }
740
- async function fetchAntigravityUsage() {
815
+ /**
816
+ * The models' own quotas (`fetchAvailableModels`, the list agy's model picker reads), from the same base as the
817
+ * summary. Only what the summary leaves out is taken from it, so a failure here costs nothing: null. Optional, so it
818
+ * never costs the row the summary already in hand (#2176 review, as the Codex ticket list, #1246): once the summary
819
+ * has answered it gets only what is left before the provider deadline, less a margin, and is then cancelled.
820
+ */
821
+ const AGY_MODELS_DEADLINE_MARGIN_MS = 1_000;
822
+ function agyModels(base, token) {
823
+ return agyOptionalRead(base, token, "fetchAvailableModels", "{}");
824
+ }
825
+ /**
826
+ * The plan's name for the row (Google AI Pro …): `loadCodeAssist`, asked as agy asks it (its client metadata), read
827
+ * like the models' quotas — alongside the summary, optional, cancelled at the deadline. The paid tier wins over the
828
+ * current one, as OpenUsage reads it: a Pro account's current tier is "free-tier" (named "Antigravity").
829
+ */
830
+ const AGY_LOAD_CODE_ASSIST_BODY = JSON.stringify({ metadata: { ideType: "ANTIGRAVITY", platform: "PLATFORM_UNSPECIFIED", pluginType: "GEMINI" } });
831
+ function agyCodeAssist(base, token) {
832
+ return agyOptionalRead(base, token, "loadCodeAssist", AGY_LOAD_CODE_ASSIST_BODY);
833
+ }
834
+ /** The plan's name from loadCodeAssist: the paid tier's, else the current tier's (its name, else its id), else null; at most
835
+ * AGY_PLAN_MAX characters (it is a badge on one line, and the text comes from the server). */
836
+ export function agyPlan(body) {
837
+ for (const tier of [body?.paidTier, body?.currentTier]) {
838
+ for (const v of [tier?.name, tier?.id])
839
+ if (typeof v === "string" && v.trim())
840
+ return truncatePlan(v.trim());
841
+ }
842
+ return null;
843
+ }
844
+ const AGY_PLAN_MAX = 64;
845
+ function truncatePlan(name) {
846
+ const chars = [...name];
847
+ return chars.length <= AGY_PLAN_MAX ? name : `${chars.slice(0, AGY_PLAN_MAX - 1).join("")}…`;
848
+ }
849
+ /** One optional Cloud Code read beside the summary: its body, or null on any failure; bounded by the caller's budget. */
850
+ function agyOptionalRead(base, token, method, requestBody) {
851
+ const abort = new AbortController();
852
+ const result = (async () => {
853
+ const res = await fetch(`${base}/v1internal:${method}`, {
854
+ method: "POST",
855
+ headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", "User-Agent": agyUserAgent() },
856
+ body: requestBody,
857
+ signal: AbortSignal.any([abort.signal, AbortSignal.timeout(LONGEST_SINGLE_FETCH_MS)]),
858
+ });
859
+ if (!res.ok)
860
+ return null;
861
+ const body = await res.json();
862
+ return body && typeof body === "object" ? body : null;
863
+ })().catch(() => null);
864
+ return {
865
+ cancel: () => abort.abort(),
866
+ async within(budgetMs) {
867
+ // No time left: an answer already in hand still counts (it settles first), nothing is waited for.
868
+ if (!(budgetMs > 0))
869
+ return Promise.race([result, Promise.resolve(null)]);
870
+ let timer;
871
+ // The timer settles the race, so a fetch that ignores its signal cannot hold the row; the caller then cancels it.
872
+ const timedOut = new Promise(resolve => { timer = setTimeout(() => resolve(null), budgetMs); });
873
+ try {
874
+ return await Promise.race([result, timedOut]);
875
+ }
876
+ finally {
877
+ clearTimeout(timer);
878
+ }
879
+ },
880
+ };
881
+ }
882
+ export async function fetchAntigravityUsage() {
883
+ // Monotonic: the deadline the models' budget is measured against is a timer, which a wall-clock change does not move.
884
+ const startedAt = performance.now();
741
885
  // A CLI-observed rate limit outranks anything the quota API says. The bucket
742
886
  // summary cannot see the account-level individual cap: verified live, it
743
887
  // reported every bucket 0% used in the same minute the CLI was refusing work
@@ -763,38 +907,51 @@ async function fetchAntigravityUsage() {
763
907
  if ("error" in auth)
764
908
  return { status: "error", error: auth.error, errorI18n: auth.errorI18n, metrics: [] };
765
909
  for (const base of AGY_CLOUDCODE_URLS) {
766
- let res;
767
- try {
768
- res = await fetch(`${base}/v1internal:retrieveUserQuotaSummary`, {
769
- method: "POST",
770
- headers: {
771
- Authorization: `Bearer ${auth.token}`,
772
- "Content-Type": "application/json",
773
- "User-Agent": "antigravity",
774
- },
775
- body: "{}",
776
- signal: AbortSignal.timeout(LONGEST_SINGLE_FETCH_MS),
777
- });
778
- }
779
- catch {
780
- continue;
781
- }
782
- if (res.status === 401 || res.status === 403) {
783
- return { status: "error", error: "Token rejected. Run `agy` once to refresh the login.", errorI18n: i18n("usage.error.token_rejected", "agy"), metrics: [] };
784
- }
785
- if (!res.ok)
786
- continue; // try the other base
787
- let body;
910
+ // Alongside the summary, not after it: one more round trip in the chain would push a slow-but-healthy pair past
911
+ // the provider deadline. Cancelled when the summary fails (it never rejects).
912
+ const models = agyModels(base, auth.token);
913
+ const codeAssist = agyCodeAssist(base, auth.token);
788
914
  try {
789
- body = await res.json();
915
+ let res;
916
+ try {
917
+ res = await fetch(`${base}/v1internal:retrieveUserQuotaSummary`, {
918
+ method: "POST",
919
+ headers: {
920
+ Authorization: `Bearer ${auth.token}`,
921
+ "Content-Type": "application/json",
922
+ "User-Agent": agyUserAgent(),
923
+ },
924
+ body: "{}",
925
+ signal: AbortSignal.timeout(LONGEST_SINGLE_FETCH_MS),
926
+ });
927
+ }
928
+ catch {
929
+ continue;
930
+ }
931
+ if (res.status === 401 || res.status === 403) {
932
+ return { status: "error", error: "Token rejected. Run `agy` once to refresh the login.", errorI18n: i18n("usage.error.token_rejected", "agy"), metrics: [] };
933
+ }
934
+ if (!res.ok)
935
+ continue; // try the other base
936
+ let body;
937
+ try {
938
+ body = await res.json();
939
+ }
940
+ catch {
941
+ continue;
942
+ }
943
+ const budgetMs = providerDeadlineMs - (performance.now() - startedAt) - AGY_MODELS_DEADLINE_MARGIN_MS;
944
+ const [modelList, assist] = await Promise.all([models.within(budgetMs), codeAssist.within(budgetMs)]);
945
+ const metrics = agyPoolMetrics(agyUsageBuckets(body ?? {}, modelList));
946
+ const plan = agyPlan(assist);
947
+ return metrics.length
948
+ ? { status: "ok", plan, metrics }
949
+ : { status: "ok", plan, hint: "No quota information reported for this account.", hintI18n: i18n("usage.hint.no_quota"), metrics: [] };
790
950
  }
791
- catch {
792
- continue;
951
+ finally {
952
+ models.cancel(); // a base given up on, or a read already settled: nothing left to wait for
953
+ codeAssist.cancel();
793
954
  }
794
- const metrics = agyPoolMetrics(agyQuotaBuckets(body ?? {}));
795
- return metrics.length
796
- ? { status: "ok", plan: null, metrics }
797
- : { status: "ok", plan: null, hint: "No quota information reported for this account.", hintI18n: i18n("usage.hint.no_quota"), metrics: [] };
798
955
  }
799
956
  return { status: "error", error: "Could not reach the Cloud Code quota endpoints.", errorI18n: i18n("usage.error.unreachable", "Cloud Code quota endpoints"), metrics: [] };
800
957
  }
@@ -1434,6 +1591,8 @@ export function providersForConfig(config, base = DEFAULT_PROVIDERS) {
1434
1591
  const backendName = usageBackendForProviderId(provider.id);
1435
1592
  if (!backendName || !credentialHomeSpec(backendName))
1436
1593
  return [provider];
1594
+ if (provider.id === "claude")
1595
+ return claudeHostRows(config, provider, backendName);
1437
1596
  const profiles = effectiveCredentialProfiles(config, backendName);
1438
1597
  if (profiles.length === 0)
1439
1598
  return [provider];
@@ -1451,6 +1610,7 @@ export function providersForConfig(config, base = DEFAULT_PROVIDERS) {
1451
1610
  rows.push({
1452
1611
  id: provider.id,
1453
1612
  name: provider.id === "codex" ? `${provider.name} (default)` : provider.name,
1613
+ ...(provider.id === "codex" ? { defaultLogin: true } : {}),
1454
1614
  // Claude's shared row keeps its statusline fallback to the shared instances (#1699); others ignore the scope.
1455
1615
  fetch: () => provider.fetch(undefined, { besideProfiles: true }),
1456
1616
  });
@@ -1464,6 +1624,48 @@ export function providersForConfig(config, base = DEFAULT_PROVIDERS) {
1464
1624
  return rows;
1465
1625
  });
1466
1626
  }
1627
+ /**
1628
+ * #2236: one row per Claude login ON THE HOST, used by an instance or not — the default (shared) login and every
1629
+ * credential profile there. A subscription at its limit is exactly the one a person stops using; it must not vanish
1630
+ * because nothing runs on it (a user's first account, full, had no row once every instance moved to new profiles).
1631
+ * The shared row is "Claude (default)" beside profiles (shown whenever that login exists); a profile no instance uses
1632
+ * shows only when signed in. isHostLoginUsageProvider keeps these rows through the snapshot's running-instances filter.
1633
+ */
1634
+ function claudeHostRows(config, provider, backendName) {
1635
+ const inUse = effectiveCredentialProfiles(config, backendName);
1636
+ const profiles = [...new Set([...inUse, ...claudeProfilesOnHost()])].sort();
1637
+ if (profiles.length === 0)
1638
+ return [provider];
1639
+ const homes = profiles.map(profile => credentialProfileStoreHome(getAgendHome(), backendName, profile));
1640
+ return [
1641
+ { id: provider.id, name: `${provider.name} (default)`, defaultLogin: true, fetch: () => provider.fetch(undefined, { besideProfiles: true }) },
1642
+ ...profiles.map((profile, i) => ({
1643
+ id: `${provider.id}:${profile}`,
1644
+ name: `${provider.name} (${profile})`,
1645
+ profile,
1646
+ fetch: () => provider.fetch(homes[i], inUse.includes(profile) ? { profile } : { profile, hostOnly: true }),
1647
+ })),
1648
+ ];
1649
+ }
1650
+ /** What a row says about whose login it reads: its profile (#2014), or that it is the default login beside profiles. */
1651
+ function rowTags(p) {
1652
+ return { ...(p.profile ? { profile: p.profile } : {}), ...(p.defaultLogin ? { defaultLogin: true } : {}) };
1653
+ }
1654
+ /** #2236: the Claude credential profiles on this host (their directories), whether or not an instance uses them. */
1655
+ function claudeProfilesOnHost() {
1656
+ try {
1657
+ return readdirSync(dirname(credentialProfileHome(getAgendHome(), "claude-code", "x")), { withFileTypes: true })
1658
+ .filter(e => e.isDirectory() && isCredentialProfileName(e.name))
1659
+ .map(e => e.name);
1660
+ }
1661
+ catch {
1662
+ return [];
1663
+ }
1664
+ }
1665
+ /** #2236: a Claude login's row — kept on screen whether or not a running instance uses it. */
1666
+ export function isHostLoginUsageProvider(id) {
1667
+ return id === "claude" || id.startsWith("claude:");
1668
+ }
1467
1669
  /**
1468
1670
  * Whether at least one effective fleet binding uses the legacy shared login.
1469
1671
  *
@@ -1645,16 +1847,16 @@ export async function fetchAllUsage(config) {
1645
1847
  // Fail soft: this row says it could not be read, the rest still answer,
1646
1848
  // and the snapshot returns in bounded time.
1647
1849
  return {
1648
- id: p.id, name: p.name, ...(p.profile ? { profile: p.profile } : {}), status: "error",
1850
+ id: p.id, name: p.name, ...rowTags(p), status: "error",
1649
1851
  error: `Could not reach ${p.name}.`,
1650
1852
  errorI18n: i18n("usage.error.unreachable", p.name),
1651
1853
  metrics: [],
1652
1854
  };
1653
1855
  }
1654
- return { id: p.id, name: p.name, ...(p.profile ? { profile: p.profile } : {}), ...outcome };
1856
+ return { id: p.id, name: p.name, ...rowTags(p), ...outcome };
1655
1857
  }
1656
1858
  catch (err) {
1657
- return { id: p.id, name: p.name, ...(p.profile ? { profile: p.profile } : {}), status: "error", error: String(err?.message ?? err), metrics: [] };
1859
+ return { id: p.id, name: p.name, ...rowTags(p), status: "error", error: String(err?.message ?? err), metrics: [] };
1658
1860
  }
1659
1861
  }));
1660
1862
  return {