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

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 (326) 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 +27 -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/backend/codex.js +1 -0
  20. package/dist/backend/codex.js.map +1 -1
  21. package/dist/backend/types.d.ts +2 -0
  22. package/dist/backend/types.js.map +1 -1
  23. package/dist/build-provenance.json +1 -1
  24. package/dist/bundled-tmux-guard.d.ts +19 -0
  25. package/dist/bundled-tmux-guard.js +83 -0
  26. package/dist/bundled-tmux-guard.js.map +1 -0
  27. package/dist/classic-bindings.d.ts +13 -0
  28. package/dist/classic-bindings.js +28 -2
  29. package/dist/classic-bindings.js.map +1 -1
  30. package/dist/classic-channel-manager.d.ts +2 -0
  31. package/dist/classic-channel-manager.js +5 -1
  32. package/dist/classic-channel-manager.js.map +1 -1
  33. package/dist/cli.js +116 -11
  34. package/dist/cli.js.map +1 -1
  35. package/dist/config-validator.js +11 -0
  36. package/dist/config-validator.js.map +1 -1
  37. package/dist/config.js +3 -1
  38. package/dist/config.js.map +1 -1
  39. package/dist/daemon.d.ts +27 -2
  40. package/dist/daemon.js +107 -6
  41. package/dist/daemon.js.map +1 -1
  42. package/dist/doctor.js +3 -4
  43. package/dist/doctor.js.map +1 -1
  44. package/dist/e2e-isolation.js +5 -2
  45. package/dist/e2e-isolation.js.map +1 -1
  46. package/dist/fleet-control-audit.d.ts +1 -1
  47. package/dist/fleet-manager.d.ts +129 -0
  48. package/dist/fleet-manager.js +725 -53
  49. package/dist/fleet-manager.js.map +1 -1
  50. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +10 -0
  51. package/dist/hub/compose/server.js +1 -0
  52. package/dist/hub/compose/server.js.map +1 -1
  53. package/dist/hub/directory/directory.d.ts +1 -1
  54. package/dist/hub/directory/directory.js +115 -3
  55. package/dist/hub/directory/directory.js.map +1 -1
  56. package/dist/hub/directory/groups.d.ts +29 -0
  57. package/dist/hub/directory/groups.js +29 -0
  58. package/dist/hub/directory/groups.js.map +1 -0
  59. package/dist/hub/directory/index.d.ts +1 -0
  60. package/dist/hub/directory/types.d.ts +4 -0
  61. package/dist/hub/directory/types.js.map +1 -1
  62. package/dist/hub/group-policy/model.d.ts +56 -0
  63. package/dist/hub/group-policy/model.js +46 -0
  64. package/dist/hub/group-policy/model.js.map +1 -0
  65. package/dist/hub/group-policy/resources.d.ts +52 -0
  66. package/dist/hub/group-policy/resources.js +166 -0
  67. package/dist/hub/group-policy/resources.js.map +1 -0
  68. package/dist/hub/group-policy/store.d.ts +52 -0
  69. package/dist/hub/group-policy/store.js +149 -0
  70. package/dist/hub/group-policy/store.js.map +1 -0
  71. package/dist/hub/http/compose.js +4 -3
  72. package/dist/hub/http/compose.js.map +1 -1
  73. package/dist/hub/pairing.d.ts +3 -1
  74. package/dist/hub/pairing.js +6 -3
  75. package/dist/hub/pairing.js.map +1 -1
  76. package/dist/hub/server.d.ts +2 -0
  77. package/dist/hub/server.js +12 -2
  78. package/dist/hub/server.js.map +1 -1
  79. package/dist/instance-config-impact.js +4 -3
  80. package/dist/instance-config-impact.js.map +1 -1
  81. package/dist/instance-lifecycle.d.ts +17 -0
  82. package/dist/instance-lifecycle.js +38 -1
  83. package/dist/instance-lifecycle.js.map +1 -1
  84. package/dist/locale.js +21 -0
  85. package/dist/locale.js.map +1 -1
  86. package/dist/login-controller.d.ts +5 -0
  87. package/dist/login-controller.js +11 -0
  88. package/dist/login-controller.js.map +1 -1
  89. package/dist/login-window-lock.d.ts +2 -1
  90. package/dist/login-window-lock.js.map +1 -1
  91. package/dist/ls-rows.d.ts +1 -1
  92. package/dist/ls-rows.js +1 -1
  93. package/dist/ls-rows.js.map +1 -1
  94. package/dist/machine-accounts.d.ts +110 -0
  95. package/dist/machine-accounts.js +229 -0
  96. package/dist/machine-accounts.js.map +1 -0
  97. package/dist/machine-signins.d.ts +89 -0
  98. package/dist/machine-signins.js +182 -0
  99. package/dist/machine-signins.js.map +1 -0
  100. package/dist/muse-usage-relay.d.ts +2 -0
  101. package/dist/muse-usage-relay.js +5 -3
  102. package/dist/muse-usage-relay.js.map +1 -1
  103. package/dist/needs-you-hub.d.ts +3 -0
  104. package/dist/needs-you-hub.js +13 -3
  105. package/dist/needs-you-hub.js.map +1 -1
  106. package/dist/needs-you.d.ts +35 -2
  107. package/dist/needs-you.js +19 -0
  108. package/dist/needs-you.js.map +1 -1
  109. package/dist/quickstart.js +7 -18
  110. package/dist/quickstart.js.map +1 -1
  111. package/dist/quiet-run.d.ts +31 -0
  112. package/dist/quiet-run.js +50 -0
  113. package/dist/quiet-run.js.map +1 -0
  114. package/dist/quota-notice-config.d.ts +22 -0
  115. package/dist/quota-notice-config.js +41 -0
  116. package/dist/quota-notice-config.js.map +1 -0
  117. package/dist/runtime-api.d.ts +13 -0
  118. package/dist/runtime-api.js +125 -1
  119. package/dist/runtime-api.js.map +1 -1
  120. package/dist/runtime-build-info.d.ts +2 -1
  121. package/dist/runtime-build-info.js +7 -3
  122. package/dist/runtime-build-info.js.map +1 -1
  123. package/dist/runtime-cli-install.d.ts +153 -0
  124. package/dist/runtime-cli-install.js +675 -0
  125. package/dist/runtime-cli-install.js.map +1 -0
  126. package/dist/runtime-cli.js +157 -12
  127. package/dist/runtime-cli.js.map +1 -1
  128. package/dist/runtime-client.d.ts +64 -2
  129. package/dist/runtime-client.js +277 -20
  130. package/dist/runtime-client.js.map +1 -1
  131. package/dist/runtime-coordinator.d.ts +10 -1
  132. package/dist/runtime-coordinator.js +93 -2
  133. package/dist/runtime-coordinator.js.map +1 -1
  134. package/dist/runtime-credential-profiles.d.ts +11 -2
  135. package/dist/runtime-credential-profiles.js +28 -4
  136. package/dist/runtime-credential-profiles.js.map +1 -1
  137. package/dist/runtime-install.js +9 -6
  138. package/dist/runtime-install.js.map +1 -1
  139. package/dist/runtime-pane-link.js +2 -1
  140. package/dist/runtime-pane-link.js.map +1 -1
  141. package/dist/runtime-pane-service.js +2 -2
  142. package/dist/runtime-pane-service.js.map +1 -1
  143. package/dist/runtime-pane-store.d.ts +10 -0
  144. package/dist/runtime-pane-store.js +13 -1
  145. package/dist/runtime-pane-store.js.map +1 -1
  146. package/dist/runtime-profile-ownership.d.ts +66 -0
  147. package/dist/runtime-profile-ownership.js +391 -0
  148. package/dist/runtime-profile-ownership.js.map +1 -0
  149. package/dist/runtime-protocol.d.ts +88 -2
  150. package/dist/runtime-protocol.js +40 -0
  151. package/dist/runtime-protocol.js.map +1 -1
  152. package/dist/runtime-remote-accounts.d.ts +197 -0
  153. package/dist/runtime-remote-accounts.js +663 -0
  154. package/dist/runtime-remote-accounts.js.map +1 -0
  155. package/dist/runtime-remote-setup.d.ts +105 -0
  156. package/dist/runtime-remote-setup.js +529 -0
  157. package/dist/runtime-remote-setup.js.map +1 -0
  158. package/dist/runtime-signin-transport.d.ts +39 -0
  159. package/dist/runtime-signin-transport.js +110 -0
  160. package/dist/runtime-signin-transport.js.map +1 -0
  161. package/dist/runtime-signin.d.ts +132 -0
  162. package/dist/runtime-signin.js +289 -0
  163. package/dist/runtime-signin.js.map +1 -0
  164. package/dist/runtime-update-attention.d.ts +4 -0
  165. package/dist/runtime-update-attention.js +11 -0
  166. package/dist/runtime-update-attention.js.map +1 -0
  167. package/dist/runtime-update-controller.d.ts +75 -0
  168. package/dist/runtime-update-controller.js +691 -0
  169. package/dist/runtime-update-controller.js.map +1 -0
  170. package/dist/runtime-update-ipc.d.ts +42 -0
  171. package/dist/runtime-update-ipc.js +144 -0
  172. package/dist/runtime-update-ipc.js.map +1 -0
  173. package/dist/runtime-update-journal.d.ts +5 -0
  174. package/dist/runtime-update-journal.js +7 -0
  175. package/dist/runtime-update-journal.js.map +1 -1
  176. package/dist/runtime-update-lock.js +17 -2
  177. package/dist/runtime-update-lock.js.map +1 -1
  178. package/dist/runtime-update-status.d.ts +30 -0
  179. package/dist/runtime-update-status.js +31 -0
  180. package/dist/runtime-update-status.js.map +1 -0
  181. package/dist/settings-api.js +3 -0
  182. package/dist/settings-api.js.map +1 -1
  183. package/dist/settings-change.js +8 -0
  184. package/dist/settings-change.js.map +1 -1
  185. package/dist/settings-instance-patch.js +1 -1
  186. package/dist/settings-instance-patch.js.map +1 -1
  187. package/dist/setup-wizard.js +3 -5
  188. package/dist/setup-wizard.js.map +1 -1
  189. package/dist/signin-keepalive.d.ts +203 -0
  190. package/dist/signin-keepalive.js +652 -0
  191. package/dist/signin-keepalive.js.map +1 -0
  192. package/dist/structured-signin-transport.js +4 -0
  193. package/dist/structured-signin-transport.js.map +1 -1
  194. package/dist/structured-signin.d.ts +7 -0
  195. package/dist/structured-signin.js +1 -1
  196. package/dist/structured-signin.js.map +1 -1
  197. package/dist/tmux-binary.d.ts +23 -23
  198. package/dist/tmux-binary.js +35 -46
  199. package/dist/tmux-binary.js.map +1 -1
  200. package/dist/tmux-exec-helper.js +3 -3
  201. package/dist/tmux-exec-helper.js.map +1 -1
  202. package/dist/tmux-legacy.d.ts +94 -0
  203. package/dist/tmux-legacy.js +309 -0
  204. package/dist/tmux-legacy.js.map +1 -0
  205. package/dist/tmux-manager.d.ts +7 -1
  206. package/dist/tmux-manager.js +21 -11
  207. package/dist/tmux-manager.js.map +1 -1
  208. package/dist/tmux-rollback.d.ts +31 -0
  209. package/dist/tmux-rollback.js +72 -0
  210. package/dist/tmux-rollback.js.map +1 -0
  211. package/dist/tmux-server.d.ts +102 -0
  212. package/dist/tmux-server.js +248 -0
  213. package/dist/tmux-server.js.map +1 -0
  214. package/dist/transcript-monitor.js +43 -5
  215. package/dist/transcript-monitor.js.map +1 -1
  216. package/dist/transcript-records.d.ts +2 -1
  217. package/dist/transcript-records.js +3 -0
  218. package/dist/transcript-records.js.map +1 -1
  219. package/dist/transcript-sources.js +3 -0
  220. package/dist/transcript-sources.js.map +1 -1
  221. package/dist/types.d.ts +3 -0
  222. package/dist/ui/accounts-keepalive.js +112 -0
  223. package/dist/ui/accounts-manage.js +237 -0
  224. package/dist/ui/accounts-view.js +175 -31
  225. package/dist/ui/agent-runtime-settings.js +2 -1
  226. package/dist/ui/app.html +8 -1
  227. package/dist/ui/hub-attachments.js +90 -0
  228. package/dist/ui/hub-chat-store.js +9 -4
  229. package/dist/ui/hub-client.js +20 -1
  230. package/dist/ui/hub-preview.js +101 -0
  231. package/dist/ui/machine-signin.js +56 -0
  232. package/dist/ui/panel-fleet.js +1 -1
  233. package/dist/ui/panel-hub.js +126 -31
  234. package/dist/ui/panel-needs.js +14 -8
  235. package/dist/ui/panel-notices.js +4 -3
  236. package/dist/ui/panel-runtimes.js +19 -6
  237. package/dist/ui/panel-settings.js +12 -6
  238. package/dist/ui/panel-windows-agent.js +2 -1
  239. package/dist/ui/preview-pages.js +3 -41
  240. package/dist/ui/preview-panel-actions.js +3 -161
  241. package/dist/ui/preview-panel.js +10 -557
  242. package/dist/ui/preview-versions.js +3 -155
  243. package/dist/ui/runtime-cli-install.js +114 -0
  244. package/dist/ui/runtime-update-commands.d.ts +2 -0
  245. package/dist/ui/runtime-update-commands.js +11 -0
  246. package/dist/ui/runtime-update-status.js +53 -0
  247. package/dist/ui/search-dialog.js +3 -2
  248. package/dist/ui/settings-guests.js +3 -2
  249. package/dist/ui/settings-hub-browser-certificate.js +2 -0
  250. package/dist/ui/settings-hub-membership.js +12 -6
  251. package/dist/ui/settings-hub-retention.js +2 -0
  252. package/dist/ui/settings-hub.js +11 -3
  253. package/dist/ui/settings-quota-notice.js +100 -0
  254. package/dist/ui/settings-registry.js +1 -0
  255. package/dist/ui/settings-strings.js +2 -2
  256. package/dist/ui/settings-web-authority.js +2 -1
  257. package/dist/ui/shared/accounts-keepalive.css +7 -0
  258. package/dist/ui/shared/accounts.css +13 -0
  259. package/dist/ui/shared/app-route.js +1 -1
  260. package/dist/ui/shared/app-shell.js +9 -3
  261. package/dist/ui/shared/app-store.js +2 -2
  262. package/dist/ui/shared/app.css +13 -0
  263. package/dist/ui/shared/app.js +2 -1
  264. package/dist/ui/shared/hub-chat.css +1 -0
  265. package/dist/ui/shared/hub-owner.css +1 -1
  266. package/dist/ui/shared/loading.css +37 -0
  267. package/dist/ui/shared/preview-pages.js +41 -0
  268. package/dist/ui/shared/preview-panel-actions.js +168 -0
  269. package/dist/ui/shared/preview-panel.js +565 -0
  270. package/dist/ui/shared/preview-versions.js +155 -0
  271. package/dist/ui/shared/runtime-install.css +4 -0
  272. package/dist/ui/shared/signin.js +68 -6
  273. package/dist/ui/shared/ui-states.js +14 -3
  274. package/dist/ui/shared/workspace-follow.css +19 -0
  275. package/dist/ui/signin.html +7 -3
  276. package/dist/ui/structured-signin.js +31 -7
  277. package/dist/ui/workspace-follow-strings.js +28 -0
  278. package/dist/ui/workspace-panel.js +225 -36
  279. package/dist/update-install.d.ts +7 -0
  280. package/dist/update-install.js +23 -0
  281. package/dist/update-install.js.map +1 -1
  282. package/dist/usage/providers.d.ts +5 -0
  283. package/dist/usage/providers.js +5 -0
  284. package/dist/usage/providers.js.map +1 -1
  285. package/dist/usage/quota-notices.d.ts +38 -0
  286. package/dist/usage/quota-notices.js +160 -0
  287. package/dist/usage/quota-notices.js.map +1 -0
  288. package/dist/usage/usage-api.d.ts +1 -0
  289. package/dist/usage/usage-api.js +16 -0
  290. package/dist/usage/usage-api.js.map +1 -1
  291. package/dist/web-api.d.ts +33 -0
  292. package/dist/web-api.js +342 -8
  293. package/dist/web-api.js.map +1 -1
  294. package/dist/web-login.d.ts +35 -1
  295. package/dist/web-login.js +51 -5
  296. package/dist/web-login.js.map +1 -1
  297. package/dist/web-session.d.ts +11 -0
  298. package/dist/web-session.js +38 -1
  299. package/dist/web-session.js.map +1 -1
  300. package/dist/web-shell-routes.d.ts +1 -1
  301. package/dist/web-shell-routes.js +1 -1
  302. package/dist/web-shell-routes.js.map +1 -1
  303. package/dist/web-signin-link.d.ts +42 -0
  304. package/dist/web-signin-link.js +110 -0
  305. package/dist/web-signin-link.js.map +1 -0
  306. package/dist/windows-cli-api.d.ts +6 -0
  307. package/dist/windows-cli-api.js +11 -0
  308. package/dist/windows-cli-api.js.map +1 -1
  309. package/dist/windows-cli-worker.d.ts +3 -1
  310. package/dist/windows-cli-worker.js +18 -3
  311. package/dist/windows-cli-worker.js.map +1 -1
  312. package/dist/workspace-follow-parse.d.ts +36 -0
  313. package/dist/workspace-follow-parse.js +208 -0
  314. package/dist/workspace-follow-parse.js.map +1 -0
  315. package/dist/workspace-follow-records.d.ts +17 -0
  316. package/dist/workspace-follow-records.js +88 -0
  317. package/dist/workspace-follow-records.js.map +1 -0
  318. package/dist/workspace-follow.d.ts +41 -0
  319. package/dist/workspace-follow.js +143 -0
  320. package/dist/workspace-follow.js.map +1 -0
  321. package/dist/wsl-detect.d.ts +1 -0
  322. package/dist/wsl-detect.js +20 -0
  323. package/dist/wsl-detect.js.map +1 -0
  324. package/launcher/tmux-bundle.cjs +26 -10
  325. package/package.json +6 -2
  326. package/templates/runtime-install/install.ps1 +154 -13
