@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,155 +1,3 @@
1
- // #2911 (1): the versions of a page in the preview panel, and the changes from one to the next. Pure functions: the
2
- // panel (preview-panel.js) draws them. Nothing here runs a preview — a version is shown as any block is, waiting for
3
- // Preview (#1481 §14).
4
- import "/assets/chat-render.js";
5
-
6
- const R = () => globalThis.AgendChatRender;
7
-
8
- /** The text of a block's <title>, or "" — what says two blocks are versions of one thing. */
9
- export function htmlTitle(code) {
10
- const m = /<title[^>]*>([\s\S]*?)<\/title>/i.exec(String(code || ""));
11
- return m ? m[1].replace(/\s+/g, " ").trim() : "";
12
- }
13
-
14
- /**
15
- * Every version of the shown block in the loaded thread, oldest first, and where the shown one is in it.
16
- * - An attached file: the agent's attachments of the same name (case-insensitive). Their HTML is read when picked (code: null).
17
- * - A titled block: the agent's complete ```html blocks with the same <title>.
18
- * - An untitled block: the agent's complete untitled blocks — a titled one is another page.
19
- * Only agent replies count, and only complete blocks, as for a card. `index` is -1 (and `list` is just the shown block)
20
- * when the block is no longer in the thread.
21
- */
22
- export function versionsOf(open, msgs, keyOf) {
23
- if (!open) return { list: [], index: -1 };
24
- const list = [];
25
- const all = Array.isArray(msgs) ? msgs : [];
26
- if (open.att) {
27
- const name = String(open.att.name || "").trim().toLowerCase();
28
- for (const x of all) {
29
- if (x.role !== "agent" || !Array.isArray(x.attachments)) continue;
30
- const msgKey = keyOf(x);
31
- for (const a of x.attachments) {
32
- if (!R().isHtmlAttachment(a) || a.name.trim().toLowerCase() !== name) continue;
33
- list.push({ key: `${msgKey}:a${a.id}`, instance: open.instance, msgKey, att: { id: a.id, name: a.name, size: a.size }, code: null, sender: x.sender, ts: x.ts });
34
- }
35
- }
36
- } else {
37
- const title = htmlTitle(open.code);
38
- for (const x of all) {
39
- if (x.role !== "agent") continue;
40
- const msgKey = keyOf(x);
41
- R().htmlFences(x.text).forEach((f, n) => {
42
- if (!f.terminated || htmlTitle(f.code) !== title) return;
43
- list.push({ key: `${msgKey}:f${n}`, instance: open.instance, msgKey, n, code: f.code, sender: x.sender, ts: x.ts });
44
- });
45
- }
46
- }
47
- const index = list.findIndex(v => v.key === open.key);
48
- return index < 0 ? { list: [open], index: -1 } : { list, index };
49
- }
50
-
51
- // ── Changes: a line diff (Myers), bounded ──
52
-
53
- /** Past these, "Changes" says the versions are too large or too different to compare here. */
54
- export const DIFF_LIMITS = { maxChars: 5 * 1024 * 1024, maxInputLines: 50000, maxEdits: 2000, context: 3, maxLines: 3000 };
55
-
56
- /**
57
- * How many lines `lines()` makes of `s`, counted without splitting it (#2915 review: a budget before anything is
58
- * built) — LF, CRLF and a lone CR each end a line, and a last line without one counts; it stops counting past `max`
59
- * (anything over `max` is then reported as max + 1).
60
- */
61
- export function lineCount(s, max = Infinity) {
62
- if (!s) return 0;
63
- let breaks = 0;
64
- for (let i = 0; i < s.length; i++) {
65
- const c = s.charCodeAt(i);
66
- if (c === 10 || c === 13) {
67
- if (c === 13 && s.charCodeAt(i + 1) === 10) i++;
68
- if (++breaks > max) return max + 1;
69
- }
70
- }
71
- const last = s.charCodeAt(s.length - 1);
72
- return Math.min(breaks + (last === 10 || last === 13 ? 0 : 1), max + 1);
73
- }
74
-
75
- const lines = (s) => { if (!s) return []; const v = String(s).replace(/\r\n?/g, "\n").split("\n"); if (v.length > 1 && v[v.length - 1] === "") v.pop(); return v; };
76
-
77
- /**
78
- * The line edits from `a` to `b`: [{ t: " " | "-" | "+", text }] in order, or null when it cannot be done within
79
- * DIFF_LIMITS: either side over maxChars or maxInputLines (checked before anything is split or built: an op per line
80
- * is made only under that budget), or more than maxEdits lines differ after the common head and tail.
81
- */
82
- export function lineDiff(a, b, limits = DIFF_LIMITS) {
83
- const sa = String(a ?? ""), sb = String(b ?? "");
84
- if (sa.length > limits.maxChars || sb.length > limits.maxChars) return null;
85
- if (lineCount(sa, limits.maxInputLines) > limits.maxInputLines || lineCount(sb, limits.maxInputLines) > limits.maxInputLines) return null;
86
- a = sa; b = sb;
87
- const A = lines(a), B = lines(b);
88
- let head = 0;
89
- while (head < A.length && head < B.length && A[head] === B[head]) head++;
90
- let tail = 0;
91
- while (tail < A.length - head && tail < B.length - head && A[A.length - 1 - tail] === B[B.length - 1 - tail]) tail++;
92
- const x = A.slice(head, A.length - tail), y = B.slice(head, B.length - tail);
93
- const mid = myers(x, y, limits.maxEdits);
94
- if (!mid) return null;
95
- return [...A.slice(0, head).map(text => ({ t: " ", text })), ...mid, ...A.slice(A.length - tail).map(text => ({ t: " ", text }))];
96
- }
97
-
98
- /** Myers' O((N+M)·D) shortest edit script, with D capped (the trace is kept for the walk back). */
99
- function myers(a, b, maxD) {
100
- const n = a.length, m = b.length, max = n + m;
101
- if (max === 0) return [];
102
- const off = max + 1, v = new Int32Array(2 * max + 3), trace = [];
103
- for (let d = 0; d <= Math.min(max, maxD); d++) {
104
- trace.push(v.slice(off - d - 1, off + d + 2));
105
- for (let k = -d; k <= d; k += 2) {
106
- let i = k === -d || (k !== d && v[off + k - 1] < v[off + k + 1]) ? v[off + k + 1] : v[off + k - 1] + 1;
107
- let j = i - k;
108
- while (i < n && j < m && a[i] === b[j]) { i++; j++; }
109
- v[off + k] = i;
110
- if (i >= n && j >= m) return walkBack(a, b, trace, d);
111
- }
112
- }
113
- return null;
114
- }
115
-
116
- function walkBack(a, b, trace, dEnd) {
117
- const out = [];
118
- let i = a.length, j = b.length;
119
- for (let d = dEnd; d >= 0; d--) {
120
- const vd = trace[d], at = (k) => vd[k + d + 1]; // trace[d] holds v[-d-1 .. d+1] before step d
121
- const k = i - j;
122
- if (d === 0) { while (i > 0 && j > 0) { out.push({ t: " ", text: a[--i] }); j--; } break; }
123
- const down = k === -d || (k !== d && at(k - 1) < at(k + 1));
124
- const pk = down ? k + 1 : k - 1, pi = at(pk), pj = pi - pk;
125
- while (i > pi && j > pj) { out.push({ t: " ", text: a[--i] }); j--; }
126
- if (down) out.push({ t: "+", text: b[--j] }); else out.push({ t: "-", text: a[--i] });
127
- }
128
- return out.reverse();
129
- }
130
-
131
- /**
132
- * The edits as hunks with `context` lines around each change, as a unified diff shows them:
133
- * [{ oldStart, oldLines, newStart, newLines, lines: [{ t, text }] }] (1-based starts). [] when nothing changed.
134
- */
135
- export function diffHunks(ops, context = DIFF_LIMITS.context) {
136
- // Each op's line numbers on either side (before it), then the changed spans widened by `context` and merged.
137
- const oldAt = [], newAt = [];
138
- let o = 1, n = 1;
139
- for (const op of ops) { oldAt.push(o); newAt.push(n); if (op.t !== "+") o++; if (op.t !== "-") n++; }
140
- const ranges = [];
141
- ops.forEach((op, idx) => {
142
- if (op.t === " ") return;
143
- const from = Math.max(0, idx - context), to = Math.min(ops.length - 1, idx + context);
144
- const last = ranges[ranges.length - 1];
145
- if (last && from <= last.to + 1) last.to = Math.max(last.to, to); else ranges.push({ from, to });
146
- });
147
- return ranges.map(({ from, to }) => {
148
- const part = ops.slice(from, to + 1);
149
- return {
150
- oldStart: oldAt[from], newStart: newAt[from],
151
- oldLines: part.filter(x => x.t !== "+").length, newLines: part.filter(x => x.t !== "-").length,
152
- lines: part,
153
- };
154
- });
155
- }
1
+ // Hub E (#3226): this module moved to /assets/preview-versions.js (src/ui/shared/), shared by the fleet and the Hub. A tab opened
2
+ // before the move still imports it from here: the same module (one instance), re-exported.
3
+ export * from "/assets/preview-versions.js";
@@ -0,0 +1,134 @@
1
+ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
2
+ import { register, t } from "/assets/app-i18n.js";
3
+ import { confirmDialog } from "/assets/ui-confirm.js";
4
+ import { ErrorState, Skeleton } from "/assets/ui-states.js";
5
+
6
+ /**
7
+ * #3190 Part 3b: install a CLI on a paired Windows computer, from Settings → Runtime. The page sends only a CLI id; the Runtime on that computer decides the
8
+ * package, the exact version, the folder and the checks. It happens only while that computer's owner has turned the "install" switch on THERE (the page can
9
+ * read the switch, never change it). Claude Code and Codex only; the other CLIs show their official command for the computer's owner to run.
10
+ */
11
+ register("runtimeInstall", {
12
+ en: { title: "Install a CLI", lead: "Installs the fixed version AgEnD pins, into this Runtime's own folder on that computer. No administrator, no PATH change, no vendor script.",
13
+ old: "Update the Runtime on that computer to install CLIs from here.", offline: "That computer is offline.", unreadable: "Could not read this computer's setting. Try again.",
14
+ switchOff: "The owner of that computer has not turned this on. On that computer, run:", switchOn: "Allowed by that computer's owner.", switchUntil: "Allowed until {0}.",
15
+ installed: "Installed {0}", installedOther: "Installed {0} (not the version AgEnD installs)", notInstalled: "Not installed", install: "Install {0}", reinstall: "Install pinned {0}", installing: "Installing… this can take a few minutes",
16
+ ask: "Install {0} {1} on {2}? It comes from the official npm registry, is checked against AgEnD's pinned hashes, the registry signatures and the publisher's Windows signature, and is kept in this Runtime's folder on that computer. The install is recorded there.",
17
+ confirm: "Install", done: "{0} {1} is installed.", failed: "The install did not finish: {2}", failedShort: "The install did not finish.", requestFailed: "Could not start the install: {0}",
18
+ othersTitle: "Other CLIs", othersLead: "AgEnD does not install these. The computer's owner can run the vendor's own command in PowerShell on that computer.", needsAdmin: "needs an administrator" },
19
+ "zh-TW": { title: "安裝 CLI", lead: "安裝 AgEnD 固定的版本,裝在那台電腦上 Runtime 自己的資料夾。不需要系統管理員,不改 PATH,也不執行廠商腳本。",
20
+ old: "請更新那台電腦上的 Runtime,才能從這裡安裝 CLI。", offline: "那台電腦目前離線。", unreadable: "無法讀取那台電腦的設定,請再試一次。",
21
+ switchOff: "那台電腦的主人還沒有開啟這個功能。請在那台電腦執行:", switchOn: "那台電腦的主人已允許。", switchUntil: "已允許,到 {0} 為止。",
22
+ installed: "已安裝 {0}", installedOther: "已安裝 {0}(不是 AgEnD 會安裝的版本)", notInstalled: "尚未安裝", install: "安裝 {0}", reinstall: "安裝固定版本 {0}", installing: "安裝中…可能需要幾分鐘",
23
+ ask: "要在 {2} 安裝 {0} {1} 嗎?它來自官方 npm registry,會比對 AgEnD 內建的雜湊、registry 簽章與發行者的 Windows 數位簽章,並放在那台電腦上 Runtime 自己的資料夾。那台電腦會留下安裝紀錄。",
24
+ confirm: "安裝", done: "{0} {1} 已安裝。", failed: "安裝沒有完成:{2}", failedShort: "安裝沒有完成。", requestFailed: "無法開始安裝:{0}",
25
+ othersTitle: "其他 CLI", othersLead: "AgEnD 不會安裝這些。電腦的主人可以在那台電腦的 PowerShell 執行廠商自己的指令。", needsAdmin: "需要系統管理員" },
26
+ });
27
+ const text = (key, ...values) => t(`runtimeInstall.${key}`, ...values);
28
+
29
+ /** A command, not words: the same in every language. */
30
+ export const SWITCH_COMMAND = "agend-runtime remote-setup install on --for 2h";
31
+ /** The CLIs a Runtime can install, as AgEnD's own table names them; the Runtime enforces its own list. */
32
+ export const INSTALL_CLIS = [{ id: "claude-code", label: "Claude Code" }, { id: "codex", label: "Codex" }];
33
+ /** Vendor commands, for the computer's owner to run: AgEnD never sends them anywhere. */
34
+ export const OFFICIAL_COMMANDS = [
35
+ { id: "grok", label: "Grok", command: "irm https://x.ai/cli/install.ps1 | iex" },
36
+ { id: "antigravity", label: "Antigravity", command: "irm https://antigravity.google/cli/install.ps1 | iex" },
37
+ { id: "kiro", label: "Kiro", command: "irm https://cli.kiro.dev/install.ps1 | iex", administrator: true },
38
+ ];
39
+ /** A computer shows this only when its Runtime says it can (and it is a paired, approved one). */
40
+ /**
41
+ * The version number inside what a CLI printed for `--version` ("codex-cli 0.165.0", "2.1.316 (Claude Code)"): the first x.y.z (a prerelease may follow),
42
+ * not glued to other digits or dots. Null when there is none, which counts as "a different version".
43
+ */
44
+ export const versionNumber = printed => typeof printed === "string" ? /(?<![\d.])\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?![\d.])/.exec(printed)?.[0] ?? null : null;
45
+ export const offersCliInstall = machine => !!machine && !machine.isLocal && machine.runtimeInfo?.capabilities?.includes("cli-install") === true && ["online", "offline"].includes(machine.status);
46
+
47
+ // Ridge #3321 S06 / S09: the words of the loading state and the copyable commands.
48
+ register("runtimeInstall", {
49
+ en: { loading: "Reading this computer's install setting…", copy: "Copy", copied: "Copied", switchCommand: "Command for that computer" },
50
+ "zh-TW": { loading: "正在讀取這台電腦的安裝設定…", copy: "複製", copied: "已複製", switchCommand: "在那台電腦執行的指令" },
51
+ });
52
+ /** Ridge #3321 S09: a command to run on that computer — Runtime's labelled command card (runtime-install.css), with Copy. */
53
+ function CommandCard({ label, command }) {
54
+ const [copied, setCopied] = useState(false);
55
+ const copy = async () => { try { await navigator.clipboard.writeText(command); setCopied(true); } catch { /* it is on screen to copy by hand */ } };
56
+ return html`<div class="runtime-command-card"><span class="runtime-command-label">${label}</span><div class="runtime-command-row">
57
+ <pre class="runtime-command-text" tabindex="0" aria-label=${label}><code>${command}</code></pre>
58
+ <button type="button" class="btn btn-sm" onClick=${copy}>${text(copied ? "copied" : "copy")}</button></div></div>`;
59
+ }
60
+
61
+ export function CliInstall({ machine, lease, onChanged }) {
62
+ const [view, setView] = useState(null), [error, setError] = useState(""), [note, setNote] = useState(""), [busy, setBusy] = useState(false);
63
+ const last = useRef("");
64
+ const online = machine.status === "online";
65
+ const path = `/ui/runtimes/machines/${encodeURIComponent(machine.id)}/remote-setup`;
66
+ const load = async () => {
67
+ const response = await lease.fetch(path, { credentials: "same-origin" });
68
+ const value = await response.json().catch(() => ({}));
69
+ if (!lease.current()) return;
70
+ if (!response.ok) throw new Error(value.error || `HTTP ${response.status}`);
71
+ setView(value);
72
+ return value;
73
+ };
74
+ const [attempt, setAttempt] = useState(0);
75
+ useEffect(() => { if (online) { setError(""); load().catch(() => { if (lease.current()) setError(text("unreadable")); }); } }, [lease, machine.id, online, attempt]);
76
+ const job = view?.job, running = job?.state === "installing";
77
+ // While an install runs the page asks again every few seconds; when it ends the computer's list is refreshed once.
78
+ useEffect(() => {
79
+ if (!running) return;
80
+ const timer = lease.timeout(() => { load().catch(() => {}); }, 3000);
81
+ return () => lease.clear(timer);
82
+ }, [lease, running, view]);
83
+ useEffect(() => {
84
+ const key = job ? `${job.cli}:${job.startedAt}:${job.state}` : "";
85
+ if (key === last.current) return;
86
+ const before = last.current; last.current = key;
87
+ if (before.endsWith(":installing") && job && job.state !== "installing") {
88
+ const label = INSTALL_CLIS.find(cli => cli.id === job.cli)?.label || job.cli;
89
+ setNote(job.state === "done" ? text("done", label, job.version || "") : job.error ? text("failed", label, job.version || "", job.error) : text("failedShort"));
90
+ onChanged?.();
91
+ }
92
+ }, [job]);
93
+ const switchState = view?.switches?.install;
94
+ const allowed = switchState?.on === true;
95
+ const row = cli => {
96
+ const entry = (machine.inventory?.clis || []).find(item => item.id === cli.id && item.path);
97
+ const pinned = view?.catalog?.find(item => item.id === cli.id)?.version || "";
98
+ // What the CLI printed is compared by its version number, whole; the path says nothing (the owner's own copy of the same version is just as installed).
99
+ const found = entry ? versionNumber(entry.version) : null, upToDate = !!entry && !!pinned && found === pinned;
100
+ const state = !entry ? text("notInstalled") : upToDate ? text("installed", found) : text("installedOther", entry.version || "?");
101
+ const start = async () => {
102
+ if (busy || !pinned) return;
103
+ if (!await confirmDialog({ message: text("ask", cli.label, pinned, machine.name), confirmLabel: text("confirm") })) return;
104
+ if (!lease.current()) return;
105
+ setBusy(true); setError(""); setNote("");
106
+ try {
107
+ const response = await lease.fetch(`/ui/runtimes/machines/${encodeURIComponent(machine.id)}/cli-install`, { method: "POST", credentials: "same-origin", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ cli: cli.id }) });
108
+ const value = await response.json().catch(() => ({}));
109
+ if (!lease.current()) return;
110
+ if (!response.ok) throw new Error(value.error || `HTTP ${response.status}`);
111
+ await load();
112
+ } catch (e) { if (lease.current()) setError(text("requestFailed", e.message)); }
113
+ finally { if (lease.current()) setBusy(false); }
114
+ };
115
+ return html`<li key=${cli.id} data-cli=${cli.id}><strong>${cli.label}</strong><span class="note">${state}</span>
116
+ ${upToDate ? null : html`<button type="button" class="btn btn-sm" disabled=${!allowed || !online || busy || running || !pinned} onClick=${start}>${entry ? text("reinstall", pinned) : text("install", pinned)}</button>`}</li>`;
117
+ };
118
+ return html`<div class="runtime-cli-install"><h4>${text("title")}</h4><p class="note">${text("lead")}</p>
119
+ ${!online ? html`<p class="note" role="status">${text("offline")}</p>`
120
+ // Ridge #3321 S06: until the computer's setting and the pinned versions are read, the shared loading state — not a
121
+ // settled-looking form of disabled buttons with empty versions; a first read that fails says so, with Retry.
122
+ : !view ? (error ? html`<${ErrorState} message=${error} onRetry=${() => setAttempt((n) => n + 1)} />` : html`<${Skeleton} variant="rows" lines=${2} label=${text("loading")} />`)
123
+ : !view.capable ? html`<p class="note" role="status">${text("old")}</p>` : html`
124
+ <ul class="runtime-cli-install-list" aria-label=${text("title")}>${INSTALL_CLIS.map(row)}</ul>
125
+ ${view && !view.switches ? html`<p class="note" role="status">${text("unreadable")}</p>` : null}
126
+ ${switchState && !allowed ? html`<p class="note runtime-cli-install-off" role="status">${text("switchOff")}</p><${CommandCard} label=${text("switchCommand")} command=${SWITCH_COMMAND} />` : null}
127
+ ${allowed ? html`<p class="note">${switchState.until ? text("switchUntil", new Date(switchState.until).toLocaleString()) : text("switchOn")}</p>` : null}
128
+ ${running ? html`<p class="note" role="status" aria-busy="true"><span class="out-spin" aria-hidden="true"></span> ${text("installing")}</p>` : null}
129
+ ${note ? html`<p class="note" role="status">${note}</p>` : null}
130
+ ${error ? html`<p class="runtime-error" role="alert">${error}</p>` : null}`}
131
+ <details class="runtime-cli-install-others"><summary>${text("othersTitle")}</summary><p class="note">${text("othersLead")}</p>
132
+ <ul>${OFFICIAL_COMMANDS.map(item => html`<li key=${item.id}><${CommandCard} label=${item.administrator ? `${item.label} (${text("needsAdmin")})` : item.label} command=${item.command} /></li>`)}</ul></details>
133
+ </div>`;
134
+ }
@@ -0,0 +1,2 @@
1
+ /** Hash-pinned installer in a fresh private install root; returns empty for an invalid origin or hash. */
2
+ export function runtimeFreshInstallCommand(server: unknown, scriptSha256: unknown): string;
@@ -0,0 +1,11 @@
1
+ import { runtimeInstallCommand } from "./runtime-commands.js";
2
+
3
+ /** Reuse the existing pinned installer; refuse rather than silently reuse an old/shared root. */
4
+ export function runtimeFreshInstallCommand(server, scriptSha256) {
5
+ const command = runtimeInstallCommand(server, scriptSha256);
6
+ if (!command) return "";
7
+ return `$agendFresh = $null; $agendFresh = Join-Path $env:LOCALAPPDATA ('agend-runtime-' + [Guid]::NewGuid().ToString('N')); `
8
+ + `if ($agendFresh -and -not (Test-Path -LiteralPath $agendFresh)) { $env:AGEND_RUNTIME_INSTALL_DIR = $agendFresh; $env:AGEND_RUNTIME_NO_PATH = '1'; $env:AGEND_RUNTIME_REPAIR = '1'; `
9
+ + `if ($env:AGEND_RUNTIME_INSTALL_DIR -eq $agendFresh -and $env:AGEND_RUNTIME_NO_PATH -eq '1' -and $env:AGEND_RUNTIME_REPAIR -eq '1') { ${command} } else { throw 'A fresh Runtime folder could not be selected' } } `
10
+ + `else { throw 'A fresh Runtime folder could not be selected' }`;
11
+ }
@@ -0,0 +1,53 @@
1
+ import { html } from "/assets/app-html.js";
2
+ import { register, t } from "/assets/app-i18n.js";
3
+ export { runtimeFreshInstallCommand } from "./runtime-update-commands.js";
4
+
5
+ // Lazy-owned copy also works with a shell opened before this feature existed.
6
+ register("runtimeUpdate", {
7
+ en: {
8
+ unknown: "Update status unavailable", current: "Matches the paired AgEnD build", pending: "Update pending: {0} / bundle {1}",
9
+ failed: "Update failed: {0} / bundle {1}", pendingHint: "Waiting for idle. Running panes and deliveries are kept.",
10
+ failedHint: "The previous code is kept. This build will not be retried until the paired AgEnD offers a different hash.",
11
+ unmanaged: "Reinstall once with the one-line command to enable automatic updates.",
12
+ shared: "This installation is shared. Use a separate installation for each paired AgEnD before enabling automatic updates.",
13
+ "another-runtime": "Updates are waiting for exclusive use of this installation. Close the other Runtime, or use a separate installation.",
14
+ recovery: "An interrupted update needs a fresh separate installation. Keep the existing profile and pairing.",
15
+ damaged: "This installation could not be verified. Reinstall into a fresh separate folder.",
16
+ running: "Running: {0} / build {1}", last: "Last reported update status; this connection has not confirmed it.",
17
+ repair: "Show reinstall command", repairTitle: "Enable automatic Runtime updates", repairHint: "Run agend-runtime status with the same --profile or AGEND_RUNTIME_HOME as this Runtime, note its profile folder, then close this Runtime. This command selects a fresh separate folder and verifies the installer from this AgEnD, leaving PATH unchanged. The installer prints a full-path run command; enter that same existing profile folder when asked. Your pairing is kept; no new pairing code is needed.",
18
+ attention: "Runtime update needs attention", open: "Open Runtime settings",
19
+ },
20
+ "zh-TW": {
21
+ unknown: "無法取得更新狀態", current: "與配對 AgEnD 的版本相符", pending: "更新待執行:{0}/套件 {1}",
22
+ failed: "更新失敗:{0}/套件 {1}", pendingHint: "正在等待閒置,執行中的 pane 與傳遞會保留。",
23
+ failedHint: "已保留原本程式。配對的 AgEnD 提供不同雜湊前,不會重試此套件。",
24
+ unmanaged: "使用一行安裝指令重新安裝一次,即可啟用自動更新。",
25
+ shared: "此安裝目錄由多個 AgEnD 共用。請為每個配對的 AgEnD 使用獨立安裝目錄,再啟用自動更新。",
26
+ "another-runtime": "更新正在等待獨佔此安裝目錄。請關閉另一個 Runtime,或使用獨立安裝目錄。",
27
+ recovery: "中斷的更新需要重新安裝到獨立目錄。請保留既有設定檔與配對。",
28
+ damaged: "無法驗證此安裝。請重新安裝到全新的獨立目錄。",
29
+ running: "執行中:{0}/組建 {1}", last: "這是上次回報的更新狀態,目前連線尚未確認。",
30
+ repair: "顯示重新安裝指令", repairTitle: "啟用 Runtime 自動更新", repairHint: "沿用此 Runtime 原本的 --profile 或 AGEND_RUNTIME_HOME 執行 agend-runtime status,記下設定檔資料夾,再關閉此 Runtime。指令會選擇全新的獨立目錄,並驗證來自這台 AgEnD 的安裝程式,不會變更 PATH。請執行安裝程式顯示的完整路徑 run 指令,並在詢問時輸入原本的設定檔資料夾;既有配對會保留,不需要新的配對碼。",
31
+ attention: "Runtime 更新需要處理", open: "開啟 Runtime 設定",
32
+ },
33
+ });
34
+ export const runtimeUpdateText = (key, ...args) => t(`runtimeUpdate.${key}`, ...args);
35
+ const reasons = new Set(["unmanaged", "shared", "another-runtime", "recovery", "damaged"]);
36
+ export function RuntimeUpdateNotice({ machine, onRepair }) {
37
+ const report = machine.updateReport, status = report?.status;
38
+ const fresh = machine.status === "online" && report?.bootId === machine.bootId && report?.generation === machine.generation;
39
+ const state = ["current", "pending", "failed", "manual"].includes(status?.state) ? status.state : "unknown";
40
+ const reason = state === "manual" && reasons.has(status.reason) ? status.reason : "";
41
+ const target = (state === "pending" || state === "failed") && status.target;
42
+ const label = state === "manual" ? reason ? runtimeUpdateText(reason) : runtimeUpdateText("unknown")
43
+ : state === "current" && !fresh ? runtimeUpdateText("unknown")
44
+ : target ? runtimeUpdateText(state, target.version, target.bundleSha256.slice(0, 8)) : runtimeUpdateText(state);
45
+ const repair = reason && reason !== "another-runtime" || state === "unknown" && machine.status === "online" && !machine.runtimeInfo?.capabilities?.includes("managed-update-status-v1");
46
+ return html`<section class="runtime-update-notice" role=${state === "failed" ? "alert" : "status"}>
47
+ <p>${label}</p>
48
+ ${report && !fresh ? html`<p class="note">${runtimeUpdateText("last")}</p>` : null}
49
+ ${state === "pending" || state === "failed" ? html`<p class="note">${runtimeUpdateText(`${state}Hint`)}</p>` : null}
50
+ ${target && machine.runtimeInfo ? html`<p class="note">${runtimeUpdateText("running", machine.runtimeInfo.version || "—", machine.runtimeInfo.buildId?.slice(0, 8) || "—")}</p>` : null}
51
+ ${repair ? html`<button type="button" class="btn btn-sm" onClick=${onRepair}>${runtimeUpdateText("repair")}</button>` : null}
52
+ </section>`;
53
+ }
@@ -12,6 +12,7 @@ import { navigate } from "/assets/app-nav.js";
12
12
  import { chatPath, fleetPath } from "/assets/app-route.js";
