@songsid/agend 2.4.0-beta.22 → 2.4.0-beta.24

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 (284) hide show
  1. package/dist/agent-cli-instructions.md +4 -3
  2. package/dist/agent-cli.js +32 -2
  3. package/dist/agent-cli.js.map +1 -1
  4. package/dist/agent-file-read.js +2 -2
  5. package/dist/agent-file-read.js.map +1 -1
  6. package/dist/agent-whats-new.js +17 -1
  7. package/dist/agent-whats-new.js.map +1 -1
  8. package/dist/auth-api.d.ts +2 -0
  9. package/dist/auth-api.js +5 -2
  10. package/dist/auth-api.js.map +1 -1
  11. package/dist/authority/web-authority.d.ts +17 -3
  12. package/dist/authority/web-authority.js +56 -3
  13. package/dist/authority/web-authority.js.map +1 -1
  14. package/dist/backend/claude-code.d.ts +15 -0
  15. package/dist/backend/claude-code.js +8 -3
  16. package/dist/backend/claude-code.js.map +1 -1
  17. package/dist/backend/claude-mcp-carry.d.ts +63 -0
  18. package/dist/backend/claude-mcp-carry.js +242 -0
  19. package/dist/backend/claude-mcp-carry.js.map +1 -0
  20. package/dist/build-provenance.json +1 -1
  21. package/dist/channel/mcp-tools.js +15 -7
  22. package/dist/channel/mcp-tools.js.map +1 -1
  23. package/dist/classic-channel-manager.d.ts +1 -1
  24. package/dist/classic-channel-manager.js +2 -2
  25. package/dist/classic-channel-manager.js.map +1 -1
  26. package/dist/config-validator.js +6 -0
  27. package/dist/config-validator.js.map +1 -1
  28. package/dist/contact-auth-api.js +3 -1
  29. package/dist/contact-auth-api.js.map +1 -1
  30. package/dist/contact-auth-service.js +1 -1
  31. package/dist/contact-auth-service.js.map +1 -1
  32. package/dist/contact-auth-store.d.ts +28 -2
  33. package/dist/contact-auth-store.js +72 -4
  34. package/dist/contact-auth-store.js.map +1 -1
  35. package/dist/contact-change-proposals.d.ts +18 -1
  36. package/dist/contact-change-proposals.js +38 -4
  37. package/dist/contact-change-proposals.js.map +1 -1
  38. package/dist/contact-state-view.d.ts +103 -0
  39. package/dist/contact-state-view.js +80 -0
  40. package/dist/contact-state-view.js.map +1 -0
  41. package/dist/daemon.d.ts +11 -0
  42. package/dist/daemon.js +66 -15
  43. package/dist/daemon.js.map +1 -1
  44. package/dist/dashboard-permissions.d.ts +8 -0
  45. package/dist/dashboard-permissions.js +8 -0
  46. package/dist/dashboard-permissions.js.map +1 -1
  47. package/dist/delivery-outbox.d.ts +15 -1
  48. package/dist/delivery-outbox.js +60 -2
  49. package/dist/delivery-outbox.js.map +1 -1
  50. package/dist/fleet-manager.d.ts +157 -15
  51. package/dist/fleet-manager.js +522 -78
  52. package/dist/fleet-manager.js.map +1 -1
  53. package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
  54. package/dist/general-knowledge/skills/concepts/SKILL.md +31 -21
  55. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +6 -0
  56. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
  57. package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -3
  58. package/dist/general-knowledge/skills/hub/SKILL.md +6 -1
  59. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
  60. package/dist/general-knowledge/skills/task-board/SKILL.md +17 -0
  61. package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -0
  62. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +75 -12
  63. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  64. package/dist/general-role.d.ts +1 -1
  65. package/dist/general-role.js +1 -0
  66. package/dist/general-role.js.map +1 -1
  67. package/dist/hub/client.js +6 -1
  68. package/dist/hub/client.js.map +1 -1
  69. package/dist/hub/compose/member.d.ts +2 -1
  70. package/dist/hub/compose/member.js +3 -2
  71. package/dist/hub/compose/member.js.map +1 -1
  72. package/dist/hub/compose/server.js +2 -1
  73. package/dist/hub/compose/server.js.map +1 -1
  74. package/dist/hub/http/compose.js +5 -0
  75. package/dist/hub/http/compose.js.map +1 -1
  76. package/dist/hub/protocol.d.ts +21 -0
  77. package/dist/hub/protocol.js +3 -0
  78. package/dist/hub/protocol.js.map +1 -1
  79. package/dist/hub/question-close-model.d.ts +17 -0
  80. package/dist/hub/question-close-model.js +7 -0
  81. package/dist/hub/question-close-model.js.map +1 -0
  82. package/dist/hub/representative.d.ts +5 -0
  83. package/dist/hub/representative.js +51 -1
  84. package/dist/hub/representative.js.map +1 -1
  85. package/dist/hub/rooms/direct-view.js +1 -0
  86. package/dist/hub/rooms/direct-view.js.map +1 -1
  87. package/dist/hub/rooms/types.d.ts +1 -1
  88. package/dist/hub/rooms.d.ts +3 -0
  89. package/dist/hub/rooms.js +27 -1
  90. package/dist/hub/rooms.js.map +1 -1
  91. package/dist/hub/server.js +6 -1
  92. package/dist/hub/server.js.map +1 -1
  93. package/dist/hub/types.d.ts +2 -2
  94. package/dist/human-delivery-receipts.d.ts +12 -2
  95. package/dist/human-delivery-receipts.js +19 -4
  96. package/dist/human-delivery-receipts.js.map +1 -1
  97. package/dist/instance-lifecycle.d.ts +2 -0
  98. package/dist/instance-lifecycle.js +29 -1
  99. package/dist/instance-lifecycle.js.map +1 -1
  100. package/dist/instructions.d.ts +1 -1
  101. package/dist/instructions.js +1 -1
  102. package/dist/instructions.js.map +1 -1
  103. package/dist/locale.js +110 -12
  104. package/dist/locale.js.map +1 -1
  105. package/dist/needs-you-hub.d.ts +3 -0
  106. package/dist/needs-you-hub.js +31 -5
  107. package/dist/needs-you-hub.js.map +1 -1
  108. package/dist/needs-you.d.ts +16 -1
  109. package/dist/needs-you.js +7 -1
  110. package/dist/needs-you.js.map +1 -1
  111. package/dist/office-share-page.js +2 -2
  112. package/dist/office-share-page.js.map +1 -1
  113. package/dist/office-share.js +2 -1
  114. package/dist/office-share.js.map +1 -1
  115. package/dist/outbound-handlers.d.ts +4 -0
  116. package/dist/outbound-handlers.js +69 -11
  117. package/dist/outbound-handlers.js.map +1 -1
  118. package/dist/outbound-schemas.d.ts +5 -1
  119. package/dist/outbound-schemas.js +10 -7
  120. package/dist/outbound-schemas.js.map +1 -1
  121. package/dist/public-web-gateway.js +21 -0
  122. package/dist/public-web-gateway.js.map +1 -1
  123. package/dist/reply-buttons-controller.d.ts +2 -1
  124. package/dist/reply-buttons-controller.js +1 -1
  125. package/dist/reply-buttons-controller.js.map +1 -1
  126. package/dist/request-context-compatibility.d.ts +20 -0
  127. package/dist/request-context-compatibility.js +74 -0
  128. package/dist/request-context-compatibility.js.map +1 -0
  129. package/dist/request-context-protocol.d.ts +137 -0
  130. package/dist/request-context-protocol.js +38 -0
  131. package/dist/request-context-protocol.js.map +1 -0
  132. package/dist/request-context-store.d.ts +25 -0
  133. package/dist/request-context-store.js +137 -0
  134. package/dist/request-context-store.js.map +1 -0
  135. package/dist/scheduler/db.js +26 -0
  136. package/dist/scheduler/db.js.map +1 -1
  137. package/dist/scheduler/task-board-text.d.ts +2 -0
  138. package/dist/scheduler/task-board-text.js +12 -0
  139. package/dist/scheduler/task-board-text.js.map +1 -1
  140. package/dist/scheduler/task-board.d.ts +102 -2
  141. package/dist/scheduler/task-board.js +242 -24
  142. package/dist/scheduler/task-board.js.map +1 -1
  143. package/dist/scheduler/task-files.d.ts +80 -0
  144. package/dist/scheduler/task-files.js +357 -0
  145. package/dist/scheduler/task-files.js.map +1 -0
  146. package/dist/settings-api.d.ts +2 -0
  147. package/dist/settings-api.js +6 -1
  148. package/dist/settings-api.js.map +1 -1
  149. package/dist/settings-baseline.d.ts +1 -0
  150. package/dist/settings-baseline.js +1 -1
  151. package/dist/settings-baseline.js.map +1 -1
  152. package/dist/settings-effect.d.ts +2 -0
  153. package/dist/settings-effect.js +5 -1
  154. package/dist/settings-effect.js.map +1 -1
  155. package/dist/task-attach-client.d.ts +43 -0
  156. package/dist/task-attach-client.js +125 -0
  157. package/dist/task-attach-client.js.map +1 -0
  158. package/dist/task-board-tool.d.ts +12 -0
  159. package/dist/task-board-tool.js +107 -6
  160. package/dist/task-board-tool.js.map +1 -1
  161. package/dist/task-file-limits.d.ts +15 -0
  162. package/dist/task-file-limits.js +21 -0
  163. package/dist/task-file-limits.js.map +1 -0
  164. package/dist/tool-permissions.d.ts +32 -0
  165. package/dist/tool-permissions.js +64 -1
  166. package/dist/tool-permissions.js.map +1 -1
  167. package/dist/types.d.ts +6 -0
  168. package/dist/ui/accounts-keepalive.js +2 -1
  169. package/dist/ui/agent-details-settings.js +7 -5
  170. package/dist/ui/agent-who-can-use-strings.js +125 -0
  171. package/dist/ui/agent-who-can-use.js +238 -0
  172. package/dist/ui/chat-activity.js +2 -1
  173. package/dist/ui/chat-pins.js +2 -1
  174. package/dist/ui/claude-credentials.js +2 -1
  175. package/dist/ui/contact-auth-strings.js +28 -17
  176. package/dist/ui/contact-authorizations.js +6 -4
  177. package/dist/ui/contact-needs.js +6 -1
  178. package/dist/ui/contact-permissions.js +6 -4
  179. package/dist/ui/contact-tool-groups.js +1 -1
  180. package/dist/ui/contact-verify-need.js +46 -0
  181. package/dist/ui/fleet-cache.js +2 -1
  182. package/dist/ui/fleet-office-card.js +23 -5
  183. package/dist/ui/fleet-office-editor.js +5 -5
  184. package/dist/ui/fleet-office-pack.d.ts +10 -0
  185. package/dist/ui/fleet-office-pack.js +65 -2
  186. package/dist/ui/fleet-office-skin.js +52 -14
  187. package/dist/ui/fleet-office-store.js +33 -2
  188. package/dist/ui/fleet-office-vehicles.js +130 -0
  189. package/dist/ui/fleet-office-zones.js +27 -10
  190. package/dist/ui/fleet-office.js +128 -40
  191. package/dist/ui/fleet-org.js +6 -1
  192. package/dist/ui/fleet-tab-icons.js +19 -0
  193. package/dist/ui/fleet-task-activity.js +11 -83
  194. package/dist/ui/fleet-task-archive.js +111 -0
  195. package/dist/ui/fleet-task-card.js +6 -4
  196. package/dist/ui/fleet-task-common.js +2 -2
  197. package/dist/ui/fleet-task-edit.js +8 -1
  198. package/dist/ui/fleet-task-files.js +196 -0
  199. package/dist/ui/fleet-task-md.js +98 -0
  200. package/dist/ui/fleet-task-menu.js +1 -1
  201. package/dist/ui/fleet-task-stats.js +2 -2
  202. package/dist/ui/fleet-task-view.js +14 -9
  203. package/dist/ui/fleet-tasks.js +42 -18
  204. package/dist/ui/fleet-usage.js +2 -1
  205. package/dist/ui/hub-admin-overview.js +2 -1
  206. package/dist/ui/hub-agent-intro.js +2 -1
  207. package/dist/ui/hub-assistant-admin.js +2 -1
  208. package/dist/ui/hub-directory-notices.js +2 -1
  209. package/dist/ui/hub-enrolment-code.js +2 -1
  210. package/dist/ui/hub-my-agents.js +2 -1
  211. package/dist/ui/hub-quick-pairing.js +2 -1
  212. package/dist/ui/hub-role-audit.js +2 -1
  213. package/dist/ui/hub-role-forms.js +3 -2
  214. package/dist/ui/hub-role-view.js +3 -2
  215. package/dist/ui/hub-roles.js +2 -1
  216. package/dist/ui/hub-room-agent-strings.js +2 -1
  217. package/dist/ui/hub-room-list.js +2 -1
  218. package/dist/ui/hub-room-owner-requests.js +2 -1
  219. package/dist/ui/hub-room-pins.js +2 -1
  220. package/dist/ui/hub-room-strings.js +2 -2
  221. package/dist/ui/hub-room-thread.js +1 -1
  222. package/dist/ui/log-row.js +4 -3
  223. package/dist/ui/office-share-dialog.js +2 -1
  224. package/dist/ui/office-share-page.js +2 -1
  225. package/dist/ui/page-share-dialog.js +3 -2
  226. package/dist/ui/panel-chat.js +2 -1
  227. package/dist/ui/panel-details.js +5 -2
  228. package/dist/ui/panel-fleet.js +10 -5
  229. package/dist/ui/panel-hub.js +2 -1
  230. package/dist/ui/panel-needs.js +34 -6
  231. package/dist/ui/panel-notices.js +2 -1
  232. package/dist/ui/panel-runtimes.js +2 -1
  233. package/dist/ui/panel-settings.js +15 -1
  234. package/dist/ui/panel-windows-cli.js +3 -2
  235. package/dist/ui/runtime-cli-install.js +2 -1
  236. package/dist/ui/settings-appearance.js +2 -1
  237. package/dist/ui/settings-guests.js +4 -3
  238. package/dist/ui/settings-hub-member-address.js +2 -1
  239. package/dist/ui/settings-hub-setup.js +2 -1
  240. package/dist/ui/settings-hub-web-address.js +2 -1
  241. package/dist/ui/settings-hub.js +2 -1
  242. package/dist/ui/settings-registry.js +1 -0
  243. package/dist/ui/settings-shared-strings.js +9 -0
  244. package/dist/ui/settings-shared.js +6 -1
  245. package/dist/ui/settings-update.js +2 -1
  246. package/dist/ui/settings-web-authority.js +2 -1
  247. package/dist/ui/shared/agent-sheet.js +2 -1
  248. package/dist/ui/shared/app-i18n.js +2 -2
  249. package/dist/ui/shared/app-needs.js +8 -1
  250. package/dist/ui/shared/app-session.js +4 -3
  251. package/dist/ui/shared/app-shell.js +6 -2
  252. package/dist/ui/shared/app.css +93 -11
  253. package/dist/ui/shared/chat-strings.js +4 -4
  254. package/dist/ui/shared/chat-time.js +7 -4
  255. package/dist/ui/shared/clock-text.js +57 -0
  256. package/dist/ui/shared/device-roles.js +6 -5
  257. package/dist/ui/shared/instance-nav.js +17 -22
  258. package/dist/ui/shared/task-board.css +64 -0
  259. package/dist/ui/shared/usage-dialog.js +2 -1
  260. package/dist/ui/shared/view-strings.js +0 -14
  261. package/dist/ui/shared/web-authorize.js +3 -2
  262. package/dist/ui/subagent-row.js +2 -1
  263. package/dist/web-api.d.ts +18 -2
  264. package/dist/web-api.js +159 -27
  265. package/dist/web-api.js.map +1 -1
  266. package/dist/web-login.d.ts +6 -1
  267. package/dist/web-login.js +8 -3
  268. package/dist/web-login.js.map +1 -1
  269. package/dist/web-office-acts.d.ts +16 -0
  270. package/dist/web-office-acts.js +27 -9
  271. package/dist/web-office-acts.js.map +1 -1
  272. package/dist/web-office-pack-read.js +1 -1
  273. package/dist/web-office-pack-read.js.map +1 -1
  274. package/dist/web-office-skins.d.ts +5 -3
  275. package/dist/web-office-skins.js +20 -16
  276. package/dist/web-office-skins.js.map +1 -1
  277. package/dist/web-session-authorization.d.ts +3 -0
  278. package/dist/web-session-authorization.js +1 -1
  279. package/dist/web-session-authorization.js.map +1 -1
  280. package/dist/web-settings-patch.d.ts +27 -0
  281. package/dist/web-settings-patch.js +67 -0
  282. package/dist/web-settings-patch.js.map +1 -1
  283. package/dist/workflow-templates/default.md +1 -0
  284. package/package.json +1 -1
