@songsid/agend 2.4.0-beta.21 → 2.4.0-beta.23

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 (276) hide show
  1. package/dist/agent-whats-new.js +6 -0
  2. package/dist/agent-whats-new.js.map +1 -1
  3. package/dist/auth-api.d.ts +2 -0
  4. package/dist/auth-api.js +5 -2
  5. package/dist/auth-api.js.map +1 -1
  6. package/dist/authority/web-authority.d.ts +17 -3
  7. package/dist/authority/web-authority.js +56 -3
  8. package/dist/authority/web-authority.js.map +1 -1
  9. package/dist/backend/claude-code.js +3 -0
  10. package/dist/backend/claude-code.js.map +1 -1
  11. package/dist/build-provenance.json +1 -1
  12. package/dist/cache-ledger.d.ts +23 -21
  13. package/dist/cache-ledger.js +70 -6
  14. package/dist/cache-ledger.js.map +1 -1
  15. package/dist/cache-prices.d.ts +8 -6
  16. package/dist/cache-prices.js +12 -5
  17. package/dist/cache-prices.js.map +1 -1
  18. package/dist/cache-service.d.ts +9 -5
  19. package/dist/cache-service.js +202 -50
  20. package/dist/cache-service.js.map +1 -1
  21. package/dist/channel/mcp-tools.js +8 -1
  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/cli-audited.js +2 -1
  27. package/dist/cli-audited.js.map +1 -1
  28. package/dist/cli.js +4 -1
  29. package/dist/cli.js.map +1 -1
  30. package/dist/contact-auth-api.js +3 -1
  31. package/dist/contact-auth-api.js.map +1 -1
  32. package/dist/contact-auth-policy.js +1 -1
  33. package/dist/contact-auth-policy.js.map +1 -1
  34. package/dist/contact-auth-service.js +8 -2
  35. package/dist/contact-auth-service.js.map +1 -1
  36. package/dist/contact-auth-store.d.ts +31 -2
  37. package/dist/contact-auth-store.js +106 -12
  38. package/dist/contact-auth-store.js.map +1 -1
  39. package/dist/contact-auth-types.d.ts +3 -2
  40. package/dist/contact-auth-types.js.map +1 -1
  41. package/dist/contact-change-proposals.d.ts +18 -1
  42. package/dist/contact-change-proposals.js +41 -6
  43. package/dist/contact-change-proposals.js.map +1 -1
  44. package/dist/contact-state-view.d.ts +103 -0
  45. package/dist/contact-state-view.js +80 -0
  46. package/dist/contact-state-view.js.map +1 -0
  47. package/dist/daemon.d.ts +31 -0
  48. package/dist/daemon.js +149 -2
  49. package/dist/daemon.js.map +1 -1
  50. package/dist/delivery-outbox.d.ts +10 -0
  51. package/dist/delivery-outbox.js +21 -0
  52. package/dist/delivery-outbox.js.map +1 -1
  53. package/dist/fleet-manager.d.ts +183 -15
  54. package/dist/fleet-manager.js +628 -96
  55. package/dist/fleet-manager.js.map +1 -1
  56. package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
  57. package/dist/general-knowledge/skills/concepts/SKILL.md +14 -17
  58. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
  59. package/dist/general-knowledge/skills/hub/SKILL.md +12 -4
  60. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +54 -9
  61. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  62. package/dist/general-role.d.ts +1 -1
  63. package/dist/general-role.js +1 -0
  64. package/dist/general-role.js.map +1 -1
  65. package/dist/hub/agent-pictures-model.d.ts +128 -0
  66. package/dist/hub/agent-pictures-model.js +43 -4
  67. package/dist/hub/agent-pictures-model.js.map +1 -1
  68. package/dist/hub/agent-pictures.d.ts +14 -2
  69. package/dist/hub/agent-pictures.js +65 -12
  70. package/dist/hub/agent-pictures.js.map +1 -1
  71. package/dist/hub/client.d.ts +2 -0
  72. package/dist/hub/client.js +14 -2
  73. package/dist/hub/client.js.map +1 -1
  74. package/dist/hub/compose/member.d.ts +6 -2
  75. package/dist/hub/compose/member.js +19 -6
  76. package/dist/hub/compose/member.js.map +1 -1
  77. package/dist/hub/compose/server.d.ts +5 -5
  78. package/dist/hub/compose/server.js +6 -3
  79. package/dist/hub/compose/server.js.map +1 -1
  80. package/dist/hub/group-policy/resources.d.ts +1 -1
  81. package/dist/hub/http/compose.d.ts +3 -0
  82. package/dist/hub/http/compose.js +14 -7
  83. package/dist/hub/http/compose.js.map +1 -1
  84. package/dist/hub/http/deps.d.ts +1 -0
  85. package/dist/hub/http/schema.js +2 -1
  86. package/dist/hub/http/schema.js.map +1 -1
  87. package/dist/hub/init/text.js +1 -1
  88. package/dist/hub/mcp/policy.d.ts +1 -1
  89. package/dist/hub/member/agent-pictures.d.ts +34 -1
  90. package/dist/hub/member/agent-pictures.js +80 -9
  91. package/dist/hub/member/agent-pictures.js.map +1 -1
  92. package/dist/hub/member/room-ask.d.ts +22 -1
  93. package/dist/hub/member/room-ask.js +99 -5
  94. package/dist/hub/member/room-ask.js.map +1 -1
  95. package/dist/hub/member/room-asker-store.d.ts +48 -0
  96. package/dist/hub/member/room-asker-store.js +181 -0
  97. package/dist/hub/member/room-asker-store.js.map +1 -0
  98. package/dist/hub/protocol.d.ts +152 -0
  99. package/dist/hub/protocol.js +6 -1
  100. package/dist/hub/protocol.js.map +1 -1
  101. package/dist/hub/question-close-model.d.ts +17 -0
  102. package/dist/hub/question-close-model.js +7 -0
  103. package/dist/hub/question-close-model.js.map +1 -0
  104. package/dist/hub/representative.d.ts +15 -0
  105. package/dist/hub/representative.js +64 -1
  106. package/dist/hub/representative.js.map +1 -1
  107. package/dist/hub/room-asker-identity-model.d.ts +53 -0
  108. package/dist/hub/room-asker-identity-model.js +14 -0
  109. package/dist/hub/room-asker-identity-model.js.map +1 -0
  110. package/dist/hub/room-asker-identity.d.ts +22 -0
  111. package/dist/hub/room-asker-identity.js +43 -0
  112. package/dist/hub/room-asker-identity.js.map +1 -0
  113. package/dist/hub/rooms/agents.js +16 -0
  114. package/dist/hub/rooms/agents.js.map +1 -1
  115. package/dist/hub/rooms/asker-identity.d.ts +21 -0
  116. package/dist/hub/rooms/asker-identity.js +86 -0
  117. package/dist/hub/rooms/asker-identity.js.map +1 -0
  118. package/dist/hub/rooms/direct-view.js +1 -0
  119. package/dist/hub/rooms/direct-view.js.map +1 -1
  120. package/dist/hub/rooms/office.d.ts +18 -0
  121. package/dist/hub/rooms/office.js +3 -1
  122. package/dist/hub/rooms/office.js.map +1 -1
  123. package/dist/hub/rooms/service.d.ts +6 -0
  124. package/dist/hub/rooms/service.js +19 -0
  125. package/dist/hub/rooms/service.js.map +1 -1
  126. package/dist/hub/rooms/types.d.ts +1 -1
  127. package/dist/hub/rooms.d.ts +3 -0
  128. package/dist/hub/rooms.js +27 -1
  129. package/dist/hub/rooms.js.map +1 -1
  130. package/dist/hub/server.js +12 -2
  131. package/dist/hub/server.js.map +1 -1
  132. package/dist/hub/types.d.ts +3 -2
  133. package/dist/hub-character-plan.d.ts +47 -0
  134. package/dist/hub-character-plan.js +70 -0
  135. package/dist/hub-character-plan.js.map +1 -0
  136. package/dist/hub-contact-windows.d.ts +13 -1
  137. package/dist/hub-contact-windows.js +35 -2
  138. package/dist/hub-contact-windows.js.map +1 -1
  139. package/dist/hub-picture-reduce.d.ts +21 -1
  140. package/dist/hub-picture-reduce.js +65 -13
  141. package/dist/hub-picture-reduce.js.map +1 -1
  142. package/dist/hub-picture-worker.js +12 -4
  143. package/dist/hub-picture-worker.js.map +1 -1
  144. package/dist/human-delivery-receipts.d.ts +12 -2
  145. package/dist/human-delivery-receipts.js +19 -4
  146. package/dist/human-delivery-receipts.js.map +1 -1
  147. package/dist/instructions.d.ts +1 -1
  148. package/dist/instructions.js +1 -1
  149. package/dist/instructions.js.map +1 -1
  150. package/dist/locale.js +367 -275
  151. package/dist/locale.js.map +1 -1
  152. package/dist/ls-rows.d.ts +2 -0
  153. package/dist/ls-rows.js.map +1 -1
  154. package/dist/needs-you.d.ts +4 -0
  155. package/dist/needs-you.js +3 -2
  156. package/dist/needs-you.js.map +1 -1
  157. package/dist/office-share-page.js +1 -1
  158. package/dist/office-share-page.js.map +1 -1
  159. package/dist/outbound-handlers.d.ts +8 -0
  160. package/dist/outbound-handlers.js +56 -7
  161. package/dist/outbound-handlers.js.map +1 -1
  162. package/dist/outbound-schemas.d.ts +2 -1
  163. package/dist/outbound-schemas.js +3 -2
  164. package/dist/outbound-schemas.js.map +1 -1
  165. package/dist/public-web-gateway.js +18 -0
  166. package/dist/public-web-gateway.js.map +1 -1
  167. package/dist/reply-buttons-controller.d.ts +2 -1
  168. package/dist/reply-buttons-controller.js +1 -1
  169. package/dist/reply-buttons-controller.js.map +1 -1
  170. package/dist/runtime-cli-install.js +4 -4
  171. package/dist/runtime-cli-install.js.map +1 -1
  172. package/dist/tips.js +3 -3
  173. package/dist/tool-permissions.js +1 -1
  174. package/dist/tool-permissions.js.map +1 -1
  175. package/dist/ui/accounts-keepalive.js +2 -1
  176. package/dist/ui/agent-export-strings.js +1 -1
  177. package/dist/ui/agent-page-strings.js +5 -5
  178. package/dist/ui/chat-activity.js +2 -1
  179. package/dist/ui/chat-pins.js +2 -1
  180. package/dist/ui/claude-credentials.js +2 -1
  181. package/dist/ui/contact-auth-client.js +2 -2
  182. package/dist/ui/contact-auth-strings.js +28 -17
  183. package/dist/ui/contact-authorizations.js +6 -4
  184. package/dist/ui/contact-needs.js +6 -1
  185. package/dist/ui/contact-permissions.js +6 -4
  186. package/dist/ui/contact-tool-groups.js +1 -1
  187. package/dist/ui/contact-verify-need.js +46 -0
  188. package/dist/ui/fleet-cache.js +7 -6
  189. package/dist/ui/fleet-canvas.js +1 -1
  190. package/dist/ui/fleet-office-card.js +26 -2
  191. package/dist/ui/fleet-office-layout.js +2 -2
  192. package/dist/ui/fleet-office-skin.js +26 -6
  193. package/dist/ui/fleet-office-view.js +32 -0
  194. package/dist/ui/fleet-office-zones.js +22 -9
  195. package/dist/ui/fleet-office.js +92 -29
  196. package/dist/ui/fleet-org.js +9 -4
  197. package/dist/ui/fleet-tab-icons.js +19 -0
  198. package/dist/ui/fleet-task-activity.js +2 -1
  199. package/dist/ui/fleet-task-common.js +2 -2
  200. package/dist/ui/fleet-task-view.js +2 -1
  201. package/dist/ui/fleet-usage.js +8 -7
  202. package/dist/ui/hub-admin-overview.js +3 -2
  203. package/dist/ui/hub-agent-intro.js +2 -1
  204. package/dist/ui/hub-assistant-admin.js +2 -1
  205. package/dist/ui/hub-chat-strings.js +1 -1
  206. package/dist/ui/hub-directory-notices.js +2 -1
  207. package/dist/ui/hub-enrolment-code.js +2 -1
  208. package/dist/ui/hub-my-agents-strings.js +2 -2
  209. package/dist/ui/hub-my-agents.js +3 -2
  210. package/dist/ui/hub-quick-pairing.js +2 -1
  211. package/dist/ui/hub-role-audit.js +2 -1
  212. package/dist/ui/hub-role-forms.js +3 -2
  213. package/dist/ui/hub-role-view.js +3 -2
  214. package/dist/ui/hub-roles.js +2 -1
  215. package/dist/ui/hub-room-agent-strings.js +2 -1
  216. package/dist/ui/hub-room-list.js +2 -1
  217. package/dist/ui/hub-room-office.js +70 -2
  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-presence.js +5 -0
  221. package/dist/ui/hub-room-strings.js +2 -2
  222. package/dist/ui/hub-room-thread.js +1 -1
  223. package/dist/ui/log-row.js +4 -3
  224. package/dist/ui/office-share-dialog.js +2 -1
  225. package/dist/ui/office-share-page.js +2 -1
  226. package/dist/ui/page-share-dialog.js +3 -2
  227. package/dist/ui/panel-chat.js +2 -1
  228. package/dist/ui/panel-details.js +2 -1
  229. package/dist/ui/panel-fleet.js +15 -10
  230. package/dist/ui/panel-hub.js +2 -1
  231. package/dist/ui/panel-log.js +3 -3
  232. package/dist/ui/panel-needs.js +31 -3
  233. package/dist/ui/panel-notices.js +2 -1
  234. package/dist/ui/panel-runtimes.js +4 -3
  235. package/dist/ui/panel-windows-cli.js +3 -2
  236. package/dist/ui/runtime-cli-install.js +3 -2
  237. package/dist/ui/runtime-update-status.js +1 -1
  238. package/dist/ui/settings-access-strings.js +1 -1
  239. package/dist/ui/settings-appearance.js +2 -1
  240. package/dist/ui/settings-guests.js +4 -3
  241. package/dist/ui/settings-hub-member-address.js +2 -1
  242. package/dist/ui/settings-hub-setup-strings.js +1 -1
  243. package/dist/ui/settings-hub-setup.js +2 -1
  244. package/dist/ui/settings-hub-web-address.js +2 -1
  245. package/dist/ui/settings-hub.js +2 -1
  246. package/dist/ui/settings-layout.js +2 -2
  247. package/dist/ui/settings-named-test.js +16 -16
  248. package/dist/ui/settings-public-session-strings.js +2 -2
  249. package/dist/ui/settings-revoke-strings.js +1 -1
  250. package/dist/ui/settings-shared-strings.js +2 -2
  251. package/dist/ui/settings-strings.js +40 -40
  252. package/dist/ui/settings-update.js +2 -1
  253. package/dist/ui/settings-web-authority.js +2 -1
  254. package/dist/ui/shared/agent-sheet.js +2 -1
  255. package/dist/ui/shared/app-session.js +4 -3
  256. package/dist/ui/shared/app-shell.js +7 -3
  257. package/dist/ui/shared/app.css +60 -11
  258. package/dist/ui/shared/chat-strings.js +8 -8
  259. package/dist/ui/shared/chat-time.js +7 -4
  260. package/dist/ui/shared/clock-text.js +57 -0
  261. package/dist/ui/shared/device-roles.js +6 -5
  262. package/dist/ui/shared/instance-nav.js +31 -2
  263. package/dist/ui/shared/usage-dialog.js +2 -1
  264. package/dist/ui/shared/view-strings.js +13 -9
  265. package/dist/ui/shared/web-authorize.js +3 -2
  266. package/dist/ui/subagent-row.js +2 -1
  267. package/dist/web-api.d.ts +15 -2
  268. package/dist/web-api.js +62 -13
  269. package/dist/web-api.js.map +1 -1
  270. package/dist/web-login.d.ts +6 -1
  271. package/dist/web-login.js +8 -3
  272. package/dist/web-login.js.map +1 -1
  273. package/dist/web-session-authorization.d.ts +3 -0
  274. package/dist/web-session-authorization.js +1 -1
  275. package/dist/web-session-authorization.js.map +1 -1
  276. package/package.json +1 -1