@@ -41,6 +41,7 @@ import {
41
41
  NewBotDialog, Override, Select, ask, impactText, inAgentDefaults, valueText,
42
42
  } from "./settings-dialogs.js";
43
43
  import { SharedAgentSettings, sharedNotes } from "./settings-shared.js";
44
+ import { QuotaNoticeSettings, quotaNoticeText } from "./settings-quota-notice.js";
44
45
  import { SetupWizard } from "./settings-wizard.js";
45
46
  import { CreateInstanceDialog } from "./panel-fleet.js";
46
47
  import { RuntimesPanel } from "./panel-runtimes.js";
@@ -86,13 +87,13 @@ import { useRuntimeCatalog } from "./runtime-catalog.js";
86
87
  import { ShortcutsHelpRow } from "./settings-shortcuts.js";
87
88
  import { GeneralLocation } from "./general-location.js";
88
89
 
89
- const tn = (k, ...v) => t(`settings.${k}`, ...v);
90
+ const tn = (k, ...v) => k === "sec_notifications" ? quotaNoticeText().title : t(`settings.${k}`, ...v);
90
91
  /** What a refused change says to a person: the server's code in words (the code itself only for one not listed). */
91
92
  const APPLY_ERRORS = new Set(["unsupported_sensitive_effect", "confirmation_diff_too_large", "session_required", "admin_required", "settings_changed",
92
93
  "request_no_longer_current", "too_many_pending_changes", "fleet_unavailable", "invalid_settings_effect", "settings_confirmation_unavailable", "failed"]);