@@ -4,6 +4,7 @@ import {PeopleSearch} from "./hub-subject-picker.js";
4
4
  import {GroupSearch} from "./hub-group-search.js";
5
5
  import {hr} from "./hub-roles-strings.js";
6
6
  import {personKey,personName,roleName,roleDescription,permissionGroups,management,changeLines,reviewImpact,scopeName,valueLines} from "./hub-role-view.js";
7
+ import { dateTimeText } from "/assets/clock-text.js";
7
8
  const copy=value=>structuredClone(value);
8
9
  const dateValue=at=>at?new Date(at-new Date(at).getTimezoneOffset()*60000).toISOString().slice(0,16):"";
9
10
  export function RoleSearch({client,kind,onPick,disabled,id}){
@@ -45,8 +46,8 @@ export function Review({view,checked}){
45
46
  ${line.after?.description!==undefined?html`<p>${hr("rolePurpose")}: ${line.before?.description||"–"} → ${line.after.description||"–"}</p>`:null}
46
47
  ${line.after?.defaultMaxFleets!==undefined?html`<p>${hr("quota")}: ${line.before?.defaultMaxFleets??"–"} → ${line.after.defaultMaxFleets}</p>`:null}
47
48
  ${line.after?.scope?html`<p>${hr("scope")}: ${line.before?.scope?scopeName(line.before.scope):"–"} → ${scopeName(line.after.scope)}</p>
48
- ${line.after.startsAt||line.before?.startsAt?html`<p>${hr("start")}: ${line.before?.startsAt?new Date(line.before.startsAt).toLocaleString():"–"} → ${line.after.startsAt?new Date(line.after.startsAt).toLocaleString():"–"}</p>`:null}
49
- <p>${hr("ends")}: ${line.before?.expiresAt?new Date(line.before.expiresAt).toLocaleString():hr("noEnd")} → ${line.after.expiresAt?new Date(line.after.expiresAt).toLocaleString():hr("noEnd")}</p>
49
+ ${line.after.startsAt||line.before?.startsAt?html`<p>${hr("start")}: ${line.before?.startsAt?dateTimeText(line.before.startsAt):"–"} → ${line.after.startsAt?dateTimeText(line.after.startsAt):"–"}</p>`:null}
50
+ <p>${hr("ends")}: ${line.before?.expiresAt?dateTimeText(line.before.expiresAt):hr("noEnd")} → ${line.after.expiresAt?dateTimeText(line.after.expiresAt):hr("noEnd")}</p>
50
51
  ${line.after.maxFleets!==null||line.before?.maxFleets!=null?html`<p>${hr("override")}: ${line.before?.maxFleets??"–"} → ${line.after.maxFleets??"–"}</p>`:null}`:null}
51
52
  ${line.deleted?html`<p class="note">${hr("deleteAssignments",line.removedAssignments)}</p>`:null}</section>`)}
52
53
  ${!lines.length?html`<p>${hr("nothingChanged")}</p>`:null}
@@ -1,5 +1,6 @@
1
1
  /** Display projections only. Policy keys, permissions and checked writes remain server-owned. */
2
2
  import {hr} from "./hub-roles-strings.js";
3
+ import { dateTimeText } from "/assets/clock-text.js";
3
4
  export const personKey=p=>`${p?.realm}/${p?.objectId}`;
4
5
  export const management=["fleets.manage","join.manage","roles.assign","audit.view","hub.admin"];
5
6
  export const permissionGroups=[{key:"usingHub",permissions:["ask_agents","publish_agents","pair_fleet"]},{key:"theirTeam",permissions:["team.view","team.usage"]},{key:"runningHub",permissions:["fleets.manage","join.manage","roles.assign","audit.view"]}];
@@ -73,8 +74,8 @@ export function valueLines(value){
73
74
  if(value.permissions)lines.push(value.permissions.map(p=>hr(p)).join(" · "));
74
75
  if(value.defaultMaxFleets!==undefined)lines.push(`${hr("quota")}: ${value.defaultMaxFleets}`);
75
76
  if(value.subject)lines.push(value.subject.name||hr("unknownPerson"));if(value.scope)lines.push(scopeName(value.scope));
76
- if(value.startsAt)lines.push(`${hr("start")}: ${new Date(value.startsAt).toLocaleString()}`);
77
- if(value.expiresAt!==undefined)lines.push(`${hr("ends")}: ${value.expiresAt?new Date(value.expiresAt).toLocaleString():hr("noEnd")}`);
77
+ if(value.startsAt)lines.push(`${hr("start")}: ${dateTimeText(value.startsAt)}`);
78
+ if(value.expiresAt!==undefined)lines.push(`${hr("ends")}: ${value.expiresAt?dateTimeText(value.expiresAt):hr("noEnd")}`);
78
79
  if(value.maxFleets!=null)lines.push(`${hr("override")}: ${value.maxFleets}`);
79
80
  if(value.rolesActive!==undefined)lines.push(hr(value.rolesActive?"on":"off"));
80
81
  return lines;
@@ -5,6 +5,7 @@ import {hr,linkRoleCss} from "./hub-roles-strings.js";
5
5
  import {RoleWizard,AssignPanel,PermissionSections,Review} from "./hub-role-forms.js";
6
6
  import {RoleAudit} from "./hub-role-audit.js";
7
7
  import {personKey,personName,roleName,roleDescription,assignedSubjects,assignmentCount,subjectId,scopeName,roleError} from "./hub-role-view.js";
8
+ import { dateTimeText } from "/assets/clock-text.js";
8
9
  const copy=value=>structuredClone(value);
9
10
  function Tabs({items,value,onChange,disabled=false,label}){
10
11
  return html`<div class="hub-role-tabs" role="tablist" aria-label=${label}>${items.map(item=>html`<button key=${item.key} type="button" role="tab" tabindex=${item.key===value?0:-1} onKeyDown=${e=>{const at=items.findIndex(row=>row.key===value),keys={ArrowRight:(at+1)%items.length,ArrowLeft:(at+items.length-1)%items.length,Home:0,End:items.length-1};if(Object.hasOwn(keys,e.key)){e.preventDefault();const next=keys[e.key];onChange(items[next].key);(e.currentTarget||e.target).parentNode.querySelectorAll('[role="tab"]')[next]?.focus();}}} aria-selected=${item.key===value} class=${item.key===value?"is-active":""} disabled=${disabled} onClick=${()=>onChange(item.key)}>${item.label}</button>`)}</div>`;
@@ -27,7 +28,7 @@ function PersonRoles({view,subject,busy,onBack,onEdit,onRemove}){
27
28
  const row=assignedSubjects(view).find(row=>row.id===subjectId(subject)),own=subject.kind==="person"&&personKey(subject.person)===personKey(view.actor),canAssign=view.management.includes("roles.assign");
28
29
  return html`<section class="card hub-role-person"><button type="button" class="btn btn-sm" disabled=${busy} onClick=${onBack}>‹ ${hr("people")}</button><h2>${row?.name||hr("unknownPerson")}${own?html` <span class="tag">${hr("you")}</span>`:null}</h2>${own?html`<p class="s-info">${hr("selfHelp")}</p>`:null}
29
30
  <ul class="hub-rows">${row?.fixed?html`<li class="s-row hub-row"><span class="hub-row-text"><strong>${hr("admin")}</strong><small class="note">${hr("firstAdminHelp")}</small></span></li>`:null}
30
- ${row?.assignments.map(a=>html`<li class="s-row hub-row" key=${a.id}><span class="hub-row-text"><strong>${roleName(view.policy.roles.find(r=>r.id===a.roleId),view)}</strong><small class="note">${scopeName(a.scope)} · ${a.expiresAt?new Date(a.expiresAt).toLocaleString():hr("noEnd")}</small></span>
31
+ ${row?.assignments.map(a=>html`<li class="s-row hub-row" key=${a.id}><span class="hub-row-text"><strong>${roleName(view.policy.roles.find(r=>r.id===a.roleId),view)}</strong><small class="note">${scopeName(a.scope)} · ${a.expiresAt?dateTimeText(a.expiresAt):hr("noEnd")}</small></span>
31
32
  ${canAssign?html`<div class="s-actions"><button type="button" class="btn btn-sm" disabled=${busy||own} onClick=${()=>onEdit(a)}>${hr("edit")}</button><button type="button" class="btn btn-sm danger" disabled=${busy||own} onClick=${()=>onRemove(a)}>${hr("remove")}</button></div>`:null}</li>`)}</ul></section>`;
32
33
  }
33
34
  function RolePage({view,role,busy,canEdit,canAssign,onBack,onAssign,onEdit,onDelete,onPerson}){
@@ -1,5 +1,6 @@
1
1
  // M-3118: independent namespace so a cached room dictionary can still render new stop events.
2
2
  import { register, t, lang } from "/assets/app-i18n.js";
3
+ import { timeText } from "/assets/clock-text.js";
3
4
  register("hubRoomAgent", {
4
5
  en: {
5
6
  all: "Agents can't use @All agents. This message was not sent to other agents.",
@@ -23,6 +24,6 @@ export function agentStopText(system) {
23
24
  if (!system || !["all", "ambiguous", "depth", "rate", "capacity"].includes(system.reason)) return null;
24
25
  if (system.reason !== "rate") return hra(system.reason, String(system.name || ""));
25
26
  if (!Number.isSafeInteger(system.retryAt) || system.retryAt < 0) return null;
26
- const time = new Date(Math.ceil(system.retryAt / 60_000) * 60_000).toLocaleTimeString(lang(), { hour: "2-digit", minute: "2-digit" });
27
+ const time = timeText(Math.ceil(system.retryAt / 60_000) * 60_000, { hour: "2-digit", minute: "2-digit" }, lang());
27
28
  return hra("rate", String(system.name || ""), time);
28
29
  }
@@ -17,6 +17,7 @@ import { Menu } from "/assets/ui-menu.js";
17
17
  import { Icon } from "/assets/ui-icons.js";
18
18
  import "./hub-room-strings.js";
19
19
  import { presenceDot } from "./hub-room-presence.js";
20
+ import { timeText } from "/assets/clock-text.js";
20
21
 
21
22
  const tr = (key, ...a) => t(`hubRoom.${key}`, ...a);
22
23
  /** The Fleet sidebar's own words for favourites (view.*, with named values; agentRow.*): no Hub copy of them. */
@@ -90,7 +91,7 @@ export function rowView(r) {
90
91
  const listTime = (ms) => {
91
92
  if (!ms) return "";
92
93
  const d = new Date(ms), now = new Date();
93
- return d.toDateString() === now.toDateString() ? d.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" }) : d.toLocaleDateString(undefined, { month: "numeric", day: "numeric" });
94
+ return d.toDateString() === now.toDateString() ? timeText(d, { hour: "2-digit", minute: "2-digit" }) : d.toLocaleDateString(undefined, { month: "numeric", day: "numeric" });
94
95
  };
95
96
 
96
97
  /**
@@ -3,12 +3,13 @@ import { Dialog } from "/assets/ui-dialog.js";
3
3
  import { RoomPicker } from "./hub-room-new.js";
4
4
  import { hrq } from "./hub-room-owner-requests-strings.js";
5
5
  import { hn } from "./hub-room-new-strings.js";
6
+ import { dateTimeText } from "/assets/clock-text.js";
6
7
 
7
8
  export function ownerRequestError(result, owner) {
8
9
  if (result?.code === "owner-not-taking-requests") return hrq("ownerOff", owner);
9
10
  if (result?.code === "request-open") return hrq("already", owner);
10
11
  if (result?.code === "request-limit" && Number.isSafeInteger(result.resetsAt) && result.resetsAt > 0 && result.resetsAt <= 8.64e15) {
11
- const time = new Date(result.resetsAt).toLocaleString(undefined, { month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit" });
12
+ const time = dateTimeText(result.resetsAt, { month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit" });
12
13
  return hrq("limit", time);
13
14
  }
14
15
  return hrq("failed");
@@ -9,11 +9,12 @@ import { lang, t } from "/assets/app-i18n.js";
9
9
  import { Dialog } from "/assets/ui-dialog.js";
10
10
  import { Icon } from "/assets/ui-icons.js";
11
11
  import { hroom } from "./hub-room-strings.js";
12
+ import { dateTimeText } from "/assets/clock-text.js";
12
13
 
13
14
  /** The Hub's limit per person per room (src/hub/rooms/service.ts ROOM_PINS_MAX). */
14
15
  export const ROOM_PINS_MAX = 50;
15
16
 
16
- const when = (ms) => { const d = new Date(ms); return Number.isFinite(d.getTime()) ? d.toLocaleString(lang(), { dateStyle: "medium", timeStyle: "short" }) : ""; };
17
+ const when = (ms) => { const d = new Date(ms); return Number.isFinite(d.getTime()) ? dateTimeText(d, { dateStyle: "medium", timeStyle: "short" }, lang()) : ""; };
17
18
  const snippet = (s, n = 40) => { const one = String(s || "").replace(/\s+/g, " ").trim(); return one.length > n ? `${one.slice(0, n - 1)}…` : one; };
18
19
  const textOf = (m) => String(m?.text || "");
19
20
  const filesOf = (m) => (Array.isArray(m?.files) ? m.files.map((f) => f && f.name).filter(Boolean) : []);
@@ -40,7 +40,7 @@ register("hubRoom", {
40
40
  searchResults: "Results", searchRooms: "Rooms and chats", searchBadgeRoom: "Room", searchBadgeChat: "Chat", searchCount: "{0} results",
41
41
  searchOlder: "Search older messages", searchKeys: "↑↓ move · Enter open · Esc close", jumpMissing: "That message is no longer in this room.",
42
42
  filterPh: "Filter: name or owner", filterClear: "Clear the filter",
43
- laterAnswer: "{0} ({1}) · answers after they come online", noAnswer: "No answer", noAnswerReshare: "This agent is unavailable right now. Its owner needs to share it again.", noAnswerUnanswered:"No answer: The agent finished without answering here", noAnswerStopped: "No answer: {0} stopped sharing this agent.",
43
+ laterAnswer: "{0} ({1}) · answers after they come online", noAnswer: "No answer", noAnswerReshare: "This agent is unavailable right now. Its owner needs to share it again.", noAnswerUnanswered:"No answer: The agent finished without answering here", noAnswerDeclined: "The owner chose not to answer this question.", noAnswerStopped: "No answer: {0} stopped sharing this agent.",
44
44
  workingOne: "{0} is working on it", workingMany: "{0} agents are working",
45
45
  waitBehindOne: "Waiting: {0} is answering another question first", waitBehindMany: "Waiting: {0} has {1} questions to answer first",
46
46
  waitBusy: "Waiting: {0} is busy with other work", waitPaused: "Waiting: {0} is paused; it gets your question when it resumes",
@@ -197,7 +197,7 @@ register("hubRoom", {
197
197
  searchResults: "結果", searchRooms: "房間與聊天", searchBadgeRoom: "房間", searchBadgeChat: "聊天", searchCount: "{0} 筆結果",
198
198
  searchOlder: "搜尋更早的訊息", searchKeys: "↑↓ 移動 · Enter 開啟 · Esc 關閉", jumpMissing: "這則訊息已不在這個房間裡。",
199
199
  filterPh: "篩選:名稱或擁有者", filterClear: "清除篩選",
200
- laterAnswer: "{0}({1})· 上線後回答", noAnswer: "沒有回答", noAnswerReshare: "這個 Agent 暫時無法回答,擁有者需要重新分享。", noAnswerUnanswered:"沒有回答:Agent 已結束處理,但沒有在這裡回答。", noAnswerStopped: "沒有回答:{0} 已停止分享這個 Agent。",
200
+ laterAnswer: "{0}({1})· 上線後回答", noAnswer: "沒有回答", noAnswerReshare: "這個 Agent 暫時無法回答,擁有者需要重新分享。", noAnswerUnanswered:"沒有回答:Agent 已結束處理,但沒有在這裡回答。", noAnswerDeclined: "擁有者決定不處理這題。", noAnswerStopped: "沒有回答:{0} 已停止分享這個 Agent。",
201
201
  workingOne: "{0} 正在處理", workingMany: "{0} 個 Agent 正在處理",
202
202
  waitBehindOne: "等待中:{0} 正在先回答另一個問題", waitBehindMany: "等待中:{0} 前面還有 {1} 個問題",
203
203
  waitBusy: "等待中:{0} 正在處理其他工作", waitPaused: "等待中:{0} 已暫停,恢復後會收到你的問題",
@@ -211,7 +211,7 @@ export function toThreadMessages(messages, { meId, ids, direct = false, expanded
211
211
  ...(!direct && Array.isArray(m.reactions) && m.reactions.length ? { reactionBar: reactionBar(m.reactions, { meId, names }) } : {}),
212
212
  ...(!direct && kind !== "person" && m.buttons ? { buttons: roomButtons(m.buttons, meId) } : {}),
213
213
  ...(quotedId ? { replyTo: { boot: BOOT, id: num(quotedId), sender: quoted ? authorLine(quoted.author, quoted.author?.id === meId, direct) : "", text: quoted ? String(quoted.text || "").slice(0, 120) : "" } } : {}),
214
- ...(m.stage === "not-answered" && !(kind === "person" && m.reasonCode === "share-needs-reshare") ? { text: m.reasonCode === "share-needs-reshare" ? hroom("noAnswerReshare") : m.reasonCode === "owner-stopped-sharing" ? hroom("noAnswerStopped", author.owner?.name || "") : m.reasonCode==="finished-without-answer"?hroom("noAnswerUnanswered"):hroom("noAnswer") } : {}) });
214
+ ...(m.stage === "not-answered" && !(kind === "person" && m.reasonCode === "share-needs-reshare") ? { text: m.reasonCode === "owner-declined" ? hroom("noAnswerDeclined") : m.reasonCode === "share-needs-reshare" ? hroom("noAnswerReshare") : m.reasonCode === "owner-stopped-sharing" ? hroom("noAnswerStopped", author.owner?.name || "") : m.reasonCode==="finished-without-answer"?hroom("noAnswerUnanswered"):hroom("noAnswer") } : {}) });
215
215
  if (kind === "person" && m.stage === "not-answered" && m.reasonCode === "share-needs-reshare")
216
216
  out.push({ boot: BOOT, id: num(`unavailable:${m.id}`), role: "status", sender: "", text: hroom("noAnswerReshare"), bare: true, wrap: true });
217
217
  if (foldAfter) out.push({ boot: BOOT, id: num(`expand:${foldAfter.arg}`), role: "status", sender: "", text: "", bare: true, fold: true, action: foldAfter });
@@ -7,6 +7,7 @@ import { register, t } from "/assets/app-i18n.js";
7
7
  import { Icon } from "/assets/ui-icons.js";
8
8
  import "/assets/chat-strings.js";
9
9
  import { chatTime, chatTimeFull } from "/assets/chat-time.js";
10
+ import { unitText } from "/assets/clock-text.js";
10
11
 
11
12
  register("log", {
12
13
  en: {
@@ -129,11 +130,11 @@ function size(bytes) {
129
130
  }
130
131
  function duration(ms) {
131
132
  if (!(ms >= 0)) return "";
132
- if (ms < 1000) return `${ms} ms`;
133
+ if (ms < 1000) return unitText(ms, "ms");
133
134
  const s = ms / 1000;
134
- if (s < 60) return `${s < 10 ? s.toFixed(1) : Math.round(s)} s`;
135
+ if (s < 60) return unitText(s < 10 ? s.toFixed(1) : Math.round(s), "s");
135
136
  const m = Math.floor(s / 60);
136
- return `${m} m ${Math.round(s - m * 60)} s`;
137
+ return `${unitText(m, "m")} ${unitText(Math.round(s - m * 60), "s")}`;
137
138
  }
138
139
  const eventLabel = (type) => { const k = `log.ev_${type}`; const v = t(k); return v === k ? String(type).replace(/_/g, " ") : v; };
139
140
 
@@ -10,6 +10,7 @@ import { html, useEffect, useState } from "/assets/app-html.js";
10
10
  import { t, register } from "/assets/app-i18n.js";
11
11
  import { Dialog } from "/assets/ui-dialog.js";
12
12
  import { toast } from "/assets/ui-toast.js";
13
+ import { clockFormat } from "/assets/clock-text.js";
13
14
 
14
15
  register("oshare", {
15
16
  en: {
@@ -40,7 +41,7 @@ register("oshare", {
40
41
  const to = (k, ...v) => t(`oshare.${k}`, ...v);
41
42
  const DURATIONS = [["m15", 15], ["m30", 30], ["h1", 60], ["h2", 120], ["h4", 240], ["h8", 480], ["h24", 1440]];
42
43
  const JSON_HEADERS = { "Content-Type": "application/json" };
43
- const when = (ms) => { try { return new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }).format(new Date(ms)); } catch { return ""; } };
44
+ const when = (ms) => { try { return clockFormat({ month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; } };
44
45
 
45
46
  /** What a refusal says (the host's `error` and `reason`). */
46
47
  export function refusalText(d) {
@@ -12,6 +12,7 @@ import { buildOrgView } from "./fleet-org.js";
12
12
  import { createTrafficStore, POLL_MS } from "./fleet-traffic.js";
13
13
  import { Office } from "./fleet-office.js";
14
14
  import { ALL_ID } from "./fleet-office-overview.js";
15
+ import { clockFormat } from "/assets/clock-text.js";
15
16
 
16
17
  register("share", {
17
18
  en: { title: "Office", live: "Live view", ends: "until {0}", readOnly: "Read-only: names and states only.", ended: "This Office link has ended.", loading: "Loading the office…", offline: "Can't reach the office right now. Trying again…" },
@@ -111,7 +112,7 @@ export function appFromState(d) {
111
112
  }
112
113
 
113
114
  const clock = (ms) => {
114
- try { return new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit" }).format(new Date(ms)); } catch { return ""; }
115
+ try { return clockFormat({ hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; }
115
116
  };
116
117
 
117
118
  export function SharePage({ base, timers = globalThis, pollMs = POLL_MS }) {
@@ -8,6 +8,7 @@ import { html, useEffect, useState } from "/assets/app-html.js";
8
8
  import { t, register } from "/assets/app-i18n.js";
9
9
  import { Dialog } from "/assets/ui-dialog.js";
10
10
  import { toast } from "/assets/ui-toast.js";
11
+ import { clockFormat } from "/assets/clock-text.js";
11
12
 
12
13
  register("pshare", {
13
14
  en: {
@@ -56,10 +57,10 @@ register("pshare", {
56
57
  const tp = (k, ...v) => t(`pshare.${k}`, ...v);
57
58
  export const DURATIONS = [["m15", 15], ["h1", 60], ["h8", 480], ["h24", 1440]];
58
59
  const JSON_HEADERS = { "Content-Type": "application/json" };
59
- const when = (ms) => { try { return new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit" }).format(new Date(ms)); } catch { return ""; } };
60
+ const when = (ms) => { try { return clockFormat({ hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; } };
60
61
  /** The end of a share for the bar: the time today, with the day when it is not today (a share may last 24 h). */
61
62
  const until = (ms) => { const d = new Date(ms), now = new Date(); return d.toDateString() === now.toDateString() ? when(ms) : whenLong(ms); };
62
- const whenLong = (ms) => { try { return new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }).format(new Date(ms)); } catch { return ""; } };
63
+ const whenLong = (ms) => { try { return clockFormat({ month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }, undefined).format(new Date(ms)); } catch { return ""; } };
63
64
 
64
65
  /** What a refusal says (the host's `error` and `reason`). */
65
66
  export function refusalText(d) {
@@ -107,7 +107,7 @@ register("chatPhone", {
107
107
  en: { goTo: "Go to", thisChat: "This chat", verifiedUntil: "Verified · speaks as you until {0}", needsToast: "{0} needs you", ctxHide: "Hide this for now" },
108
108
  "zh-TW": { goTo: "前往", thisChat: "這個對話", verifiedUntil: "已驗證 · 以你的身分發言到 {0}", needsToast: "{0} 正在等你回應", ctxHide: "這次先不提醒" },
109
109
  });
110
- const untilClock = (ms) => { try { return new Date(ms).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }); } catch { return ""; } };
110
+ const untilClock = (ms) => { try { return timeText(ms, { hour: "2-digit", minute: "2-digit" }, []); } catch { return ""; } };
111
111
  /** A Needs-you item's identity: its nonce, else its id, else what it says. */
112
112
  const needKey = (item) => String(item?.nonce || item?.id || JSON.stringify(item || null));
113
113
  /**
@@ -244,6 +244,7 @@ export function linkWorkBarCss(doc = typeof document !== "undefined" ? document
244
244
  linkWorkBarCss();
245
245
 
246
246
  import { activityDrawCtx, activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
247
+ import { timeText } from "/assets/clock-text.js";
247
248
  /** The composer's textarea (#2342: text put back into it is a step Ctrl+Z goes back from). */
248
249
  const composers = new Map(); // agent → current mounted refs, never a retained thread's stale closure
249
250
  const composerField = (name) => composers.get(name)?.input.current || null;
@@ -34,8 +34,10 @@ import { InstanceBoardWork } from "./fleet-task-work.js";
34
34
  import { Icon } from "/assets/ui-icons.js";
35
35
  import { AgentCategoryNav, AgentPageHead, AgentSettingsPanels, agentKind, categoryFromSearch, useAgentSettings } from "./agent-details-settings.js";
36
36
  import { ContactPermissionsPanel } from "./contact-permissions.js";
37
+ import { WhoCanUsePanel } from "./agent-who-can-use.js";
37
38
  import "./agent-page-strings.js";
38
39
  import { pt } from "./agent-page-strings.js";
40
+ import { timeText } from "/assets/clock-text.js";
39
41
 
40
42
  // Local registration also works when this lazy page is paired with retained string modules.
41
43
  register("agentNavigation", { en: { backToChat: "Back to chat" }, "zh-TW": { backToChat: "回到聊天" } });
@@ -195,7 +197,7 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
195
197
  ${loaded(d.instruction_files)}
196
198
  <${InstanceBoardWork} name=${name} onOpen=${(id) => navigate(`/ui/fleet?card=${encodeURIComponent(id)}`)} />
197
199
  <section class="card"><h3>${t("chat.dActivity")}</h3>${d.recent_activity?.length ? d.recent_activity.map((a, i) => html`<div key=${i} class="activity">
198
- <span class="mono muted">${a.timestamp ? new Date(`${a.timestamp.replace(" ", "T")}Z`).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : ""}</span>
200
+ <span class="mono muted">${a.timestamp ? timeText(`${a.timestamp.replace(" ", "T")}Z`, { hour: "2-digit", minute: "2-digit" }, []) : ""}</span>
199
201
  <span class="ev">${a.event}</span> ${a.summary || ""}</div>`) : html`<p class="note">${t("chat.dNoActivity")}</p>`}</section>`;
200
202
  }
201
203
  const actions = items.filter((i) => i && ["start", "restart", "stop", "pause", "wake"].includes(i.key));
@@ -214,11 +216,12 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
214
216
  <${PanelHeader} title=${name} sub=${sub} pageControls=${{ navKey }} pageActions=${items} nav=${html`<${InstanceSwitch} name=${name} current="details" />`}><${HeaderTools} navKey=${navKey} /><${Menu} items=${items} label=${t("app.more")} />${phone ? html`<${AgentSheetButton} name=${name} inst=${inst} current="details" items=${items} navKey=${navKey} />` : null}</${PanelHeader}>
215
217
  <${AgentCategoryNav} name=${name} kind=${kind} cat=${shownCat} dirty=${dirty}>${!cat ? html`<div class="only-narrow"><div class="s-row agent-settings-index-return"><h2>${pt("title")}</h2>${backLink()}</div></div>` : null}</${AgentCategoryNav}>
216
218
  <div data-trust="panel-content" class="panel-body"><div class="col" ref=${body}>
217
- <div class="s-row agent-settings-heading"><a class="s-back" href=${detailsPath(name)}><${Icon} name="back" size=${16} /><span>${t("app.details")}</span></a><${AgentPageHead} name=${name} kind=${kind} cat=${shownCat} inst=${null} />${backLink()}</div>
219
+ <div class="s-row agent-settings-heading"><a class="s-back" href=${detailsPath(name)}><${Icon} name="back" size=${16} /><span>${t("app.details")}</span></a><${AgentPageHead} name=${name} kind=${kind} cat=${shownCat} inst=${inst} />${backLink()}</div>
218
220
  ${OpCard && sess.op ? html`<${OpCard} op=${sess.op} schema=${sess.data && sess.data.schema} />` : null}
219
221
  <div class="s-section-layout" data-agent-category=${shownCat}>
220
222
  <div class="ap-panel" id=${pane ? `pane-${pane.id}-ap-panel-overview` : "ap-panel-overview"} hidden=${shownCat !== "overview"}>${overview}</div>
221
223
  ${opened ? html`<${AgentSettingsPanels} name=${name} kind=${kind} cat=${shownCat} sess=${sess} onDirty=${onDirty} />` : null}
224
+ ${shownCat === "access" ? html`<div class="ap-panel" id=${pane ? `pane-${pane.id}-ap-panel-access` : "ap-panel-access"}><${WhoCanUsePanel} key=${name} name=${name} display=${inst && inst.display_name} /></div>` : null}
222
225
  ${shownCat === "permissions" ? html`<div class="ap-panel" id=${pane ? `pane-${pane.id}-ap-panel-permissions` : "ap-panel-permissions"}><${ContactPermissionsPanel} key=${name} name=${name} /></div>` : null}
223
226
  </div></div></div>
224
227
  ${sess.staged.size && Pending ? html`<${Pending} staged=${sess.staged} busy=${!!sess.op && ["writing", "posting", "watching"].includes(sess.op.phase)} onApply=${sess.apply} onDiscard=${sess.discard} section="agents" />` : null}
@@ -24,6 +24,7 @@ import { ContactAuthorizations } from "./contact-authorizations.js";
24
24
  import { Dialog } from "/assets/ui-dialog.js";
25
25
  import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
26
26
  import { Icon } from "/assets/ui-icons.js";
27
+ import { TabIcon } from "./fleet-tab-icons.js";
27
28
  import { toast } from "/assets/ui-toast.js";
28
29
  import { confirmDialog } from "/assets/ui-confirm.js";
29
30
  import { confirmedWrite, selfConfirmed } from "./settings-confirm.js";
@@ -33,6 +34,7 @@ import { CacheReport } from "./fleet-cache.js";
33
34
  import { UsageTab } from "./fleet-usage.js";
34
35
  import { BackendSelect, ModelSelect } from "./settings-dialogs.js";
35
36
  import { TaskBoardTab } from "./fleet-tasks.js";
37
+ import { dateTimeText } from "/assets/clock-text.js";
36
38
 
37
39
  /** #2015: one of the largest processes as text: "python3 18.1 GB (dev-a)". */
38
40
  export function memoryHogText(p) {
@@ -105,7 +107,8 @@ const DOCS_SITE = "https://songsid.github.io/AgEnD";
105
107
  export function docsUrl(language = lang()) {
106
108
  return `${DOCS_SITE}${language === "zh-TW" ? "/zh-tw" : ""}/docs/web-guide/`;
107
109
  }
108
- const ICONS = { tasks: "tasks", schedules: "clock", teams: "team", org: "org", cache: "chart", usage: "chart", authorizations: "key", "host-health": "chart" };
110
+ // M-3722: one icon each (a phone's tabs are icons only): Cache, Usage and Host health no longer share "chart" (fleet-tab-icons.js).
111
+ const ICONS = { tasks: "tasks", schedules: "clock", teams: "team", org: "org", cache: "database", usage: "gauge", authorizations: "key", "host-health": "pulse" };
109
112
  const BACKENDS = ["claude-code", "codex", "opencode", "kiro-cli", "antigravity", "grok", "muse"];
110
113
 
111
114
  async function api(method, path, body, lease) {
@@ -232,7 +235,7 @@ export function FleetPanel({ route, navKey }) {
232
235
  else if (a.left < n.left) nav.scrollLeft -= n.left - a.left;
233
236
  }, [phone, tab, admin, wide]);
234
237
  const tabs = (cls) => html`<nav data-trust="panel-navigation" class=${cls} aria-label=${t("fleet.title")}>${visibleTabs.map(k => html`<a key=${k} href=${fleetPath(k)} class=${`seg-item${k === tab ? " active" : ""}`}
235
- aria-current=${k === tab ? "page" : undefined}><${Icon} name=${ICONS[k]} size=${16} /><span>${t(`fleet.${k}`)}</span></a>`)}</nav>`;
238
+ aria-current=${k === tab ? "page" : undefined}><${TabIcon} name=${ICONS[k]} size=${16} /><span>${t(`fleet.${k}`)}</span></a>`)}</nav>`;
236
239
  return html`<div ref=${root} data-effect-panel="fleet" class="panel p-fleet">
237
240
  ${/* M-2542: the tabs share the title row (PanelHeader's nav slot, as the instance tabs do) when everything fits
238
241
  there (useTabsInHeader), saving a line; otherwise — a phone, a narrow window, a long host memory warning — they
@@ -240,8 +243,10 @@ export function FleetPanel({ route, navKey }) {
240
243
  and chosen here rather than by CSS: a previous release's app.css, cached in an open tab, has no rule for the
241
244
  header slot — this way either stylesheet lays both out (smoke-2542 SKEW). */ ""}
242
245
  ${/* M-3166 (Argon 5, the user's OK of round 2): a phone's Fleet is two rows — its tabs in the header's row (☰, then the
243
- tabs; the title, search, docs and text size give way: app.css), then the page's own tools. */ ""}
244
- <${PanelHeader} title=${t("fleet.title")} sub=${sub} nav=${wide ? tabs("fleet-tabs") : phone ? tabs("seg fleet-phone-tabs") : null}><${DocsLink} /><${HeaderTools} navKey=${navKey} /></${PanelHeader}>
246
+ tabs; the title, search, docs and text size give way: app.css), then the page's own tools.
247
+ M-3722: eight tabs no longer fit beside ☰ at 390 px (Authorizations, Host health). On a phone the header is ☰ and
248
+ this page's name, then every tab as an icon, each a whole touch target (app.css): nothing scrolls off. */ ""}
249
+ <${PanelHeader} title=${phone && !wide ? t(`fleet.${tab}`) : t("fleet.title")} sub=${sub} nav=${wide ? tabs("fleet-tabs") : phone ? tabs("seg fleet-phone-tabs") : null}><${DocsLink} /><${HeaderTools} navKey=${navKey} /></${PanelHeader}>
245
250
  ${wide || phone ? null : tabs("seg fleet-tabs-row")}
246
251
  <div data-trust="panel-content" class="panel-body"><div class=${`col${tab === "tasks" || tab === "org" || tab === "cache" || tab === "usage" || tab === "authorizations" || tab === "host-health" ? " col-wide" : ""}`}><${Body} lease=${lease} /></div></div>
247
252
  </div>`;
@@ -622,7 +627,7 @@ export function CreateInstanceDialog({ onClose }) {
622
627
  const cliLabel = productLabel(f.backend) || `${t("fleet.fleetDefault")} (${productLabel(defaultBackend)})`;
623
628
  const backendField = windows ? html`<div class="field"><div class="cli-discovery-heading"><span>${tr("backend")}</span>${native && !machineId ? html`<button type="button" class="btn btn-ghost btn-sm" disabled=${discovery.loading} onClick=${discovery.refresh}><${Icon} name="restart" size=${14} />${detectionText("refresh")}</button>` : null}</div>
624
629
  <div aria-busy=${!machineId && discovery.loading ? "true" : "false"}>${native ? html`<${CliPicker} label=${tr("backend")} value=${f.backend} choices=${nativeChoices} onChange=${value => { setCredentialProfile(""); setF(x => ({...x,backend:value,model:""})); }} disabled=${!nativeChoices.length || !!machineId && machine?.status !== "online"} />` : null}</div>
625
- ${machineId ? html`<p class="note">${tr(!nativeChoices.length ? "noRemoteCli" : "remotePolicy")}</p>${machine?.inventoryUpdatedAt ? html`<p class="note">${t("runtime.inventoryAt",new Date(machine.inventoryUpdatedAt).toLocaleString())}</p>` : null}` : html`<${WindowsCliDiscoveryStatus} state=${discovery} />`}
630
+ ${machineId ? html`<p class="note">${tr(!nativeChoices.length ? "noRemoteCli" : "remotePolicy")}</p>${machine?.inventoryUpdatedAt ? html`<p class="note">${t("runtime.inventoryAt",dateTimeText(machine.inventoryUpdatedAt))}</p>` : null}` : html`<${WindowsCliDiscoveryStatus} state=${discovery} />`}
626
631
  ${!machineId && native && !discovery.loading && !discovery.error ? html`<p class="note">${!nativeChoices.length ? tr("noCli") : tr("nativeHint")}</p>` : null}
627
632
  ${machineId ? html`<${ClaudeAccountSelect} id="native-create-claude-account" machine=${machine} backend=${f.backend} value=${credentialProfile} onChange=${setCredentialProfile} disabled=${machine?.status !== "online"} />` : null}</div>`
628
633
  : html`${field(tr("backend"),backends ? html`<${CliPicker} label=${tr("backend")} value=${f.backend} choices=${[{value:"",label:t("fleet.fleetDefault")},...backends.filter(b => backendState(b) !== "not_installed" && !b.deprecated).map(b => ({value:b.name,label:productLabel(b.name),disabled:backendBlocked(b),description:backendNote(b)}))]} onChange=${value => { setCredentialProfile(""); setF(x => ({...x,backend:value,model:""})); }} />` : html`<div role="status" aria-busy="true"><${Skeleton} lines=${1} /><span class="note">${tr("loadingClis")}</span></div>`)}${hostAccount ? html`<${AccountSelect} id="create-host-account" backend=${hostBackend} value=${credentialProfile} onChange=${setCredentialProfile} creating=${true} />` : null}`;
@@ -61,6 +61,7 @@ import { DropOverlay, MAX_FILES, PendingFiles, hf, pageCarriesFiles, pasteToAtta
61
61
  import { composerCaret, insertQuote, installQuoteSelection, showCaret } from "/assets/chat-quote.js";
62
62
  import { installTableSelection } from "/assets/chat-table-select.js";
63
63
  import { assetUrl } from "/assets/asset-url.js";
64
+ import { dateTimeText } from "/assets/clock-text.js";
64
65
  register("hubAccess", {
65
66
  en: { tag: "Access needs checking", refused: "Asking was refused. Check your access before trying again.", check: "Check access", limited: "Asking was refused; the previous access information needs checking." },
66
67
  "zh-TW": { tag: "需要確認權限", refused: "提問遭到拒絕。請先重新檢查權限,再試一次。", check: "重新檢查權限", limited: "提問遭到拒絕,先前的權限資訊需要重新確認。" },
@@ -160,7 +161,7 @@ function useSession() {
160
161
  }, []);
161
162
  return s;
162
163
  }
163
- const when = (ms) => new Date(ms).toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short" });
164
+ const when = (ms) => dateTimeText(ms, { dateStyle: "medium", timeStyle: "short" });
164
165
  // M-2988: words added after a release; a tab holding the older hub-strings dictionary falls back to the older sentence.
165
166
  const newer = (key, args, older) => { const s = hw(key, ...args); return s === `hub.${key}` ? older() : s; };
166
167
  const errText = (r) => hw(r.code === "conflict" || r.code === "stale" ? "errConflictHub" : r.code === "not-found" ? "errNotFound"
@@ -31,12 +31,13 @@ import { decideProposal, installProposals } from "./agent-proposals.js";
31
31
  import { GeneralLocation } from "./general-location.js";
32
32
  import { runtimeUpdateText } from "./runtime-update-status.js";
33
33
  import { ContactNeedsItem, ContactSuggestionsGroup, isRestrictedSuggestion } from "./contact-needs.js";
34
+ import { ContactVerifyNeed, contactVerifyCount, isContactVerify } from "./contact-verify-need.js";
34
35
  import { HostDirectoryNotices, hostDirectoryNoticesOffered } from "./hub-host-security-notices.js";
35
36
 
36
37
  // A pre-upgrade tab retains app-i18n.js. Register these reasons when the updated panel is loaded, too.
37
38
  register("app", {
38
- en: { needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_tmux_hold: "Held: an old tmux server or window" },
39
- "zh-TW": { needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_tmux_hold: "已暫停:舊的 tmux 伺服器或視窗" },
39
+ en: { needs_reason_mcp_missing: "MCP servers missing after an AI account switch", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_tmux_hold: "Held: an old tmux server or window" },
40
+ "zh-TW": { needs_reason_mcp_missing: "切換 AI 帳號後缺少 MCP 伺服器", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_tmux_hold: "已暫停:舊的 tmux 伺服器或視窗" },
40
41
  });
41
42
 
42
43
  register("needs", {
@@ -44,6 +45,7 @@ register("needs", {
44
45
  otherEmpty: "No other items are waiting for you.", title: "Needs you", empty: "Nothing needs you right now", emptyHint: "When an agent waits for you, it shows here — and in your chat app's General.", emptyHintWeb: "When an agent waits for you, it shows here.",
45
46
  open: "Open chat", kiroOpen: "Open agent", kiroMigration: "Migration instructions", openCard: "Open the card", noAssignee: "Task board (nobody assigned)", fleetSignIns: "AI accounts", signIn: "Connect account",
46
47
  gap: "not wrapped up: {0}", gapUnchecked: "{0} checklist item(s) unchecked", gapNoResult: "no result", gapJoin: ", ", acknowledge: "Acknowledge", acknowledging: "Acknowledging…", answering: "Answering…",
48
+ hubClose: "Close this question", hubClosing: "Closing…", hubCloseTitle: "Close this question?", hubCloseConfirm: "Close question", hubCloseDetail: "You can close this question without sending it to the agent again.", hubCloseMessage: "The Hub will tell the asker this question will not be answered. This can't be undone. The same message can't be retried; the asker can send a new question. An answer already sent stays visible. This does not stop work the agent has already started.", hubCloseDone: "The question is closed on the Hub.", hubCloseAnswered: "An answer already reached the Hub; it was kept.", hubCloseVerify: "Verify your admin account, then close this question again.", hubCloseForbidden: "Only an admin who manages this agent can close its question.", hubCloseUnsupported: "Update the Hub to close this question. It is still held.", hubCloseUnavailable: "The Hub did not confirm closure. Check its connection and try closing again; the question was not resent.",
47
49
  hubRetry: "Try again", hubRetrying: "Trying again…", hubRetryDone: "Asked the Hub again.",
48
50
  hubRetryGone: "This item has already changed. The list will refresh.", hubRetryNot: "This one can't be tried again: the Hub refused it, or the agent changed. Ask the person to send the question again.",
49
51
  hubHoldDetail: "The Hub could not confirm this question before it reached the agent. Try again asks the Hub again; nothing is sent without its OK.",
@@ -72,6 +74,7 @@ register("needs", {
72
74
  otherEmpty: "沒有其他待處理事項。", title: "等你處理", empty: "目前沒有需要你處理的事", emptyHint: "agent 在等你時,會出現在這裡——也會出現在聊天 app 的 General。", emptyHintWeb: "agent 在等你時,會出現在這裡。",
73
75
  open: "開啟聊天", kiroOpen: "開啟 Agent", kiroMigration: "遷移說明", openCard: "打開卡片", noAssignee: "任務看板(沒有負責人)", fleetSignIns: "AI 帳號", signIn: "連接帳號",
74
76
  gap: "還沒補齊:{0}", gapUnchecked: "還有 {0} 項沒勾", gapNoResult: "沒有產出總結", gapJoin: "、", acknowledge: "確認", acknowledging: "確認中…", answering: "回覆中…",
77
+ hubClose: "不處理這題", hubClosing: "結束中…", hubCloseTitle: "不處理這題?", hubCloseConfirm: "不處理這題", hubCloseDetail: "可以結束這題,不會再把問題送給 Agent。", hubCloseMessage: "Hub 會告訴提問者這題不會回答。關閉後無法復原。同一則訊息無法再試一次;提問者可以另問一題。已經送出的答案會保留。這不會停止 Agent 已經開始的工作。", hubCloseDone: "Hub 已確認結束這題。", hubCloseAnswered: "答案已經送達 Hub,原有答案會保留。", hubCloseVerify: "請先驗證管理員帳號,再結束這題。", hubCloseForbidden: "只有管理這個 Agent 的管理員可以結束這題。", hubCloseUnsupported: "請先更新 Hub,才能結束這題。目前仍保留暫停項目。", hubCloseUnavailable: "Hub 尚未確認結束。請檢查連線後再試;問題沒有重新送出。",
75
78
  hubRetry: "再試一次", hubRetrying: "重試中…", hubRetryDone: "已重新詢問 Hub。",
76
79
  hubRetryGone: "這個項目已經有變化,清單會重新整理。", hubRetryNot: "這則無法再試:Hub 已拒絕,或 Agent 已變更。請提問的人重新送出問題。",
77
80
  hubHoldDetail: "Hub 在問題交給 Agent 之前無法確認。按「再試一次」會重新詢問 Hub,未經 Hub 同意不會送出。",
@@ -214,8 +217,11 @@ export function NeedsPanel({ navKey }) {
214
217
  const updates = items.filter(item => item.runtimeUpdate);
215
218
  // M-3381: the rooms' restricted-mode suggestions are one group (below the rest), counted once.
216
219
  const suggestions = items.filter(isRestrictedSuggestion);
217
- const groups = groupNeeds(items.filter(item => !item.runtimeUpdate && !isRestrictedSuggestion(item)));
218
- const shownCount = items.length - suggestions.length + (suggestions.length ? 1 : 0) + asks.length;
220
+ // M-3710: "N contact requests need a verified browser" — on top, under no agent's heading.
221
+ const verify = items.find(isContactVerify);
222
+ const groups = groupNeeds(items.filter(item => !item.runtimeUpdate && !isRestrictedSuggestion(item) && !isContactVerify(item)));
223
+ // M-3710: the verify line counts as the requests it stands for (as the badge and tab title do).
224
+ const shownCount = items.length - suggestions.length + (suggestions.length ? 1 : 0) + asks.length + (verify ? contactVerifyCount(verify) - 1 : 0);
219
225
  if (updates.length) groups.push({ instance: "", items: updates });
220
226
  const nowMs = Date.now();
221
227
  return html`<div data-effect-panel="needs" class="panel p-needs">
@@ -226,6 +232,7 @@ export function NeedsPanel({ navKey }) {
226
232
  ${asks.map((p) => html`<${ProposalItem} key=${p.id} proposal=${p} nowMs=${nowMs} />`)}
227
233
  ${decidedHere.map(([id, d]) => html`<${ProposalResult} key=${id} result=${d} />`)}
228
234
  </section>` : null}
235
+ ${verify ? html`<${ContactVerifyNeed} item=${verify} />` : null}
229
236
  ${(!ready || needsLoaded === false) && !items.length && !asks.length ? html`<${Skeleton} variant="rows" lines=${3} />`
230
237
  : !items.length && !asks.length && !decidedHere.length ? hostDirectoryNoticesOffered() ? html`<p class="muted">${tn("otherEmpty")}</p>` : html`<${Empty} icon="check" title=${tn("empty")} hint=${tn(chatApp ? "emptyHint" : "emptyHintWeb")} />`
231
238
  : groups.map((g) => html`<section key=${JSON.stringify([g.instance, g.items[0]?.type === "config",g.items[0]?.type === 'host', !!g.items[0]?.runtimeUpdate])} class="n-group" aria-label=${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance}>
@@ -288,6 +295,25 @@ function NeedsItem({ item, nowMs, owner }) {
288
295
  setClaim("acks", item.id, res && res.ok ? "done" : null);
289
296
  toast((body && (body.message || body.error)) || t("app.failed"), !!(res && res.ok));
290
297
  };
298
+ const closeKey = `hub-close:${item.id}`, closeAck = c.acks[closeKey];
299
+ const closeHub = async () => {
300
+ if (claims.get().acks[closeKey]) return;
301
+ setClaim("acks", closeKey, "confirming");
302
+ if (!await confirmDialog({ title: tn("hubCloseTitle"), message: tn("hubCloseMessage"), confirmLabel: tn("hubCloseConfirm"), danger: true })) {
303
+ setClaim("acks", closeKey, null); return;
304
+ }
305
+ setClaim("acks", closeKey, "busy");
306
+ let res = null, body = {};
307
+ try {
308
+ res = await fetch("/ui/needs/hub-close", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ id: item.id }) });
309
+ body = await res.json().catch(() => ({}));
310
+ } catch { /* clear, localised connection error below */ }
311
+ setClaim("acks", closeKey, res?.ok ? "done" : null);
312
+ const key = res?.ok ? body.code === "answered" ? "hubCloseAnswered" : "hubCloseDone"
313
+ : body.code === "verification-required" ? "hubCloseVerify" : body.code === "forbidden" ? "hubCloseForbidden"
314
+ : body.code === "unsupported" ? "hubCloseUnsupported" : body.code === "not-found" ? "hubRetryGone" : "hubCloseUnavailable";
315
+ toast(tn(key), !!res?.ok);
316
+ };
291
317
  // M-3632: held Hub work → back through the Hub's checks (the server re-asks the Hub for its lease; never delivered blind).
292
318
  const hubKey = hubRetryKey(item), hubAck = item.hubRetry ? c.acks[hubKey] : undefined;
293
319
  const retryHub = async () => {
@@ -307,6 +333,7 @@ function NeedsItem({ item, nowMs, owner }) {
307
333
  <div class="n-body">
308
334
  <div class="n-title"><strong>${item.type==='host'?hostAlertName(item.hostAlert):itemReason(item)}</strong><span class="n-age">${item.type==='host'?hostAlertText('started')+age(item.since, nowMs):age(item.since, nowMs)}</span></div>
309
335
  ${item.type==='host'&&item.hostAlert?html`<p class="n-detail">${hostAlertText(item.hostAlert.level)} · ${hostAlertDescription(item.hostAlert)}</p>`:item.type==='host'?html`<p class="n-detail">${hostAlertText('failed')}</p>`:detailOf(item)?html`<p class="n-detail">${detailOf(item)}</p>`:null}
336
+ ${item.type === "hub" && item.hubClose ? html`<p class="n-detail">${tn("hubCloseDetail")}</p>` : null}
310
337
  ${item.type === "hub" && item.hubRetry ? html`<p class="n-detail">${tn("hubHoldDetail")}</p>` : null}
311
338
  ${item.type === "hub" && item.hubProposal ? html`<p class="n-detail">${item.hubProposal.action}</p><pre>${item.hubProposal.arguments}</pre><p class="n-detail">${item.hubProposal.consequences}</p>` : null}
312
339
  ${item.generalLocation ? html`<${GeneralLocation} name=${item.instance} attentionOnly=${true} />` : null}
@@ -314,9 +341,10 @@ function NeedsItem({ item, nowMs, owner }) {
314
341
  <div class="n-actions">
315
342
  ${item.type === "prompt" && Array.isArray(item.actions) ? item.actions.filter((a) => !a.input).map((a) => html`<button key=${a.id} type="button" class="btn btn-sm"
316
343
  disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy && !p.confirming : fallback === "busy") ? tn("answering") : a.label}</button>`) : null}
317
- ${item.type === "hub" && item.hubRetry ? html`<button type="button" class="btn btn-sm btn-primary" disabled=${!!hubAck} onClick=${retryHub}>
344
+ ${item.type === "hub" && item.hubRetry ? html`<button type="button" class="btn btn-sm btn-primary" disabled=${!!hubAck || !!closeAck} onClick=${retryHub}>
318
345
  <${Icon} name="restart" size=${14} />${hubAck === "busy" ? tn("hubRetrying") : tn("hubRetry")}</button>` : null}
319
- ${item.type === "delivery" || item.type === "missed" ? html`<button type="button" class="btn btn-sm" disabled=${!!ack} onClick=${acknowledge}>
346
+ ${item.type === "hub" && item.hubClose ? html`<button type="button" class="btn btn-sm hub-close" disabled=${!!closeAck || !!hubAck} onClick=${closeHub}>${tn(closeAck === "busy" ? "hubClosing" : "hubClose")}</button>` : null}
347
+ ${item.type === "delivery" || item.type === "missed" || item.reason === "mcp_missing" ? html`<button type="button" class="btn btn-sm" disabled=${!!ack} onClick=${acknowledge}>
320
348
  <${Icon} name="check" size=${14} />${ack === "busy" ? tn("acknowledging") : tn("acknowledge")}</button>` : null}
321
349
  ${(item.reason === "auth_paused" || item.reason === "backend_signin") && item.signIn && signInOffered() ? html`<button type="button" class="btn btn-sm btn-primary" onClick=${() => openSignIn(item.signIn)}>${tn("signIn")}</button>` : null}
322
350
  ${item.type === "task" && item.card ? html`<a class="btn btn-sm" href=${`/ui/fleet?card=${encodeURIComponent(item.card.code)}`}>${tn("openCard")}</a>` : null}
@@ -12,6 +12,7 @@ import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
12
12
  import { Icon } from "/assets/ui-icons.js";
13
13
  import { HubSharingNotice } from "./notice-hub-sharing.js";
14
14
  import { HubUpdateNotice, useHubUpdateActions } from "./notice-hub-update.js";
15
+ import { dateTimeText } from "/assets/clock-text.js";
15
16
 
16
17
  register("notices", {
17
18
  en: {
@@ -92,7 +93,7 @@ export function NoticesPanel({ navKey }) {
92
93
  <div class="n-body">
93
94
  <div class="n-title"><strong>${tn(`kind_${n.kind}`)}${n.instance ? ` · ${n.instance}` : ""}</strong>
94
95
  ${n.id > seenAtOpen ? html`<span class="notice-new">${tn("unread")}</span>` : null}
95
- <span class="n-age" title=${new Date(n.at).toLocaleString()}>${noticeAge(n.at, nowMs)}</span></div>
96
+ <span class="n-age" title=${dateTimeText(n.at)}>${noticeAge(n.at, nowMs)}</span></div>
96
97
  ${n.hubSharing ? html`<${HubSharingNotice} notice=${n} />` : n.hubUpdate ? html`<${HubUpdateNotice} notice=${n} actions=${hubActions} />` : html`<p class="n-detail notice-text">${n.text}</p>`}
97
98
  ${n.instance && known.has(n.instance) ? html`<div class="n-actions"><a class="btn btn-sm btn-ghost" href=${chatPath(n.instance)}>${tn("open")}</a></div>` : null}
98
99
  </div>
@@ -18,6 +18,7 @@ import { identityText } from "./account-identity.js";
18
18
  import { CliInstall, offersCliInstall } from "./runtime-cli-install.js";
19
19
  import { useWindowsCliCatalog, refreshWindowsCliCatalog, useWindowsCliCatalogSnapshot } from "./windows-cli-catalog.js";
20
20
  import { assetUrl } from "/assets/asset-url.js";
21
+ import { dateTimeText } from "/assets/clock-text.js";
21
22
 
22
23
  /** The install tabs', command cards' and account list's stylesheet, linked once by this lazy page (a tab opened before an upgrade has an app.css without these rules). */
23
24
  export function linkRuntimeInstallCss(doc = typeof document !== "undefined" ? document : null) {
@@ -210,7 +211,7 @@ function paneVerificationTag(cli, text) {
210
211
  const key = cli.paneVerification === "unverified" ? "paneUnverified" : cli.paneVerification === "denied" ? "paneDenied" : "";
211
212
  return key ? html`<span class="tag" title=${text(`${key}Hint`)}>${text(key)}</span>` : null;
212
213
  }
213
- export function machineTime(value) { const date=new Date(value); return value && Number.isFinite(date.getTime()) ? date.toLocaleString() : machineText("unknown"); }
214
+ export function machineTime(value) { const date=new Date(value); return value && Number.isFinite(date.getTime()) ? dateTimeText(date) : machineText("unknown"); }
214
215
  function MachineCard({ machine, sameName, busy, action, openDiagnostics, probe, repairUpdate, lease, onChanged }) {
215
216
  const [editing,setEditing] = useState(false), [name,setName] = useState(machine.name), [info,setInfo] = useState(false);
216
217
  const detection = useWindowsCliCatalogSnapshot(machine.isLocal ? "" : machine.id);