@@ -71,7 +71,7 @@ import { nodeText, stateWords } from "./fleet-org.js";
71
71
  import { hits, needle } from "./fleet-canvas-layout.js";
72
72
  import { AUTO_ID, LOBBY, autoLayout, backingScale, coatOf, createFlights, customLayout, deskAt, desksOf, filterOk, lampOf, layoutOk, lightOf, membersOf,
73
73
  officePose, officeRooms, signOf, workOn } from "./fleet-office-model.js";
74
- import { BUILT_IN_SKINS, CHAR_DEPTH, DEFAULT_PAL, PICTURE_SKINS, bubbleBox, pixelSkin, loadBuiltInSkin, loadPackSkin, modeOf, skinFor, tagBox, tagFootprint } from "./fleet-office-skin.js";
74
+ import { BUILT_IN_SKINS, CHAR_DEPTH, DEFAULT_PAL, PICTURE_SKINS, bubbleBox, pixelSkin, loadBuiltInSkin, loadPackSkin, modeOf, skinFor, tagBox, tagFootprint, withCharacters } from "./fleet-office-skin.js";
75
75
  import { CALLING, activeFurniture, bubbleAt, hiddenBy, bubbleRank, NIGHT, WANDER, createMail, createWalkers, isNight, linesFor, npcKey, personAt, placeBubbles, routeStaysInArea, thinBubbles, walkTargets, zonesLayout } from "./fleet-office-zones.js";
76
76
  import { actsOk, createOfficeStore } from "./fleet-office-store.js";
77
77
  import { badgeOf, fixedOf, mergeLevels } from "./fleet-office-levels.js";