13
13
  import { namesOf, namesStore } from "/assets/instance-nav.js";
14
14
  import { Icon } from "/assets/ui-icons.js";
15
+ import { Skeleton } from "/assets/ui-states.js";
15
16
  import { goToSetting, searchSettings, settingLabel } from "./settings-registry.js";
16
17
  import "./settings-strings.js";
17
18
  import "./settings-shared-strings.js"; // the "where" of a result is settings.sec_<section>; sec_agent-defaults is one of these words
@@ -334,7 +335,7 @@ function Results({ guest = false, q, res, groups, settings = [], active, setActi
334
335
  return html`
335
336
  ${res.building ? html`<p class="search-note" role="status">${t("search.building")}</p>` : null}
336
337
  ${res.limited ? html`<p class="search-note" role="status">${t("search.limited")}</p>` : null}
337
- ${res.status === "loading" && !hits.length ? html`<p class="search-status" role="status">${t("search.searching")}</p>` : null}
338
+ ${res.status === "loading" && !hits.length ? html`<${Skeleton} variant="rows" lines=${4} label=${t("search.searching")} />` : null}
338
339
  ${failed ? html`<p class="search-status bad" role="alert">${res.error}</p>` : null}
339
340
  ${res.status === "ok" && !hits.length && !settings.length ? html`<p class="search-status" role="status">${filtered ? t("search.noneFiltered") : t("search.none")}</p>` : null}
340
341
  <div id="search-results" role="listbox" aria-label=${t("search.results")} class=${`search-results${res.status === "loading" ? " stale" : ""}`}>
@@ -369,7 +370,7 @@ function Detail({ detail, q, label, onBack, onClose }) {
369
370
  const head = html`<div class="search-detail-head"><button type="button" class="chip-btn" onClick=${onBack}><${Icon} name="back" size=${14} />${t("search.back")}</button>
370
371
  <span class=${`search-badge ${hit.source}`}>${t(`search.badge_${hit.source}`)}</span><span class="search-who">${hit.source === "xmsg" ? t("search.from", label(hit.instance), label(hit.peer || "")) : label(hit.instance)}</span>
371
372
  <time class="search-time">${when(hit.ts)}</time></div>`;
372
- if (detail.status === "loading") return html`<div class="search-detail">${head}<p class="search-status" role="status">${t("search.loadingCtx")}</p></div>`;
373
+ if (detail.status === "loading") return html`<div class="search-detail">${head}<${Skeleton} lines=${6} label=${t("search.loadingCtx")} /></div>`;
373
374
  if (detail.status === "error") return html`<div class="search-detail">${head}<p class="search-status bad" role="alert">${detail.error}</p></div>`;
374
375
  const ctx = detail.ctx || {};
375
376
  const doc = ctx.doc || {};
@@ -67,6 +67,13 @@ function publish() {
67
67
  withdraw: view.can_withdraw && view.state === "pending" ? () => withdraw(view.id) : null,
68
68
  // #2868: this browser may confirm it itself now (the server's read says so; it checks again on the click).
69
69
  applyNow: view.can_self_confirm && view.state === "pending" ? () => applyNow(view.id) : null,
70
+ // alpha.6 #2c (hmsg-468cc290): a web-only fleet's own page may confirm it with the authenticator's code.
71
+ confirmWithCode: view.totp === "ready" && view.state === "pending" ? (code) => confirmWithCode(view.id, code) : null,
72
+ totpNotSetUp: view.totp === "not_set_up" && view.state === "pending",
73
+ // Over a link (the leader's ruling (b)): no code here — confirm it in the host computer's own browser, or in General.
74
+ onHost: view.totp === "on_host" && view.state === "pending",
75
+ // A link option turned on (#2453, the leader's ruling on D3): only the browser on the AgEnD computer itself confirms it.
76
+ hostBrowser: view.totp === "host_browser" && view.state === "pending",
70
77
  dismiss: TERMINAL.has(view.state) ? () => forget(view.id) : null,
71
78
  })),
72
79
  });
@@ -168,6 +175,27 @@ export async function applyNow(id) {
168
175
  return { ok: false, status: res.status };
169
176
  }
170
177
 
178
+ /**
179
+ * alpha.6 feedback #2c (the user's decision hmsg-468cc290): confirm a pending change on this computer's own page with the
180
+ * owner's authenticator code. The server checks the code (each time step once, the fleet-wide wrong-code limit) and asks
181
+ * again at execution. { ok } or why not: "wrong", "paused" (retryAfterMs), "not_here" (this page can no longer), "unavailable".
182
+ */
183
+ export async function confirmWithCode(id, code) {
184
+ const e = tracked.get(id);
185
+ if (!e) return { ok: false, error: "not_here" };
186
+ const token = ticket(e);
187
+ let res;
188
+ try { res = await api(`/api/settings/pending/${encodeURIComponent(id)}/confirm-totp`, { method: "POST", body: JSON.stringify({ code: String(code || "").replace(/\s+/g, ""), digest: String(e.view.confirm_digest || "") }) }); }
189
+ catch { return { ok: false, error: "unavailable" }; }
190
+ if (isPendingResponse(res) && res.body.pending_change.id === id) { update(res.body.pending_change, token); schedule(); return { ok: true }; }
191
+ if (res.status === 401 && res.body && res.body.error === "wrong_code") return { ok: false, error: "wrong" };
192
+ if (res.status === 429) return { ok: false, error: "paused", retryAfterMs: Number(res.body && res.body.retryAfterMs) || null };
193
+ // The change is not the one this page showed (#3352 security review, point 2): read it again; the code was not used.
194
+ if (res.status === 409 && res.body && res.body.error === "confirmation_changed") return { ok: false, error: "changed" };
195
+ if (res.status === 403) { if (e.view.totp) update({ ...e.view, totp: undefined }, token); return { ok: false, error: "not_here" }; }
196
+ return { ok: false, error: "unavailable" };
197
+ }
198
+
171
199
  /** This session's requests still open on the server (after a reload): followed like new ones. */
172
200
  export async function attach() {
173
201
  let res;
@@ -12,9 +12,9 @@
12
12
  // with the authenticator's code. Anyone else sees the card, the explanation and a disabled button. The server decides
13
13
  // that on every request and refuses everything else regardless (POST /ui/devices/{lookup,approve,deny} → 403).
14
14
  // Refs #3061 (review of P2b): with web authorization off nobody is an owner, so nobody can add a device or sign another out —
15
- // the card says so and points to `agend web-token rotate` on the AgEnD computer (which ends every session); and the
16
- // confirm screen leads with where the request is from and its address (the device name is the browser's own word and can be
17
- // faked) and says to allow only when the new device shows the same code.
15
+ // this card is web-only (the reader is on the AgEnD computer's dashboard), so it explains that and does not name General
16
+ // or ask the computer's owner; and the confirm screen leads with where the request is from and its address (the device
17
+ // name is the browser's own word and can be faked) and says to allow only when the new device shows the same code.
18
18
  // The words are English and 繁體中文, as everything in src/ui (tests/i18n-ui-literals-2390.test.ts).
19
19
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
20
20
  import { t, register } from "/assets/app-i18n.js";
@@ -46,8 +46,7 @@ register("devices", {
46
46
  signOutTitle: "Sign out this device?", signOutLead: "{0} will have to sign in again.", signOutGo: "Sign out",
47
47
  signedOut: "{0} was signed out.", alreadyGone: "That device is already signed out.",
48
48
  notSaved: "Signed out for now, but the change could not be saved: a restart may bring the session back. Fix the permissions on ~/.agend/web-sessions.json and sign it out again.",
49
- authorityOffA: "Web authorization is off, so no device is the owner: none can add a device or sign another one out. To sign the other devices out, run ",
50
- authorityOffB: " on the AgEnD computer. It ends every session, this one included, and every device has to sign in again.",
49
+ authorityOff: "Web authorization is off, so no device is the owner: none can add a device or sign another one out.",
51
50
  },
52
51
  "zh-TW": {
53
52
  title: "裝置與登入", lead: "用 8 碼代碼讓新裝置登入。在已登入且已驗證擁有者的裝置上,到這裡核准。",
@@ -73,13 +72,10 @@ register("devices", {
73
72
  signOutTitle: "登出這台裝置?", signOutLead: "{0} 需要重新登入。", signOutGo: "登出",
74
73
  signedOut: "已登出 {0}。", alreadyGone: "這台裝置已經登出了。",
75
74
  notSaved: "暫時登出了,但變更沒能存檔:重新啟動後這個工作階段可能會回來。請修正 ~/.agend/web-sessions.json 的權限,再登出一次。",
76
- authorityOffA: "網頁授權已關閉,所以沒有任何裝置是擁有者:不能新增裝置,也不能登出其他裝置。要登出其他裝置,請在 AgEnD 電腦上執行 ",
77
- authorityOffB: "。這個指令會結束所有工作階段(包括目前這個),每台裝置都要重新登入。",
75
+ authorityOff: "網頁授權已關閉,所以沒有任何裝置是擁有者:不能新增裝置,也不能登出其他裝置。",
78
76
  },
79
77
  });
80
78
  const td = (k, ...v) => t(`devices.${k}`, ...v);
81
- /** The one thing that signs other devices out when nobody is an owner: a command, the same in both languages. */
82
- export const ROTATE_COMMAND = "agend web-token rotate";
83
79
 
84
80
  /** A wait as words: "2 minutes" / 「2 分鐘」 (rounded up). */
85
81
  export function pauseWords(ms) {
@@ -241,7 +237,7 @@ export function DevicesCard() {
241
237
  </li>`)}</ul>