93
94
  // #2726: a code or words of the setup host (the wizard's commit) in the page's language; anything else as it came.
94
95
  export const applyErrorText = (code) => (APPLY_ERRORS.has(code) ? tn(`applyError_${code}`) : tn("applyErrorOther", hostText(String(code), lang())));
95
- const ICONS = { preferences: "user", look: "palette", agents: "bot", runtimes: "view", "agent-defaults": "sliders", chat: "chat", "web-dashboard": "globe", access: "key", advanced: "code" };
96
+ const ICONS = { preferences: "user", look: "palette", agents: "bot", notifications: "sliders", runtimes: "view", "agent-defaults": "sliders", chat: "chat", "web-dashboard": "globe", access: "key", advanced: "code" };
96
97
 
97
98
  /** GET under the panel's lease → { ok, status, body }. */
98
99
  async function read(lease, path) {
@@ -416,6 +417,7 @@ export function SettingsPanel({ route, navKey }) {
416
417
  : section === "agents" ? html`<${YamlLock} staged=${staged}><${Agents} ctx=${ctx} search=${search} clearSearch=${() => setSearch("")} openDialog=${toDialog} /></${YamlLock}><details class="s-ui-disclosure s-ai-accounts"><summary><span>${layoutText("aiAccounts")}</span><small>${layoutText("aiAccountsSummary")}</small></summary><div class="s-disclosure-body s-auth-body">
417
418
  <div class="s-auth-scope"><${Icon} name="view" size=${18} /><div><strong>${layoutText("aiHostScope")}</strong><p>${layoutText("aiAccountsHint")}</p><a href=${settingsPath("runtimes")}>${layoutText("aiWindowsLink")}<span aria-hidden="true">→</span></a></div></div>
418
419
  <${AccountsView} instances=${ctx.fleet.instances || {}} stageAgent=${ctx.stageAgent}
420
+ openAgent=${(name) => { const insts = ctx.fleet.instances || {}; if (Object.hasOwn(insts, name)) toDialog({ kind: "agent", name, inst: insts[name] }); }}
419
421
  stageDefault=${(backend, profile) => {
420
422
  // One change for every CLI's fleet default, carrying the whole map (the write replaces it whole).
421
423
  const opts = defaultsBackendOptions((ctx.fleet.defaults || {}).backend_options, stagedRef.current.get("defaults:account")?.request?.body?.backend_options, backend, profile);
@@ -424,7 +426,8 @@ export function SettingsPanel({ route, navKey }) {
424
426
  request: { method: "PUT", url: "/api/settings/fleet/defaults", body: { backend_options: opts } } });
425
427
  }} />${ctx.providerOk ? html`<${ProviderKeys} ctx=${ctx} />` : html`<section class="s-auth-section s-api-unavailable"><header class="s-auth-section-head"><div><h3>${layoutText("apiKeysTitle")}</h3><p>${layoutText("apiKeysHint")}</p></div><span class="s-auth-state">${layoutText("apiKeysUnavailableState")}</span></header><p class="note">${layoutText("apiKeysUnavailable")}</p></section>`}
426
428
  </div></details>`
427
- : section === "agent-defaults" ? html`<${GeneralLocation} /><${YamlLock} staged=${staged}><${General} key=${formKey} ctx=${ctx} part="fleet" /></${YamlLock}>`
429
+ : section === "agent-defaults" ? html`<${GeneralLocation} /><${YamlLock} staged=${staged}><${General} key=${formKey} ctx=${ctx} part="fleet" />${!SETTINGS_SECTIONS.includes("notifications") ? html`<${QuotaNoticeSettings} key=${`quota:${formKey}`} ctx=${ctx} />` : null}</${YamlLock}>`
430
+ : section === "notifications" ? html`<${YamlLock} staged=${staged}><${QuotaNoticeSettings} key=${formKey} ctx=${ctx} /></${YamlLock}>`
428
431
  : section === "chat" ? html`<${YamlLock} staged=${staged}><${Bots} ctx=${ctx} search=${search} openDialog=${toDialog} /></${YamlLock}>
429
432
  <${WebSection} key=${formKey} ctx=${ctx} staged=${staged} part="chat" />
430
433
  <div id="classicbot" class="s-anchor s-classic-area"><section class="card s-chat-classic"><h2 class="s-ap-group">ClassicBot</h2><${Classic} ctx=${ctx} search=${search} openDialog=${toDialog} /></section>
@@ -715,8 +718,9 @@ export function ProfileCard({ embedded = false } = {}) {
715
718
  };
716
719
  const busy = state.phase !== "ready";
717
720
  const changed = draft.trim() !== state.name;
721
+ const loading = state.phase === "loading";
718
722
  const initial = [...(state.shown || state.name || "web-user")][0]?.toUpperCase() || "W";
719
- const fields = html`<div class="s-pref-profile-layout">
723
+ const fields = html`<div class=${`s-pref-profile-layout${loading ? " sk-reserve" : ""}`} aria-hidden=${loading ? "true" : undefined} inert=${loading || undefined}>
720
724
  ${embedded ? html`<span class="s-pref-avatar" aria-hidden="true">${initial}</span>` : null}
721
725
  <div class="s-pref-profile-main"><div class="field"><label for="profile-name">${tn("profileName")}</label>
722
726
  <div class="s-pref-name-action"><input id="profile-name" type="text" maxlength="200" autocomplete="nickname" value=${draft} disabled=${busy}
@@ -729,8 +733,10 @@ export function ProfileCard({ embedded = false } = {}) {
729
733
  ${state.name ? html`<div class="s-device-row"><button type="button" class="btn btn-ghost btn-sm" disabled=${busy} onClick=${() => save(true)}>${state.bound ? tn("profileUseAccount", state.platform || "web-user") : tn("profileClear")}</button></div>` : null}
730
734
  <details class="s-pref-identity-details"><summary>${layoutText("profileIdentityDetails")}</summary><p class="sub">${state.bound ? tn("profileLeadBound") : tn("profileLeadUnbound")}</p></details>
731
735
  </div></div>`;
732
- return embedded ? html`<div class="s-profile s-pref-profile-fields">${fields}</div>`
733
- : html`<section class="card s-device s-profile"><h3>${tn("profileTitle")}</h3>${fields}</section>`;
736
+ const content = html`${loading ? html`<div class="sk-profile-cover"><${Skeleton} variant="form" lines=${4} /></div>` : null}
737
+ ${fields}`;
738
+ return embedded ? html`<div class="s-profile s-pref-profile-fields">${content}</div>`
739
+ : html`<section class="card s-device s-profile"><h3>${tn("profileTitle")}</h3>${content}</section>`;
734
740
  }
735
741
 
736
742
  /** The operation in hand still owns Apply: its writes and job, or a restart of AgEnD from the press to its end. */
@@ -3,6 +3,7 @@ import { register, t } from "/assets/app-i18n.js";
3
3
  import { useLease } from "/assets/app-ctx.js";
4
4
  import { PanelHeader, setTitle } from "/assets/app-shell.js";
5
5
  import { Icon } from "/assets/ui-icons.js";
6
+ import { Skeleton } from "/assets/ui-states.js";
6
7
  import { CliProductMark, cliLabel } from "./cli-picker.js";
7
8
  import { appStore, useStore } from "/assets/app-store.js";
8
9
  import { navigate } from "/assets/app-nav.js";
@@ -77,7 +78,7 @@ export function WindowsAgentPanel({ route, navKey }) {
77
78
  ${agent ? html`<div class="windows-agent-identity"><span class="windows-cli-brand"><${CliProductMark} id=${agent.cli || "codex"} size=${24} /></span><div><strong>Windows · ${cliLabel(agent.cli || "codex")}${agent.model ? ` · ${agent.model}` : ""}</strong><code>${agent.cwd}</code></div><span class="pill">${tn(fileAccess === "read-only" ? "read" : "write")}</span></div>
78
79
  ${agent.description ? html`<p class="note">${agent.description}</p>` : null}
79
80
  ${!agent.turns.length ? html`<div class="windows-agent-empty"><${Icon} name="chat" size=${32} /><h2>${tn("empty")}</h2><p>${tn("emptyHint")}</p></div>` : agent.turns.map(turn => html`<article key=${turn.id} class="windows-agent-turn"><div class="windows-agent-human"><strong>${tn("you")}</strong><p>${turn.prompt}</p></div><div class="windows-agent-reply"><strong><${CliProductMark} id=${agent.cli || "codex"} size=${18} />${cliLabel(agent.cli || "codex")}</strong><pre tabIndex="0">${turn.output || tn(["starting","running","cancelling"].includes(turn.status) ? "waiting" : "noOutput")}</pre>${turn.error ? html`<p class="error">${turn.error}</p>` : null}<small>${tn(turn.status)}</small></div></article>`)}
80
- ` : html`<p class="note">${tn("loading")}</p>`}
81
+ ` : error ? null : html`<${Skeleton} variant="rows" lines=${4} label=${tn("loading")} />`}
81
82
  ${error ? html`<p class="error" role="alert">${error}</p>` : null}
82
83
  ${agent?.blocked ? html`<div class="windows-agent-blocked"><p>${tn("blocked")}</p><button type="button" class="btn" onClick=${recover}>${tn("recover")}</button></div>` : null}
83
84
  </div></div>
@@ -1,41 +1,3 @@
1
- // #2911 (6): every page in the thread — the list the preview panel shows. A page is what preview-versions.js counts as
2
- // versions of one thing: the agent's complete ```html blocks with one <title> (the untitled ones together), or its
3
- // attached .html files of one name. Pure: the panel draws it; nothing here runs a preview.
4
- import "/assets/chat-render.js";
5
- import { htmlTitle } from "./preview-versions.js";
6
-
7
- const R = () => globalThis.AgendChatRender;
8
-
9
- /**
10
- * The pages in `msgs` (in thread order), newest first: [{ id, label, kind: "html" | "file", versions, latest }], where
11
- * `latest` is the newest version as the panel opens it ({ key, instance, msgKey, n | att, code, sender, ts }; an
12
- * attached file's code is read when it is opened). `label` is the title, the file name, or "" for untitled blocks.
13
- */
14
- export function pagesOf(msgs, keyOf, instance) {
15
- const pages = new Map();
16
- const add = (id, label, kind, spec) => {
17
- const p = pages.get(id);
18
- if (p) { p.versions++; p.latest = spec; pages.delete(id); pages.set(id, p); } // re-inserted: newest last
19
- else pages.set(id, { id, label, kind, versions: 1, latest: spec });
20
- };
21
- for (const x of Array.isArray(msgs) ? msgs : []) {
22
- if (x.role !== "agent") continue;
23
- const msgKey = keyOf(x);
24
- R().htmlFences(x.text).forEach((f, n) => {
25
- if (!f.terminated) return;
26
- const title = htmlTitle(f.code);
27
- add(`t:${title}`, title, "html", { key: `${msgKey}:f${n}`, instance, msgKey, n, code: f.code, sender: x.sender, ts: x.ts });
28
- });
29
- for (const a of Array.isArray(x.attachments) ? x.attachments : []) {
30
- if (!R().isHtmlAttachment(a)) continue;
31
- add(`a:${a.name.trim().toLowerCase()}`, a.name, "file", { key: `${msgKey}:a${a.id}`, instance, msgKey, att: { id: a.id, name: a.name, size: a.size }, code: null, sender: x.sender, ts: x.ts });
32
- }
33
- }
34
- return [...pages.values()].reverse();
35
- }
36
-
37
- /** The page `open` belongs to: its id in pagesOf's terms. */
38
- export function pageIdOf(open) {
39
- if (!open) return null;
40
- return open.att ? `a:${String(open.att.name || "").trim().toLowerCase()}` : `t:${htmlTitle(open.code)}`;
41
- }
1
+ // Hub E (#3226): this module moved to /assets/preview-pages.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-pages.js";
@@ -1,161 +1,3 @@
1
- // #2911: the preview panel's feedback actions — what a person tells the agent about the page it made (M-2217). The
2
- // panel (preview-panel.js, M-2216's chrome) renders <PanelActions> in its bar, before Download; everything the actions
3
- // do lives here, so neither side edits the other's file.
4
- //
5
- // Nothing here reads or relays the page. A preview's content is the agent's untrusted HTML, so only what the chat
6
- // already holds goes into the message: a #2272 reply to the message the page came in, and the page's <title> or file
7
- // name as one line of plain text in the composer — where the person edits it and sends it themselves. What goes is an
8
- // ordinary message (Discord first): no new channel, nothing sent by itself.
9
-
10
- import { html, useEffect, useState } from "/assets/app-html.js";
11
- import { t } from "/assets/app-i18n.js";
12
- import { Icon } from "/assets/ui-icons.js";
13
- import { closePanel, frameKey, htmlTitle } from "./preview-panel.js";
14
- import { PageShareButton } from "./page-share-dialog.js";
15
-
16
- const P = () => globalThis.AgendPreview;
17
-
18
- /**
19
- * The chat registers how to reach its composer (panel-chat.js): { findMsg(instance, msgKey), startReply(instance, msg),
20
- * clearReply(instance), addToDraft(instance, line), focus() }. null: no chat is mounted, and the actions are not shown.
21
- */
22
- let chat = null;
23
- export function setPanelFeedback(deps) { chat = deps || null; }
24
-
25
- /** The most of a page's title or file name the line carries. */
26
- export const NAME_MAX = 80;
27
-
28
- /** One line of plain text: format characters removed, whitespace and control characters collapsed, cut at NAME_MAX characters. */
29
- export function plainName(value) {
30
- // \p{Cf} first (bidi controls, zero-widths): what the person reads is what is sent (#2914 review).
31
- const s = String(value == null ? "" : value).replace(/\p{Cf}+/gu, "").replace(/[\s\u0000-\u001f\u007f-\u009f\u2028\u2029]+/gu, " ").trim();
32
- const chars = [...s];
33
- return chars.length > NAME_MAX ? `${chars.slice(0, NAME_MAX - 1).join("")}…` : s;
34
- }
35
-
36
- /** The composer's line naming the page: its <title>, else the attached file's name, else "this page". */
37
- export function aboutLine(open) {
38
- if (!open) return "";
39
- const name = plainName(htmlTitle(open.code || "")) || plainName(open.att && open.att.name);
40
- return name ? t("chat.pvFbAboutNamed", name) : t("chat.pvFbAboutThis");
41
- }
42
-
43
- /**
44
- * Reply about the open page: a reply to the message it came in (while the thread still has it), and the line naming
45
- * the page added to the composer (never twice). Returns false when there is nothing to do it with.
46
- */
47
- export function replyAboutPage(open, deps = chat) {
48
- if (!open || !deps) return false;
49
- const msg = open.msgKey ? deps.findMsg(open.instance, open.msgKey) : null;
50
- // The page's message gone from the thread: no reply — and not one to another message started earlier, which the
51
- // line naming this page would be sent as (#2913 review).
52
- if (msg) deps.startReply(open.instance, msg);
53
- else deps.clearReply(open.instance);
54
- deps.addToDraft(open.instance, aboutLine(open));
55
- deps.focus();
56
- return true;
57
- }
58
-
59
- /**
60
- * #2911: the lines the errors chip adds — a header saying the text below is the page's, then each kept error quoted
61
- * ("> "), already one line of plain text (preview.js), and how many more there were. `log`: P().errors(key).
62
- */
63
- export function errorLines(log) {
64
- if (!log || !log.count) return [];
65
- const kind = { error: "", rejection: t("chat.pvFbErrRejection"), console: "console.error: ", blocked: t("chat.pvCdnBlocked") };
66
- const lines = [t(log.count === 1 ? "chat.pvFbErrHeadOne" : "chat.pvFbErrHead", String(log.count))];
67
- for (const x of log.items) lines.push(`> ${kind[x.kind] ?? ""}${plainName(x.message)}${x.line ? ` (${t("chat.pvFbErrAt", String(x.line), String(x.col))})` : ""}`);
68
- const more = log.count - log.items.length;
69
- if (more > 0) lines.push(t("chat.pvFbErrMore", String(more)));
70
- return lines;
71
- }
72
-
73
- /** The errors chip's click: reply about the page, then the error lines (each once) — the person edits and sends. */
74
- export function sendErrors(open, log, deps = chat) {
75
- if (!replyAboutPage(open, deps)) return false;
76
- for (const line of errorLines(log)) deps.addToDraft(open.instance, line);
77
- deps.focus();
78
- return true;
79
- }
80
-
81
- /**
82
- * #2911: the line a picked element adds — where in the page (the selector the page's frame built, as code) and its
83
- * words, marked as the page's text. Backticks are taken out of the selector so it stays one code span.
84
- */
85
- export function pickLine(result) {
86
- if (!result) return "";
87
- const where = plainName(String(result.selector || "").replace(/`/g, "")) || "?";
88
- const words = plainName(result.text);
89
- return words ? t("chat.pvFbPickWords", where, words) : t("chat.pvFbPickAt", where);
90
- }
91
-
92
- /** A picked element: reply about the page, then its line — the person writes what to change after it. */
93
- export function sendPick(open, result, deps = chat) {
94
- if (!result || !replyAboutPage(open, deps)) return false;
95
- deps.addToDraft(open.instance, pickLine(result));
96
- deps.focus();
97
- return true;
98
- }
99
-
100
- /** Whether the open page's frame is in pick mode, and its answer handed to sendPick. */
101
- function usePick(open) {
102
- const key = open ? frameKey(open.key) : null;
103
- const [on, setOn] = useState(() => !!(key && P() && P().picking && P().picking(key)));
104
- useEffect(() => {
105
- setOn(!!(key && P() && P().picking && P().picking(key)));
106
- if (!key || !P() || typeof P().onPick !== "function") return undefined;
107
- return P().onPick((k, result, now) => {
108
- if (k !== key) return;
109
- setOn(!!now);
110
- if (result) { if (narrow()) closePanel(); sendPick(open, result); }
111
- });
112
- }, [key]);
113
- return on;
114
- }
115
-
116
- /** The errors the open page's frame reported, re-read when they change. */
117
- function useErrors(open) {
118
- const key = open ? frameKey(open.key) : null;
119
- const read = () => (key && P() && typeof P().errors === "function" ? P().errors(key) : null);
120
- const [log, setLog] = useState(read);
121
- useEffect(() => {
122
- setLog(read());
123
- if (!key || !P() || typeof P().onErrors !== "function") return undefined;
124
- return P().onErrors((k) => { if (k === key) setLog(read()); });
125
- }, [key]);
126
- return log;
127
- }
128
-
129
- /**
130
- * #2911 item 8: what Share page names — the block of the message the open page came in ({ boot, id } and its fence
131
- * number or attachment id; the server reads the page itself), its title, and whose reply. null while the thread no
132
- * longer has that message.
133
- */
134
- export function shareBlock(open, deps = chat) {
135
- if (!open || !deps) return null;
136
- const msg = open.msgKey ? deps.findMsg(open.instance, open.msgKey) : null;
137
- if (!msg || typeof msg.boot !== "string" || typeof msg.id !== "number") return null;
138
- const from = open.att && typeof open.att.id === "string" ? { boot: msg.boot, id: msg.id, att: open.att.id }
139
- : Number.isInteger(open.n) ? { boot: msg.boot, id: msg.id, fence: open.n } : null;
140
- if (!from) return null;
141
- const title = plainName(htmlTitle(open.code || "")) || plainName(open.att && open.att.name);
142
- return { instance: open.instance, from, title, sender: msg.sender || open.sender || "", ts: msg.ts || open.ts || "" };
143
- }
144
-
145
- const narrow = () => typeof window !== "undefined" && !!window.matchMedia && window.matchMedia("(max-width: 899px)").matches;
146
-
147
- /** The bar's actions for the open page. props: open, name, run, view (as the panel has them). */
148
- export function PanelActions({ open, run }) {
149
- const log = useErrors(open);
150
- const picking = usePick(open);
151
- if (!open || !chat) return null;
152
- // On a phone the panel is a sheet over the composer: it closes, so the composer is there to type in.
153
- const reply = () => { if (narrow()) closePanel(); replyAboutPage(open); };
154
- const send = () => { const now = P().errors(frameKey(open.key)); if (narrow()) closePanel(); sendErrors(open, now); };
155
- const n = log ? log.count : 0;
156
- const key = open && frameKey(open.key);
157
- const canPick = run && run.state === "running" && typeof P().pick === "function";
158
- const point = () => { P().pick(key, !picking); };
159
- return html`<${PageShareButton} block=${shareBlock(open)} Icon=${Icon} />${canPick ? html`<button type="button" class=${`btn btn-sm pv-fb-pick${picking ? " on" : ""}`} aria-pressed=${picking ? "true" : "false"}
160
- title=${t(picking ? "chat.pvFbPickCancelTitle" : "chat.pvFbPickTitle")} onClick=${point}><${Icon} name="edit" size=${14} /><span class="lbl">${t(picking ? "chat.pvFbPickCancel" : "chat.pvFbPick")}</span></button>` : null}${n ? html`<button type="button" class="btn btn-sm pv-fb-errors" title=${t("chat.pvFbErrTitle")} onClick=${send}><${Icon} name="alert" size=${14} /><span class="pv-fb-n">${n >= P().ERRORS.maxCount ? `${n}+` : String(n)}</span><span class="lbl">${t(n === 1 ? "chat.pvFbErrOne" : "chat.pvFbErrMany")}</span></button>` : null}<button type="button" class="btn btn-sm pv-fb-reply" title=${t("chat.pvFbReplyTitle")} onClick=${reply}><${Icon} name="chat" size=${14} /><span class="lbl">${t("chat.pvFbReply")}</span></button>`;
161
- }
1
+ // Hub E (#3226): this module moved to /assets/preview-panel-actions.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-panel-actions.js";