@songsid/agend 2.3.5-alpha.5 → 2.3.5-alpha.7

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 (410) hide show
  1. package/THIRD_PARTY_NOTICES.md +0 -1
  2. package/dist/accounts-profiles.d.ts +96 -0
  3. package/dist/accounts-profiles.js +178 -0
  4. package/dist/accounts-profiles.js.map +1 -0
  5. package/dist/accounts-signout.d.ts +59 -0
  6. package/dist/accounts-signout.js +184 -0
  7. package/dist/accounts-signout.js.map +1 -0
  8. package/dist/accounts-view.d.ts +54 -0
  9. package/dist/accounts-view.js +55 -11
  10. package/dist/accounts-view.js.map +1 -1
  11. package/dist/agent-workspace.d.ts +11 -0
  12. package/dist/agent-workspace.js +28 -0
  13. package/dist/agent-workspace.js.map +1 -1
  14. package/dist/auth-api.js +38 -5
  15. package/dist/auth-api.js.map +1 -1
  16. package/dist/authority/session-authorizations.d.ts +2 -0
  17. package/dist/authority/session-authorizations.js +7 -1
  18. package/dist/authority/session-authorizations.js.map +1 -1
  19. package/dist/authority/web-authority.d.ts +13 -0
  20. package/dist/authority/web-authority.js +12 -0
  21. package/dist/authority/web-authority.js.map +1 -1
  22. package/dist/backend/claude-code.js +47 -9
  23. package/dist/backend/claude-code.js.map +1 -1
  24. package/dist/backend/codex.js +1 -0
  25. package/dist/backend/codex.js.map +1 -1
  26. package/dist/backend/kiro.js +1 -1
  27. package/dist/backend/kiro.js.map +1 -1
  28. package/dist/backend/types.d.ts +2 -0
  29. package/dist/backend/types.js.map +1 -1
  30. package/dist/build-provenance.json +1 -1
  31. package/dist/bundled-tmux-guard.d.ts +19 -0
  32. package/dist/bundled-tmux-guard.js +83 -0
  33. package/dist/bundled-tmux-guard.js.map +1 -0
  34. package/dist/channel/access-manager.d.ts +1 -6
  35. package/dist/channel/access-manager.js +4 -94
  36. package/dist/channel/access-manager.js.map +1 -1
  37. package/dist/channel/adapters/discord.d.ts +0 -2
  38. package/dist/channel/adapters/discord.js +0 -8
  39. package/dist/channel/adapters/discord.js.map +1 -1
  40. package/dist/channel/adapters/telegram.d.ts +0 -3
  41. package/dist/channel/adapters/telegram.js +1 -30
  42. package/dist/channel/adapters/telegram.js.map +1 -1
  43. package/dist/channel/types.d.ts +0 -2
  44. package/dist/classic-bindings.d.ts +13 -0
  45. package/dist/classic-bindings.js +28 -2
  46. package/dist/classic-bindings.js.map +1 -1
  47. package/dist/classic-channel-manager.d.ts +2 -0
  48. package/dist/classic-channel-manager.js +5 -1
  49. package/dist/classic-channel-manager.js.map +1 -1
  50. package/dist/cli.js +117 -30
  51. package/dist/cli.js.map +1 -1
  52. package/dist/config-validator.js +11 -0
  53. package/dist/config-validator.js.map +1 -1
  54. package/dist/config.js +3 -1
  55. package/dist/config.js.map +1 -1
  56. package/dist/daemon.d.ts +27 -2
  57. package/dist/daemon.js +107 -6
  58. package/dist/daemon.js.map +1 -1
  59. package/dist/doctor.js +3 -4
  60. package/dist/doctor.js.map +1 -1
  61. package/dist/e2e-isolation.js +5 -2
  62. package/dist/e2e-isolation.js.map +1 -1
  63. package/dist/fleet-control-audit.d.ts +1 -1
  64. package/dist/fleet-manager.d.ts +188 -1
  65. package/dist/fleet-manager.js +1059 -79
  66. package/dist/fleet-manager.js.map +1 -1
  67. package/dist/general-knowledge/skills/concepts/SKILL.md +22 -7
  68. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +10 -0
  69. package/dist/general-knowledge/steering/core-rules.md +6 -4
  70. package/dist/hub/buttons.js +4 -2
  71. package/dist/hub/buttons.js.map +1 -1
  72. package/dist/hub/catalog.d.ts +1 -1
  73. package/dist/hub/catalog.js +82 -15
  74. package/dist/hub/catalog.js.map +1 -1
  75. package/dist/hub/compose/server.d.ts +4 -1
  76. package/dist/hub/compose/server.js +30 -3
  77. package/dist/hub/compose/server.js.map +1 -1
  78. package/dist/hub/directory/directory.d.ts +1 -1
  79. package/dist/hub/directory/directory.js +142 -21
  80. package/dist/hub/directory/directory.js.map +1 -1
  81. package/dist/hub/directory/groups.d.ts +29 -0
  82. package/dist/hub/directory/groups.js +29 -0
  83. package/dist/hub/directory/groups.js.map +1 -0
  84. package/dist/hub/directory/index.d.ts +2 -1
  85. package/dist/hub/directory/types.d.ts +12 -2
  86. package/dist/hub/directory/types.js.map +1 -1
  87. package/dist/hub/group-policy/admin-context.d.ts +23 -0
  88. package/dist/hub/group-policy/admin-context.js +52 -0
  89. package/dist/hub/group-policy/admin-context.js.map +1 -0
  90. package/dist/hub/group-policy/admin-dto.d.ts +235 -0
  91. package/dist/hub/group-policy/admin-dto.js +55 -0
  92. package/dist/hub/group-policy/admin-dto.js.map +1 -0
  93. package/dist/hub/group-policy/admin-inventory.d.ts +24 -0
  94. package/dist/hub/group-policy/admin-inventory.js +72 -0
  95. package/dist/hub/group-policy/admin-inventory.js.map +1 -0
  96. package/dist/hub/group-policy/admin-read.d.ts +21 -0
  97. package/dist/hub/group-policy/admin-read.js +90 -0
  98. package/dist/hub/group-policy/admin-read.js.map +1 -0
  99. package/dist/hub/group-policy/authorization.d.ts +43 -0
  100. package/dist/hub/group-policy/authorization.js +170 -0
  101. package/dist/hub/group-policy/authorization.js.map +1 -0
  102. package/dist/hub/group-policy/model.d.ts +56 -0
  103. package/dist/hub/group-policy/model.js +46 -0
  104. package/dist/hub/group-policy/model.js.map +1 -0
  105. package/dist/hub/group-policy/resources.d.ts +60 -0
  106. package/dist/hub/group-policy/resources.js +191 -0
  107. package/dist/hub/group-policy/resources.js.map +1 -0
  108. package/dist/hub/group-policy/store.d.ts +58 -0
  109. package/dist/hub/group-policy/store.js +155 -0
  110. package/dist/hub/group-policy/store.js.map +1 -0
  111. package/dist/hub/http/compose.js +9 -9
  112. package/dist/hub/http/compose.js.map +1 -1
  113. package/dist/hub/http/core.d.ts +23 -3
  114. package/dist/hub/http/core.js +138 -5
  115. package/dist/hub/http/core.js.map +1 -1
  116. package/dist/hub/http/deps.d.ts +3 -0
  117. package/dist/hub/pairing.d.ts +3 -1
  118. package/dist/hub/pairing.js +6 -3
  119. package/dist/hub/pairing.js.map +1 -1
  120. package/dist/hub/policy.d.ts +3 -1
  121. package/dist/hub/policy.js +13 -6
  122. package/dist/hub/policy.js.map +1 -1
  123. package/dist/hub/rooms.d.ts +1 -0
  124. package/dist/hub/rooms.js +76 -26
  125. package/dist/hub/rooms.js.map +1 -1
  126. package/dist/hub/server.d.ts +2 -0
  127. package/dist/hub/server.js +12 -2
  128. package/dist/hub/server.js.map +1 -1
  129. package/dist/hub/sessions.js +2 -1
  130. package/dist/hub/sessions.js.map +1 -1
  131. package/dist/hub/types.d.ts +2 -0
  132. package/dist/instance-config-impact.js +4 -3
  133. package/dist/instance-config-impact.js.map +1 -1
  134. package/dist/instance-lifecycle.d.ts +17 -0
  135. package/dist/instance-lifecycle.js +38 -1
  136. package/dist/instance-lifecycle.js.map +1 -1
  137. package/dist/locale.js +45 -18
  138. package/dist/locale.js.map +1 -1
  139. package/dist/login-controller.d.ts +5 -0
  140. package/dist/login-controller.js +11 -0
  141. package/dist/login-controller.js.map +1 -1
  142. package/dist/login-window-lock.d.ts +2 -1
  143. package/dist/login-window-lock.js.map +1 -1
  144. package/dist/ls-rows.d.ts +1 -1
  145. package/dist/ls-rows.js +1 -1
  146. package/dist/ls-rows.js.map +1 -1
  147. package/dist/machine-accounts.d.ts +110 -0
  148. package/dist/machine-accounts.js +229 -0
  149. package/dist/machine-accounts.js.map +1 -0
  150. package/dist/machine-signins.d.ts +89 -0
  151. package/dist/machine-signins.js +182 -0
  152. package/dist/machine-signins.js.map +1 -0
  153. package/dist/muse-usage-relay.d.ts +2 -0
  154. package/dist/muse-usage-relay.js +5 -3
  155. package/dist/muse-usage-relay.js.map +1 -1
  156. package/dist/needs-you-hub.d.ts +3 -0
  157. package/dist/needs-you-hub.js +13 -3
  158. package/dist/needs-you-hub.js.map +1 -1
  159. package/dist/needs-you.d.ts +35 -2
  160. package/dist/needs-you.js +19 -0
  161. package/dist/needs-you.js.map +1 -1
  162. package/dist/quickstart.js +7 -18
  163. package/dist/quickstart.js.map +1 -1
  164. package/dist/quiet-run.d.ts +31 -0
  165. package/dist/quiet-run.js +50 -0
  166. package/dist/quiet-run.js.map +1 -0
  167. package/dist/quota-notice-config.d.ts +22 -0
  168. package/dist/quota-notice-config.js +41 -0
  169. package/dist/quota-notice-config.js.map +1 -0
  170. package/dist/runtime-api.d.ts +13 -0
  171. package/dist/runtime-api.js +134 -2
  172. package/dist/runtime-api.js.map +1 -1
  173. package/dist/runtime-build-info.d.ts +2 -1
  174. package/dist/runtime-build-info.js +7 -3
  175. package/dist/runtime-build-info.js.map +1 -1
  176. package/dist/runtime-cli-install.d.ts +153 -0
  177. package/dist/runtime-cli-install.js +675 -0
  178. package/dist/runtime-cli-install.js.map +1 -0
  179. package/dist/runtime-cli.js +157 -12
  180. package/dist/runtime-cli.js.map +1 -1
  181. package/dist/runtime-client.d.ts +64 -2
  182. package/dist/runtime-client.js +277 -20
  183. package/dist/runtime-client.js.map +1 -1
  184. package/dist/runtime-coordinator.d.ts +10 -1
  185. package/dist/runtime-coordinator.js +93 -2
  186. package/dist/runtime-coordinator.js.map +1 -1
  187. package/dist/runtime-credential-profiles.d.ts +11 -2
  188. package/dist/runtime-credential-profiles.js +28 -4
  189. package/dist/runtime-credential-profiles.js.map +1 -1
  190. package/dist/runtime-install.js +9 -6
  191. package/dist/runtime-install.js.map +1 -1
  192. package/dist/runtime-pane-link.js +2 -1
  193. package/dist/runtime-pane-link.js.map +1 -1
  194. package/dist/runtime-pane-service.js +2 -2
  195. package/dist/runtime-pane-service.js.map +1 -1
  196. package/dist/runtime-pane-store.d.ts +10 -0
  197. package/dist/runtime-pane-store.js +13 -1
  198. package/dist/runtime-pane-store.js.map +1 -1
  199. package/dist/runtime-profile-ownership.d.ts +66 -0
  200. package/dist/runtime-profile-ownership.js +391 -0
  201. package/dist/runtime-profile-ownership.js.map +1 -0
  202. package/dist/runtime-protocol.d.ts +88 -2
  203. package/dist/runtime-protocol.js +40 -0
  204. package/dist/runtime-protocol.js.map +1 -1
  205. package/dist/runtime-remote-accounts.d.ts +197 -0
  206. package/dist/runtime-remote-accounts.js +663 -0
  207. package/dist/runtime-remote-accounts.js.map +1 -0
  208. package/dist/runtime-remote-setup.d.ts +105 -0
  209. package/dist/runtime-remote-setup.js +529 -0
  210. package/dist/runtime-remote-setup.js.map +1 -0
  211. package/dist/runtime-signin-transport.d.ts +39 -0
  212. package/dist/runtime-signin-transport.js +110 -0
  213. package/dist/runtime-signin-transport.js.map +1 -0
  214. package/dist/runtime-signin.d.ts +132 -0
  215. package/dist/runtime-signin.js +289 -0
  216. package/dist/runtime-signin.js.map +1 -0
  217. package/dist/runtime-update-attention.d.ts +4 -0
  218. package/dist/runtime-update-attention.js +11 -0
  219. package/dist/runtime-update-attention.js.map +1 -0
  220. package/dist/runtime-update-controller.d.ts +75 -0
  221. package/dist/runtime-update-controller.js +691 -0
  222. package/dist/runtime-update-controller.js.map +1 -0
  223. package/dist/runtime-update-ipc.d.ts +42 -0
  224. package/dist/runtime-update-ipc.js +144 -0
  225. package/dist/runtime-update-ipc.js.map +1 -0
  226. package/dist/runtime-update-journal.d.ts +5 -0
  227. package/dist/runtime-update-journal.js +7 -0
  228. package/dist/runtime-update-journal.js.map +1 -1
  229. package/dist/runtime-update-lock.js +17 -2
  230. package/dist/runtime-update-lock.js.map +1 -1
  231. package/dist/runtime-update-status.d.ts +30 -0
  232. package/dist/runtime-update-status.js +31 -0
  233. package/dist/runtime-update-status.js.map +1 -0
  234. package/dist/settings-api.js +6 -2
  235. package/dist/settings-api.js.map +1 -1
  236. package/dist/settings-change.d.ts +10 -0
  237. package/dist/settings-change.js +25 -1
  238. package/dist/settings-change.js.map +1 -1
  239. package/dist/settings-confirmation.d.ts +25 -1
  240. package/dist/settings-confirmation.js +11 -3
  241. package/dist/settings-confirmation.js.map +1 -1
  242. package/dist/settings-effect.js +18 -6
  243. package/dist/settings-effect.js.map +1 -1
  244. package/dist/settings-http-confirmation.d.ts +21 -0
  245. package/dist/settings-http-confirmation.js +74 -3
  246. package/dist/settings-http-confirmation.js.map +1 -1
  247. package/dist/settings-instance-patch.js +1 -1
  248. package/dist/settings-instance-patch.js.map +1 -1
  249. package/dist/setup-wizard.js +3 -5
  250. package/dist/setup-wizard.js.map +1 -1
  251. package/dist/signin-keepalive.d.ts +203 -0
  252. package/dist/signin-keepalive.js +652 -0
  253. package/dist/signin-keepalive.js.map +1 -0
  254. package/dist/structured-signin-transport.js +4 -0
  255. package/dist/structured-signin-transport.js.map +1 -1
  256. package/dist/structured-signin.d.ts +7 -0
  257. package/dist/structured-signin.js +4 -2
  258. package/dist/structured-signin.js.map +1 -1
  259. package/dist/tips.js +4 -4
  260. package/dist/tips.js.map +1 -1
  261. package/dist/tmux-binary.d.ts +23 -23
  262. package/dist/tmux-binary.js +35 -46
  263. package/dist/tmux-binary.js.map +1 -1
  264. package/dist/tmux-exec-helper.js +3 -3
  265. package/dist/tmux-exec-helper.js.map +1 -1
  266. package/dist/tmux-legacy.d.ts +94 -0
  267. package/dist/tmux-legacy.js +309 -0
  268. package/dist/tmux-legacy.js.map +1 -0
  269. package/dist/tmux-manager.d.ts +7 -1
  270. package/dist/tmux-manager.js +21 -11
  271. package/dist/tmux-manager.js.map +1 -1
  272. package/dist/tmux-rollback.d.ts +31 -0
  273. package/dist/tmux-rollback.js +72 -0
  274. package/dist/tmux-rollback.js.map +1 -0
  275. package/dist/tmux-server.d.ts +102 -0
  276. package/dist/tmux-server.js +248 -0
  277. package/dist/tmux-server.js.map +1 -0
  278. package/dist/transcript-monitor.js +43 -5
  279. package/dist/transcript-monitor.js.map +1 -1
  280. package/dist/transcript-records.d.ts +2 -1
  281. package/dist/transcript-records.js +3 -0
  282. package/dist/transcript-records.js.map +1 -1
  283. package/dist/transcript-sources.js +3 -0
  284. package/dist/transcript-sources.js.map +1 -1
  285. package/dist/types.d.ts +5 -0
  286. package/dist/types.js.map +1 -1
  287. package/dist/ui/accounts-keepalive.js +113 -0
  288. package/dist/ui/accounts-manage.js +237 -0
  289. package/dist/ui/accounts-view.js +191 -36
  290. package/dist/ui/agent-runtime-settings.js +2 -1
  291. package/dist/ui/app.html +8 -1
  292. package/dist/ui/backend-signin.js +12 -3
  293. package/dist/ui/general-location.js +28 -14
  294. package/dist/ui/hub-attachments.js +90 -0
  295. package/dist/ui/hub-chat-store.js +11 -5
  296. package/dist/ui/hub-client.js +20 -1
  297. package/dist/ui/hub-grant-strings.js +13 -0
  298. package/dist/ui/hub-owner-strings.js +6 -2
  299. package/dist/ui/hub-preview.js +101 -0
  300. package/dist/ui/hub-strings.js +4 -2
  301. package/dist/ui/machine-signin.js +56 -0
  302. package/dist/ui/panel-fleet.js +1 -1
  303. package/dist/ui/panel-hub.js +194 -54
  304. package/dist/ui/panel-log.js +2 -2
  305. package/dist/ui/panel-needs.js +14 -8
  306. package/dist/ui/panel-notices.js +4 -3
  307. package/dist/ui/panel-runtimes.js +32 -11
  308. package/dist/ui/panel-settings.js +18 -24
  309. package/dist/ui/panel-windows-agent.js +2 -1
  310. package/dist/ui/preview-pages.js +3 -41
  311. package/dist/ui/preview-panel-actions.js +3 -161
  312. package/dist/ui/preview-panel.js +10 -557
  313. package/dist/ui/preview-versions.js +3 -155
  314. package/dist/ui/runtime-cli-install.js +134 -0
  315. package/dist/ui/runtime-update-commands.d.ts +2 -0
  316. package/dist/ui/runtime-update-commands.js +11 -0
  317. package/dist/ui/runtime-update-status.js +53 -0
  318. package/dist/ui/search-dialog.js +3 -2
  319. package/dist/ui/settings-confirm.js +28 -0
  320. package/dist/ui/settings-devices.js +6 -10
  321. package/dist/ui/settings-guests.js +3 -2
  322. package/dist/ui/settings-hub-browser-certificate.js +2 -0
  323. package/dist/ui/settings-hub-membership.js +17 -11
  324. package/dist/ui/settings-hub-retention.js +2 -0
  325. package/dist/ui/settings-hub-section.js +35 -0
  326. package/dist/ui/settings-hub.js +17 -5
  327. package/dist/ui/settings-layout.js +6 -2
  328. package/dist/ui/settings-named-test.js +2 -2
  329. package/dist/ui/settings-outside.js +1 -1
  330. package/dist/ui/settings-quota-notice.js +102 -0
  331. package/dist/ui/settings-registry.js +4 -0
  332. package/dist/ui/settings-strings.js +6 -6
  333. package/dist/ui/settings-web-authority.js +2 -1
  334. package/dist/ui/shared/accounts-keepalive.css +7 -0
  335. package/dist/ui/shared/accounts.css +13 -0
  336. package/dist/ui/shared/app-i18n.js +4 -2
  337. package/dist/ui/shared/app-route.js +1 -1
  338. package/dist/ui/shared/app-shell.js +111 -8
  339. package/dist/ui/shared/app-store.js +2 -2
  340. package/dist/ui/shared/app.css +29 -0
  341. package/dist/ui/shared/app.js +2 -1
  342. package/dist/ui/shared/chat-strings.js +8 -8
  343. package/dist/ui/shared/hub-chat.css +1 -0
  344. package/dist/ui/shared/hub-owner.css +3 -3
  345. package/dist/ui/shared/hub-signin.css +24 -0
  346. package/dist/ui/shared/loading.css +37 -0
  347. package/dist/ui/shared/preview-pages.js +41 -0
  348. package/dist/ui/shared/preview-panel-actions.js +168 -0
  349. package/dist/ui/shared/preview-panel.js +565 -0
  350. package/dist/ui/shared/preview-versions.js +155 -0
  351. package/dist/ui/shared/runtime-install.css +4 -0
  352. package/dist/ui/shared/signin.js +68 -6
  353. package/dist/ui/shared/ui-states.js +14 -3
  354. package/dist/ui/shared/view-strings.js +4 -4
  355. package/dist/ui/shared/workspace-follow.css +19 -0
  356. package/dist/ui/signin.html +7 -3
  357. package/dist/ui/structured-signin.js +43 -11
  358. package/dist/ui/workspace-follow-strings.js +28 -0
  359. package/dist/ui/workspace-panel.js +225 -36
  360. package/dist/update-install.d.ts +7 -0
  361. package/dist/update-install.js +23 -0
  362. package/dist/update-install.js.map +1 -1
  363. package/dist/usage/providers.d.ts +6 -0
  364. package/dist/usage/providers.js +18 -9
  365. package/dist/usage/providers.js.map +1 -1
  366. package/dist/usage/quota-notices.d.ts +38 -0
  367. package/dist/usage/quota-notices.js +160 -0
  368. package/dist/usage/quota-notices.js.map +1 -0
  369. package/dist/usage/usage-api.d.ts +1 -0
  370. package/dist/usage/usage-api.js +16 -0
  371. package/dist/usage/usage-api.js.map +1 -1
  372. package/dist/web-api.d.ts +38 -0
  373. package/dist/web-api.js +357 -14
  374. package/dist/web-api.js.map +1 -1
  375. package/dist/web-login.d.ts +35 -1
  376. package/dist/web-login.js +51 -5
  377. package/dist/web-login.js.map +1 -1
  378. package/dist/web-remote-access.d.ts +6 -0
  379. package/dist/web-remote-access.js +10 -1
  380. package/dist/web-remote-access.js.map +1 -1
  381. package/dist/web-session.d.ts +11 -0
  382. package/dist/web-session.js +38 -1
  383. package/dist/web-session.js.map +1 -1
  384. package/dist/web-shell-routes.d.ts +1 -1
  385. package/dist/web-shell-routes.js +1 -1
  386. package/dist/web-shell-routes.js.map +1 -1
  387. package/dist/web-signin-link.d.ts +42 -0
  388. package/dist/web-signin-link.js +110 -0
  389. package/dist/web-signin-link.js.map +1 -0
  390. package/dist/windows-cli-api.d.ts +14 -0
  391. package/dist/windows-cli-api.js +21 -0
  392. package/dist/windows-cli-api.js.map +1 -1
  393. package/dist/windows-cli-worker.d.ts +3 -1
  394. package/dist/windows-cli-worker.js +18 -3
  395. package/dist/windows-cli-worker.js.map +1 -1
  396. package/dist/workspace-follow-parse.d.ts +36 -0
  397. package/dist/workspace-follow-parse.js +208 -0
  398. package/dist/workspace-follow-parse.js.map +1 -0
  399. package/dist/workspace-follow-records.d.ts +17 -0
  400. package/dist/workspace-follow-records.js +88 -0
  401. package/dist/workspace-follow-records.js.map +1 -0
  402. package/dist/workspace-follow.d.ts +41 -0
  403. package/dist/workspace-follow.js +143 -0
  404. package/dist/workspace-follow.js.map +1 -0
  405. package/dist/wsl-detect.d.ts +1 -0
  406. package/dist/wsl-detect.js +20 -0
  407. package/dist/wsl-detect.js.map +1 -0
  408. package/launcher/tmux-bundle.cjs +26 -10
  409. package/package.json +7 -2
  410. package/templates/runtime-install/install.ps1 +154 -13