@@ -87,7 +87,7 @@ import { applyOverrides, createClipClocks, fitNight, fitSeatFor, packMaxFps, sna
87
87
  import { ALL_ID, LOBBY_TILE, OV, createCrossFlights, cropToRooms, fromTile, inTile, labelAt, lobbyNodes, overviewOk, tileAt, tileBox, tileLayout, visibleTiles } from "./fleet-office-overview.js";
88
88
  import { CAROUSEL_ID, INTERVALS, carouselHeld, carouselIdsOk, carouselKey, carouselOk, intervalOk, nextIndex, prevIndex } from "./fleet-office-carousel.js";
89
89
  import { centreOn, gestureState, gestures, miniPoint, toScreen, toWorld, wheelFactor, zoomKey, zoomTo } from "./fleet-canvas-view.js";
90
- import { OK_MAX, clampPan, desksK, minK, edgeMatte, edgeStrips, fitScene, layerScale, miniBox, miniFrame, openingView, pinchOffice, savedOf, stepK, viewFromSaved,
90
+ import { OK_MAX, cardSpot, clampPan, desksK, minK, edgeMatte, edgeStrips, fitScene, layerScale, miniBox, miniFrame, openingView, pinchOffice, savedOf, stepK, viewFromSaved,
91
91
  wholeInView, zoomLabel, zoomOffice } from "./fleet-office-view.js";
92
92
 
93
93
  register("orgo", {
@@ -106,7 +106,7 @@ register("orgo", {
106
106
  styleForAll: "The whole fleet's style, for everyone: every device and share link", styleHere: "The whole fleet's style in this browser",
107
107
  styleFailed: "The style was not saved for everyone ({0}).", styleBusy: "Too many changes. Try again in a minute.",
108
108
  fit: "Fit the office", overview: "Overview: click to move there", fullscreen: "Fullscreen", exitFullscreen: "Exit fullscreen",
109
- fill: "Fill", fillTitle: "Fill the panel (the scene's overflow is cropped; drag to see it)", zoomLevel: "Zoom {0}",
109
+ fill: "Fill", fillTitle: "Fill the panel (the scene's overflow is cropped; drag to see it)", zoomLevel: "Zoom {0}", view: "View", zoomIn: "Zoom in", zoomOut: "Zoom out", live: "Live",
110
110
  allOffices: "All offices", labelAll: "All offices: each office is a tile, drawn in its own style. Drag to pan; the wheel, a pinch, + and − zoom, 0 fits, F is fullscreen. Click a tile to open that office.",
111
111
  backAll: "← All offices",
112
112
  key: "Key", keyTitle: "What the items carried between desks are", keyLabel: "Carried between desks",
@@ -126,8 +126,8 @@ register("orgo", {
126
126
  },
127
127
  "zh-TW": {
128
128
  display: "顯示選項", playMotionOff: "已關閉:系統開了「減少動態效果」",
129
- label: "辦公室:每個 team 是一間房間,每個 Agent 一張桌子;General 和未加入 team 的 Agent 在大廳。拖曳平移;滾輪、雙指、+ 和 − 縮放,0 顯示整個場景,F 切換全螢幕。",
130
- office: "辦公室", allOffice: "整個 fleet", show: "顯示", allTeams: "所有 team", lobby: "大廳(General、未加入 team)", lobbyRoom: "大廳",
129
+ label: "辦公室:每個團隊是一間房間,每個 Agent 一張桌子;General 和未加入團隊的 Agent 在大廳。拖曳平移;滾輪、雙指、+ 和 − 縮放,0 顯示整個場景,F 切換全螢幕。",
130
+ office: "辦公室", allOffice: "整個 fleet", show: "顯示", allTeams: "所有團隊", lobby: "大廳(General、未加入團隊)", lobbyRoom: "大廳",
131
131
  people: "成員", peopleN: "成員({0})", findPerson: "尋找成員", everyone: "顯示全部", nobody: "沒有符合這個篩選的成員。",
132
132
  unseated: "{0} 位沒有座位", skinUnknown: "這裡沒有它的風格「{0}」:以辦公桌顯示。", closed: "休息中", desks: "桌子", tapAgain: "再點一下開啟聊天",
133
133
  capWorking: "埋頭打字中", capIdle: "喝茶休息", capPaused: "睡著了", capNeeds: "在呼叫你", capAway: "空位", capStarting: "剛到座位", capQueued: "等待啟動",
@@ -139,7 +139,7 @@ register("orgo", {
139
139
  styleForAll: "整個 fleet 的風格,所有人共用:每台裝置與分享連結都一樣", styleHere: "這個瀏覽器裡整個 fleet 的風格",
140
140
  styleFailed: "風格沒有替所有人儲存({0})。", styleBusy: "變更太頻繁,請一分鐘後再試。",
141
141
  fit: "顯示整個辦公室", overview: "總覽:點一下移到那裡", fullscreen: "全螢幕", exitFullscreen: "結束全螢幕",
142
- fill: "填滿", fillTitle: "填滿整個面板(超出的部分會被裁切,拖曳即可看到)", zoomLevel: "縮放 {0}",
142
+ fill: "填滿", fillTitle: "填滿整個面板(超出的部分會被裁切,拖曳即可看到)", zoomLevel: "縮放 {0}", view: "檢視", zoomIn: "放大", zoomOut: "縮小", live: "即時",
143
143
  allOffices: "所有辦公室", labelAll: "所有辦公室:每間辦公室是一格,以它自己的風格顯示。拖曳平移;滾輪、雙指、+ 和 − 縮放,0 顯示全部,F 切換全螢幕。點一格即可開啟那間辦公室。",
144
144
  backAll: "← 返回全域",
145
145
  key: "圖例", keyTitle: "桌子之間傳遞的物品代表什麼", keyLabel: "桌子之間傳遞的物品",
@@ -256,6 +256,8 @@ const UP_MS = 1800;
256
256
  const FIND_K = 2;
257
257
  /** #2661: below this stage width (CSS px) the card is a bottom sheet. */
258
258
  const SHEET_W = 560;
259
+ /** M-3633: the corner of an area its name takes (logical units, from the area's top left): a floating card keeps off it. */
260
+ const AREA_LABEL = { w: 320, h: 44 };
259
261
  /**
260
262
  * M-3253 (Argon's phone review): the Office's phone layout — a phone's width (the shell's), or a phone turned sideways (a
261
263
  * coarse pointer in a short window: an iPhone's 956 × 440 is wider than 899 px). There the Office's tools are one ⋯ sheet,
@@ -408,6 +410,8 @@ export function speakerAt(sk, look, at) {
408
410
  }
409
411
  /** The pose an area's seats are for: the first state (asleep, working, calling, idle) the pack sends there. */
410
412
  const GHOST_POSE = [["paused", "paused"], ["stopped", "paused"], ["working", "working"], ["needs", "needs"], ["crashed", "needs"], ["stuck", "needs"], ["idle", "idle"]];
413
+ /** M-3533 R2c: how far inside its area's top edge a room character's speech bubble stays (scene units). */
414
+ const BUBBLE_IN_AREA = 8;
411
415
  /** How faint Edit layout's figures are: seen through, yet readable over a busy picture (a dimmed person is 0.35). */
412
416
  const GHOST_ALPHA = 0.6;
413
417
  /** Edit layout's faint figures: one on each seat no one is on, { x, y, look } (the pack's default set; drawn at GHOST_ALPHA). */
@@ -512,6 +516,7 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
512
516
  blit(p.layers.back);
513
517
  T();
514
518
  const speakers = [], tags = [], titleBoxes = []; // M-3539: the area names bubbles keep off too
519
+ const titleDraws = []; // M-3722: and redrawn over a bubble's tail that crosses one
515
520
  const up = still ? [] : p.flights.frame(ms, p.L);
516
521
  // Mail from another office (#2564): flying in at the door, or on the floor until its person picks it up.
517
522
  const post = still || !p.mail || !p.zones ? [] : p.mail.frame(ms > 0 ? ms : now(), p.L, p.walkers);
@@ -661,7 +666,7 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
661
666
  const crowded = (q) => over.has(q.d.area) && !pinned(q);
662
667
  const tagged = (q) => pinned(q) || !(tagsOff || over.has(q.d.area));
663
668
  const keep = [...titles.map((x) => x.box), ...(env.keepClear || [])];
664
- titleBoxes.push(...titles.map((x) => x.box));
669
+ titleBoxes.push(...titles.map((x) => x.box)); titleDraws.push(...titles);
665
670
  const taken = [];
666
671
  const touches = (b) => taken.some((o) => overlaps(b, o)) || keep.some((o) => overlaps(b, o));
667
672
  // Under an open card (`p.cover`, bitmap px; #4379 review): no tag, its level badge included, rather than a piece of one
@@ -770,7 +775,7 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
770
775
  // Speech bubbles: a short line for the state, now and then (typed out; whole at once when still), placed so no two
771
776
  // overlap (placeBubbles; #2431).
772
777
  const bubbles = [], rp = p.reply, tSaid = Date.now(), replies = [];
773
- for (const sp of speakers) {
778
+ for (let sp of speakers) {
774
779
  if (sp.look.dim || sp.look.pose === "away") continue;
775
780
  // Talk "Over their head": a live reply, in full (wrapped), in place of the state's line.
776
781
  const said = rp ? rp.chat.recent(sp.look.name, tSaid) : null;
@@ -788,21 +793,38 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
788
793
  const b = own ? { text: own, shown: [...own].length }
789
794
  : scText ? { text: scText, shown: [...scText].length }
790
795
  : bubbleAt(sp.look.name, says, ms, linesFor(says, p.lang, sk.pack, p.lines, sp.look.name)); // #3681: theirs, their set's, the pack's
796
+ // M-3533 R2c (Lumen): a room's own characters stand taller than the style's figures; their bubble stays inside the
797
+ // area's box, as a figure's does (the Fleet's own office is unchanged).
798
+ const ar = b && sk.ownCharacters && p.zones && sp.area != null ? p.L.areas && p.L.areas[sp.area] : null;
799
+ if (ar && ar.rect) { const bx = bubbleBox(ctx, sp.x, sp.y, b.text), min = ar.rect.y + BUBBLE_IN_AREA; if (bx.y < min) sp = { ...sp, y: sp.y + (min - bx.y) }; }
791
800
  if (b) bubbles.push({ key: sp.look.name, area: sp.area, state: sp.look.state, calling: CALLING.has(sp.look.state), rank: own ? 0 : scText ? 1 : bubbleRank(sp.look.state), shown: b.shown, ...(raSays ? { keep: true } : {}),
792
- box: bubbleBox(ctx, sp.x, sp.y, b.text), tail: { x: sp.x, y: sp.y }, sp, b });
801
+ box: bubbleBox(ctx, sp.x, sp.y, b.text), ...(CALLING.has(sp.look.state) ? { flipBox: bubbleBox(ctx, sp.x, sp.y, b.text, 0, true) } : {}), tail: { x: sp.x, y: sp.y }, sp, b });
793
802
  }
794
803
  // A crowded area speaks less (thinBubbles: calls, then work, a few at most); no bubble covers a name tag. `defer`
795
804
  // (All offices): drawn after every tile, unclipped, so a bubble at a tile's edge is whole.
796
805
  // M-3648: an area's name blocks chatter; a call may cover it (placeBubbles' `soft`): a name never keeps a call out.
797
- const placed = placeBubbles(thinBubbles(bubbles, p.zones ? p.L.over : null), 22, tags, titleBoxes);
798
- const say = () => { T(); for (const { sp, b, dy } of placed) {
799
- const text = [...b.text].slice(0, b.shown).join("");
800
- sk.drawBubble(ctx, sp.x, sp.y, text, env, -dy);
806
+ // M-3722: and 3 px of air off a name, not just its plate (a call beside 求救區 touched its corner). A number here, not an
807
+ // import: a page still holding the older fleet-office-zones.js keeps linking (it just ignores it).
808
+ const placed = placeBubbles(thinBubbles(bubbles, p.zones ? p.L.over : null), 22, tags, titleBoxes, 3);
809
+ // M-3533 R2c: and after placing (which lifts a bubble clear of another), a room character's bubble still stays in its area.
810
+ const inArea = (sp, text, dy, flip) => {
811
+ const ar = sk.ownCharacters && p.zones && sp.area != null ? p.L.areas && p.L.areas[sp.area] : null;
812
+ if (!ar || !ar.rect || !dy) return dy;
813
+ const over = ar.rect.y + BUBBLE_IN_AREA - bubbleBox(ctx, sp.x, sp.y, text, -dy, flip).y;
814
+ return over > 0 ? Math.max(0, dy - over) : dy;
815
+ };
816
+ const say = () => { T(); const tails = []; for (const { sp, b, dy: lifted, flip = false } of placed) {
817
+ const text = [...b.text].slice(0, b.shown).join(""), dy = inArea(sp, b.text, lifted, flip);
818
+ sk.drawBubble(ctx, sp.x, sp.y, text, env, -dy, flip);
819
+ if (text) { const box = bubbleBox(ctx, sp.x, sp.y, text, -dy, flip); tails.push({ x: sp.x - 1, y: box.y + box.h, w: 9, h: Math.max(0, sp.y - (box.y + box.h)) }); }
801
820
  if (bubbleHits && text) {
802
- const box = bubbleBox(ctx, sp.x, sp.y, text, -dy);
821
+ const box = bubbleBox(ctx, sp.x, sp.y, text, -dy, flip);
803
822
  bubbleHits.push({ name: sp.look.name, box: { x: ox + box.x * a, y: oy + box.y * a, w: box.w * a, h: box.h * a } });
804
823
  }
805
824
  }
825
+ // M-3722: a bubble keeps its box off an area's name (placeBubbles); a tail that still crosses one has the name written
826
+ // again over it (as over a figure standing on it, M-3539), so the name always reads whole.
827
+ if (sk.drawAreaTitle) for (const { ar, box } of titleDraws) if (tails.some((t) => overlaps(t, box))) sk.drawAreaTitle(ctx, ar, env);
806
828
  const bl = sk.pack && sk.pack.dialogBox ? sk.pack.dialogBox.bubble : null;
807
829
  const im = bl && bl.frame && typeof sk.picture === "function" ? sk.picture(bl.frame, () => {}) : null;
808
830
  for (const { sp, said } of replies) {
@@ -944,7 +966,7 @@ function ensureDialogueStyle() {
944
966
  link.setAttribute("data-office-dialogue-css", "1"); doc.head.appendChild(link);
945
967
  }
946
968
  export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetImage, opening, talk, chatUi = null, more = false, onMore = null, live = null, onLive = null,
947
- oneOffice = false, readOnly = false, stream = true, storage = undefined, cardRows = null, words = null, cardAction = null, cardName = null, officesKey = undefined, foldBar = false, cardPhoto = null }) {
969
+ oneOffice = false, readOnly = false, stream = true, storage = undefined, cardRows = null, words = null, cardAction = null, cardName = null, officesKey = undefined, foldBar = false, cardPhoto = null, characters = null }) {
948
970
  // M-3253: on a phone the page above (fleet-canvas.js) puts a ⋯ in its bar: `more` is that sheet open, `onMore(open)`;
949
971
  // `live` / `onLive` its Live toggle, which moves into the sheet. Without one (a share link's page) the bar stays.
950
972
  useLayoutEffect(ensureDialogueStyle, []);
@@ -1039,6 +1061,8 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
1039
1061
  // back there when it closes); the card's element and where it points (placed every frame: it follows them).
1040
1062
  const [card, setCard] = useState(null);
1041
1063
  const cardFrom = useRef(null), cardEl = useRef(null), cardDesk = useRef(null);
1064
+ // M-3633: how much of the stage a bottom-sheet card covers (px from its foot); the scene is kept in the rest.
1065
+ const sheetCover = useRef(0);
1042
1066
  const stageRef = useRef(null), canvasRef = useRef(null), tipRef = useRef(null), lastType = useRef("mouse");
1043
1067
  // Fullscreen: null, "native" (the Fullscreen API) or "immersive" (the CSS cover); per visit, never kept.
1044
1068
  const ooRef = useRef(null), [fs, setFs] = useState(null), fsRef = useRef(null), fsAsked = useRef(false), fsTarget = useRef(null);
@@ -1323,7 +1347,8 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
1323
1347
  if (zones && layout && !layoutStale) return { skin: { ...baseSkin, pack: layout.draft }, ignored: false };
1324
1348
  return withOverrides(baseSkin, zones, custom);
1325
1349
  }, [baseSkin, zones, custom, layout, layoutStale]);
1326
- const skin = placed.skin;
1350
+ // M-3533 R2c: a Hub room office's agents in their own characters (`characters`: { sets, images }), over its style.
1351
+ const skin = useMemo(() => (characters ? withCharacters(placed.skin, characters.sets, characters.images) : placed.skin), [placed.skin, characters]);
1327
1352
  // While Edit layout is open: a faint figure on every seat, in the pose its area is for (#2558), so a seat is placed by
1328
1353
  // what will stand, sit or lie there, not by a dot.
1329
1354
  const ghosts = zones && !!layout && !layoutStale;
@@ -1513,17 +1538,55 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
1513
1538
  */
1514
1539
  const placeCard = () => {
1515
1540
  const el = cardEl.current, c = cardDesk.current;
1516
- if (!el || !c || !el.style || el.classList?.contains("sheet")) return;
1541
+ if (!el || !c || !el.style) return;
1542
+ if (el.classList?.contains("sheet")) { el.style.removeProperty("max-height"); liftOverSheet(el, c); return; }
1517
1543
  const v = view0(), sz = sizeRef.current;
1518
1544
  const w = c.walks ? walkers.at(c.name, now()) : null;
1519
1545
  const pt = w ? { x: w.x, y: w.y - 52, r: 16 } : { x: c.box.x + c.box.w / 2, y: c.box.y, r: (c.box.w / 2) * v.k };
1520
- const p = toScreen(v, pt.x, pt.y), cw = el.offsetWidth || 320, ch = el.offsetHeight || 260, gap = (c.skin?.pack?.card?.layout?.gap ?? 12) + pt.r;
1521
- let x = p.x + gap;
1522
- if (x + cw > sz.w - 8) x = p.x - gap - cw;
1523
- x = Math.max(8, Math.min(x, sz.w - cw - 8));
1524
- const y = Math.max(8, Math.min(p.y - 24, sz.h - ch - 8));
1546
+ // Its whole height (a card held shorter below an area's name scrolls: its content's height, not the box's).
1547
+ const sc = (typeof el.querySelector === "function" && el.querySelector(".oo-card-body")) || el;
1548
+ const natural = sc.scrollHeight ? sc.scrollHeight + ((el.offsetHeight || 0) - (sc.clientHeight || 0)) : 0;
1549
+ const p = toScreen(v, pt.x, pt.y), cw = el.offsetWidth || 320, ch = natural || el.offsetHeight || 260, gap = (c.skin?.pack?.card?.layout?.gap ?? 12) + pt.r;
1550
+ // M-3633: clear of the areas' names — where the Office writes each one (areaTitleBox, a few px around it), else, on a
1551
+ // pack's own picture, the corner a name painted there takes.
1552
+ // The scene's own layout and skin (the draw loop's: this runs in it, where the render's may be an older one).
1553
+ const sc0 = scene.current, part = sc0 && !sc0.overview ? sc0.part : null, sk0 = part && part.skin;
1554
+ const titled = !!(sk0 && sk0.areaTitleBox && sc0.ctx && sc0.env);
1555
+ const avoid = part && part.zones && part.L ? Object.values(part.L.areas || {}).map((ar) => {
1556
+ const b = titled ? sk0.areaTitleBox(sc0.ctx, ar, sc0.env) : null;
1557
+ const r = b ? { x: b.x - 4, y: b.y - 4, w: b.w + 8, h: b.h + 8 } : { x: ar.rect.x, y: ar.rect.y, w: Math.min(ar.rect.w, AREA_LABEL.w), h: Math.min(ar.rect.h, AREA_LABEL.h) };
1558
+ const q = toScreen(v, r.x, r.y);
1559
+ return { x: q.x, y: q.y, w: r.w * v.k, h: r.h * v.k };
1560
+ }) : [];
1561
+ const { x, y, maxH } = cardSpot({ px: p.x, py: p.y, gap, cw, ch, w: sz.w, h: sz.h, avoid });
1562
+ if (maxH) el.style.setProperty("max-height", `${Math.round(maxH)}px`); else el.style.removeProperty("max-height");
1525
1563
  el.style.setProperty("transform", `translate(${Math.round(x)}px, ${Math.round(y)}px)`);
1526
1564
  };
1565
+ /**
1566
+ * M-3633: a phone's bottom-sheet card covers the stage's foot. The scene is kept in the rest (setView's clampPan is
1567
+ * given the uncovered height: a scene smaller than it is centred there), and the person is brought above the sheet —
1568
+ * once each time the sheet's height changes, so a pan of their own is left alone. It closes: the whole stage again.
1569
+ */
1570
+ const visSize = () => { const z = sizeRef.current || size; return { w: z.w, h: Math.max(1, z.h - sheetCover.current) }; };
1571
+ const liftOverSheet = (el, c) => {
1572
+ const st = stageRef.current;
1573
+ if (!st || typeof st.getBoundingClientRect !== "function" || typeof el.getBoundingClientRect !== "function") return;
1574
+ const cover = Math.max(0, Math.round(st.getBoundingClientRect().bottom - el.getBoundingClientRect().top));
1575
+ if (cover === sheetCover.current) return;
1576
+ sheetCover.current = cover;
1577
+ // The scene's current layout (this runs in the draw loop, where the render's `L` may be an older one).
1578
+ const LL = (scene.current && !scene.current.overview && scene.current.part && scene.current.part.L) || L;
1579
+ const v = view0(), w = c.walks ? walkers.at(c.name, now()) : null;
1580
+ const p = toScreen(v, w ? w.x : c.box.x + c.box.w / 2, w ? w.y : c.box.y + c.box.h), room = (sizeRef.current || size).h - cover - 16;
1581
+ vp.current = clampPan({ ...v, y: v.y - Math.max(0, p.y - room) }, LL.width, LL.height, visSize());
1582
+ apply();
1583
+ };
1584
+ const unliftSheet = () => {
1585
+ if (!sheetCover.current) return;
1586
+ sheetCover.current = 0;
1587
+ vp.current = clampPan(view0(), L.width, L.height, size);
1588
+ apply();
1589
+ };
1527
1590
  /**
1528
1591
  * Put the view on everything that shows it beside the canvas: the overview's frame (the part of the scene in view;
1529
1592
  * the whole view on its data-k/x/y), the zoom's percentage, the overlay, the tooltip.
@@ -1572,7 +1635,7 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
1572
1635
  * fit (a resize fits it again).
1573
1636
  */
1574
1637
  const setView = (v, user = true, fit = false) => {
1575
- vp.current = clampPan(v, L.width, L.height, size);
1638
+ vp.current = clampPan(v, L.width, L.height, visSize());
1576
1639
  fitted.current = fit;
1577
1640
  apply();
1578
1641
  if (!user) return;
@@ -1612,7 +1675,7 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
1612
1675
  else if (!touched.current) reopen();
1613
1676
  else { const v = vp.current, cx = (was.w / 2 - v.x) / v.k, cy = (was.h / 2 - v.y) / v.k; vp.current = { k: v.k, x: size.w / 2 - cx * v.k, y: size.h / 2 - cy * v.k }; }
1614
1677
  } else if (fitted.current) vp.current = fitL(fitMode); // the scene's size changed
1615
- vp.current = clampPan(view0(), L.width, L.height, size);
1678
+ vp.current = clampPan(view0(), L.width, L.height, visSize());
1616
1679
  raw.current = vp.current.k;
1617
1680
  }, [officeKey, size.w, size.h, ratio, L.width, L.height]);
1618
1681
  useEffect(() => () => flushSave(), []);
@@ -2608,7 +2671,7 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
2608
2671
  ${tile("fitwidth", to("fill"), toggleFill, "oo-sheet-fill", fitMode === "cover")}
2609
2672
  ${tile("fullscreen", to("fullscreen"), () => { closeMore(); enterFs(); }, "oo-sheet-fs")}
2610
2673
  </div>` : null}
2611
- ${typeof onLive === "function" ? html`<label class="check oo-sheet-live"><input type="checkbox" checked=${!!live} onChange=${() => onLive(!live)} /><span>${t("orgc.live")}</span></label>` : null}
2674
+ ${typeof onLive === "function" ? html`<label class="check oo-sheet-live"><input type="checkbox" checked=${!!live} onChange=${() => onLive(!live)} /><span>${to("live")}</span></label>` : null}
2612
2675
  <div class="oo-bar oo-sheet-bar" onClick=${sheetClick}>${barItems}</div>
2613
2676
  </${Dialog}>` : null}
2614
2677
  ${traffic && keyOpen ? html`<${OfficeKey} pal=${pal} />` : null}
@@ -2639,7 +2702,7 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
2639
2702
  model=${cardModel({ node: cardOf.node, lv, levels: wordsOf(cardOf.skin), share: !onOpen, rows: cardRows ? cardRows(cardOf.node.name) : null, display: cardName ? cardName(cardOf.node.name) : "",
2640
2703
  state: stateOf(cardOf.node), now: nowOf(cardOf.node),
2641
2704
  where: [cardOf.office || (custom ? custom.name : to("allOffice")), cardOf.area].filter(Boolean).join(" · ") })}
2642
- avatar=${drawAvatar} sheet=${phone || size.w < SHEET_W} place=${(el) => { const was = cardEl.current; cardEl.current = el; placeCard();
2705
+ avatar=${drawAvatar} sheet=${phone || size.w < SHEET_W} place=${(el) => { const was = cardEl.current; cardEl.current = el; if (!el || !el.classList?.contains("sheet")) unliftSheet(); placeCard();
2643
2706
  // #4379 review: the tags it covers (or uncovers) are judged at the next frame; a still scene draws one now.
2644
2707
  if (was !== el && scene.current) { scene.current.dirty = true; const go = () => (still ? draw(0) : loop.current?.wake()); if (typeof requestAnimationFrame === "function") requestAnimationFrame(go); else go(); } }}
2645
2708
  onChat=${onOpen ? () => { const n = cardOf.node.name; setCard(null); open(n); } : null} onFind=${findCard} onClose=${closeCard}
@@ -2672,10 +2735,10 @@ export function Office({ view, traffic, q = "", lease, onOpen, assetUrl, assetIm
2672
2735
  onFocus=${() => setTip(d.key)} onBlur=${() => setTip(null)} onClick=${() => { cardFrom.current = d.key; setCard((cur) => (cur === d.key ? null : d.key)); }}>${nt.primary}</button>`
2673
2736
  : html`<span class="oo-desk" data-name=${d.node.name} data-key=${d.key}>${full}</span>`}</li>`;
2674
2737
  })}</ul>
2675
- <div class="oc-zoom oo-zoom" role="group" aria-label=${t("orgc.view")}>
2738
+ <div class="oc-zoom oo-zoom" role="group" aria-label=${to("view")}>
2676
2739
  <output ref=${pctRef} class="oo-zoom-pct"></output>
2677
- <button type="button" class="icon-btn oo-zoom-in" aria-label=${t("orgc.zoomIn")} title=${t("orgc.zoomIn")} onClick=${() => zoomStep(1)}><${Icon} name="plus" size=${16} /></button>
2678
- <button type="button" class="icon-btn oo-zoom-out" aria-label=${t("orgc.zoomOut")} title=${t("orgc.zoomOut")} onClick=${() => zoomStep(-1)}><${Icon} name="minus" size=${16} /></button>
2740
+ <button type="button" class="icon-btn oo-zoom-in" aria-label=${to("zoomIn")} title=${to("zoomIn")} onClick=${() => zoomStep(1)}><${Icon} name="plus" size=${16} /></button>
2741
+ <button type="button" class="icon-btn oo-zoom-out" aria-label=${to("zoomOut")} title=${to("zoomOut")} onClick=${() => zoomStep(-1)}><${Icon} name="minus" size=${16} /></button>
2679
2742
  <button type="button" class="icon-btn oo-fit" aria-label=${to("fit")} title=${to("fit")} onClick=${() => fit()}><${Icon} name="fitwidth" size=${16} /></button>
2680
2743
  <button type="button" class=${`icon-btn oo-fill${fitMode === "cover" ? " on" : ""}`} aria-pressed=${fitMode === "cover" ? "true" : "false"} aria-label=${to("fillTitle")}
2681
2744
  title=${to("fillTitle")} onClick=${toggleFill}>${to("fill")}</button>
@@ -24,11 +24,11 @@ register("org", {
24
24
  sending: "Sending:", queuedNote: "(queued)", workingNote: "(in progress)",
25
25
  },
26
26
  "zh-TW": {
27
- starting: "啟動中", queued: "等待啟動", title: "組織圖", general: "General", unteamed: "未加入 team", members: "{0} 名成員", member: "1 名成員", instances: "{0} 個 Agent", instance: "1 個 Agent",
27
+ starting: "啟動中", queued: "等待啟動", title: "組織圖", general: "General", unteamed: "未加入團隊", members: "{0} 名成員", member: "1 名成員", instances: "{0} 個 Agent", instance: "1 個 Agent",
28
28
  needs: "等你回應", working: "工作中", idle: "閒置", stuck: "似乎卡住", paused: "已暫停", stopped: "已停止", crashed: "已當掉",
29
29
  missing: "不在 fleet 中", thread_discord: "Discord 討論串", thread_telegram: "Telegram topic", openChat: "開啟聊天",
30
- classic: "ClassicBot 頻道", empty: "還沒有 Agent", emptyHint: "fleet 有 Agent 和 team 後會顯示在這裡。",
31
- noTeams: "還沒有 team——到 Fleet → Teams 定義後,組織圖會依 team 分組。", newTab: "(在新分頁開啟)",
30
+ classic: "ClassicBot 頻道", empty: "還沒有 Agent", emptyHint: "fleet 有 Agent 和團隊後會顯示在這裡。",
31
+ noTeams: "還沒有團隊——到 Fleet → 團隊 定義後,組織圖會依團隊分組。", newTab: "(在新分頁開啟)",
32
32
  sending: "傳送中:", queuedNote: "(排隊中)", workingNote: "(進行中)",
33
33
  },
34
34
  });
@@ -78,7 +78,12 @@ export function nodeText(n) {
78
78
  export function buildOrgView(org, app) {
79
79
  const live = new Map((app.instances || []).map((i) => [i.name, i]));
80
80
  const needs = new Map();
81
- for (const item of Array.isArray(app.needs) ? app.needs : []) needs.set(item.instance, (needs.get(item.instance) || 0) + 1);
81
+ // M-3720 (the user, 11-25): a ClassicBot room's "can switch to restricted mode" suggestion is a low-key hint (Needs you
82
+ // folds them into one quiet group), not a call — it alone never sends the room to the Help desk. Every other item does.
83
+ for (const item of Array.isArray(app.needs) ? app.needs : []) {
84
+ if (item && item.type === "contact" && item.reason === "contact_restricted_suggestion") continue;
85
+ needs.set(item.instance, (needs.get(item.instance) || 0) + 1);
86
+ }
82
87
  const awaiting = app.awaiting || {};
83
88
  const info = (org && org.instances) || {};
84
89
  const node = (name) => {
@@ -0,0 +1,19 @@
1
+ // M-3722 (#4453 review): Fleet's tabs are icons only on a phone, so each tab has its own icon — Cache, Usage and Host
2
+ // health no longer share "chart". Those three drawings live here, not in the shared ui-icons.js: a page still holding an
3
+ // older ui-icons.js (cached by URL) would draw nothing for an unknown name, and a phone's tab, its name hidden, would be
4
+ // blank. Every other tab's icon is the shared one.
5
+ import { html } from "/assets/app-html.js";
6
+ import { Icon } from "/assets/ui-icons.js";
7
+
8
+ const OWN = {
9
+ database: () => html`<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/><path d="M3 12c0 1.66 4 3 9 3s9-1.34 9-3"/>`,
10
+ gauge: () => html`<path d="M12 14l4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/>`,
11
+ pulse: () => html`<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>`,
12
+ };
13
+
14
+ /** A Fleet tab's icon: one of the three drawn here, else the shared Icon (same size, stroke and look). */
15
+ export function TabIcon({ name, size = 16 }) {
16
+ if (!OWN[name]) return html`<${Icon} name=${name} size=${size} />`;
17
+ return html`<svg class="icon" width=${size} height=${size} viewBox="0 0 24 24" fill="none" stroke="currentColor"
18
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${OWN[name]()}</svg>`;
19
+ }
@@ -19,6 +19,7 @@ import { BoardOffNote, boardOffTargets, relTime } from "./fleet-task-common.js";
19
19
  import { AgentTag } from "./fleet-task-run.js";
20
20
  import { WhoCard } from "./fleet-task-owner.js";
21
21
  import { insertAtTrigger, triggerAt, withoutCode } from "./trigger-complete.js";
22
+ import { dateTimeText } from "/assets/clock-text.js";
22
23
 
23
24
  export const TIMELINE_FILTERS = ["all", "comments", "log", "history"];
24
25
  const RANK = { event: 0, log: 1, comment: 2 }; // at one instant: the move first, then the words that came with it
@@ -77,7 +78,7 @@ export const insertMention = (text, m, caret, name, names = []) => insertAtTrigg
77
78
 
78
79
  // ── The timeline ──────────────────────────────────────────
79
80
 
80
- const fullTime = (iso) => { const d = new Date(iso); return Number.isFinite(d.getTime()) ? d.toLocaleString() : ""; };
81
+ const fullTime = (iso) => { const d = new Date(iso); return Number.isFinite(d.getTime()) ? dateTimeText(d) : ""; };
81
82
 
82
83
  /**
83
84
  * A run of the same history line from the same hand ("web-user changed acceptance" three times in a row) is one entry with a
@@ -131,7 +131,7 @@ register("tasks", {
131
131
  boardOffNote: "{0} 的任務板是關閉的:不能指派卡片給它,留言和 @ 也叫不醒它,它也收不到 [Task board] 通知。",
132
132
  boardOffCommentNote: "{0} 的任務板是關閉的,這則留言不會叫醒它。",
133
133
  boardOffWhere: "要打開:{0}(所有 Agent),或這個 Agent 自己的設定 → 進階 → 網頁儀表板權限。", boardOffWhereLink: "設定 → Agent 共用設定",
134
- boardOff: "{0}(看板已關閉)", boardOffHint: "關閉任務看板的 Agent 不能被派卡:它沒有 task 工具,讀不到卡片。",
134
+ boardOff: "{0}(看板已關閉)", boardOffHint: "關閉任務看板的 Agent 不能被派卡:它沒有任務工具,讀不到卡片。",
135
135
  reviewBox: "做完要停在待確認,等我確認", created: "已開 {0}", titleRequired: "標題必填",
136
136
  search: "搜尋卡片", searchHint: "搜尋標題、各欄位、驗收條件和留言", searchEmpty: "沒有符合的卡片", inField: "在{0}",
137
137
  fieldgoal: "目標", fieldscope: "範圍", fieldcontext: "背景", fieldstate: "目前狀態", fieldresult: "產出", fieldblockedReason: "卡住原因",
@@ -161,7 +161,7 @@ register("tasks", {
161
161
  "err.dep_own_main": "子任務不能相依自己的主任務 {0}", "err.dep_own_sub": "主任務不能相依自己的子任務 {0}",
162
162
  "err.dep_cycle": "相依會形成循環,大家會互相等待:{0}", "err.conflict": "{0} 已經被改過(最後由 {1} 修改)",
163
163
  "err.signed_in_only": "看板只接受已登入網頁的修改", "err.unavailable": "看板目前無法使用", "err.not_over_public_link": "公開連結只能看看板,不能修改",
164
- "err.assignee_board_off": "{0} 關閉了任務看板,讀不到也動不了卡片。請先替 {0} 開啟(Settings → 該 agent → Dashboard access),或改在聊天中交辦",
164
+ "err.assignee_board_off": "{0} 關閉了任務看板,讀不到也動不了卡片。請先替 {0} 開啟(設定 → 該 Agent → 網頁儀表板權限),或改在聊天中交辦",
165
165
  "err.watcher_unknown": "「{0}」不是 fleet 裡的 Agent", "err.watcher_board_off": "{0} 關閉了任務看板,讀不到也動不了卡片,通知送過去它也沒辦法處理",
166
166
  "err.watchers_max": "{0} 最多只能有 {1} 個關注者", "err.watch_not_board": "{0} 不是任務板上的卡片,只有任務板上的卡片可以關注",
167
167
  "note.review_waiting": "{0}「{1}」的子任務都完成了,等你確認",
@@ -13,6 +13,7 @@ import { RunMark, runOf } from "./fleet-task-run.js";
13
13
  import { OwnerChip } from "./fleet-task-owner.js";
14
14
  import { COLUMNS, ProgressBar, UNASSIGNED, Who, readStored, recentlyDone, relTime, reviewLabel, waitsForYou, waitsList, waitsOn, wrapUpText, writeStored } from "./fleet-task-common.js";
15
15
  import { assetUrl } from "/assets/asset-url.js";
16
+ import { dateTimeText } from "/assets/clock-text.js";
16
17
 
17
18
  /** The task board's stylesheet, linked once (a tab opened before an upgrade has an app.css without these rules). */
18
19
  export function linkTaskBoardCss(doc = typeof document !== "undefined" ? document : null) {
@@ -400,7 +401,7 @@ function groupHead(group, key) {
400
401
  return html`<span class=${`tb-tag p-${key}`}>${t(`tasks.${key}`)}</span>`;
401
402
  }
402
403
  const groupWord = (group, key) => (group === "assignee" ? (key === NONE ? t("tasks.nobody") : key) : t(`tasks.${key}`));
403
- const longTime = (iso) => { const d = new Date(iso); return Number.isFinite(d.getTime()) ? d.toLocaleString(lang() === "zh-TW" ? "zh-TW" : "en") : ""; };
404
+ const longTime = (iso) => { const d = new Date(iso); return Number.isFinite(d.getTime()) ? dateTimeText(d, undefined, lang() === "zh-TW" ? "zh-TW" : "en") : ""; };
404
405
 
405
406
  // The groups a person folded away, remembered on this device, per project (by what heads them: "1/status:done",
406
407
  // "none/assignee:alpha" — the project's id, or "none" for No project).
@@ -9,6 +9,7 @@ import { t, register } from "/assets/app-i18n.js";
9
9
  import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
10
10
  import { Icon } from "/assets/ui-icons.js";
11
11
  import { money, tokens } from "./fleet-cache.js";
12
+ import { timeText } from "/assets/clock-text.js";
12
13
 
13
14
  register("fusage", {
14
15
  en: {
@@ -50,23 +51,23 @@ register("fusage", {
50
51
  },
51
52
  "zh-TW": {
52
53
  range: "期間", today: "今天", r7d: "7 天", month: "本月", all: "全部", custom: "自訂", from: "從", to: "到", apply: "套用",
53
- group: "分組", g_instance: "Agent", g_backend: "Backend", g_model: "模型", g_profile: "憑證 profile", g_team: "Team(依目前設定)",
54
+ group: "分組", g_instance: "Agent", g_backend: "Backend", g_model: "模型", g_profile: "憑證設定檔", g_team: "Team(依目前設定)",
54
55
  csv: "下載 CSV", basis: "依牌價換算的 API 等值({0})——不是實際花費。", basisMore: "訂閱方案不按 token 計費。",
55
56
  amount: "API 等值", input: "輸入", output: "輸出", reasoning: "推理", read: "快取讀取", write: "快取寫入", total: "token 總計", requests: "請求數", messages: "訊息數",
56
- notPriced: "未定價", partial: "部分", noTeam: "(不屬於任何 team)", unknown: "未知",
57
+ notPriced: "未定價", partial: "部分", noTeam: "(不屬於任何團隊)", unknown: "未知",
57
58
  t_not_priced: "未定價:{0}", t_partial: "這一列有部分模型沒有價格", t_write_unreported: "Codex/Muse 不回報快取寫入",
58
59
  t_cost_reported: "金額為 CLI 自行回報", t_estimated: "依文字長度估算(Kiro 不記錄 token 數)", t_reasoning_none: "這個 CLI 不回報",
59
- sourceNote: "部分時段在 AgEnD 記錄 backend 與 profile 之前就已讀取。", profileUnrecorded: "未記錄 profile",
60
+ sourceNote: "部分時段在 AgEnD 記錄後端與設定檔之前就已讀取。", profileUnrecorded: "未記錄設定檔",
60
61
  l_partial: "◐ 部分定價", l_cost_reported: "† 金額由 CLI 回報", l_estimated: "≈ 估算值",
61
62
  speed: "速度", speedUnit: "{0} token/秒", speedCoverage: "{1} 個請求中有 {0} 個可計時", speedSpread: "p10–p90:{0}–{1} token/秒",
62
- speedNone: "transcript 沒有計時資訊", speedByModel: "各模型速度",
63
+ speedNone: "對話紀錄沒有計時資訊", speedByModel: "各模型速度",
63
64
  speedBasis: "輸出 token ÷ 模型本身的回應時間(不含工具執行時間);方法參考 tokdash。",
64
65
 
65
66
  f_includes_estimates: "含估算值(Kiro)", estimatedPart: "其中估算:{0}",
66
67
  scanning: "掃描中——總數可能還會增加。", updated: "更新於 {0} · 每 10 分鐘讀取一次", since: "自 {0} 起收集", notYet: "尚未收集",
67
68
  refresh: "重新整理",
68
- notMeasured: "未量測", nm_credit_billed: "Kiro 以 credit 計費,不記錄 token", nm_unsupported: "AgEnD 目前還讀不到這個 CLI 的用量", nm_no_data: "尚未讀到任何資料",
69
- shared: "與 {0} 共用工作目錄,無法分辨各自的 transcript",
69
+ notMeasured: "未量測", nm_credit_billed: "Kiro 以點數計費,不記錄 token", nm_unsupported: "AgEnD 目前還讀不到這個 CLI 的用量", nm_no_data: "尚未讀到任何資料",
70
+ shared: "與 {0} 共用工作目錄,無法分辨各自的對話紀錄",
70
71
  empty: "還沒有任何紀錄", emptyHint: "用量從 Claude Code、Codex、Grok、Muse、OpenCode 與 Antigravity 讀取,Kiro 則為估算,自 fleet 啟動起計。",
71
72
  blocked: "公開連結上不提供", blockedHint: "只有在設定 → 網頁儀表板裡開啟「透過公開連結提供用量報告」時,公開連結才會提供用量;這個設定要在執行 AgEnD 的那台電腦上、直接開啟的儀表板裡變更。",
72
73
  openSettings: "在那台電腦上開啟設定 → 網頁儀表板",
@@ -439,7 +440,7 @@ export function UsageReport({ report, choice, setChoice, refresh, fetchedAt }) {
439
440
  <p class="us-basis" role="note" title=${tu("basisMore")}>${tu("basis", report.pricesChecked)}</p>
440
441
  ${noDaily ? html`<p class="us-partial" role="status">${tu("noDaily")}</p>` : report.dailyTruncated ? html`<p class="us-partial" role="status">${tu("partialDays", report.dailyFrom)}</p>` : null}
441
442
  ${zones ? html`<p class="us-partial" role="status">${tu("zoneChanged", zones.join(", "), report.zone)}</p>` : null}
442
- <p class="note us-fresh">${tu("updated", new Date(fetchedAt).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }))} · ${Number.isFinite(since) ? tu("since", new Date(since).toLocaleDateString()) : tu("notYet")} · ${tu("zoneNote", report.zone)}${group === "team" ? ` ${tu("teamsNote")}` : ""}
443
+ <p class="note us-fresh">${tu("updated", timeText(fetchedAt, { hour: "2-digit", minute: "2-digit" }, []))} · ${Number.isFinite(since) ? tu("since", new Date(since).toLocaleDateString()) : tu("notYet")} · ${tu("zoneNote", report.zone)}${group === "team" ? ` ${tu("teamsNote")}` : ""}
443
444
  ${report.scanning.active && (!report.scanning.caughtUp || report.scanning.pendingBytes > 0) ? html` <span class="us-scan" role="status">${tu("scanning")} <button type="button" class="btn btn-sm" onClick=${refresh}>${tu("refresh")}</button></span>` : null}</p>
444
445
  ${empty ? html`<${Empty} icon="chart" title=${tu("empty")} hint=${tu("emptyHint")} />` : html`
445
446
  <dl class="us-totals card">
@@ -8,6 +8,7 @@
8
8
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
9
9
  import { register, t, lang } from "/assets/app-i18n.js";
10
10
  import { ErrorState, Skeleton } from "/assets/ui-states.js";
11
+ import { timeText } from "/assets/clock-text.js";
11
12
 
12
13
  register("hubOverview", {
13
14
  en: {
@@ -43,7 +44,7 @@ register("hubOverview", {
43
44
  qPerDay: "每天的提問數", qRange_today: "今天", qRange_7d: "7 天", qHint: "每問一個 Agent 算一次。", qToday: "今天",
44
45
  aTime: "回答時間", aMed: "一般(中位數)", aSlow: "最慢的十分之一", aWait: "正在等回答", aWaitOld: "目前等最久",
45
46
  notEnough: "回答數還不夠", none: "—",
46
- fTitle: "沒有得到回答", fRate: "占全部提問的 {0}%", fOff: "Agent 的 Fleet 沒有連接", fTime: "逾時沒有回答",
47
+ fTitle: "沒有得到回答", fRate: "佔全部提問的 {0}%", fOff: "Agent 的 Fleet 沒有連接", fTime: "逾時沒有回答",
47
48
  fPerm: "權限先到期", fBusy: "Agent 停止或拒絕", fUnknown: "其他或原因不明",
48
49
  topTitle: "最常被問的 Agent", topAgent: "Agent", topAsk: "提問數", topMed: "一般回答時間", topFail: "沒有回答",
49
50
  topNone: "這段期間還沒有人問過 Agent。", topShared: "總共分享了 {0} 個 Agent。",
@@ -110,7 +111,7 @@ export function HubAdminOverview({ client, onOpen = () => {}, onGone = () => {}
110
111
  <div class="hub-ov-range" role="group" aria-label=${ho("rangeLabel")}>
111
112
  ${["today", "7d"].map((r) => html`<button key=${r} type="button" class=${`hub-ov-range-item${range === r ? " is-current" : ""}`} aria-pressed=${range === r ? "true" : "false"} onClick=${() => pick(r)}>${ho(r === "today" ? "today" : "week")}</button>`)}
112
113
  </div>
113
- ${at ? html`<span class="note hub-ov-updated">${ho("updated", new Date(at).toLocaleTimeString(lang() === "zh-TW" ? "zh-TW" : "en", { hour: "2-digit", minute: "2-digit" }))}</span>` : null}
114
+ ${at ? html`<span class="note hub-ov-updated">${ho("updated", timeText(at, { hour: "2-digit", minute: "2-digit" }, lang() === "zh-TW" ? "zh-TW" : "en"))}</span>` : null}
114
115
  </div>
115
116
  <p class="note hub-ov-privacy">${ho("privacy")}</p>`;
116
117
  if (!data) return html`<div class="hub-ov">${head}${error ? html`<${ErrorState} onRetry=${() => load(range)} />` : html`<${Skeleton} variant="rows" lines=${6} />`}</div>`;
@@ -1,5 +1,6 @@
1
1
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
2
2
  import { register, t } from "/assets/app-i18n.js";
3
+ import { dateTimeText } from "/assets/clock-text.js";
3
4
  register("hubIntro", {
4
5
  en: {title:"Introduction",hint:"One line about what this agent handles. Colleagues can see it. Up to 50 characters.",placeholder:"I handle…",save:"Save introduction",failed:"Could not save the introduction. Try again.",saved:"Saved. The agent can still change it later; this line shows who changed it last.",edit:"Edit",close:"Close",owner:"Last changed by the owner",agent:"Last changed by the agent",default:"From the Fleet description",review:"Colleagues will see this line. Check it and save.",cut:"Your earlier description was longer; only the first 50 characters are shown here.",assistant:"Hub assistant. Answers from this room's chat."},
5
6
  "zh-TW": {title:"自我介紹",hint:"用一句話說明這個 Agent 負責什麼,同仁會看到。最多 50 個字。",placeholder:"我負責…",save:"儲存自我介紹",failed:"無法儲存自我介紹,請再試一次。",saved:"已儲存。Agent 之後仍然可以更改;這一行會顯示最後是誰改的。",edit:"編輯",close:"關閉",owner:"最後由擁有者修改",agent:"最後由 Agent 修改",default:"來自 Fleet 說明",review:"同仁會看到這一行,請確認後儲存。",cut:"你之前的說明比較長,這裡只顯示前 50 個字。",assistant:"Hub 提供的助理,根據這個房間的對話回答。"}
@@ -20,7 +21,7 @@ export function AgentIntroEditor({exposure,client,onSaved=()=>{},embedded=false}
20
21
  const Body=embedded?"div":"form";
21
22
  return html`<section class=${embedded?"hub-agent-intro":"card hub-agent-intro"}>${embedded?null:html`<h3>${hi("title")}</h3>`}<${Body} class="form" onSubmit=${embedded?undefined:save}>
22
23
  <label class="field"><span>${hi("title")}</span><input value=${text} placeholder=${hi("placeholder")} disabled=${busy} onInput=${e=>setText(e.target.value)} aria-invalid=${count>50?"true":null} /><small class="note">${`${hi("hint")} ${count}/50`}</small></label>
23
- ${exposure.introBy?html`<p class="note">${hi(exposure.introBy)}${exposure.introAt?html` · <time datetime=${new Date(exposure.introAt).toISOString()}>${new Date(exposure.introAt).toLocaleString()}</time>`:null}</p>`:null}
24
+ ${exposure.introBy?html`<p class="note">${hi(exposure.introBy)}${exposure.introAt?html` · <time datetime=${new Date(exposure.introAt).toISOString()}>${dateTimeText(exposure.introAt)}</time>`:null}</p>`:null}
24
25
  <div class="field-row"><button type=${embedded?"button":"submit"} onClick=${embedded?save:undefined} class="btn btn-sm btn-primary" disabled=${busy||count>50||text===(exposure.intro??"")}>${hi("save")}</button></div>
25
26
  ${message?html`<p role="status">${message}</p>`:null}
26
27
  </${Body}></section>`;
@@ -2,6 +2,7 @@ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
2
2
  import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
3
3
  import { hroom } from "./hub-room-strings.js";
4
4
  import { ha } from "./hub-assistant-admin-strings.js";
5
+ import { dateTimeText } from "/assets/clock-text.js";
5
6
 
6
7
  const fields = value => ({ enabled: value.enabled === true, backend: value.backend, account: value.account ?? null, cap: Number(value.cap), idleMinutes: Number(value.idleMinutes) });
7
8
  const validLimits = value => Number.isInteger(Number(value?.cap)) && Number(value.cap) >= 1 && Number(value.cap) <= 16 && Number.isInteger(Number(value?.idleMinutes)) && Number(value.idleMinutes) >= 1 && Number(value.idleMinutes) <= 240;
@@ -75,7 +76,7 @@ export function HubAssistantAdmin({ client }) {
75
76
  </form>
76
77
  </section>
77
78
  <section class="card" aria-label=${hroom("runningNow")}><div class="hub-card-head"><h3>${hroom("runningNow")}</h3><button type="button" class="btn btn-sm btn-ghost" disabled=${busy} onClick=${() => load(false)}>${ha("refresh")}</button></div>
78
- ${running.length ? html`<div class="hub-rows">${running.map(row => html`<div class="s-row hub-row" key=${row.roomId}><span class="hub-row-text"><strong title=${row.roomName}>${row.roomName}</strong><small class="note">${hroom("lastUsed")} · ${new Date(row.lastUsed).toLocaleString(undefined, { dateStyle: "short", timeStyle: "short", hour12: false })}</small></span>
79
+ ${running.length ? html`<div class="hub-rows">${running.map(row => html`<div class="s-row hub-row" key=${row.roomId}><span class="hub-row-text"><strong title=${row.roomName}>${row.roomName}</strong><small class="note">${hroom("lastUsed")} · ${dateTimeText(row.lastUsed, { dateStyle: "short", timeStyle: "short", hour12: false })}</small></span>
79
80
  <span class=${`tag ${row.state === "failed" ? "warn" : ""}`}>${stateWord(row.state)}</span><button type="button" class="btn btn-sm" disabled=${busy || row.state === "stopping"} onClick=${() => stop(row.roomId)}>${hroom("stop")}</button></div>`)}</div>` : html`<p class="note">${ha("noneRunning")}</p>`}
80
81
  </section>
81
82
  <section class="card" aria-label=${hroom("usage")}><h3>${hroom("usage")}</h3><p class="note">${hroom("usageLead")}</p>
@@ -69,7 +69,7 @@ register("hubChat", {
69
69
  ownerSees: "你的問題會出現在 {0} 的 fleet 聊天裡,標示你的 Hub 身分。",
70
70
  agentShares: "它和其他有權限的人共用同一段對話,可能記得別人問過的事。別放不想讓別人知道的內容。",
71
71
  adminTitle: "Hub 管理員", adminSees: "看不到內容。",
72
- notHere: "這裡沒有", notHereText: "{0} 的檔案與變更、終端機畫面(View)、工具進度:只有 {1} 在自己的 fleet 看得到。",
72
+ notHere: "這裡沒有", notHereText: "{0} 的檔案與變更、終端機畫面(檢視)、工具進度:只有 {1} 在自己的 fleet 看得到。",
73
73
  oneToOne: "一個聊天室只有你和這個 Agent。",
74
74
  menu: "選單", mine: "我的 Agent", mineHint: "誰可以提問、到什麼時候", admin: "管理", adminHint: "連接 Fleet",
75
75
  back: "對話",
@@ -1,6 +1,7 @@
1
1
  /** Recipient-only history, fetched on this page only. No stream, polling, implicit ACK or global notice feed. */
2
2
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
3
3
  import { dn } from "./hub-directory-notice-strings.js";
4
+ import { dateTimeText } from "/assets/clock-text.js";
4
5
 
5
6
  export const DIRECTORY_NOTICE_FEATURE = "directory-security-notices-v1";
6
7
  export function directoryNoticesOffered(session, client) {
@@ -56,7 +57,7 @@ export function DirectoryNotices({ client, host = false }) {
56
57
  ${loaded && !errorKey && !rows.length ? html`<p class="muted">${dn("empty")}</p>` : null}
57
58
  ${rows.map(row => html`<article class="directory-notice" key=${row.id} data-directory-notice=${row.id}>
58
59
  <h3>${dn(row.kind === "directory-compensation" ? "restored" : "changed")}</h3>
59
- <p class="muted">${dn(row.actor?.kind === "host-owner" ? "host" : "admin")} · <time datetime=${new Date(row.at).toISOString()}>${new Date(row.at).toLocaleString()}</time></p>
60
+ <p class="muted">${dn(row.actor?.kind === "host-owner" ? "host" : "admin")} · <time datetime=${new Date(row.at).toISOString()}>${dateTimeText(row.at)}</time></p>
60
61
  <p>${(row.changes || []).map(key => dn(key)).join(" · ")}</p>
61
62
  ${row.acknowledged ? html`<span class="muted">${dn("acknowledged")}</span>` : html`<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => acknowledge(row.id)}>${dn(acking === row.id ? "acknowledging" : "acknowledge")}</button>`}
62
63
  </article>`)}
@@ -5,8 +5,9 @@ import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
5
5
  import { hubClient } from "./hub-client.js";
6
6
  import { he } from "./hub-enrolment-code-strings.js";
7
7
  import { jf } from "./hub-joincode-flow-strings.js";
8
+ import { dateTimeText } from "/assets/clock-text.js";
8
9
  export const enrolmentCodeV1 = true;
9
- const time = value => new Date(value).toLocaleString();
10
+ const time = value => dateTimeText(value);
10
11
  const supported = client => client?.enrolmentCodeV1 === true && ["enrolmentCodes", "createEnrolmentCode", "revokeEnrolmentCode"].every(key => typeof client[key] === "function");
11
12
  const integer = (value, max) => Number.isSafeInteger(Number(value)) && Number(value) >= 1 && Number(value) <= max;
12
13
  const errorText = (result, fallback) => result?.code === "backpressure" && result.reason === "live-code-limit" ? jf("liveLimit")