@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
@@ -0,0 +1,155 @@
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 "./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
+ }
@@ -24,3 +24,7 @@
24
24
  .runtime-profile-default { padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-2); font-size: var(--fs-xs); }
25
25
  .runtime-profiles .note, .runtime-profiles-old { margin: 4px 0 0; font-size: var(--fs-xs); }
26
26
  .runtime-profiles-old { margin-bottom: 16px; }
27
+ /* Lazy Runtime update diagnostics remain readable with an older app.css. */
28
+ .runtime-update-notice { margin-block: .75rem; padding: .6rem .8rem; border-inline-start: 3px solid var(--border, #777); }
29
+ .runtime-update-notice p { margin-block: .25rem; overflow-wrap: anywhere; }
30
+ .runtime-update-notice[role="alert"] { border-inline-start-color: var(--warning, #b87218); }
@@ -17,6 +17,8 @@
17
17
  nobot: "No chat bot?", nobot_body: "Ask the operator to run agend web --code on the AgEnD computer.",
18
18
  safe: "Page looks wrong after signing in?", safe_body: "Your custom CSS may be hiding something. Add ?safe=1 to the end of the address to load the page without it, then fix it or turn it off in Settings → Look.",
19
19
  refused: "The code is invalid or no longer works. Send /web in General, then press a sign-in button for a new code.",
20
+ // #3270: the code in the opened link did not work (expired, used, or the fleet restarted). It is never put back in the box.
21
+ autofail: "The automatic sign-in did not work — its code has expired or was already used. Run agend web on the AgEnD computer for a new one.",
20
22
  unconfirmed: "Sign-in could not be confirmed. Get a new code and try again; if it keeps failing, contact the operator.",
21
23
  paused: "Too many wrong codes — sign-in is paused for a few minutes.",
22
24
  network: "Could not reach AgEnD. Check the connection and try again.",
@@ -50,6 +52,7 @@
50
52
  nobot: "沒有聊天 bot?", nobot_body: "請管理員在 AgEnD 電腦執行 agend web --code。",
51
53
  safe: "登入後畫面不對勁?", safe_body: "可能是你的自訂 CSS 把東西藏起來了。在網址最後加上 ?safe=1,就會不套用它地載入;再到「設定 → 外觀」修正或關閉。",
52
54
  refused: "登入碼無效或已失效。請在 General 傳 /web,再按登入按鈕取新碼。",
55
+ autofail: "自動登入沒有成功:登入碼已過期或已使用過。請在 AgEnD 電腦上執行 agend web 取得新的登入碼。",
53
56
  unconfirmed: "登入暫時無法確認。請重新取碼再試;若仍失敗,請聯絡管理員。",
54
57
  paused: "錯誤次數過多,登入暫停幾分鐘。",
55
58
  network: "連不上 AgEnD,請檢查連線後再試。",
@@ -85,6 +88,8 @@
85
88
  const deviceLogin = webOnly && !outside && document.body.getAttribute("data-device-login") === "1";
86
89
  // #3061 (P2b): …and, when `web.login_qr` is on (<body data-login-qr="1">), it also draws the QR code of the approve link.
87
90
  const loginQr = deviceLogin && document.body.getAttribute("data-login-qr") === "1";
91
+ // Reserve the gated action while the form is still hidden, so ending the session read does not resize the card.
92
+ if (deviceLogin) $("another").hidden = false;
88
93
  const t = (k) => (outside && (T[lang][`${k}_outside`] || T.en[`${k}_outside`])) || (webOnly && (T[lang][`${k}_web`] || T.en[`${k}_web`])) || T[lang][k] || T.en[k] || k;
89
94
  /** A wait as words: "15 minutes" / 「15 分鐘」, "2 hours" / 「2 小時」 (rounded up). */
90
95
  const duration = (ms) => {
@@ -96,12 +101,37 @@
96
101
  // …and no "No chat bot?" help: the hint above already is it.
97
102
  if (webOnly) document.querySelectorAll("details.help").forEach((d) => { if (d.querySelector && d.querySelector('[data-i18n="nobot"]')) d.hidden = true; });
98
103
  document.documentElement.lang = lang === "zh-TW" ? "zh-Hant" : "en";
104
+ $("checking").setAttribute?.("aria-label", t("checking"));
99
105
  if (outside) {
100
106
  const input = $("code");
101
107
  input.setAttribute("inputmode", "numeric"); input.setAttribute("maxlength", "7"); input.setAttribute("placeholder", "123456");
102
108
  input.setAttribute("pattern", "[0-9 ]*");
103
109
  }
104
110
 
111
+ // #3270: `agend web` opens this page on this computer as /signin#code=XXXX-XXXX. A fragment is never sent to the server, a
112
+ // log or a Referer; it is read here and taken out of the address bar and the history entry BEFORE anything else runs —
113
+ // before any request this script makes — so it cannot be copied, bookmarked or shared from the address bar. It is
114
+ // cleared wherever the page is (a link pasted from the terminal must not leave a code behind), but it is only ever
115
+ // exchanged on this computer's own loopback name: a page reached by any other name never spends it on its own. It is
116
+ // also only exchanged on a fresh navigation by a browser with no session yet (below) — a reload or a history entry that
117
+ // still carried a code must not sign a different session in over the one the person has.
118
+ const LOOPBACK_NAMES = /^(localhost|127\.0\.0\.1|::1|\[::1\])$/i;
119
+ let fragmentCode = null;
120
+ try {
121
+ const params = new URLSearchParams(String(location.hash || "").replace(/^#/, ""));
122
+ if (params.has("code")) {
123
+ const raw = params.get("code") || "";
124
+ history.replaceState(null, "", location.pathname + location.search);
125
+ if (/^[A-Za-z0-9]{4}-?[A-Za-z0-9]{4}$/.test(raw)) fragmentCode = raw;
126
+ }
127
+ } catch { /* nothing to clean */ }
128
+ let freshNavigation = true;
129
+ try {
130
+ const nav = typeof performance === "object" && performance && typeof performance.getEntriesByType === "function" ? performance.getEntriesByType("navigation")[0] : null;
131
+ if (nav && nav.type && nav.type !== "navigate") freshNavigation = false;
132
+ } catch { /* no navigation timing: treat as fresh */ }
133
+ const autoCode = fragmentCode && freshNavigation && !outside && LOOPBACK_NAMES.test(location.hostname || "") ? fragmentCode : null;
134
+
105
135
  // An old dashboard link carries `?token=`. It is not a credential any more (the server ignored it and
106
136
  // answered with this page), but it is still the fleet's token: take it out of the address bar and
107
137
  // the history entry at once, so it is not copied, bookmarked or shared from here.
@@ -171,7 +201,6 @@
171
201
  } catch { /* private mode */ }
172
202
  $("code").focus();
173
203
  offerResend();
174
- if (deviceLogin) $("another").hidden = false;
175
204
  }
176
205
 
177
206
  // Only a returning device gets the button; the answer is a boolean and asking has no side effect. Never from outside
@@ -241,6 +270,7 @@
241
270
  const clock = (ms) => { const s = Math.max(0, Math.ceil(ms / 1000)); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`; };
242
271
  function devStop() {
243
272
  hideQr();
273
+ if ($("devLoading")) $("devLoading").hidden = true;
244
274
  if (!dev) return;
245
275
  dev.stopped = true;
246
276
  clearTimeout(dev.poll); clearInterval(dev.tick);
@@ -288,13 +318,15 @@
288
318
  devStop();
289
319
  $("form").hidden = true; $("device").hidden = false; $("devNew").hidden = true;
290
320
  hideQr();
291
- $("devCode").textContent = "XXXX-XXXX";
321
+ $("devCode").textContent = "";
322
+ if ($("devLoading")) { $("devLoading").hidden = false; $("devLoading").setAttribute?.("aria-label", t("dev_title")); }
292
323
  devSay("", false, true);
293
324
  const mine = { stopped: false, poll: 0, tick: 0, deadline: 0, lost: 0 };
294
325
  dev = mine;
295
326
  let made;
296
327
  try { made = await devCall("", mine); } catch { if (!mine.stopped) devEnded(t("dev_failed"), true); return; }
297
328
  if (mine.stopped || !made) return;
329
+ if ($("devLoading")) $("devLoading").hidden = true;
298
330
  const { r, body } = made;
299
331
  if (!r.ok || !body || typeof body.code !== "string") {
300
332
  if (r.status === 429) {
@@ -364,6 +396,28 @@
364
396
  } catch { return false; }
365
397
  }
366
398
 
399
+ // What a refused POST /auth/login says (the form's and the fragment's exchange alike): 429 and 5xx are not a wrong code.
400
+ const failureText = (status) => (status === 429 ? t("paused") : status >= 500 ? t("unconfirmed") : t("refused"));
401
+
402
+ // #3270: the exchange of the code `agend web` put in the fragment. Resolves null once the browser is on its way into the
403
+ // app, else the words for why not — the form then shows them, so an expired or used code never leaves a blank page. The
404
+ // code itself is never shown or put in the box: whatever it was, it is spent or useless now.
405
+ async function autoSignIn(code) {
406
+ $("checking").textContent = t("working");
407
+ try {
408
+ const r = await fetch("/auth/login", {
409
+ method: "POST",
410
+ credentials: "same-origin",
411
+ headers: { "Content-Type": "application/json" },
412
+ body: JSON.stringify({ code }),
413
+ });
414
+ if (r.ok) { clearBounce(); location.replace(nextTarget()); return null; }
415
+ return r.status === 429 || r.status >= 500 ? failureText(r.status) : t("autofail");
416
+ } catch {
417
+ return t("network");
418
+ }
419
+ }
420
+
367
421
  $("form").addEventListener("submit", async (event) => {
368
422
  event.preventDefault();
369
423
  const button = $("go");
@@ -388,7 +442,7 @@
388
442
  }
389
443
  // #1854: a 5xx is the server failing to confirm the sign-in (503: a public link's notice did not go out), not a
390
444
  // wrong code — say so. The code is spent either way: the way on is a new one.
391
- msg.textContent = r.status === 429 ? t("paused") : r.status >= 500 ? t("unconfirmed") : t("refused");
445
+ msg.textContent = failureText(r.status);
392
446
  } catch (err) {
393
447
  if (err !== "shown") msg.textContent = t("network");
394
448
  }
@@ -397,8 +451,16 @@
397
451
  $("code").select();
398
452
  });
399
453
 
400
- probe().then((signedIn) => {
401
- if (signedIn) { markBounce(); location.replace(nextTarget()); return; }
454
+ (async () => {
455
+ // Someone who already has a session is simply let in: the code in the link is not exchanged over it (it stays unspent
456
+ // and, being from a link, short-lived anyway).
457
+ if (await probe()) { markBounce(); location.replace(nextTarget()); return; }
458
+ let failure = null;
459
+ if (autoCode) {
460
+ failure = await autoSignIn(autoCode);
461
+ if (failure === null) return;
462
+ }
402
463
  showForm();
403
- });
464
+ if (failure) $("msg").textContent = failure;
465
+ })();
404
466
  })();
@@ -3,9 +3,20 @@ import { html } from "./app-html.js";
3
3
  import { Icon } from "./ui-icons.js";
4
4
  import { t } from "./app-i18n.js";
5
5
 
6
- /** Placeholder lines while something loads. Shown only after 300 ms (CSS), so a fast load never flashes. */
7
- export function Skeleton({ lines = 3 }) {
8
- return html`<div class="skeleton" aria-busy="true" aria-label=${t("app.loading")}>${Array.from({ length: lines }, (_, i) => html`<div key=${i} class="sk-line"></div>`)}</div>`;
6
+ // Lazy panels can arrive in a shell with an older app.css. Keep the loading shapes in their own public stylesheet.
7
+ function loadingStyles() {
8
+ if (typeof document === "undefined" || !document.head || document.querySelector('link[href="/assets/loading.css"]')) return;
9
+ const link = document.createElement("link"); link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/loading.css");
10
+ document.head.appendChild(link);
11
+ }
12
+ /** Initial data only: retain populated content on refresh. Existing callers still get simple text lines. */
13
+ export function Skeleton({ lines = 3, variant = "lines", label }) {
14
+ loadingStyles();
15
+ return html`<div class=${`skeleton sk-${variant}`} role="status" aria-busy="true" aria-label=${label || t("app.loading")}>
16
+ <div aria-hidden="true">${Array.from({ length: lines }, (_, i) => variant === "rows" || variant === "cards"
17
+ ? html`<div key=${i} class="sk-row"><div class="sk-line sk-thumb"></div><div class="sk-copy"><div class="sk-line"></div><div class="sk-line"></div></div><div class="sk-line sk-pill"></div></div>`
18
+ : html`<div key=${i} class="sk-line"></div>`)}</div>
19
+ </div>`;
9
20
  }
10
21
 
11
22
  export function Empty({ icon = "info", title, hint, action }) {
@@ -143,8 +143,8 @@ register("view", {
143
143
  "usage.hint.grok_no_login": "auth.json has no usable login. Run `grok login`.",
144
144
  "usage.hint.login_kiro": "Log in with the Kiro CLI (`kiro-cli`).",
145
145
  "usage.hint.kiro_signed_out": "Signed out — run `kiro-cli` to log in.",
146
- "usage.hint.claude_profile_signed_out": "Not logged in — sign in with: {0}",
147
- "usage.hint.claude_profile_signed_out_chat": "Not logged in — sign in with `{0}` (or run `{1}` on the host).",
146
+ "usage.hint.claude_profile_signed_out": "Not logged in — sign in from Settings → Agents → AI sign-ins and API keys → Accounts.",
147
+ "usage.hint.claude_profile_signed_out_chat": "Not logged in — sign in from Settings → Agents → AI sign-ins and API keys → Accounts, or with `{0}`.",
148
148
  "usage.hint.token_refreshing": "Token refreshing — try again in a moment.",
149
149
  "usage.hint.subscription_no_credit": "Subscription — no credit usage to report.",
150
150
  "usage.hint.no_quota_account": "No quota information available for this account type.",
@@ -415,8 +415,8 @@ register("view", {
415
415
  "usage.hint.grok_no_login": "auth.json 沒有可用的登入資料。請執行 `grok login`。",
416
416
  "usage.hint.login_kiro": "請使用 Kiro CLI(`kiro-cli`)登入。",
417
417
  "usage.hint.kiro_signed_out": "目前已登出;請執行 `kiro-cli` 登入。",
418
- "usage.hint.claude_profile_signed_out": "尚未登入;請用這行指令登入:{0}",
419
- "usage.hint.claude_profile_signed_out_chat": "尚未登入;請用 `{0}` 登入(或在主機上執行 `{1}`)。",
418
+ "usage.hint.claude_profile_signed_out": "尚未登入;請到設定 → Agents →「AI 登入與 API 金鑰」→「帳號」。",
419
+ "usage.hint.claude_profile_signed_out_chat": "尚未登入;請到設定 → Agents →「AI 登入與 API 金鑰」→「帳號」,或用 `{0}` 登入。",
420
420
  "usage.hint.token_refreshing": "Token 更新中 — 請稍候再試。",
421
421
  "usage.hint.subscription_no_credit": "訂閱方案沒有可回報的額度用量。",
422
422
  "usage.hint.no_quota_account": "此帳號類型沒有可用的額度資訊。",
@@ -0,0 +1,19 @@
1
+ /* #3160: Follow agent in the Files & changes panel — its own stylesheet, linked by workspace-panel.js (a page holding
2
+ an older workspace.css or app.css still draws it). */
3
+ .ws-follow.on { color: var(--accent); }
4
+ .ws-follow.paused { color: var(--warn); }
5
+ .ws-history { display: flex; align-items: center; gap: var(--s-1); padding: 0 var(--s-3) var(--s-2); overflow-x: auto; scrollbar-width: thin; }
6
+ .ws-history-label { flex: none; font-size: var(--fs-xs); color: var(--text-3); }
7
+ .ws-step { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 16em; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px;
8
+ background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
9
+ .ws-step:hover { background: var(--surface-2); }
10
+ .ws-step.is-current { border-color: var(--accent); }
11
+ .ws-step.is-hidden { color: var(--text-3); cursor: default; }
12
+ .ws-step .ws-step-kind { color: var(--text-3); }
13
+ .ws-step .ws-step-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
14
+ .ws-follow-note { margin: 0 var(--s-3) var(--s-2); font-size: var(--fs-xs); color: var(--text-3); }
15
+ .ws-text .ws-line { display: block; }
16
+ .ws-text .ws-line.hl-read { background: color-mix(in srgb, var(--accent) 12%, transparent); }
17
+ .ws-text .ws-line.hl-edit { background: color-mix(in srgb, var(--ok) 18%, transparent); }
18
+ .ws-entry.hl .ws-entry-btn { outline: 2px solid var(--accent); outline-offset: -2px; }
19
+ @media (prefers-reduced-motion: no-preference) { .ws-text .ws-line.hl-edit, .ws-text .ws-line.hl-read { transition: background 0.4s; } }
@@ -13,6 +13,7 @@
13
13
  <!--/app-icon-->
14
14
  <script src="/assets/theme.js"></script>
15
15
  <link rel="stylesheet" href="/assets/tokens.css">
16
+ <link rel="stylesheet" href="/assets/loading.css">
16
17
  <style>
17
18
  /* #1408 step 5: the app's tokens (tokens.css), light and dark like every page (theme.js before paint). */
18
19
  * { box-sizing: border-box; }
@@ -53,9 +54,11 @@
53
54
  </style>
54
55
  </head>
55
56
  <body>
56
- <main>
57
+ <main class="signin-card">
57
58
  <div class="brand">AgEnD</div>
58
- <div id="checking" data-i18n="checking">Checking your session…</div>
59
+ <div id="checking" class="skeleton sk-signin" role="status" aria-busy="true" aria-label="Checking your session…">
60
+ <div aria-hidden="true"><div class="sk-line"></div><div class="sk-line"></div><div class="sk-line"></div><div class="sk-line"></div><div class="sk-line"></div></div>
61
+ </div>
59
62
  <form id="form" hidden autocomplete="off">
60
63
  <h1 data-i18n="title">Sign in to AgEnD</h1>
61
64
  <p data-i18n="lead">Enter your sign-in code.</p>
@@ -74,7 +77,8 @@
74
77
  <div id="device" hidden>
75
78
  <h1 data-i18n="dev_title">Sign in with another device</h1>
76
79
  <p data-i18n="dev_lead">On a device that is already signed in to AgEnD as the owner, open Settings → Access &amp; security, choose Add device under Devices &amp; sign-in, and enter this code.</p>
77
- <div id="devCode" class="devcode" aria-live="polite" aria-label="Code">XXXX-XXXX</div>
80
+ <div id="devLoading" class="skeleton sk-inline" role="status" aria-busy="true" aria-label="Loading…" hidden><div class="sk-line" aria-hidden="true"></div></div>
81
+ <div id="devCode" class="devcode" aria-live="polite" aria-label="Code"></div>
78
82
  <div id="devStatus" role="status" aria-live="polite"></div>
79
83
  <div id="devQr" class="devqr" hidden><svg id="devQrSvg" viewBox="0 0 1 1" role="img" aria-label="QR code" focusable="false"></svg><p data-i18n="dev_qr">Or scan this QR code with a device that is already signed in as the owner. It holds this page's address and the code above, nothing else.</p></div>
80
84
  <button id="devNew" type="button" hidden data-i18n="dev_new">Get a new code</button>
@@ -8,7 +8,7 @@ export const SIGNIN_STRINGS = {
8
8
  consoleOnly: "Use the explicit console fallback, or sign in later.", needed: "Sign-in needed", waiting: "Waiting for the CLI…", login: "Login: {0}",
9
9
  openProvider: "Open provider sign-in", deviceCode: "Device code:", answerSent: "Answer sent. Waiting for the next screen; it will not be sent twice.",
10
10
  cancel: "Cancel sign-in", signIn: "Sign in", signInAgain: "Sign in again", later: "Sign in later", submit: "Submit {0}",
11
- relogin: "Sign in again? Kiro will sign out its existing account first.", ready: "You can continue setup.",
11
+ relogin: "Sign in to {0} again? It signs out its current account first.", reloginReplace: "Sign in to {0} again? The new sign-in replaces the account it uses now.", ready: "You can continue setup.",
12
12
  field_code: "Paste the returned code", field_start_url: "Organization Start URL", field_region: "AWS region",
13
13
  phase_method: "method", phase_code: "code", phase_start_url: "start URL", phase_region: "region", phase_authorization: "authorization",
14
14
  choice_organization: "Your organization", choice_subscription: "Claude subscription",
@@ -24,6 +24,16 @@ export const SIGNIN_STRINGS = {
24
24
  error_expired: "This login attempt expired. Start a new attempt.",
25
25
  error_auth_unconfirmed: "The CLI exited, but credentials could not be verified. Retry or sign in later.",
26
26
  error_provider_rejected: "The provider rejected this sign-in. Retry or sign in later.",
27
+ // #3190 Part 3c: a profile on a paired computer (the dashboard's Accounts view).
28
+ error_machine_unknown: "That computer is not paired any more.",
29
+ error_machine_offline: "That computer is offline. Start its Runtime, then try again.",
30
+ error_machine_unsupported: "That computer's Runtime is too old to sign in from here. Update the Runtime on it, then try again.",
31
+ error_machine_accounts_off: "The owner of that computer has not allowed this. On that computer run: agend-runtime remote-setup accounts on",
32
+ error_machine_unreachable: "That computer did not answer. Check its Runtime window, then try again.",
33
+ error_machine_profile_not_owned: "This account was not created by AgEnD's Runtime, so it can only be signed in on that computer: agend-runtime login claude-code NAME",
34
+ error_machine_busy: "Another sign-in is already running on that computer.",
35
+ error_invalid_machine_target: "That is not a valid account on a computer.",
36
+ error_machine_transport_failed: "That computer could not complete the sign-in. Check its Runtime window, then try again.",
27
37
  },
28
38
  "zh-TW": {
29
39
  heading: "登入你的 AI 後端",
@@ -32,7 +42,7 @@ export const SIGNIN_STRINGS = {
32
42
  consoleOnly: "請改用主控台備援,或稍後登入。", needed: "需要登入", waiting: "等待 CLI 回應…", login: "登入:{0}",
33
43
  openProvider: "開啟登入頁", deviceCode: "裝置代碼:", answerSent: "已送出。等待下一個畫面;不會重複送出。",
34
44
  cancel: "取消登入", signIn: "登入", signInAgain: "重新登入", later: "稍後登入", submit: "送出{0}",
35
- relogin: "要重新登入嗎?Kiro 會先登出目前的帳號。", ready: "可以繼續設定了。",
45
+ relogin: "要重新登入 {0} 嗎?會先登出目前的帳號。", reloginReplace: "要重新登入 {0} 嗎?新的登入會取代目前使用的帳號。", ready: "可以繼續設定了。",
36
46
  field_code: "貼上取得的代碼", field_start_url: "組織的 Start URL", field_region: "AWS 區域",
37
47
  phase_method: "選擇方式", phase_code: "代碼", phase_start_url: "Start URL", phase_region: "區域", phase_authorization: "授權",
38
48
  choice_organization: "你的組織", choice_subscription: "Claude 訂閱",
@@ -48,6 +58,16 @@ export const SIGNIN_STRINGS = {
48
58
  error_expired: "這次登入已過期。請重新開始。",
49
59
  error_auth_unconfirmed: "CLI 已結束,但無法確認憑證。請重試或稍後登入。",
50
60
  error_provider_rejected: "平台拒絕了這次登入。請重試或稍後登入。",
61
+ // #3190 Part 3c:配對電腦上的憑證設定檔(儀表板的「帳號」頁)。
62
+ error_machine_unknown: "那台電腦已不再配對。",
63
+ error_machine_offline: "那台電腦離線了。請先啟動它的 Runtime,再試一次。",
64
+ error_machine_unsupported: "那台電腦的 Runtime 太舊,無法在這裡登入。請先更新它的 Runtime,再試一次。",
65
+ error_machine_accounts_off: "那台電腦的擁有者尚未允許這件事。請在那台電腦上執行:agend-runtime remote-setup accounts on",
66
+ error_machine_unreachable: "那台電腦沒有回應。請檢查它的 Runtime 視窗,再試一次。",
67
+ error_machine_profile_not_owned: "這個帳號不是 AgEnD 的 Runtime 建立的,只能在那台電腦上登入:agend-runtime login claude-code NAME",
68
+ error_machine_busy: "那台電腦上已經有另一個登入在進行。",
69
+ error_invalid_machine_target: "這不是電腦上的有效帳號。",
70
+ error_machine_transport_failed: "那台電腦沒有完成這次登入。請檢查它的 Runtime 視窗,再試一次。",
51
71
  },
52
72
  };
53
73
  const NAMES = { "kiro-cli": "Kiro", "claude-code": "Claude Code", codex: "Codex", antigravity: "Antigravity" };
@@ -55,14 +75,19 @@ const CHOICES = { builder_id: "Builder ID", google: "Google", github: "GitHub",
55
75
  /** The page's language, as its <html lang> says (the setup page and the dashboard both keep it current). */
56
76
  const pageLang = doc => /^zh/i.test(doc?.documentElement?.lang || "") ? "zh-TW" : "en";
57
77
 
58
- export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang } = {}) {
78
+ /**
79
+ * `machine` (#3190 Part 3c): these cards are for ONE credential profile on a paired computer (the endpoint carries `?machine=&profile=`). The dialog around them says
80
+ * so, so the setup page's heading and lead are not repeated; there is no "sign in later" (this is an explicit request); and a sign-in again asks nothing about
81
+ * Kiro (Claude Code's own sign-in replaces the login; it signs nothing out first).
82
+ */
83
+ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false } = {}) {
59
84
  const doc = root.ownerDocument;
60
85
  let view = null, busy = false, disposed = false, timer = null, generation = 0, message = "", rendered = "";
61
86
  const language = () => (lang ? lang() : pageLang(doc)) === "zh-TW" ? "zh-TW" : "en";
62
87
  const tr = (key, value) => { const text = SIGNIN_STRINGS[language()][key] ?? SIGNIN_STRINGS.en[key] ?? key; return value === undefined ? text : text.split("{0}").join(value); };
63
88
  const el = (tag, text, parent = root) => { const node = doc.createElement(tag); if (text) node.textContent = text; parent.append(node); return node; };
64
89
  // An error is kept as its code, so it is said again in the other language when that changes.
65
- const errorText = code => SIGNIN_STRINGS.en["error_" + code] ? tr("error_" + code) : tr("error");
90
+ const errorText = code => machine && SIGNIN_STRINGS.en["error_machine_" + code] ? tr("error_machine_" + code) : SIGNIN_STRINGS.en["error_" + code] ? tr("error_" + code) : tr("error");
66
91
  const name = backend => backend === "antigravity" ? tr("antigravity") : NAMES[backend] || backend;
67
92
  const choiceName = choice => CHOICES[choice] ?? tr("choice_" + choice);
68
93
  const phaseName = phase => SIGNIN_STRINGS.en["phase_" + phase] ? tr("phase_" + phase) : phase.replaceAll("_", " ");
@@ -85,8 +110,9 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
85
110
  const signature = JSON.stringify([view, busy, message, language()]);
86
111
  if (disposed || rendered === signature) return;
87
112
  rendered = signature; root.replaceChildren();
88
- el("h2", tr("heading"));
89
- el("p", tr("lead"));
113
+ // Ridge #3321 S12: inside the dashboard (`dashboard`) the dialog's own title names the CLI — the setup page's heading, lead and
114
+ // "continue setup" are not repeated there.
115
+ if (!machine && !dashboard) { el("h2", tr("heading")); el("p", tr("lead")); }
90
116
  if (message) { const alert = el("p", errorText(message)); alert.setAttribute("role", "alert"); }
91
117
  if (!view) { button(root, tr("check"), () => perform({ operation: "refresh" })); return; }
92
118
  for (const backend of view.selected) {
@@ -120,16 +146,22 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
120
146
  } else {
121
147
  if (login?.reason && login.reason !== "cancelled") el("p", errorText(login.reason), card);
122
148
  const usable = !["antigravity"].includes(backend) && state !== "not_installed";
123
- if (usable) button(card, tr(state === "valid" ? "signInAgain" : "signIn"), () => {
149
+ // Ridge #3321 S01: the question names THIS card's CLI, and says what a sign-in again does to it — only Kiro signs out
150
+ // first (logoutArgv); Claude Code and Codex sign in again over the account they have. The dashboard passes its own
151
+ // in-app confirmation (`ask`); the setup page, which loads nothing else, keeps the browser's.
152
+ if (usable) button(card, tr(state === "valid" ? "signInAgain" : "signIn"), async () => {
124
153
  const relogin = state === "valid";
125
- if (relogin && !globalThis.confirm(tr("relogin"))) return;
126
- void perform({ operation: "start", backend, relogin });
154
+ if (relogin && !machine) {
155
+ const question = tr(backend === "kiro-cli" ? "relogin" : "reloginReplace", name(backend));
156
+ if (!(await (ask ? ask(question, name(backend)) : globalThis.confirm(question)))) return;
157
+ }
158
+ await perform({ operation: "start", backend, relogin });
127
159
  });
128
160
  }
129
- if (pending && !skipped) button(card, tr("later"), () => perform({ operation: "skip", backend }));
161
+ if (pending && !skipped && !machine) button(card, tr("later"), () => perform({ operation: "skip", backend }));
130
162
  }
131
163
  button(root, tr("check"), () => perform({ operation: "refresh" }));
132
- if (view.ready) el("p", tr("ready"));
164
+ if (view.ready && !machine && !dashboard) el("p", tr("ready"));
133
165
  }
134
166
  async function poll() {
135
167
  if (disposed) return;
@@ -0,0 +1,28 @@
1
+ // #3160: Follow agent's words, in their own module (a new URL, so a page that cached an older workspace-strings.js
2
+ // still gets them — never a raw key). Registered by workspace-panel.js.
3
+ import { register } from "/assets/app-i18n.js";
4
+
5
+ register("chat", {
6
+ en: {
7
+ wsFollow: "Follow agent", wsFollowing: "Following", wsFollowPaused: "Paused · Resume",
8
+ wsFollowTitle: "Show the file the agent is reading, editing or searching, as it works",
9
+ wsFollowPausedTitle: "You moved, so Follow paused. Click to follow the agent again",
10
+ wsFollowNotHere: "Follow works for Claude Code and Codex agents",
11
+ wsFollowNotRunning: "The agent isn't running", wsFollowIdle: "Waiting for the agent to read or edit a file…",
12
+ wsThisTurn: "This turn", wsKind_read: "Read", wsKind_edit: "Edit", wsKind_search: "Search", wsKind_list: "List",
13
+ wsBestEffort: "From a shell command, so this is a best guess", wsHiddenStep: "A hidden file (its contents are never shown)",
14
+ wsFollowHlRead: "Lines the agent read", wsFollowHlEdit: "Uncommitted changes (including your edits)",
15
+ wsFollowHlEditExact: "Lines changed by this edit",
16
+ },
17
+ "zh-TW": {
18
+ wsFollow: "跟隨 Agent", wsFollowing: "跟隨中", wsFollowPaused: "已暫停 · 繼續",
19
+ wsFollowTitle: "Agent 工作時,顯示它正在讀、改或搜尋的檔案",
20
+ wsFollowPausedTitle: "你動了畫面,所以先暫停跟隨。按一下繼續跟隨 Agent",
21
+ wsFollowNotHere: "跟隨只支援 Claude Code 與 Codex 的 Agent",
22
+ wsFollowNotRunning: "Agent 沒有在執行", wsFollowIdle: "等 Agent 讀取或修改檔案…",
23
+ wsThisTurn: "這一輪", wsKind_read: "讀取", wsKind_edit: "修改", wsKind_search: "搜尋", wsKind_list: "列出",
24
+ wsBestEffort: "來自 shell 指令,只是推測", wsHiddenStep: "隱藏的檔案(內容一律不顯示)",
25
+ wsFollowHlRead: "Agent 讀過的行", wsFollowHlEdit: "尚未提交的變更(包含你的修改)",
26
+ wsFollowHlEditExact: "這次修改的行",
27
+ },
28
+ });