@@ -1,5 +1,6 @@
1
1
  // Host-owner Settings only. Own the copy here so an open tab's older Settings strings still work.
2
2
  import { html, useEffect, useState } from "/assets/app-html.js";
3
+ import { Skeleton } from "/assets/ui-states.js";
3
4
  import { register, t } from "/assets/app-i18n.js";
4
5
  import { api, confirmedWrite } from "./settings-confirm.js";
5
6
  register("hubRetention", {
@@ -43,6 +44,7 @@ export function HubRetentionSettings() {
43
44
  };
44
45
  return html`<section class="card hub-retention"><h3>${copy("title")}</h3>
45
46
  <p class="note">${copy("hint")}</p>
47
+ ${!policy && !messageKey ? html`<${Skeleton} variant="form" lines=${4} />` : null}
46
48
  ${policy ? html`<form class="form" onSubmit=${save}><div class="grid2">
47
49
  <label class="field">${copy("content")}<input type="number" min="1" max="3650" step="1" value=${content} disabled=${busy} onInput=${e => setContent(e.target.value)} /></label>
48
50
  <label class="field">${copy("events")}<input type="number" min="1" max="3650" step="1" value=${events} disabled=${busy} onInput=${e => setEvents(e.target.value)} /></label>
@@ -0,0 +1,35 @@
1
+ // alpha.6 feedback (#2): Settings → Hub. Everything about this fleet and a Hub in one section, found by search: the
2
+ // membership switch, then (once it is on and the page is marked a member) Connect to a Hub — address and pairing code,
3
+ // the fingerprint to compare, the approval steps, then paired (open, disconnect) — with the agents shared there; and on
4
+ // a fleet that runs a Hub itself, its retention and browser-certificate cards. Each card stays its own lazy module, as
5
+ // it was under Access & security. Never over the public link: the member handlers are this computer's owner's only.
6
+ import { html, useEffect, useState } from "/assets/app-html.js";
7
+ import { register, t } from "/assets/app-i18n.js";
8
+
9
+ register("settingsHubSection", {
10
+ en: {
11
+ publicLink: "Hub settings are only on this fleet's own dashboard, not over the public link.",
12
+ relatedTitle: "Hub", relatedHint: "Connect this fleet to a team Hub and choose which agents to share.",
13
+ },
14
+ "zh-TW": {
15
+ publicLink: "Hub 設定只在這個 Fleet 自己的儀表板上提供,公開連結上沒有。",
16
+ relatedTitle: "Hub", relatedHint: "將這個 Fleet 連線至團隊 Hub,並選擇要分享的 Agent。",
17
+ },
18
+ });
19
+ export const hubSectionText = (key) => t(`settingsHubSection.${key}`);
20
+
21
+ /** A card from its own lazy module (it loads only when this section is drawn). */
22
+ function Lazy({ load, pick }) {
23
+ const [Card, setCard] = useState(null);
24
+ useEffect(() => { let live = true; load().then((m) => { if (live) setCard(() => pick(m)); }, () => {}); return () => { live = false; }; }, []);
25
+ return Card ? html`<${Card} />` : null;
26
+ }
27
+
28
+ export function HubSection({ overPublicLink, hubHost }) {
29
+ if (overPublicLink) return html`<section class="card s-group" id="hub-public-link"><p class="note">${hubSectionText("publicLink")}</p></section>`;
30
+ return html`<div class="s-hub-section">
31
+ <${Lazy} load=${() => import("./settings-hub-membership.js")} pick=${(m) => m.HubMembershipSettings} />
32
+ ${hubHost ? html`<${Lazy} load=${() => import("./settings-hub-retention.js")} pick=${(m) => m.HubRetentionSettings} />
33
+ <${Lazy} load=${() => import("./settings-hub-browser-certificate.js")} pick=${(m) => m.HubBrowserCertificateSettings} />` : null}
34
+ </div>`;
35
+ }
@@ -5,6 +5,7 @@
5
5
  // this fleet's own agents with a Share switch each, against the revision shown (a stale tab gets a conflict, never a
6
6
  // silent widening). Everything goes through hubClient(); until slice 1 that is a stub, and the card says so.
7
7
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
8
+ import { Skeleton, ErrorState } from "/assets/ui-states.js";
8
9
  import { Icon } from "/assets/ui-icons.js";
9
10
  import { confirmDialog } from "/assets/ui-confirm.js";
10
11
  import { compareGroups, hubClient, safeWebOrigin, ADDRESS_HINT, CODE_HINT } from "./hub-client.js";
@@ -16,6 +17,8 @@ const CONNECT_ERRORS = { address: "errAddress", code: "errCode", busy: "errBusy"
16
17
  const HOLDS = new Set(["unknown_outcome", "expired", "unsaved", "refused", "revoked", "disconnected"]);
17
18
  const PUBLISH_ERRORS = { conflict: "errConflict", unsaved: "errUnsaved", not_paired: "errNotPaired", not_enforceable: "agentNotShareable",
18
19
  unknown_view: "agentNotShareable", limit: "errLimit", unavailable: "notAvailable" };
20
+ // The switcher may have cached hub-strings before this action existed. Its original Allow word is still available.
21
+ const allowOnHubLabel = () => { const label = hw("allowOnHub"); return label === "hub.allowOnHub" ? `${hw("allow")}…` : label; };
19
22
 
20
23
  /** A fingerprint: its first 128 bits in groups people compare, the whole digest on request. */
21
24
  function Fingerprint({ label, fp }) {
@@ -32,14 +35,19 @@ function Fingerprint({ label, fp }) {
32
35
  export function HubConnectCard() {
33
36
  const client = hubClient();
34
37
  const [pairing, setPairing] = useState(null);
38
+ const [readError, setReadError] = useState(false);
35
39
  const [form, setForm] = useState({ address: "", code: "" });
36
40
  const [busy, setBusy] = useState(false);
37
41
  const [msg, setMsg] = useState(null);
38
42
  const live = useRef(true);
43
+ const readPairing = () => {
44
+ setReadError(false);
45
+ return client.pairing().then((p) => { if (live.current) setPairing(p); }, () => { if (live.current) setReadError(true); });
46
+ };
39
47
  useEffect(() => {
40
48
  linkHubCss();
41
49
  live.current = true;
42
- client.pairing().then((p) => { if (live.current) setPairing(p); }, () => {});
50
+ readPairing();
43
51
  const off = client.subscribe((p) => { if (live.current) setPairing(p); });
44
52
  return () => { live.current = false; off(); };
45
53
  }, []);
@@ -69,7 +77,7 @@ export function HubConnectCard() {
69
77
 
70
78
  const p = pairing;
71
79
  let body = null;
72
- if (!p) body = null;
80
+ if (!p) body = readError ? html`<${ErrorState} message=${hw("errFailed")} onRetry=${readPairing} />` : html`<${Skeleton} variant="form" lines=${4} />`;
73
81
  else if (p.state === "unpaired") {
74
82
  const addressOk = ADDRESS_HINT.test(form.address.trim()), codeOk = CODE_HINT.test(form.code.trim());
75
83
  body = html`<form class="form hub-connect" onSubmit=${(e) => { e.preventDefault(); connect(); }}>
@@ -141,7 +149,7 @@ export function HubConnectCard() {
141
149
  ${client.stub ? html`<p class="note hub-preview" role="note">${hw("preview")}</p>` : null}
142
150
  ${body}
143
151
  ${msg ? html`<p class=${msg.error ? "err" : "note"} role=${msg.error ? "alert" : "status"}>${msg.text}</p>` : null}
144
- ${p && p.state === "paired" ? html`<${HubExposures} client=${client} />` : null}
152
+ ${p && p.state === "paired" ? html`<${HubExposures} key=${`${p.binding}|${p.hub.hubId}|${p.hub.fingerprint?.digest}|${safeWebOrigin(p)}`} client=${client} pairing=${p} />` : null}
145
153
  </section>`;
146
154
  }
147
155
 
@@ -150,12 +158,13 @@ export function HubConnectCard() {
150
158
  * itself (docs/design/hub-representative-agent.md): switching on sends AGENT_CHOICE for the owner's confirmation; a row
151
159
  * shared under the older restricted mode says so and offers "Share again" (a new, confirmed revision).
152
160
  */
153
- function HubExposures({ client }) {
161
+ function HubExposures({ client, pairing }) {
154
162
  const [rows, setRows] = useState(null);
163
+ const [readError, setReadError] = useState(false);
155
164
  const [busy, setBusy] = useState(null);
156
165
  const [msg, setMsg] = useState(null);
157
166
  const live = useRef(true);
158
- const load = () => client.exposures().then((r) => { if (live.current) setRows(r); }, () => { if (live.current) setRows([]); });
167
+ const load = () => { setReadError(false); return client.exposures().then((r) => { if (live.current) setRows(r); }, () => { if (live.current) setReadError(true); }); };
159
168
  useEffect(() => { live.current = true; load(); return () => { live.current = false; }; }, []);
160
169
  const toggle = async (row, on) => {
161
170
  if (busy) return;
@@ -173,6 +182,7 @@ function HubExposures({ client }) {
173
182
  return html`<div class="hub-exposures">
174
183
  <h4>${hw("sharedTitle")}</h4>
175
184
  <p class="note">${hw("agentLead")}</p>
185
+ ${readError ? html`<${ErrorState} message=${hw("errFailed")} onRetry=${load} />` : !rows ? html`<${Skeleton} variant="rows" lines=${3} />` : null}
176
186
  ${rows && !rows.length ? html`<p class="note">${hw("noAgents")}</p>` : null}
177
187
  ${rows && rows.length ? html`<ul class="hub-exposure-list">${rows.map((row) => html`<li key=${row.agent} class=${`hub-exposure${row.state === "published" ? " is-shared" : ""}`}>
178
188
  <label class="hub-exposure-main">
@@ -190,6 +200,8 @@ function HubExposures({ client }) {
190
200
  : row.policy ? html`<small class="hub-exposure-why">${hw("policy", row.policy.dataView, row.policy.tools.join(", ") || "—")}</small>` : null}
191
201
  ${!row.enforceable && row.state !== "frozen" && guidanceFor(row.reason)
192
202
  ? html`<small class="hub-exposure-why hub-provider-guidance">${hw(guidanceFor(row.reason))}</small>` : null}
203
+ ${row.state === "published" && !row.pending && /^[a-f0-9-]{36}$/.test(row.exposureId || "") && safeWebOrigin(pairing)
204
+ ? html`<div class="field-row"><a class="btn btn-sm" href=${`${safeWebOrigin(pairing)}/ui/hub/exposures?agent=${encodeURIComponent(row.exposureId)}&grant=1`} target="_blank" rel="noopener noreferrer">${allowOnHubLabel()}</a></div>` : null}
193
205
  </li>`)}</ul>` : null}
194
206
  ${msg ? html`<p class=${msg.error ? "err" : "note"} role=${msg.error ? "alert" : "status"}>${msg.text}</p>` : null}
195
207
  </div>`;
@@ -16,6 +16,8 @@ register("settingsLayout", {
16
16
  "lead_web-dashboard": "Manage fleet-wide dashboard features, branding and resource limits.",
17
17
  lead_access: "Manage sign-in, web authority, guests and sharing.",
18
18
  lead_advanced: "Inspect and edit fleet configuration, with effective values kept separate.",
19
+ lead_hub: "Connect this fleet to a team Hub, compare its fingerprint, and choose which agents to share there.",
20
+ lead_notifications: "Choose when account usage reminders are sent, and to whom.",
19
21
  editor: "Configuration editor", effective: "Effective settings (read only)",
20
22
  aiAccounts: "AI accounts and keys", aiAccountsHint: "Sign-ins and supported provider keys on the AgEnD host. Windows CLI status is shown under Runtime.",
21
23
  classicDefaults: "ClassicBot defaults and access",
@@ -30,6 +32,8 @@ register("settingsLayout", {
30
32
  "lead_web-dashboard": "管理整個 Fleet 的網頁功能、品牌與資源限制。",
31
33
  lead_access: "管理登入、網頁授權、訪客與對外分享。",
32
34
  lead_advanced: "檢視與編輯 Fleet 設定,並區分目前生效的唯讀內容。",
35
+ lead_hub: "將這個 Fleet 連線至團隊 Hub、比對指紋,並選擇要在那裡分享的 Agent。",
36
+ lead_notifications: "設定帳號用量提醒的時機與傳送對象。",
33
37
  editor: "設定編輯器", effective: "生效設定(唯讀)",
34
38
  aiAccounts: "AI 帳號與金鑰", aiAccountsHint: "管理 AgEnD 主機的登入與支援的供應商金鑰;Windows CLI 狀態請到 Runtime 查看。",
35
39
  classicDefaults: "ClassicBot 預設行為與存取",
@@ -39,13 +43,13 @@ register("settingsLayout", {
39
43
  register("settingsLayout", {
40
44
  en: {
41
45
  aiAccounts: "AI sign-ins and API keys", aiAccountsSummary: "Host CLI sign-ins and provider API keys, managed separately.",
42
- aiHostScope: "Credentials on the AgEnD host", aiAccountsHint: "These sign-ins and keys belong to the host running AgEnD.", aiWindowsLink: "Manage Windows computers and their CLIs in Runtime",
46
+ aiHostScope: "Credentials on the AgEnD host and paired computers", aiAccountsHint: "Sign-ins are listed per computer: this AgEnD host, then each paired computer. Provider API keys belong to the host.", aiWindowsLink: "Manage Windows computers and their CLIs in Runtime",
43
47
  apiKeysTitle: "Provider API keys", apiKeysHint: "API credentials for supported provider integrations.", apiKeysUnavailableState: "Not offered", apiKeysUnavailable: "Provider API key management is not offered in this session.",
44
48
  apiNewPlaceholder: "Enter an API key to verify", apiReplacePlaceholder: "Enter a replacement API key",
45
49
  },
46
50
  "zh-TW": {
47
51
  aiAccounts: "AI 登入與 API 金鑰", aiAccountsSummary: "分開管理主機 CLI 登入與供應商 API 金鑰。",
48
- aiHostScope: "AgEnD 主機上的憑證", aiAccountsHint: "這裡的登入與金鑰屬於執行 AgEnD 的主機。", aiWindowsLink: "前往 Runtime 管理 Windows 電腦與 CLI",
52
+ aiHostScope: "AgEnD 主機與已配對電腦上的憑證", aiAccountsHint: "登入依電腦列出:先是這台 AgEnD 主機,再來是每台已配對電腦。供應商 API 金鑰屬於主機。", aiWindowsLink: "前往 Runtime 管理 Windows 電腦與 CLI",
49
53
  apiKeysTitle: "供應商 API 金鑰", apiKeysHint: "供支援的供應商整合功能使用的 API 憑證。", apiKeysUnavailableState: "目前未提供", apiKeysUnavailable: "此工作階段未提供供應商 API 金鑰管理。",
50
54
  apiNewPlaceholder: "輸入要驗證的 API 金鑰", apiReplacePlaceholder: "輸入替換用的 API 金鑰",
51
55
  },
@@ -17,7 +17,7 @@ register("settings", {
17
17
  ntNotRun: "Not tested (an earlier step failed).",
18
18
  ntTimeout: "The test took too long and was stopped. Test again; if it repeats, check this machine's network.",
19
19
  ntCancelled: "Your sign-in ended, so nothing was started. Sign in again and test again.",
20
- ntCleanup: "The test's connector could not be confirmed stopped. Run agend restart before testing or opening the link again.",
20
+ ntCleanup: "The test's connector could not be confirmed stopped. Restart AgEnD (Restart now, or /restart in General) before testing or opening the link again.",
21
21
  ntStep_values: "The domain, port and token",
22
22
  ntStep_origin: "This machine answers on port {1}",
23
23
  ntStep_tunnel: "The tunnel connects to Cloudflare",
@@ -60,7 +60,7 @@ register("settings", {
60
60
  ntNotRun: "未測試(前面的步驟失敗)。",
61
61
  ntTimeout: "測試太久,已經停止。請再測一次;如果一直這樣,請檢查這台主機所在的網路。",
62
62
  ntCancelled: "你的登入已結束,所以沒有啟動任何東西。請重新登入後再測。",
63
- ntCleanup: "無法確認測試用的連接器已經停止。請先執行 agend restart,再測試或開啟連結。",
63
+ ntCleanup: "無法確認測試用的連接器已經停止。請先重新啟動 AgEnD(立即重新啟動,或在 General 傳 /restart),再測試或開啟連結。",
64
64
  ntStep_values: "網域、port 與 token",
65
65
  ntStep_origin: "這台主機在 port {1} 回應",
66
66
  ntStep_tunnel: "tunnel 連上 Cloudflare",
@@ -209,7 +209,7 @@ export function OutsideCard() {
209
209
  return html`<section class="card s-outside" id="outsideCard" ref=${card}><header class="s-auth-section-head"><div><h3>${to("title")}</h3><p id="outLead">${to("lead")}</p></div><span class=${`s-auth-state${s.enrolled ? " is-usable" : ""}`} id="outState">${to(s.enrolled ? "stateOn" : "stateOff")}</span></header>
210
210
  <div class="chips s-out-apps" id="outApps" role="list" aria-label=${to("appsLabel")}><span class="tag" role="listitem">Google Authenticator</span><span class="tag" role="listitem">Microsoft Authenticator</span><span class="tag" role="listitem">${to("appOther")}</span></div>
211
211
  ${!here ? html`<p class="note" id="outHereOnly">${to("hereOnly")}</p>` : null}
212
- <label class="check"><input id="outSwitch" type="checkbox" checked=${s.outside} disabled=${!here || busy || (!s.enrolled && !s.outside)}
212
+ <label class="check"><input id="outSwitch" class="s-ui-toggle" type="checkbox" role="switch" checked=${s.outside} disabled=${!here || busy || (!s.enrolled && !s.outside)}
213
213
  onChange=${(e) => flip(e.target.checked)} /><span>${to("switch")}</span></label>
214
214
  ${!s.enrolled ? html`<p class="note" id="outNeedApp">${to("needApp")}</p>` : null}
215
215
  ${s.outside && open && link.url ? html`<p class="note" id="outOpenAt">${to("openAt", link.url)}${link.quick ? ` ${to("quick")}` : ""}</p>` : null}
@@ -0,0 +1,102 @@
1
+ import { html, useEffect, useMemo, useState } from "/assets/app-html.js";
2
+ import { lang } from "/assets/app-i18n.js";
3
+ import { useDraft, syncStage } from "./settings-draft.js";
4
+
5
+ const COPY = {
6
+ en: { title: "Notifications", heading: "Quota notices", hint: "One reminder per account, shared by its enabled agents. Exhaustion, pause and auto-continue messages are always kept.",
7
+ classic: "ClassicBot", periodExample: "weekly", scope: "Rule for", fleet: "Fleet default", backend: "Backend", agent: "Agent", enabled: "Reminders", inherit: "Inherit", on: "On", off: "Off",
8
+ thresholds: "Remaining percentages", thresholdHint: "Comma-separated, 1–99 (up to 8). Blank inherits; none disables reminders.",
9
+ periods: "Periods", periodHint: "session, hourly, daily, weekly, monthly. Comma-separated; blank inherits; none disables reminders.",
10
+ target: "Send to", general: "General", error: "Check percentages and periods. Changes cannot be saved yet.",
11
+ old: "This server does not support quota notice settings. Update AgEnD to edit them.",
12
+ sources: "Only fresh account usage with a known reset is used. Unsupported or stale readings do not send reminders. Enabled agents contribute a union of rules; disabling one does not silence others.",
13
+ effective: "In effect", defaults: "Built-in: on · 10% remaining · weekly · General", saved: "Quota notices" },
14
+ "zh-TW": { title: "通知", heading: "用量提醒", hint: "同一帳號共用一份提醒,由啟用提醒的 Agent 合併規則。額度耗盡、暫停與自動繼續的狀態訊息一律保留。",
15
+ classic: "ClassicBot", periodExample: "weekly", scope: "設定對象", fleet: "全隊預設", backend: "後端", agent: "Agent", enabled: "提醒", inherit: "繼承", on: "開啟", off: "關閉",
16
+ thresholds: "剩餘百分比", thresholdHint: "以逗號分隔,1–99,最多 8 個。空白表示繼承;none 表示不提醒。",
17
+ periods: "週期", periodHint: "session(工作階段)、hourly(每小時)、daily(每日)、weekly(每週)、monthly(每月)。以逗號分隔;空白繼承;none 不提醒。",
18
+ target: "傳送至", general: "General", error: "請檢查百分比與週期,目前無法儲存。",
19
+ old: "此伺服器尚未支援用量提醒設定,請更新 AgEnD 後再編輯。",
20
+ sources: "只採用有重設時間的最新帳號用量。不支援或過期的資料不會產生提醒。各 Agent 的規則取聯集;關閉其中一個不會關掉其他 Agent 的提醒。",
21
+ effective: "目前生效", defaults: "內建預設:開啟 · 剩餘 10% · 每週 · General", saved: "用量提醒" },
22
+ };
23
+ export const quotaNoticeText = () => COPY[lang()] || COPY.en;
24
+ const BACKENDS = ["claude-code", "codex", "kiro-cli", "grok", "antigravity", "muse"];
25
+ const PERIODS = ["session", "hourly", "daily", "weekly", "monthly"];
26
+ const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
27
+ const fieldKey = (scope, field) => JSON.stringify([scope, field]);
28
+ const ruleForm = (v = {}) => ({ enabled: v.enabled === undefined ? "" : v.enabled ? "on" : "off", thresholds: v.thresholds === undefined ? "" : v.thresholds.join(", ") || "none", periods: v.periods === undefined ? "" : v.periods.join(", ") || "none" });
29
+ export function quotaRuleFromForm(f) {
30
+ const rule = {};
31
+ if (f.enabled) rule.enabled = f.enabled === "on";
32
+ for (const k of ["thresholds", "periods"]) {
33
+ const raw = f[k].trim(); if (!raw) continue;
34
+ const values = raw === "none" ? [] : raw.split(",").map(v => v.trim());
35
+ const list = k === "thresholds" ? values.map(v => v === "" ? NaN : Number(v)) : values;
36
+ if (new Set(list).size !== list.length || (k === "thresholds" ? list.length > 8 || list.some(v => !Number.isFinite(v) || v < 1 || v > 99) : list.some(v => !PERIODS.includes(v)))) return null;
37
+ rule[k] = list;
38
+ }
39
+ return rule;
40
+ }
41
+
42
+ export function QuotaNoticeSettings({ ctx }) {
43
+ const text = quotaNoticeText();
44
+ const supported = ctx.schema?.impacts?.["instance.quota_notice"] === "now";
45
+ const instances = ctx.fleet.instances || {};
46
+ const classic = ctx.classic?.channels || {};
47
+ const base = useMemo(() => {
48
+ const d = ctx.fleet.defaults?.quota_notice || {};
49
+ return { target: d.target || "general", rules: Object.fromEntries([
50
+ ["fleet", ruleForm(d)], ...BACKENDS.map(b => [`backend:${b}`, ruleForm(d.backends?.[b])]),
51
+ ...Object.entries(instances).map(([n, c]) => [`agent:${n}`, ruleForm(c.quota_notice)]),
52
+ ...Object.entries(classic).map(([n, c]) => [`classic:${n}`, ruleForm(c.quota_notice)]),
53
+ ]) };
54
+ }, []);
55
+ // useDraft retains top-level edited fields. Flatten rules so an edit never
56
+ // freezes untouched rules (or untouched fields of the same rule) across reload.
57
+ const savedFields = useMemo(() => {
58
+ const saved = { target: base.target, ...Object.fromEntries(Object.entries(base.rules).flatMap(([scope, rule]) => Object.entries(rule).map(([field, value]) => [fieldKey(scope, field), value]))) };
59
+ const retained = ctx.drafts?.get("quota-notices");
60
+ if (retained) ctx.drafts.set("quota-notices", Object.fromEntries(Object.entries(retained).filter(([key]) => Object.hasOwn(saved, key))));
61
+ return saved;
62
+ }, []);
63
+ const [fields, setFields] = useDraft(ctx, "quota-notices", () => savedFields);
64
+ const form = useMemo(() => ({ target: fields.target, rules: Object.fromEntries(Object.entries(base.rules).map(([scope, rule]) => [scope, Object.fromEntries(Object.keys(rule).map(field => [field, fields[fieldKey(scope, field)]]))])) }), [fields]);
65
+ const [scope, setScope] = useState("fleet");
66
+ const parsed = Object.fromEntries(Object.entries(form.rules).map(([k, v]) => [k, quotaRuleFromForm(v)]));
67
+ const invalid = Object.values(parsed).some(v => v === null);
68
+ useEffect(() => {
69
+ if (!supported) return;
70
+ const defaults = { ...parsed.fleet, target: form.target, backends: Object.fromEntries(BACKENDS.flatMap(b => Object.keys(parsed[`backend:${b}`] || {}).length ? [[b, parsed[`backend:${b}`]]] : [])) };
71
+ const changed = !same(form.rules.fleet, base.rules.fleet) || form.target !== base.target || BACKENDS.some(b => !same(form.rules[`backend:${b}`], base.rules[`backend:${b}`]));
72
+ syncStage(ctx, "quota:defaults", changed ? { label: text.saved, impact: "now", ...(invalid ? { invalid: text.error } : { request: { method: "PUT", url: "/api/settings/fleet/defaults", body: { quota_notice: defaults } } }) } : null);
73
+ for (const [name, isClassic] of [...Object.keys(instances).map(n => [n, false]), ...Object.keys(classic).map(n => [n, true])]) {
74
+ const k = `${isClassic ? "classic" : "agent"}:${name}`, rule = parsed[k];
75
+ syncStage(ctx, `quota:${k}`, !same(form.rules[k], base.rules[k]) ? { label: `${text.saved} · ${name}`, impact: "now", ...(rule === null ? { invalid: text.error } : { request: { method: "PATCH", url: isClassic ? `/api/settings/classic/channels/${encodeURIComponent(name)}` : `/api/settings/fleet/instances/${encodeURIComponent(name)}`, body: { quota_notice: Object.keys(rule).length ? rule : null } } }) } : null);
76
+ }
77
+ }, [form, supported]);
78
+ const value = form.rules[scope];
79
+ const selectedBackend = scope.startsWith("backend:") ? scope.slice(8) : scope.startsWith("agent:") ? instances[scope.slice(6)]?.backend || ctx.fleet.defaults?.backend || "claude-code" : scope.startsWith("classic:") ? classic[scope.slice(8)]?.backend || ctx.classic?.defaults?.backend || ctx.fleet.defaults?.backend || "claude-code" : null;
80
+ const effective = { enabled: true, thresholds: [10], periods: ["weekly"], ...parsed.fleet,
81
+ ...(selectedBackend ? parsed[`backend:${selectedBackend}`] : {}), ...(scope.startsWith("agent:") || scope.startsWith("classic:") ? parsed[scope] : {}) };
82
+ const update = k => e => setFields(f => ({ ...f, [fieldKey(scope, k)]: e.target.value }));
83
+ // alpha.6 feedback (#3): the Settings card (card s-group, as Shared agent settings: a title and its note, the fields in the
84
+ // grid), not a bare heading over full-width fields.
85
+ return html`<section class="card s-group" id="quota-notices"><div><h3>${text.heading}</h3><p class="note">${text.hint}</p><p class="note">${text.defaults}</p></div>
86
+ ${!supported ? html`<p role="status">${text.old}</p>` : null}
87
+ ${!invalid ? html`<p class="note" data-quota-effective>${text.effective}: ${effective.enabled ? text.on : text.off} · ${effective.thresholds.map(v => `${v}%`).join(", ") || "—"} · ${effective.periods.join(", ") || "—"}</p>` : null}
88
+ <fieldset disabled=${!supported} class="s-quota-fields grid2">
89
+ <div class="field"><label for="qn-target">${text.target}</label><select id="qn-target" value=${form.target} onChange=${e => setFields(f => ({ ...f, target: e.target.value }))}>
90
+ <option value="general">${text.general}</option>${Object.entries(instances).filter(([n]) => n !== "general").map(([n, c]) => html`<option value=${n}>${c.display_name || n}</option>`)}
91
+ ${form.target !== "general" && !Object.hasOwn(instances, form.target) ? html`<option value=${form.target}>${form.target}</option>` : null}
92
+ </select></div>
93
+ <div class="field"><label for="qn-scope">${text.scope}</label><select id="qn-scope" value=${scope} onChange=${e => setScope(e.target.value)}>
94
+ <option value="fleet">${text.fleet}</option>${BACKENDS.map(b => html`<option value=${`backend:${b}`}>${text.backend} · ${b}</option>`)}
95
+ ${Object.entries(instances).map(([n, c]) => html`<option value=${`agent:${n}`}>${text.agent} · ${c.display_name || n}</option>`)}
96
+ ${Object.entries(classic).map(([n, c]) => html`<option value=${`classic:${n}`}>${text.classic} · ${c.name || c.instanceName || n}</option>`)}
97
+ </select></div>
98
+ <div class="field"><label for="qn-enabled">${text.enabled}</label><select id="qn-enabled" value=${value.enabled} onChange=${update("enabled")}><option value="">${text.inherit}</option><option value="on">${text.on}</option><option value="off">${text.off}</option></select></div>
99
+ <div class="field"><label for="qn-thresholds">${text.thresholds}</label><input id="qn-thresholds" value=${value.thresholds} onInput=${update("thresholds")} placeholder="10" /><p class="note">${text.thresholdHint}</p></div>
100
+ <div class="field"><label for="qn-periods">${text.periods}</label><input id="qn-periods" value=${value.periods} onInput=${update("periods")} placeholder=${text.periodExample} /><p class="note">${text.periodHint}</p></div>
101
+ </fieldset>${invalid ? html`<p class="feedback error" role="alert">${text.error}</p>` : null}<p class="note">${text.sources}</p></section>`;
102
+ }
@@ -15,6 +15,10 @@ const L = (en, zh) => ({ en, "zh-TW": zh });
15
15
  /** [id, section, target, labelKey | label, config key, words en, words zh] */
16
16
  const ROWS = [
17
17
  ["general.location", "agent-defaults", "#general-location", null, null, ["general", "windows", "paired PC", "host", "location"], ["General", "Windows", "電腦", "主機", "執行位置"], L("Run General on", "General 執行位置")],
18
+ // alpha.6 feedback (#2): "hub" found nothing — Settings → Hub's cards. Connect to a Hub is drawn once membership is on.
19
+ ["hub.membership", "hub", "#hubMemberEnabled", null, "hub_member.enabled", ["hub", "team hub", "membership", "connect", "join", "pair", "share agents"], ["Hub", "團隊 Hub", "成員", "連線", "加入", "配對", "分享"], L("Allow this fleet to connect to a Hub", "允許這個 Fleet 連線至 Hub")],
20
+ ["hub.connect", "hub", "#hub-connect", null, null, ["hub", "connect to a hub", "pairing code", "hub address", "fingerprint", "pair", "unpair", "disconnect", "join"], ["Hub", "連線至 Hub", "配對碼", "Hub 位址", "指紋", "配對", "解除配對", "中斷連線", "加入"], L("Connect to a Hub", "連線至 Hub")],
21
+ ["quota.notices", "notifications", "#quota-notices", null, "defaults.quota_notice", ["usage", "quota", "notifications", "remaining", "weekly"], ["用量", "額度", "提醒", "通知", "剩餘"], L("Quota notices", "用量提醒")],
18
22
  // You · Preferences
19
23
  ["profile.name", "preferences", "#profile-name", "settings.profileTitle", null, ["name", "display name", "who agents see", "profile"], ["名字", "名稱", "顯示名稱", "個人資料"]],
20
24
  ["prefs.theme", "look", "#pref-theme", "app.theme", null, ["theme", "dark", "light", "dark mode", "colour scheme"], ["主題", "深色", "淺色", "外觀"]],
@@ -142,7 +142,7 @@ register("settings", {
142
142
  tokenShow: "Show the token", tokenHide: "Hide the token", tokenIsBot: "This is {0}.", tokenStatus: "Bot token",
143
143
  tokenSet: "Token set", tokenSetAs: "Token set · {0}", tokenMissing: "Token missing", tokenReplace: "Replace",
144
144
  tokenStoredAs: "The token is stored on this computer in ~/.agend/.env under this name — generated, and only needed if you manage .env yourself.",
145
- tokenSavedRestart: "Token saved. This connection is not running, so it starts with the new token when AgEnD restarts (on the host: agend restart).",
145
+ tokenSavedRestart: "Token saved. This connection was added or changed since AgEnD started, so it starts with the new token when AgEnD restarts (see the restart notice at the top of the page).",
146
146
  newBotTokenHint: "Paste the bot's token. It is checked with the platform, then stored on this computer — never in the browser.",
147
147
  connectionIdOptional: "Connection id (optional)",
148
148
  connConnectedAs: "Connected · {0}", connReconnecting: "Reconnecting…", connStarting: "Starting…", connFailed: "Could not connect",
@@ -286,7 +286,7 @@ register("settings", {
286
286
  "sec_windows-cli": "Windows CLI",
287
287
  sec_runtimes: "Runtime",
288
288
  sec_chat: "Chat & connections", "sec_web-dashboard": "Web dashboard", sec_access: "Access & security",
289
- sec_advanced: "Advanced", sec_look: "Look", grp_you: "You", grp_fleet: "Fleet",
289
+ sec_notifications: "Notifications", sec_hub: "Hub", sec_advanced: "Advanced", sec_look: "Look", grp_you: "You", grp_fleet: "Fleet",
290
290
  classicDefaultsTitle: "ClassicBot defaults", publicLinkTitle: "Public link & fixed address", webDashboardTitle: "Dashboard features", webSettingsLabel: "Web settings",
291
291
  stRunning: "Running",
292
292
  stPaused: "Paused",
@@ -507,7 +507,7 @@ register("settings", {
507
507
  cssError_owner_css_read_only: "This sign-in can view but not change custom CSS.",
508
508
  cssError_owner_css_needs_a_signed_in_person: "Sign in in the browser to change custom CSS.",
509
509
  cssError_other: "Not saved ({0}).",
510
- webLead: "How the web dashboard behaves. A change that loosens access (longer sessions, the browser terminal back on or for longer, the public link) waits for a fleet admin to confirm it in chat (General topic) or on the host; one that tightens it applies at once.",
510
+ webLead: "How the web dashboard behaves. A change that loosens access (longer sessions, the browser terminal back on or for longer, the public link) waits for a fleet admin to confirm it: in General in Telegram or Discord, or here on the dashboard where its card offers that; one that tightens it applies at once.",
511
511
  webPublicRefused: "Web settings can't be changed over a public link. Open the dashboard at its own address to change them.",
512
512
  webSessionTitle: "Sign-in sessions",
513
513
  webSessionHint: "For sign-ins at the dashboard's own address (this computer, the LAN, a tailnet). Over a public link (a temporary one or your permanent link), a session lasts at most 8 h, ends after 30 min idle and never outlives the link; an admin's also never lasts longer than these settings (a guest's follows the guest settings). Shortening ends the sessions it now outlives; lengthening applies to new sign-ins and to an existing one's idle time on its next use. Empty = the default.",
@@ -795,7 +795,7 @@ register("settings", {
795
795
  tokenShow: "顯示 token", tokenHide: "隱藏 token", tokenIsBot: "這是 {0}。", tokenStatus: "Bot token",
796
796
  tokenSet: "已設定 token", tokenSetAs: "已設定 token · {0}", tokenMissing: "缺少 token", tokenReplace: "更換",
797
797
  tokenStoredAs: "token 存在這台電腦的 ~/.agend/.env,用這個名稱——自動產生,只有自行管理 .env 時才需要。",
798
- tokenSavedRestart: "已儲存 token。這個連線目前沒有在執行,AgEnD 重新啟動時會用新的 token 啟動(在主機上:agend restart)。",
798
+ tokenSavedRestart: "已儲存 token。這個連線是在 AgEnD 啟動後才新增或修改的,AgEnD 重新啟動時會用新的 token 啟動(見頁面上方的重新啟動提示)。",
799
799
  newBotTokenHint: "貼上 bot 的 token。會先向平台確認,再存到這台電腦——絕不存在瀏覽器。",
800
800
  connectionIdOptional: "連線 id(選填)",
801
801
  connConnectedAs: "已連線 · {0}", connReconnecting: "重新連線中…", connStarting: "啟動中…", connFailed: "無法連線",
@@ -939,7 +939,7 @@ register("settings", {
939
939
  "sec_windows-cli": "Windows CLI",
940
940
  sec_runtimes: "Runtime",
941
941
  sec_chat: "聊天與連線", "sec_web-dashboard": "網頁儀表板", sec_access: "存取與安全",
942
- sec_advanced: "進階", sec_look: "外觀", grp_you: "你自己", grp_fleet: "整個 Fleet",
942
+ sec_notifications: "通知", sec_hub: "Hub", sec_advanced: "進階", sec_look: "外觀", grp_you: "你自己", grp_fleet: "整個 Fleet",
943
943
  classicDefaultsTitle: "ClassicBot 預設值", publicLinkTitle: "公開連結與固定網址", webDashboardTitle: "儀表板功能", webSettingsLabel: "網頁設定",
944
944
  stRunning: "執行中",
945
945
  stPaused: "已暫停",
@@ -1159,7 +1159,7 @@ register("settings", {
1159
1159
  cssError_owner_css_read_only: "這個登入只能檢視、不能變更自訂 CSS。",
1160
1160
  cssError_owner_css_needs_a_signed_in_person: "請在瀏覽器登入後再變更自訂 CSS。",
1161
1161
  cssError_other: "未儲存({0})。",
1162
- webLead: "網頁儀表板的行為。放寬存取的變更(延長 session、重新開啟或延長瀏覽器終端機、公開連結)需要 fleet admin 在聊天(General topic)或主機上確認;收緊的變更會立即套用。",
1162
+ webLead: "網頁儀表板的行為。放寬存取的變更(延長 session、重新開啟或延長瀏覽器終端機、公開連結)需要 fleet admin 確認:在 Telegram 或 Discord 的 General,或在儀表板上卡片提供確認的地方;收緊的變更會立即套用。",
1163
1163
  webPublicRefused: "無法透過公開連結變更網頁設定。請從儀表板本身的網址開啟後再變更。",
1164
1164
  webSessionTitle: "登入 session",
1165
1165
  webSessionHint: "適用於從儀表板本身網址登入的 session(本機、區域網路、tailnet)。透過公開連結(臨時連結或你的固定網域)的 session 最長 8 小時、閒置 30 分鐘就結束,也不會超過連結本身;管理者的 session 也不會超過這裡的設定(訪客依訪客設定)。縮短會讓已超過新限制的 session 結束;延長會套用到新的登入,以及既有 session 下次使用時的閒置時間。留空 = 預設值。",
@@ -5,6 +5,7 @@
5
5
  // them grants anything by itself — a session still needs its account's Confirm in Discord or Telegram).
6
6
  import { html, useEffect, useState } from "/assets/app-html.js";
7
7
  import { t } from "/assets/app-i18n.js";
8
+ import { Skeleton } from "/assets/ui-states.js";
8
9
  import { useTypedText } from "/assets/text-undo.js";
9
10
  import { toast } from "/assets/ui-toast.js";
10
11
  import { confirmDialog } from "/assets/ui-confirm.js";
@@ -70,7 +71,7 @@ export function WebAuthorityCard({ ctx, staged, disabled = false }) {
70
71
  const webOnly = !!overview && overview.webOnly === true;
71
72
  const card = (body) => html`<section class="card s-web-authority"><h3>${tn("vaTitle")}</h3><p class="note s-authority-brief">${layoutText(webOnly ? "revAuthorityBriefWeb" : "revAuthorityBrief")}</p><p class="note s-authority-rule">${layoutText("revAuthorityRule")}</p>${body}<details class="s-setting-details"><summary>${layoutText("revAuthorityDetails")}</summary><p class="note">${tn("vaHint")}</p><p class="note">${tn("vaEnabledHint")}</p><p class="note">${tn("vaLoopbackOnlyHint")}</p></details></section>`;
72
73
  if (failed) return card(html`<p class="note" role="status">${tn("vaLoadFailed")} <button type="button" class="btn btn-sm" onClick=${load}>${t("app.retry")}</button></p>`);
73
- if (!overview || !f) return card(html`<p class="note">${t("app.loading")}</p>`);
74
+ if (!overview || !f) return card(html`<${Skeleton} variant="rows" lines=${3} />`);
74
75
 
75
76
  const set = (patch) => setF((x) => ({ ...x, ...patch }));
76
77
  const hoursError = f.hours !== null && (!Number.isFinite(f.hours) || f.hours < overview.hours.min || f.hours > overview.hours.max) ? "vaHoursRange" : "";
@@ -0,0 +1,7 @@
1
+ /* #3292: Settings → Accounts → Keep sign-in alive — linked by accounts-keepalive.js (an older accounts.css lacks these rules). */
2
+ .s-account-keepalive { flex-basis: 100%; display: grid; gap: 2px; padding: var(--s-1) 0 0; border-top: 1px dashed var(--border); }
3
+ .s-account-keepalive .check { display: flex; align-items: flex-start; gap: var(--s-2); }
4
+ .s-account-keepalive small { color: var(--text-2); font-size: var(--fs-xs); overflow-wrap: anywhere; }
5
+ .s-account-keepalive .s-keepalive-fallback { margin-left: var(--s-4); }
6
+ .s-account-keepalive .is-warn { color: var(--warn); font-weight: 600; }
7
+ .s-account-keepalive .is-bad { color: var(--danger); font-weight: 600; }
@@ -13,3 +13,16 @@
13
13
  .s-account-machine { border-top: 1px dashed var(--border); padding-top: var(--s-2); }
14
14
  .s-account-move { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
15
15
  .s-account-move .check small { margin-left: var(--s-2); }
16
+ /* #3212 PR 2: + Add account at the card's end; Remove's in-use list (a tab with an older copy of this file only loses the layout). */
17
+ .s-account-head .s-account-add { margin-left: auto; }
18
+ .s-account-row .s-account-remove { color: var(--danger, var(--text-2)); }
19
+ .s-account-inuse ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
20
+ .s-account-inuse li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
21
+ .s-account-inuse li > span { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
22
+ .s-account-inuse li > small { flex-basis: 100%; }
23
+ /* #3190 Part 3c: a paired computer's accounts under its name (a tab with an older copy of this file only loses the layout). */
24
+ .s-account-machine { display: grid; gap: var(--s-1); }
25
+ .s-account-machine-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
26
+ .s-account-machine-head .s-account-add { margin-left: auto; }
27
+ .s-account-why { color: var(--text-2); font-size: var(--fs-xs); overflow-wrap: anywhere; }
28
+ .s-account-usage.is-none { color: var(--text-3); }
@@ -101,7 +101,8 @@ register("app", {
101
101
  opFailed: "Settings were not applied", openSettings: "Open Settings",
102
102
  restartWaiting: "{0} saved change(s) take effect after AgEnD restarts", restartNow: "Restart now", restartLater: "Later",
103
103
  restartConfirm: "Restart AgEnD now?\n\nEvery agent stops and starts again, work in progress is interrupted, and the panel is unreachable for up to a minute. A notice is posted to your chat channel.",
104
- restartOnHost: "Run agend restart on the host to use them.",
104
+ restartOnHost: "Restart AgEnD to use them.",
105
+ restartOnHostChat: "Send /restart in General to use them.",
105
106
  restartRefused: "Restart refused: {0}",
106
107
  pendingSent: "Sent for confirmation — a fleet admin confirms it in chat.",
107
108
  pendingSelfSent: "Confirmed by your account (this browser is web-verified) — applying.",
@@ -148,7 +149,8 @@ register("app", {
148
149
  opFailed: "設定沒有套用", openSettings: "開啟設定",
149
150
  restartWaiting: "{0} 項已儲存的變更要在 AgEnD 重新啟動後才會生效", restartNow: "立即重新啟動", restartLater: "稍後",
150
151
  restartConfirm: "現在重新啟動 AgEnD?\n\n所有 agent 都會停止再啟動,進行中的工作會被中斷,面板會有最多約一分鐘無法連線。聊天頻道會收到一則通知。",
151
- restartOnHost: "請在主機上執行 agend restart 讓它們生效。",
152
+ restartOnHost: "請重新啟動 AgEnD 讓它們生效。",
153
+ restartOnHostChat: "請在 General 傳 /restart 讓它們生效。",
152
154
  restartRefused: "重新啟動被拒絕:{0}",
153
155
  pendingSent: "已送出確認——由 fleet 管理員在聊天中確認。",
154
156
  pendingSelfSent: "已由你的帳號確認(這個瀏覽器已通過網頁驗證)——套用中。",
@@ -6,7 +6,7 @@ export const FLEET_TABS = ["tasks", "schedules", "teams", "org", "cache", "usage
6
6
  // #2347: two groups — "You" changes only you or this browser; "Fleet" changes AgEnD for everyone.
7
7
  export const SETTINGS_GROUPS = Object.freeze([
8
8
  Object.freeze({ id: "you", sections: Object.freeze(["preferences", "look"]) }),
9
- Object.freeze({ id: "fleet", sections: Object.freeze(["agents", "runtimes", "agent-defaults", "chat", "web-dashboard", "access", "advanced"]) }),
9
+ Object.freeze({ id: "fleet", sections: Object.freeze(["agents", "runtimes", "agent-defaults", "notifications", "chat", "web-dashboard", "access", "hub", "advanced"]) }),
10
10
  ]);
11
11
  export const SETTINGS_SECTIONS = Object.freeze(SETTINGS_GROUPS.flatMap((g) => g.sections));
12
12
  /** #2347: the sections' names before the regrouping (links and bookmarks keep working) and where each one went. */