242
238
  ${others && !s.owner && !authorityOff ? html`<p class="note" id="devicesSignOutOwnerOnly">${td("signOutOwnerOnly")}</p>` : null}
243
239
  ${note ? html`<p class=${`note ${note.ok ? "" : "error"}`} role=${note.ok ? "status" : "alert"} id="devicesNote">${note.text}</p>` : null}` : null}
244
- ${authorityOff ? html`<p class="note s-va-warn" id="devicesAuthorityOff">${td("authorityOffA")}<code id="devicesRotate">${ROTATE_COMMAND}</code>${td("authorityOffB")}</p>`
240
+ ${authorityOff ? html`<p class="note s-va-warn" id="devicesAuthorityOff">${td("authorityOff")}</p>`
245
241
  : !s.owner ? html`<p class="note" id="devicesOwnerOnly">${td("ownerOnly")}</p>` : null}
246
242
  <div class="save-row"><button type="button" class="btn btn-primary" id="devicesAdd" disabled=${!s.owner} onClick=${open}>${td("add")}</button></div>
247
243
  ${dlg ? html`<${Dialog} title=${td("dlgTitle")} onClose=${close} busy=${busy} actions=${actions}>${body}</${Dialog}>` : null}
@@ -11,6 +11,7 @@
11
11
  // reset from ctx.fleet), ctx.readOnly (the public link: controls disabled, actions hidden), `s-dirty` on edited rows.
12
12
  import { html, useEffect, useMemo, useState } from "/assets/app-html.js";
13
13
  import { t } from "/assets/app-i18n.js";
14
+ import { Skeleton } from "/assets/ui-states.js";
14
15
  import { toast } from "/assets/ui-toast.js";
15
16
  import { confirmDialog } from "/assets/ui-confirm.js";
16
17
  import { api } from "./settings-confirm.js";
@@ -227,7 +228,7 @@ export function GuestsSection({ ctx, staged }) {
227
228
  <p class="note">${tn("guestsChatHint")}</p>
228
229
  </div></div>
229
230
  ${failed ? html`<p class="note" role="status">${tn("guestsLoadFailed")} <button type="button" class="btn btn-sm" onClick=${load}>${t("app.retry")}</button></p>`
230
- : !overview ? html`<p class="note">${t("app.loading")}</p>` : null}
231
+ : !overview ? html`<${Skeleton} variant="rows" lines=${3} />` : null}
231
232
  ${!f.grants && overview ? html`<div class="g-legacy"><p class="note">${tn("grantsLegacy")}</p>
232
233
  ${readOnly ? null : html`<button type="button" class="btn btn-sm" id="grantsConvert" onClick=${convert}>${tn("grantsConvert")}</button>`}</div>` : null}
233
234
  <div class="s-guest-workbench"><section class="s-guest-list-card"><h4>${layoutText("revGuestManagement")}</h4>
@@ -273,7 +274,7 @@ export function GuestsSection({ ctx, staged }) {
273
274
  })}${!rows.length ? html`<p class="note">${layoutText("revSelectGuest")}</p>` : null}</aside></div>
274
275
  ${readOnly ? null : html`<details class="s-guest-add"><summary>${tn("grantsAdd")}</summary><div>
275
276
  <input type="search" class="input g-search" id="grantsSearch" value=${query} aria-label=${tn("grantsSearch")} placeholder=${tn("grantsSearch")} onInput=${(e) => setQuery(e.target.value)} />
276
- ${people === null ? html`<p class="note">${t("app.loading")}</p>` : !candidates.length ? html`<p class="note" id="grantsNoPeople">${tn("grantsNoPeople")}</p>`
277
+ ${people === null ? html`<${Skeleton} variant="rows" lines=${3} />` : !candidates.length ? html`<p class="note" id="grantsNoPeople">${tn("grantsNoPeople")}</p>`
277
278
  : html`<ul class="g-pick">${candidates.map((p) => html`<li key=${accountKey(p)} class="g-cand" data-account=${accountKey(p)}>
278
279
  <span class="g-av" aria-hidden="true">${(p.name || "?").slice(0, 1).toUpperCase()}</span>
279
280
  <div class="g-id"><strong>${p.name}</strong> <span class="note">${PLATFORMS[p.platform] || p.platform}${p.username ? ` · @${p.username}` : ""} · <span class="g-when">${tn("grantsLastSeen", new Date(p.lastSeen).toLocaleString())}</span></span>
@@ -1,5 +1,6 @@
1
1
  // Lazy host-only card. Own every string so a retained Settings shell can load this newer card.
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("hubBrowserCertificate", {
@@ -58,6 +59,7 @@ export function HubBrowserCertificateSettings() {
58
59
  };
59
60
  const details = info => html`<dl class="s-web-ro"><dt>${copy("fingerprint")}</dt><dd>${info.fingerprint256}</dd><dt>${copy("expires")}</dt><dd>${info.validTo}</dd></dl>`;
60
61
  return html`<section class="card hub-browser-certificate"><h3>${copy("title")}</h3><p class="note">${copy("boundary")}</p>
62
+ ${!view && !messageKey ? html`<${Skeleton} variant="form" lines=${4} />` : null}
61
63
  ${view ? html`${details(view.selected)}${view.restartRequired ? html`<p role="status">${copy("restart")}</p>` : null}
62
64
  <form class="form" onSubmit=${prepare}><label class="field"><select aria-label=${copy("title")} value=${mode} disabled=${busy} onChange=${e => { setMode(e.target.value); setProposal(null); }}>
63
65
  <option value="generate">${copy("generate")}</option><option value="import">${copy("import")}</option></select></label>
@@ -1,5 +1,6 @@
1
1
  // Pure lazy owner Settings while off. Hub clients/pairing UI load only after a saved on state and a member page mark.
2
2
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
3
+ import { Skeleton, ErrorState } 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("hubMembership", {
@@ -13,12 +14,12 @@ register("hubMembership", {
13
14
  retry: "Check again", reload: "Reload page", reloadHint: "Reload the page to refresh the Hub controls.",
14
15
  },
15
16
  "zh-TW": {
16
- title: "Hub 成員功能", enabled: "允許這個艦隊連線至 Hub",
17
- hint: "預設關閉。啟用不會自動配對 Hub 或分享代理;請在下方另外選擇。",
18
- off: "關閉後會停止新的 Hub 工作與回答傳送,既有代理對話會保留。",
17
+ title: "Hub 成員功能", enabled: "允許這個 Fleet 連線至 Hub",
18
+ hint: "預設關閉。啟用不會自動配對 Hub 或分享 Agent;請在下方另外選擇。",
19
+ off: "關閉後會停止新的 Hub 工作與回答傳送,既有 Agent 對話會保留。",
19
20
  loading: "正在讀取成員設定…", pending: "等待擁有者確認…",
20
21
  failed: "無法確認成員設定是否已變更。請再次檢查,再嘗試其他變更。",
21
- unavailable: "目前無法使用成員設定。請開啟這個艦隊自己的擁有者設定頁面,再次檢查。",
22
+ unavailable: "目前無法使用成員設定。請開啟這個 Fleet 自己的擁有者設定頁面,再次檢查。",
22
23
  retry: "再次檢查", reload: "重新整理頁面", reloadHint: "請重新整理頁面以更新 Hub 控制項。",
23
24
  },
24
25
  });
@@ -29,9 +30,11 @@ export function HubMembershipSettings() {
29
30
  const publicPage = globalThis.document?.body?.dataset?.publicLink === "1";
30
31
  const [view, setView] = useState(null), [busy, setBusy] = useState(false), [messageKey, setMessageKey] = useState("loading");
31
32
  const [Connect, setConnect] = useState(null);
33
+ const [connectError, setConnectError] = useState(false), [attempt, setAttempt] = useState(0);
32
34
  const owner = useRef({ mounted: true, seq: 0, busy: false });
33
35
  const read = async () => {
34
36
  const seq = ++owner.current.seq;
37
+ if (!view) setMessageKey("loading");
35
38
  let result; try { result = await api(path); } catch { result = null; }
36
39
  if (!owner.current.mounted || owner.current.seq !== seq) return;
37
40
  if (result?.ok && typeof result.body?.enabled === "boolean") { setView({ enabled: result.body.enabled }); setMessageKey(""); }
@@ -44,9 +47,12 @@ export function HubMembershipSettings() {
44
47
  }, [publicPage]);
45
48
  useEffect(() => {
46
49
  let live = true;
47
- if (!publicPage && view?.enabled && markedMember()) import("./settings-hub.js").then(m => { if (live) setConnect(() => m.HubConnectCard); }, () => {});
50
+ if (!publicPage && view?.enabled && markedMember()) {
51
+ setConnectError(false);
52
+ import("./settings-hub.js").then(m => { if (live) setConnect(() => m.HubConnectCard); }, () => { if (live) setConnectError(true); });
53
+ }
48
54
  return () => { live = false; };
49
- }, [publicPage, view?.enabled]);
55
+ }, [publicPage, view?.enabled, attempt]);
50
56
  const change = async enabled => {
51
57
  if (publicPage || !view || owner.current.busy) return;
52
58
  owner.current.busy = true; owner.current.seq++; setBusy(true); setMessageKey("");
@@ -60,13 +66,13 @@ export function HubMembershipSettings() {
60
66
  finally { owner.current.busy = false; if (owner.current.mounted) setBusy(false); }
61
67
  };
62
68
  if (publicPage) return null;
63
- return html`<div class="form hub-membership-settings"><section class="card">
69
+ return html`<div class="form hub-membership-settings"><section class="card" id="hub-membership">
64
70
  <h3>${copy("title")}</h3><p class="note">${copy("hint")}</p>
65
- <label class="check"><input class="s-ui-toggle" type="checkbox" role="switch" checked=${view?.enabled === true}
66
- disabled=${!view || busy} onChange=${e => change(e.target.checked)} /><span>${copy("enabled")}</span></label>
71
+ ${!view && messageKey === "loading" ? html`<${Skeleton} variant="rows" lines=${2} label=${copy("loading")} />` : html`<label class="check"><input id="hubMemberEnabled" class="s-ui-toggle" type="checkbox" role="switch" checked=${view?.enabled === true}
72
+ disabled=${!view || busy} onChange=${e => change(e.target.checked)} /><span>${copy("enabled")}</span></label>`}
67
73
  <p class="note">${copy("off")}</p>
68
- ${messageKey ? html`<p role="status">${copy(messageKey)}</p>` : null}
74
+ ${messageKey && messageKey !== "loading" ? html`<p role="status">${copy(messageKey)}</p>` : null}
69
75
  ${!view && !busy && messageKey !== "loading" ? html`<button class="btn btn-sm" type="button" onClick=${read}>${copy("retry")}</button>` : null}
70
76
  ${view && view.enabled !== markedMember() ? html`<p class="note">${copy("reloadHint")} <button class="btn btn-sm" type="button" disabled=${busy} onClick=${() => location.reload()}>${copy("reload")}</button></p>` : null}
71
- </section>${view?.enabled && markedMember() && Connect ? html`<${Connect} />` : null}</div>`;
77
+ </section>${view?.enabled && markedMember() ? Connect ? html`<${Connect} />` : connectError ? html`<${ErrorState} message=${copy("unavailable")} onRetry=${() => setAttempt(n => n + 1)} />` : html`<${Skeleton} variant="form" lines=${4} />` : null}</div>`;
72
78
  }