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

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 (488) hide show
  1. package/README.md +1 -1
  2. package/README.zh-TW.md +1 -1
  3. package/dist/agend-home.js +5 -5
  4. package/dist/agend-home.js.map +1 -1
  5. package/dist/agent-endpoint.js +10 -0
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/agent-file-read.js +1 -1
  8. package/dist/agent-file-read.js.map +1 -1
  9. package/dist/agent-workspace.d.ts +18 -2
  10. package/dist/agent-workspace.js +15 -4
  11. package/dist/agent-workspace.js.map +1 -1
  12. package/dist/auth-api.js +3 -1
  13. package/dist/auth-api.js.map +1 -1
  14. package/dist/backend/antigravity.js +8 -6
  15. package/dist/backend/antigravity.js.map +1 -1
  16. package/dist/backend/claude-code.js +17 -0
  17. package/dist/backend/claude-code.js.map +1 -1
  18. package/dist/backend/claude-usage-credits.d.ts +8 -0
  19. package/dist/backend/claude-usage-credits.js +121 -0
  20. package/dist/backend/claude-usage-credits.js.map +1 -0
  21. package/dist/backend/types.d.ts +30 -0
  22. package/dist/backend/types.js.map +1 -1
  23. package/dist/build-provenance.json +1 -1
  24. package/dist/channel/adapters/discord.js +7 -1
  25. package/dist/channel/adapters/discord.js.map +1 -1
  26. package/dist/channel/mcp-tools.js +1 -1
  27. package/dist/channel/mcp-tools.js.map +1 -1
  28. package/dist/channel/tool-router.js +1 -0
  29. package/dist/channel/tool-router.js.map +1 -1
  30. package/dist/cli-audited.js +9 -4
  31. package/dist/cli-audited.js.map +1 -1
  32. package/dist/cli.js +184 -21
  33. package/dist/cli.js.map +1 -1
  34. package/dist/config-validator.js +11 -1
  35. package/dist/config-validator.js.map +1 -1
  36. package/dist/config.js +2 -0
  37. package/dist/config.js.map +1 -1
  38. package/dist/contact-auth-store.d.ts +18 -0
  39. package/dist/contact-auth-store.js +55 -8
  40. package/dist/contact-auth-store.js.map +1 -1
  41. package/dist/contact-auth-types.d.ts +3 -0
  42. package/dist/contact-auth-types.js.map +1 -1
  43. package/dist/contact-change-proposals.d.ts +34 -0
  44. package/dist/contact-change-proposals.js +1 -1
  45. package/dist/contact-change-proposals.js.map +1 -1
  46. package/dist/cross-instance-notice.d.ts +1 -0
  47. package/dist/cross-instance-notice.js +9 -8
  48. package/dist/cross-instance-notice.js.map +1 -1
  49. package/dist/daemon.d.ts +35 -0
  50. package/dist/daemon.js +234 -19
  51. package/dist/daemon.js.map +1 -1
  52. package/dist/delivery-outbox.d.ts +42 -1
  53. package/dist/delivery-outbox.js +198 -21
  54. package/dist/delivery-outbox.js.map +1 -1
  55. package/dist/fleet-context.d.ts +8 -0
  56. package/dist/fleet-lock.d.ts +83 -2
  57. package/dist/fleet-lock.js +276 -2
  58. package/dist/fleet-lock.js.map +1 -1
  59. package/dist/fleet-manager.d.ts +183 -7
  60. package/dist/fleet-manager.js +1279 -78
  61. package/dist/fleet-manager.js.map +1 -1
  62. package/dist/fleet-windows-runtime.d.ts +20 -1
  63. package/dist/fleet-windows-runtime.js +98 -18
  64. package/dist/fleet-windows-runtime.js.map +1 -1
  65. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +13 -1
  66. package/dist/general-knowledge/skills/hub/SKILL.md +12 -1
  67. package/dist/general-knowledge/skills/web-appearance/SKILL.md +3 -1
  68. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +21 -4
  69. package/dist/home-update-lock.d.ts +35 -0
  70. package/dist/home-update-lock.js +81 -0
  71. package/dist/home-update-lock.js.map +1 -0
  72. package/dist/hub/client.js +7 -0
  73. package/dist/hub/client.js.map +1 -1
  74. package/dist/hub/compose/member.d.ts +5 -1
  75. package/dist/hub/compose/member.js +15 -6
  76. package/dist/hub/compose/member.js.map +1 -1
  77. package/dist/hub/compose/server.d.ts +1 -0
  78. package/dist/hub/compose/server.js +3 -2
  79. package/dist/hub/compose/server.js.map +1 -1
  80. package/dist/hub/http/compose.js +3 -2
  81. package/dist/hub/http/compose.js.map +1 -1
  82. package/dist/hub/http/deps.d.ts +1 -0
  83. package/dist/hub/member/room-ask.d.ts +12 -8
  84. package/dist/hub/member/room-ask.js +95 -29
  85. package/dist/hub/member/room-ask.js.map +1 -1
  86. package/dist/hub/member/room-mention-feedback.d.ts +2 -0
  87. package/dist/hub/member/room-mention-feedback.js +1 -1
  88. package/dist/hub/member/room-mention-feedback.js.map +1 -1
  89. package/dist/hub/member/room-post-answers.d.ts +2 -0
  90. package/dist/hub/member/room-post-answers.js +1 -1
  91. package/dist/hub/member/room-post-answers.js.map +1 -1
  92. package/dist/hub/member/room-post.d.ts +5 -0
  93. package/dist/hub/member/room-post.js +4 -1
  94. package/dist/hub/member/room-post.js.map +1 -1
  95. package/dist/hub/member/room-reaction-acks.d.ts +12 -0
  96. package/dist/hub/member/room-reaction-acks.js +44 -0
  97. package/dist/hub/member/room-reaction-acks.js.map +1 -0
  98. package/dist/hub/member/updates.d.ts +7 -1
  99. package/dist/hub/member/updates.js +7 -1
  100. package/dist/hub/member/updates.js.map +1 -1
  101. package/dist/hub/protocol.d.ts +4 -0
  102. package/dist/hub/protocol.js +2 -2
  103. package/dist/hub/protocol.js.map +1 -1
  104. package/dist/hub/representative.d.ts +7 -0
  105. package/dist/hub/representative.js +38 -5
  106. package/dist/hub/representative.js.map +1 -1
  107. package/dist/hub/roles/audit-details.d.ts +2 -0
  108. package/dist/hub/roles/audit-details.js +1 -1
  109. package/dist/hub/roles/audit-details.js.map +1 -1
  110. package/dist/hub/roles/authority.d.ts +8 -3
  111. package/dist/hub/roles/authority.js +144 -102
  112. package/dist/hub/roles/authority.js.map +1 -1
  113. package/dist/hub/roles/delegation.js +2 -2
  114. package/dist/hub/roles/delegation.js.map +1 -1
  115. package/dist/hub/roles/model.d.ts +5 -2
  116. package/dist/hub/roles/model.js +5 -4
  117. package/dist/hub/roles/model.js.map +1 -1
  118. package/dist/hub/roles/review.js +2 -2
  119. package/dist/hub/roles/review.js.map +1 -1
  120. package/dist/hub/room-react-ack-model.d.ts +2 -0
  121. package/dist/hub/room-react-ack-model.js +3 -0
  122. package/dist/hub/room-react-ack-model.js.map +1 -0
  123. package/dist/hub/rooms/admin.d.ts +6 -0
  124. package/dist/hub/rooms/admin.js +33 -0
  125. package/dist/hub/rooms/admin.js.map +1 -1
  126. package/dist/hub/rooms/agents.d.ts +2 -0
  127. package/dist/hub/rooms/agents.js +44 -3
  128. package/dist/hub/rooms/agents.js.map +1 -1
  129. package/dist/hub/rooms/service.d.ts +5 -1
  130. package/dist/hub/rooms/service.js +76 -24
  131. package/dist/hub/rooms/service.js.map +1 -1
  132. package/dist/hub/rooms/types.d.ts +2 -0
  133. package/dist/hub/server.js +6 -1
  134. package/dist/hub/server.js.map +1 -1
  135. package/dist/hub/types.d.ts +2 -0
  136. package/dist/install-lock.d.ts +15 -1
  137. package/dist/install-lock.js +16 -8
  138. package/dist/install-lock.js.map +1 -1
  139. package/dist/install-ownership.d.ts +165 -0
  140. package/dist/install-ownership.js +404 -0
  141. package/dist/install-ownership.js.map +1 -0
  142. package/dist/instance-config-impact.js +2 -0
  143. package/dist/instance-config-impact.js.map +1 -1
  144. package/dist/instructions.d.ts +4 -0
  145. package/dist/instructions.js +4 -0
  146. package/dist/instructions.js.map +1 -1
  147. package/dist/local-pane-endpoint.d.ts +4 -1
  148. package/dist/local-pane-endpoint.js +12 -2
  149. package/dist/local-pane-endpoint.js.map +1 -1
  150. package/dist/locale.js +162 -6
  151. package/dist/locale.js.map +1 -1
  152. package/dist/native-agent-admission.d.ts +7 -0
  153. package/dist/native-agent-admission.js +46 -3
  154. package/dist/native-agent-admission.js.map +1 -1
  155. package/dist/native-mcp.d.ts +16 -1
  156. package/dist/native-mcp.js +38 -5
  157. package/dist/native-mcp.js.map +1 -1
  158. package/dist/native-pane-lifecycle.d.ts +9 -0
  159. package/dist/native-pane-lifecycle.js +23 -0
  160. package/dist/native-pane-lifecycle.js.map +1 -1
  161. package/dist/native-pane-manager.d.ts +19 -6
  162. package/dist/native-pane-manager.js +79 -4
  163. package/dist/native-pane-manager.js.map +1 -1
  164. package/dist/needs-you.d.ts +8 -0
  165. package/dist/needs-you.js +1 -0
  166. package/dist/needs-you.js.map +1 -1
  167. package/dist/outbound-handlers.d.ts +12 -0
  168. package/dist/outbound-handlers.js +30 -2
  169. package/dist/outbound-handlers.js.map +1 -1
  170. package/dist/package-preimage.js +4 -0
  171. package/dist/package-preimage.js.map +1 -1
  172. package/dist/pane-port.d.ts +1 -0
  173. package/dist/plist-args.d.ts +9 -0
  174. package/dist/plist-args.js +22 -0
  175. package/dist/plist-args.js.map +1 -0
  176. package/dist/public-preview.d.ts +4 -6
  177. package/dist/public-preview.js +5 -2
  178. package/dist/public-preview.js.map +1 -1
  179. package/dist/public-web-gateway.js +10 -3
  180. package/dist/public-web-gateway.js.map +1 -1
  181. package/dist/public-web-link.d.ts +13 -1
  182. package/dist/public-web-link.js +28 -1
  183. package/dist/public-web-link.js.map +1 -1
  184. package/dist/recover.cjs +2638 -0
  185. package/dist/remote-card-prompt.d.ts +6 -2
  186. package/dist/remote-card-prompt.js +12 -3
  187. package/dist/remote-card-prompt.js.map +1 -1
  188. package/dist/reply-draft.d.ts +12 -0
  189. package/dist/reply-draft.js +81 -0
  190. package/dist/reply-draft.js.map +1 -0
  191. package/dist/request-contact-api.d.ts +15 -0
  192. package/dist/request-contact-api.js +120 -0
  193. package/dist/request-contact-api.js.map +1 -0
  194. package/dist/request-contact-card.d.ts +36 -0
  195. package/dist/request-contact-card.js +206 -0
  196. package/dist/request-contact-card.js.map +1 -0
  197. package/dist/request-contact-gate.d.ts +79 -0
  198. package/dist/request-contact-gate.js +262 -0
  199. package/dist/request-contact-gate.js.map +1 -0
  200. package/dist/request-contact-native.d.ts +52 -0
  201. package/dist/request-contact-native.js +87 -0
  202. package/dist/request-contact-native.js.map +1 -0
  203. package/dist/request-contact-types.d.ts +86 -0
  204. package/dist/request-contact-types.js +7 -0
  205. package/dist/request-contact-types.js.map +1 -0
  206. package/dist/request-context-call-protocol.d.ts +12 -0
  207. package/dist/request-context-call-protocol.js +14 -0
  208. package/dist/request-context-call-protocol.js.map +1 -0
  209. package/dist/request-context-call.d.ts +22 -0
  210. package/dist/request-context-call.js +35 -0
  211. package/dist/request-context-call.js.map +1 -0
  212. package/dist/request-context-drain.d.ts +39 -0
  213. package/dist/request-context-drain.js +159 -0
  214. package/dist/request-context-drain.js.map +1 -0
  215. package/dist/request-context-fence.d.ts +28 -0
  216. package/dist/request-context-fence.js +58 -0
  217. package/dist/request-context-fence.js.map +1 -0
  218. package/dist/request-context-migration.d.ts +64 -0
  219. package/dist/request-context-migration.js +158 -0
  220. package/dist/request-context-migration.js.map +1 -0
  221. package/dist/request-context-pane.d.ts +25 -0
  222. package/dist/request-context-pane.js +48 -0
  223. package/dist/request-context-pane.js.map +1 -0
  224. package/dist/request-context-policy.d.ts +74 -0
  225. package/dist/request-context-policy.js +116 -0
  226. package/dist/request-context-policy.js.map +1 -0
  227. package/dist/request-context-recovery.d.ts +14 -0
  228. package/dist/request-context-recovery.js +56 -0
  229. package/dist/request-context-recovery.js.map +1 -0
  230. package/dist/request-context-relay.d.ts +19 -0
  231. package/dist/request-context-relay.js +63 -0
  232. package/dist/request-context-relay.js.map +1 -0
  233. package/dist/request-context-returns.d.ts +67 -0
  234. package/dist/request-context-returns.js +211 -0
  235. package/dist/request-context-returns.js.map +1 -0
  236. package/dist/request-context-store.d.ts +2 -1
  237. package/dist/request-context-store.js +8 -1
  238. package/dist/request-context-store.js.map +1 -1
  239. package/dist/request-context-turns.d.ts +99 -0
  240. package/dist/request-context-turns.js +215 -0
  241. package/dist/request-context-turns.js.map +1 -0
  242. package/dist/request-context-view.d.ts +33 -0
  243. package/dist/request-context-view.js +36 -0
  244. package/dist/request-context-view.js.map +1 -0
  245. package/dist/request-hub-context.d.ts +130 -0
  246. package/dist/request-hub-context.js +89 -0
  247. package/dist/request-hub-context.js.map +1 -0
  248. package/dist/request-hub-output.d.ts +11 -0
  249. package/dist/request-hub-output.js +21 -0
  250. package/dist/request-hub-output.js.map +1 -0
  251. package/dist/runtime-cli-install.js +13 -11
  252. package/dist/runtime-cli-install.js.map +1 -1
  253. package/dist/runtime-client.d.ts +2 -0
  254. package/dist/runtime-client.js +17 -4
  255. package/dist/runtime-client.js.map +1 -1
  256. package/dist/runtime-coordinator.d.ts +4 -1
  257. package/dist/runtime-coordinator.js +10 -3
  258. package/dist/runtime-coordinator.js.map +1 -1
  259. package/dist/runtime-pane-assets.d.ts +1 -1
  260. package/dist/runtime-pane-assets.js +1 -1
  261. package/dist/runtime-pane-assets.js.map +1 -1
  262. package/dist/runtime-pane-host.d.ts +3 -0
  263. package/dist/runtime-pane-host.js +39 -21
  264. package/dist/runtime-pane-host.js.map +1 -1
  265. package/dist/runtime-pane-link.d.ts +6 -2
  266. package/dist/runtime-pane-link.js +17 -4
  267. package/dist/runtime-pane-link.js.map +1 -1
  268. package/dist/runtime-pane-mcp-relay.d.ts +11 -1
  269. package/dist/runtime-pane-mcp-relay.js +69 -3
  270. package/dist/runtime-pane-mcp-relay.js.map +1 -1
  271. package/dist/runtime-pane-mcp.d.ts +28 -1
  272. package/dist/runtime-pane-mcp.js +92 -15
  273. package/dist/runtime-pane-mcp.js.map +1 -1
  274. package/dist/runtime-pane-port.d.ts +6 -0
  275. package/dist/runtime-pane-port.js +23 -4
  276. package/dist/runtime-pane-port.js.map +1 -1
  277. package/dist/runtime-pane-protocol.d.ts +4 -0
  278. package/dist/runtime-pane-protocol.js +11 -4
  279. package/dist/runtime-pane-protocol.js.map +1 -1
  280. package/dist/runtime-pane-service.d.ts +1 -0
  281. package/dist/runtime-pane-service.js +25 -9
  282. package/dist/runtime-pane-service.js.map +1 -1
  283. package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
  284. package/dist/runtime-pane-stdio-protocol.js +12 -5
  285. package/dist/runtime-pane-stdio-protocol.js.map +1 -1
  286. package/dist/runtime-pane-stdio.js +5 -5
  287. package/dist/runtime-pane-stdio.js.map +1 -1
  288. package/dist/runtime-protocol.d.ts +3 -0
  289. package/dist/runtime-protocol.js.map +1 -1
  290. package/dist/scheduler/scheduler.d.ts +15 -0
  291. package/dist/scheduler/scheduler.js +45 -1
  292. package/dist/scheduler/scheduler.js.map +1 -1
  293. package/dist/scheduler/scheduler.test.js +17 -0
  294. package/dist/scheduler/scheduler.test.js.map +1 -1
  295. package/dist/scheduler/task-board.d.ts +4 -0
  296. package/dist/scheduler/task-board.js +6 -0
  297. package/dist/scheduler/task-board.js.map +1 -1
  298. package/dist/scheduler/types.d.ts +1 -1
  299. package/dist/service-activation.js +3 -13
  300. package/dist/service-activation.js.map +1 -1
  301. package/dist/service-lock.d.ts +28 -0
  302. package/dist/service-lock.js +85 -0
  303. package/dist/service-lock.js.map +1 -0
  304. package/dist/settings-api.d.ts +6 -0
  305. package/dist/settings-api.js +107 -0
  306. package/dist/settings-api.js.map +1 -1
  307. package/dist/settings-change.js +14 -1
  308. package/dist/settings-change.js.map +1 -1
  309. package/dist/settings-effect.js +11 -1
  310. package/dist/settings-effect.js.map +1 -1
  311. package/dist/state-lease.d.ts +24 -0
  312. package/dist/state-lease.js +103 -0
  313. package/dist/state-lease.js.map +1 -0
  314. package/dist/tmux-binary.js +1 -1
  315. package/dist/tmux-binary.js.map +1 -1
  316. package/dist/tool-receipt-output.d.ts +2 -0
  317. package/dist/topic-commands.js +21 -1
  318. package/dist/topic-commands.js.map +1 -1
  319. package/dist/transcript-monitor.js +3 -0
  320. package/dist/transcript-monitor.js.map +1 -1
  321. package/dist/tunnel/named-link-test.d.ts +27 -0
  322. package/dist/tunnel/named-link-test.js +41 -0
  323. package/dist/tunnel/named-link-test.js.map +1 -1
  324. package/dist/types.d.ts +7 -0
  325. package/dist/ui/chat-store.js +5 -4
  326. package/dist/ui/contact-auth-strings.js +7 -2
  327. package/dist/ui/contact-permissions.js +10 -2
  328. package/dist/ui/fleet-office-card.js +15 -2
  329. package/dist/ui/fleet-office-pack.d.ts +2 -2
  330. package/dist/ui/fleet-office-pack.js +25 -8
  331. package/dist/ui/fleet-office-skin.js +33 -9
  332. package/dist/ui/fleet-office-vehicles.js +28 -11
  333. package/dist/ui/fleet-office-zones.js +10 -5
  334. package/dist/ui/fleet-office.js +158 -20
  335. package/dist/ui/fleet-task-files.js +1 -1
  336. package/dist/ui/hub-admin-rooms-strings.js +6 -2
  337. package/dist/ui/hub-admin-rooms.js +3 -1
  338. package/dist/ui/hub-group-search.js +2 -2
  339. package/dist/ui/hub-notify-keep.js +49 -0
  340. package/dist/ui/hub-role-view.js +1 -1
  341. package/dist/ui/hub-roles-strings.js +14 -10
  342. package/dist/ui/hub-roles.js +1 -1
  343. package/dist/ui/hub-room-notify.js +2 -1
  344. package/dist/ui/hub-room-strings.js +3 -3
  345. package/dist/ui/hub-room-thread.js +9 -4
  346. package/dist/ui/panel-chat.js +15 -2
  347. package/dist/ui/panel-hub.js +3 -2
  348. package/dist/ui/panel-needs.js +35 -7
  349. package/dist/ui/panel-settings.js +22 -8
  350. package/dist/ui/settings-preview-address.js +156 -0
  351. package/dist/ui/settings-registry.js +2 -0
  352. package/dist/ui/settings-strings.js +6 -6
  353. package/dist/ui/settings-update.js +13 -0
  354. package/dist/ui/shared/app-install.js +123 -0
  355. package/dist/ui/shared/app-shell.js +4 -2
  356. package/dist/ui/shared/app-update.js +16 -2
  357. package/dist/ui/shared/app.css +119 -2
  358. package/dist/ui/shared/app.js +3 -0
  359. package/dist/ui/shared/chat-strings.js +6 -2
  360. package/dist/ui/shared/chat-thread.js +7 -1
  361. package/dist/ui/shared/hub-chat.css +6 -0
  362. package/dist/ui/shared/preview-panel.js +1 -1
  363. package/dist/ui/shared/preview.js +11 -2
  364. package/dist/ui/shared/tokens.css +18 -3
  365. package/dist/ui/shared/ui-confirm.js +7 -5
  366. package/dist/ui/shared/ui-icons.js +2 -0
  367. package/dist/ui/shared/update-card-ui.js +419 -0
  368. package/dist/ui/shared/workspace.css +7 -0
  369. package/dist/ui/usage-credits-card.js +84 -0
  370. package/dist/ui/workspace-ignored-strings.js +16 -0
  371. package/dist/ui/workspace-panel.js +15 -6
  372. package/dist/update-abandon.d.ts +26 -0
  373. package/dist/update-abandon.js +111 -0
  374. package/dist/update-abandon.js.map +1 -0
  375. package/dist/update-card.d.ts +193 -0
  376. package/dist/update-card.js +620 -0
  377. package/dist/update-card.js.map +1 -0
  378. package/dist/update-dispatch.d.ts +16 -1
  379. package/dist/update-dispatch.js +12 -4
  380. package/dist/update-dispatch.js.map +1 -1
  381. package/dist/update-forward.d.ts +59 -0
  382. package/dist/update-forward.js +227 -0
  383. package/dist/update-forward.js.map +1 -0
  384. package/dist/update-goback.d.ts +90 -0
  385. package/dist/update-goback.js +260 -0
  386. package/dist/update-goback.js.map +1 -0
  387. package/dist/update-idle.d.ts +1 -0
  388. package/dist/update-idle.js +12 -3
  389. package/dist/update-idle.js.map +1 -1
  390. package/dist/update-install.d.ts +2 -1
  391. package/dist/update-install.js +18 -10
  392. package/dist/update-install.js.map +1 -1
  393. package/dist/update-journal.d.ts +359 -0
  394. package/dist/update-journal.js +723 -0
  395. package/dist/update-journal.js.map +1 -0
  396. package/dist/update-launch.js +1 -1
  397. package/dist/update-launch.js.map +1 -1
  398. package/dist/update-npm-env.d.ts +45 -12
  399. package/dist/update-npm-env.js +48 -0
  400. package/dist/update-npm-env.js.map +1 -1
  401. package/dist/update-package-restore.d.ts +84 -0
  402. package/dist/update-package-restore.js +329 -0
  403. package/dist/update-package-restore.js.map +1 -0
  404. package/dist/update-quiescence.d.ts +221 -0
  405. package/dist/update-quiescence.js +370 -0
  406. package/dist/update-quiescence.js.map +1 -0
  407. package/dist/update-readiness-host.d.ts +61 -0
  408. package/dist/update-readiness-host.js +297 -0
  409. package/dist/update-readiness-host.js.map +1 -0
  410. package/dist/update-readiness.d.ts +83 -0
  411. package/dist/update-readiness.js +459 -0
  412. package/dist/update-readiness.js.map +1 -0
  413. package/dist/update-recovery/kit.d.ts +35 -0
  414. package/dist/update-recovery/kit.js +99 -0
  415. package/dist/update-recovery/kit.js.map +1 -0
  416. package/dist/update-recovery/pre-start.d.ts +34 -0
  417. package/dist/update-recovery/pre-start.js +103 -0
  418. package/dist/update-recovery/pre-start.js.map +1 -0
  419. package/dist/update-recovery/recover-main.d.ts +1 -0
  420. package/dist/update-recovery/recover-main.js +4 -0
  421. package/dist/update-recovery/recover-main.js.map +1 -0
  422. package/dist/update-recovery/recover.d.ts +22 -0
  423. package/dist/update-recovery/recover.js +134 -0
  424. package/dist/update-recovery/recover.js.map +1 -0
  425. package/dist/update-recovery/route.d.ts +53 -0
  426. package/dist/update-recovery/route.js +262 -0
  427. package/dist/update-recovery/route.js.map +1 -0
  428. package/dist/update-recovery/runner.d.ts +62 -0
  429. package/dist/update-recovery/runner.js +229 -0
  430. package/dist/update-recovery/runner.js.map +1 -0
  431. package/dist/update-recovery/service-manager.d.ts +39 -0
  432. package/dist/update-recovery/service-manager.js +57 -0
  433. package/dist/update-recovery/service-manager.js.map +1 -0
  434. package/dist/update-restore.d.ts +50 -0
  435. package/dist/update-restore.js +360 -0
  436. package/dist/update-restore.js.map +1 -0
  437. package/dist/update-retained.d.ts +65 -0
  438. package/dist/update-retained.js +116 -0
  439. package/dist/update-retained.js.map +1 -0
  440. package/dist/update-rollback.d.ts +74 -0
  441. package/dist/update-rollback.js +221 -0
  442. package/dist/update-rollback.js.map +1 -0
  443. package/dist/update-settings.d.ts +63 -0
  444. package/dist/update-settings.js +162 -0
  445. package/dist/update-settings.js.map +1 -0
  446. package/dist/update-snapshot-manifest.d.ts +32 -0
  447. package/dist/update-snapshot-manifest.js +65 -0
  448. package/dist/update-snapshot-manifest.js.map +1 -0
  449. package/dist/update-snapshot-scope.d.ts +67 -0
  450. package/dist/update-snapshot-scope.js +173 -0
  451. package/dist/update-snapshot-scope.js.map +1 -0
  452. package/dist/update-snapshot.d.ts +34 -0
  453. package/dist/update-snapshot.js +246 -0
  454. package/dist/update-snapshot.js.map +1 -0
  455. package/dist/update-writers.d.ts +71 -0
  456. package/dist/update-writers.js +235 -0
  457. package/dist/update-writers.js.map +1 -0
  458. package/dist/web-api.d.ts +3 -0
  459. package/dist/web-api.js +43 -8
  460. package/dist/web-api.js.map +1 -1
  461. package/dist/web-chat-history.d.ts +7 -0
  462. package/dist/web-chat-history.js +15 -0
  463. package/dist/web-chat-history.js.map +1 -1
  464. package/dist/web-icons.d.ts +11 -0
  465. package/dist/web-icons.js +14 -2
  466. package/dist/web-icons.js.map +1 -1
  467. package/dist/web-mentions.d.ts +27 -8
  468. package/dist/web-mentions.js +108 -1
  469. package/dist/web-mentions.js.map +1 -1
  470. package/dist/web-office-acts.js +3 -0
  471. package/dist/web-office-acts.js.map +1 -1
  472. package/dist/web-preview.d.ts +5 -0
  473. package/dist/web-preview.js +1 -1
  474. package/dist/web-preview.js.map +1 -1
  475. package/dist/web-update.d.ts +6 -0
  476. package/dist/windows-agents.d.ts +12 -0
  477. package/dist/windows-agents.js +5 -0
  478. package/dist/windows-agents.js.map +1 -1
  479. package/launcher/agend +4 -1
  480. package/launcher/agend-agent +4 -1
  481. package/launcher/agend-install.cjs +16 -8
  482. package/launcher/install-admission.d.cts +8 -0
  483. package/launcher/npm-allow-scripts.cjs +72 -0
  484. package/launcher/npm-global-prefix.cjs +81 -0
  485. package/launcher/postinstall.cjs +9 -8
  486. package/launcher/runtime-select.cjs +8 -2
  487. package/package.json +4 -3
  488. package/scripts/preinstall-guard.cjs +1 -1
@@ -228,6 +228,12 @@ const overlaps = (a, b) => a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h
228
228
  const figureBox = (sk, q) => (sk.charBox ? sk.charBox(q.look, q.at) : { x: q.at.x - 24, y: q.at.y - 52, w: 48, h: 66 });
229
229
  /** #2554: in All offices a tile's name tags show (always) from this many CSS px a unit up; below it on hover only. */
230
230
  export const TAG_MIN_K = 0.75;
231
+ /**
232
+ * M-3665: one office below this zoom (a phone's whole office, about 30 %: a 10 px tag is 3 px on the page) draws no
233
+ * name tags but the hovered, focused or found one: the names are read in the people row over the stage's foot and on
234
+ * a person's card. A desk's fit keeps them (the Fleet's 70 % and up; a Hub room's 60 %).
235
+ */
236
+ export const TAG_READ_K = 0.5;
231
237
  const PAN_KEYS = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };
232
238
  /** Typing: no single-key shortcut (the `f` of fullscreen) there. */
233
239
  const typing = (el) => !!el && (el.tagName === "INPUT" || el.tagName === "SELECT" || el.tagName === "TEXTAREA" || el.isContentEditable === true);
@@ -293,6 +299,8 @@ const AIR_FPS = 30;
293
299
  const STYLES = BUILT_IN_SKINS;
294
300
  /** Paused and stopped: left out when "Hide paused and stopped" is on. */
295
301
  const ASLEEP = new Set(["paused", "stopped"]);
302
+ /** A seat's standFacing (#4503) as a walk heading. */
303
+ const STAND_FACING = { up: { dx: 0, dy: -1 }, down: { dx: 0, dy: 1 }, left: { dx: -1, dy: 0 }, right: { dx: 1, dy: 0 } };
296
304
  const BUBBLE_STATES = ["working", "idle", "paused", "stopped", "needs", "crashed", "stuck"];
297
305
  /** The page's own bubble lines, by state, in its language (short, never message content). */
298
306
  export const bubbleDefaults = () => Object.fromEntries(BUBBLE_STATES.map((s) => [s, to(`b_${s}`).split("|")]));
@@ -433,6 +441,32 @@ const GHOST_POSE = [["paused", "paused"], ["stopped", "paused"], ["working", "wo
433
441
  const BUBBLE_IN_AREA = 8;
434
442
  /** How faint Edit layout's figures are: seen through, yet readable over a busy picture (a dimmed person is 0.35). */
435
443
  const GHOST_ALPHA = 0.6;
444
+ /**
445
+ * M-3665: stopped — or, in a Hub room, an agent whose computer is offline — is not the same as paused, though both
446
+ * doze in the nap corner. A paused person is drawn as ever (its Zzz); a stopped one faded (OFF_ALPHA) with a small
447
+ * power-off mark beside it, on every style and every pack (the pack's own paused strip draws both).
448
+ */
449
+ const OFF_ALPHA = 0.45;
450
+ export const offLook = (look) => !!look && look.state === "stopped" && look.pose !== "away";
451
+ export function drawOffMark(ctx, x, y, env) {
452
+ const pal = (env && env.pal) || {}, r = 6;
453
+ ctx.save();
454
+ ctx.globalAlpha = 1;
455
+ ctx.fillStyle = pal.surface || "#2f2f2f"; ctx.strokeStyle = pal.text3 || "#bbbbbb"; ctx.lineWidth = 1.2;
456
+ ctx.beginPath(); ctx.arc(x, y, r + 2, 0, Math.PI * 2); ctx.fill(); ctx.stroke();
457
+ ctx.strokeStyle = pal.text2 || "#cfcfcf"; ctx.lineWidth = 1.6; ctx.lineCap = "round";
458
+ ctx.beginPath(); ctx.arc(x, y + 0.5, r - 2, -Math.PI / 2 + 0.75, Math.PI * 1.5 - 0.75); ctx.stroke(); // the power symbol's ring…
459
+ ctx.beginPath(); ctx.moveTo(x, y - r + 1); ctx.lineTo(x, y - 0.5); ctx.stroke(); // …and its bar
460
+ ctx.restore();
461
+ }
462
+ /** A person drawn by the skin; stopped (offline): faded, with the power-off mark at (mx, my). */
463
+ function drawPerson(ctx, sk, box, look, ms, env, mx, my, markScale = 1) {
464
+ if (!offLook(look)) { sk.drawCharacter(ctx, box, look, ms, env); return; }
465
+ ctx.save(); ctx.globalAlpha *= OFF_ALPHA; sk.drawCharacter(ctx, box, look, ms, env); ctx.restore();
466
+ // M-3665 (leader's check): zoomed out past TAG_READ_K the mark keeps its size at TAG_READ_K, centred where it was.
467
+ if (markScale === 1) { drawOffMark(ctx, mx, my, env); return; }
468
+ ctx.save(); ctx.translate(mx, my); ctx.scale(markScale, markScale); drawOffMark(ctx, 0, 0, env); ctx.restore();
469
+ }
436
470
  /** 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). */
437
471
  export function ghostsOf(pack, people = []) {
438
472
  const taken = (s) => people.some((q) => Math.abs(q.at.x - s.x) < 2 && Math.abs(q.at.y - s.y) < 2);
@@ -466,6 +500,25 @@ export function actLive(a, state, at = Date.now(), seen = null) {
466
500
  * (#4415: nothing keeps a caller from the Help desk; the ride resumes when the call is over). Working or a new turn do
467
501
  * not end it (it is where they choose to be); clearing it, a new office_set or its end do.
468
502
  */
503
+ /**
504
+ * #4503: the vehicle whose seat names `name` as its `worker`, while they are working (any other state, a call above
505
+ * all, is null: they go where that state sends them, the Help desk for a call, as anyone does); else null. Here, not in
506
+ * fleet-office-vehicles.js: a tab opened before an upgrade may keep that module, and a named import it lacks would stop
507
+ * this one linking (#4505 review). The riders' `waitingFor` is optional for the same reason (`p.waitingFor ?`).
508
+ */
509
+ export const workVehicleOf = (vehicles, name, state) => (state === "working" ? (vehicles.find((v) => v.seats.some((s) => s.worker === name)) || {}).id ?? null : null);
510
+ /**
511
+ * #4504: what the card's pose preview offers — every pose a character set may draw, walking by direction. Here, not in
512
+ * fleet-office-pack.js: a tab opened before an upgrade may keep that module, and a named import it lacks would stop this
513
+ * one linking (#4505/#4508 review).
514
+ */
515
+ export const PREVIEW_POSES = ["idle", "working", "paused", "needs", "walkDown", "walkUp", "walkSide", "walkLeft", "eat", "pat", "dragged", "stand"];
516
+ const PREVIEW_HEADINGS = { walkDown: { dx: 0, dy: 1 }, walkUp: { dx: 0, dy: -1 }, walkSide: { dx: 1, dy: 0 }, walkLeft: { dx: -1, dy: 0 } };
517
+ /** A look showing `pose` in place (a walking direction walks on the spot); a set without that strip shows its own pose. */
518
+ export function previewLook(look, pose) {
519
+ const heading = PREVIEW_HEADINGS[pose];
520
+ return heading ? { ...look, pose: "walk", heading } : { ...look, pose, basePose: look.pose };
521
+ }
469
522
  export const rideLive = (a, state, at = Date.now()) => !!a && !!a.ride && at < a.until && !ASLEEP.has(state) && !CALLING.has(state);
470
523
  /** How far beside the person an agent going to them stands. */
471
524
  const ACT_BESIDE = 48;
@@ -536,6 +589,11 @@ export function officeBubbleAt(hits, x, y, minSize = 0) {
536
589
  export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false, defer = null, bubbleHits = null) {
537
590
  const sk = p.skin;
538
591
  const ls = layerScale(a, p.L.width, p.L.height);
592
+ // M-3665: the view's CSS zoom (a is bitmap px a unit: the zoom × the device ratio, Prism #4423). Below TAG_READ_K what must
593
+ // stay readable is drawn larger: the offline mark readScale times (its size at TAG_READ_K), a caller's tag callerScale.
594
+ const zk = a / ((env && env.ratio) || 1), readScale = zk < TAG_READ_K ? TAG_READ_K / zk : 1;
595
+ // A caller's tag at its full size (1×: the leader's call, "who needs you at a glance"); other floors stay at TAG_READ_K.
596
+ const callerScale = zk < 1 ? 1 / zk : 1;
539
597
  // Zones zoomed in past the layers' budget (a big pack): the layer would be coarser than the screen and the picture,
540
598
  // so the background and foreground are drawn from their pictures instead (only the part on screen is rasterised).
541
599
  const direct = !!p.zones && ls < a - 1e-6;
@@ -666,10 +724,21 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
666
724
  // A pat shows the set's `pat` strip for one full pass of it (pat.until), each pat from frame 0; a set without one keeps its pose.
667
725
  const canPat = !q.at.walking && !canEat && ms > 0 && !!p.reacts && !CALLING.has(q.look.state) && !ASLEEP.has(q.look.state) && !q.look.night;
668
726
  const patted = canPat ? patLook(posed, p.reacts.get(q.look.name), t) : null;
669
- const look = q.at.walking ? { ...q.look, pose: "walk", heading: q.at.heading }
727
+ // #4503: working but not typing — at a standing desk (its seat's standFacing), or waiting for their train (facing
728
+ // where it stops) — they stand: their walk strip's first frame, that way.
729
+ const track = !q.at.walking && !q.at.riding && posed.pose === "working" && p.waitingFor ? p.waitingFor(q.look.name) : null;
730
+ const stand = q.at.walking || q.at.riding || posed.pose !== "working" ? null
731
+ : track ? (track.x !== q.at.x || track.y !== q.at.y ? { dx: track.x - q.at.x, dy: track.y - q.at.y } : null)
732
+ : q.d.seat && q.d.seat.standFacing && q.at.x === q.d.seat.x && q.at.y === q.d.seat.y ? STAND_FACING[q.d.seat.standFacing] : null;
733
+ const look0 = q.at.walking ? { ...q.look, pose: "walk", heading: q.at.heading }
670
734
  : canEat ? { ...posed, pose: "eat", basePose: posed.pose }
671
- : patted || posed;
672
- sk.drawCharacter(ctx, box, look, ms, env);
735
+ : patted || (stand ? { ...posed, pose: "walk", heading: stand } : posed);
736
+ // #4504: the card's pose preview (this viewer's own): the picked pose in place, from its first frame (`clip`:
737
+ // Replay starts it again). Never over a call: a caller shows that they call, preview or not.
738
+ const pv = p.preview && p.preview.current;
739
+ const previewing = pv && pv.name === q.look.name && !q.at.walking && !CALLING.has(q.look.state);
740
+ const look = previewing ? { ...previewLook(posed, pv.pose), clip: `#${pv.t0}` } : look0;
741
+ drawPerson(ctx, sk, box, look, !previewing && stand && look.pose === "walk" ? 0 : ms, env, q.at.x + 20, q.at.y - 34, readScale);
673
742
  if (canEat && eating.snackId && p.snacksById && sk.drawSnack) {
674
743
  const sdef = p.snacksById.get(eating.snackId);
675
744
  if (sdef && sdef.eat) sk.drawSnack(ctx, sdef.eat, Math.max(0, t - eating.t0), q.at.x, q.at.y, env);
@@ -705,8 +774,12 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
705
774
  const over = p.L.over || new Set();
706
775
  const pinned = (q) => q.d.key === hot || !!q.look.match;
707
776
  const crowded = (q) => over.has(q.d.area) && !pinned(q);
777
+ // M-3665 (leader's check): too far out to read (tagsOff true), a caller still says who they are on the map — their tag
778
+ // at its full size (1×), where they stand (the chip row below lists them too). Drawn after the tags, below.
779
+ const beaconOn = tagsOff === true && readScale > 1;
780
+ const beacon = (q) => beaconOn && CALLING.has(q.look.state);
708
781
  // A caller keeps their tag with names hidden (#4467 review): the Help desk always says who needs you.
709
- const tagged = (q) => pinned(q) || (tagsOff === "names" && CALLING.has(q.look.state)) || !(tagsOff || over.has(q.d.area));
782
+ const tagged = (q) => !beacon(q) && (pinned(q) || (tagsOff === "names" && CALLING.has(q.look.state)) || !(tagsOff || over.has(q.d.area)));
710
783
  // Names hidden: a caller's tag is their name only; the level stays hidden (the one hovered or found keeps it).
711
784
  const tagLook = (q) => (tagsOff === "names" && !pinned(q) && q.look.badge ? { ...q.look, badge: null } : q.look);
712
785
  const keep = [...titles.map((x) => x.box), ...(env.keepClear || [])];
@@ -748,6 +821,22 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
748
821
  const tagOrder = people.filter((q) => !(live.hidden.has(q.look.name) && q.look.name !== heldName) && tagged(q))
749
822
  .map((q, i) => ({ q, i, rank: pinned(q) ? 0 : q.at.walking ? 2 : 1 })).sort((x, y) => x.rank - y.rank || x.i - y.i);
750
823
  for (const { q, rank } of tagOrder) place(q.at.x, q.at.y, tagLook(q), FULL_TRIES, rank === 0);
824
+ // The callers' tags in that mode (above), as the tags are placed: the box scaled about where they stand so it reads at
825
+ // its full size, never under an open card, clear of the kept-clear controls and of each other (there, else a row
826
+ // lower), registered (bubbles keep off it); their level left out. None clear: left to their chip in the row.
827
+ if (beaconOn) for (const q of people) {
828
+ if (!CALLING.has(q.look.state) || live.hidden.has(q.look.name) || offView(q.at)) continue;
829
+ const k = callerScale, look = { ...q.look, badge: null }, sc = (b) => ({ x: q.at.x + (b.x - q.at.x) * k, y: q.at.y + (b.y - q.at.y) * k, w: b.w * k, h: b.h * k });
830
+ for (const dy of [0, TAG_ROW]) {
831
+ const box = sc(tagBox(ctx, q.at.x, q.at.y + dy, look.label, false, look.fit));
832
+ if (covered(box) || touches(box)) continue;
833
+ ctx.save(); ctx.transform(k, 0, 0, k, q.at.x * (1 - k), q.at.y * (1 - k));
834
+ sk.drawTag(ctx, q.at.x, q.at.y + dy, look, env, false);
835
+ ctx.restore();
836
+ tags.push(box); taken.push(box);
837
+ break;
838
+ }
839
+ }
751
840
  // A furniture item's own name (#2574: an NPC drawn as furniture), tagged like a person; none on a tile too small to read.
752
841
  // #2698: an item hiding its people carries their tags too, in one row at its tag point (its own first; each keeps
753
842
  // its place in the row while another's tag is left out), and their bubbles, over its picture. The tags drawn are
@@ -781,7 +870,7 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
781
870
  place(q.at.x, q.at.y, q.look, [[0, true], [COMPACT_ROW, true]]);
782
871
  }
783
872
  } else {
784
- for (const d of p.desks) { const look = p.looks.get(d.key); sk.drawCharacter(ctx, d, actPosed(p, look), ms, env); speakers.push({ look, x: d.x + 58, y: d.y + 12, area: p.roomOf.get(d.key) ?? null }); }
873
+ for (const d of p.desks) { const look = p.looks.get(d.key); drawPerson(ctx, sk, d, actPosed(p, look), ms, env, d.x + d.w - 14, d.y + 14, readScale); speakers.push({ look, x: d.x + 58, y: d.y + 12, area: p.roomOf.get(d.key) ?? null }); }
785
874
  blit(p.layers.front);
786
875
  // Tags left out of the layer: the hovered desk's front again, with its tag.
787
876
  const hd = tagsOff && hot ? p.desks.find((d) => d.key === hot) : null;
@@ -819,6 +908,11 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
819
908
  // Speech bubbles: a short line for the state, now and then (typed out; whole at once when still), placed so no two
820
909
  // overlap (placeBubbles; #2431).
821
910
  const bubbles = [], rp = p.reply, tSaid = Date.now(), replies = [];
911
+ // M-3743: the part of the scene on screen (the canvas, in this part's units, 8 bitmap px in): a bubble stays inside it,
912
+ // its tail still at the speaker (bubbleBox's `fit`; a speaker near an edge — a rider along the map's rim — had its
913
+ // bubble cut off). All offices: the whole canvas too (the bubbles are drawn after every tile, unclipped).
914
+ const cw = ctx.canvas && ctx.canvas.width, chh = ctx.canvas && ctx.canvas.height, edge = 8 / a;
915
+ const fit = cw > 0 && chh > 0 ? { l: -ox / a + edge, r: (cw - ox) / a - edge, t: -oy / a + edge, b: (chh - oy) / a - edge } : null;
822
916
  for (let sp of speakers) {
823
917
  if (sp.look.dim || sp.look.pose === "away") continue;
824
918
  // Talk "Over their head": a live reply, in full (wrapped), in place of the state's line.
@@ -840,9 +934,10 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
840
934
  // M-3533 R2c (Lumen): a room's own characters stand taller than the style's figures; their bubble stays inside the
841
935
  // area's box, as a figure's does (the Fleet's own office is unchanged).
842
936
  const ar = b && sk.ownCharacters && p.zones && sp.area != null ? p.L.areas && p.L.areas[sp.area] : null;
843
- 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) }; }
937
+ if (ar && ar.rect) { const bx = bubbleBox(ctx, sp.x, sp.y, b.text, 0, false, fit), min = ar.rect.y + BUBBLE_IN_AREA; if (bx.y < min) sp = { ...sp, y: sp.y + (min - bx.y) }; }
844
938
  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 } : {}),
845
- 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 });
939
+ box: bubbleBox(ctx, sp.x, sp.y, b.text, 0, false, fit), ...(CALLING.has(sp.look.state) ? { flipBox: bubbleBox(ctx, sp.x, sp.y, b.text, 0, true, fit) } : {}), tail: { x: sp.x, y: sp.y }, sp, b,
940
+ boxAt: ((at) => (dy, flip) => bubbleBox(ctx, at.x, at.y, b.text, -dy, flip, fit))(sp) });
846
941
  }
847
942
  // A crowded area speaks less (thinBubbles: calls, then work, a few at most); no bubble covers a name tag. `defer`
848
943
  // (All offices): drawn after every tile, unclipped, so a bubble at a tile's edge is whole.
@@ -854,15 +949,26 @@ export function drawPart(ctx, p, a, ox, oy, ms, still, hot, env, tagsOff = false
854
949
  const inArea = (sp, text, dy, flip) => {
855
950
  const ar = sk.ownCharacters && p.zones && sp.area != null ? p.L.areas && p.L.areas[sp.area] : null;
856
951
  if (!ar || !ar.rect || !dy) return dy;
857
- const over = ar.rect.y + BUBBLE_IN_AREA - bubbleBox(ctx, sp.x, sp.y, text, -dy, flip).y;
952
+ const over = ar.rect.y + BUBBLE_IN_AREA - bubbleBox(ctx, sp.x, sp.y, text, -dy, flip, fit).y;
858
953
  return over > 0 ? Math.max(0, dy - over) : dy;
859
954
  };
860
- const say = () => { T(); const tails = []; for (const { sp, b, dy: lifted, flip = false } of placed) {
861
- const text = [...b.text].slice(0, b.shown).join(""), dy = inArea(sp, b.text, lifted, flip);
862
- sk.drawBubble(ctx, sp.x, sp.y, text, env, -dy, flip);
863
- 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)) }); }
955
+ // The box a tail covers: the skin's own (from its foot to the speaker, M-3743), else the strip under the speaker (an older skin).
956
+ const tailOf = (sp, box) => box.tail || (box.below ? { x: sp.x - 1, y: sp.y, w: 9, h: Math.max(0, box.y - sp.y) } : { x: sp.x - 1, y: box.y + box.h, w: 9, h: Math.max(0, sp.y - (box.y + box.h)) });
957
+ // M-3743 (#4474 review): checked again where each is drawn (kept on screen, and in its area), in placing order: none over
958
+ // another's box or tail, or a name tag. A page still holding an older fleet-office-zones.js places `box` moved by dy (it
959
+ // knows no boxAt), and two boxes kept on screen could meet; with the current one this keeps every bubble it placed.
960
+ const shown = [], held = [...tags];
961
+ for (const it of placed) {
962
+ const flip = it.flip || false, dy = inArea(it.sp, it.b.text, it.dy, flip), box = bubbleBox(ctx, it.sp.x, it.sp.y, it.b.text, -dy, flip, fit), tl = tailOf(it.sp, box);
963
+ if (held.some((o) => overlaps(o, box) || overlaps(o, tl))) continue;
964
+ held.push(box, tl); shown.push({ ...it, dy, flip });
965
+ }
966
+ const say = () => { T(); const tails = []; for (const { sp, b, dy, flip } of shown) {
967
+ const text = [...b.text].slice(0, b.shown).join("");
968
+ sk.drawBubble(ctx, sp.x, sp.y, text, env, -dy, flip, fit);
969
+ if (text) tails.push(tailOf(sp, bubbleBox(ctx, sp.x, sp.y, text, -dy, flip, fit)));
864
970
  if (bubbleHits && text) {
865
- const box = bubbleBox(ctx, sp.x, sp.y, text, -dy, flip);
971
+ const box = bubbleBox(ctx, sp.x, sp.y, text, -dy, flip, fit);
866
972
  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 } });
867
973
  }
868
974
  }
@@ -1125,6 +1231,15 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1125
1231
  // M-3539: the phone's zone chips scroll sideways when they do not fit (English); a fade at the side there is more
1126
1232
  // (data-more-left / data-more-right) says so.
1127
1233
  const pillsRef = useRef(null);
1234
+ // M-3665 (leader's check): the zoomed-out name row scrolls sideways; while there is more, its edge fades (as the pills).
1235
+ const desksRef = useRef(null);
1236
+ const desksCue = () => {
1237
+ const e = desksRef.current;
1238
+ if (!e || typeof e.toggleAttribute !== "function") return;
1239
+ const more = e.scrollWidth - e.clientWidth;
1240
+ e.toggleAttribute("data-more-left", more > 1 && e.scrollLeft > 1);
1241
+ e.toggleAttribute("data-more-right", more > 1 && e.scrollLeft < more - 1);
1242
+ };
1128
1243
  const pillsCue = () => {
1129
1244
  const e = pillsRef.current;
1130
1245
  if (!e || typeof e.toggleAttribute !== "function") return;
@@ -1494,6 +1609,8 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1494
1609
  // M-3547 / M-3556: off only for reduced motion — one line under Drag and pat in Display options says so (no override).
1495
1610
  const playStillOff = playOffForMotion({ on: playOn, still, zones, overview, layout: !!layout, shared }) && !carouselPick;
1496
1611
  const hold = useMemo(() => createHold(), []), reacts = useRef(new Map()), walkNow = useRef(null), holdTimer = useRef(null);
1612
+ // #4504: the card's pose preview — { name, pose, t0 } while one is picked (this viewer's own, never stored or sent).
1613
+ const preview = useRef(null), [, setPreviewRev] = useState(0);
1497
1614
  // M-3432 (#4255): custom snacks from the active skin pack (client-local, only when play is enabled).
1498
1615
  const snacks = useMemo(() => createSnacks(), []);
1499
1616
  const snackDragCtrl = useMemo(() => createSnackDrag(), []);
@@ -1530,7 +1647,11 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1530
1647
  if (fresh) riders.clear();
1531
1648
  if (vehicles.length) {
1532
1649
  const byId = new Map(vehicles.map((v) => [v.id, v])), wall = Date.now(), here = desksOf(L);
1533
- const wants = new Map(here.map((d) => { const a = actsHere.get(d.node.name); return [d.node.name, !d.night && rideLive(a, d.node.state, wall) ? a.ride : null]; }));
1650
+ // An act's ride first; else (no other act going) a worker's seat on a vehicle while working (#4503).
1651
+ const wants = new Map(here.map((d) => {
1652
+ const { name, state } = d.node, a = actsHere.get(name);
1653
+ return [name, d.night ? null : rideLive(a, state, wall) ? a.ride : actLive(a, state, wall, actSeen.current) ? null : workVehicleOf(vehicles, name, state)];
1654
+ }));
1534
1655
  const r = riders.step({ wants, vehicles: byId, wall, posOf: (n) => walkers.at(n, t), homeOf: (n) => (here.find((d) => d.node.name === n) || {}).seat || null,
1535
1656
  sinceOf: (n) => { const a = actsHere.get(n); return a && a.ride && typeof a.since === "number" ? a.since : null; },
1536
1657
  urgent: (n) => { const d = here.find((x) => x.node.name === n); return !!d && CALLING.has(d.node.state); } });
@@ -1660,6 +1781,11 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1660
1781
  * the whole view on its data-k/x/y), the zoom's percentage, the overlay, the tooltip.
1661
1782
  */
1662
1783
  const mark = () => {
1784
+ // M-3665: too far out to read the name tags (TAG_READ_K) in one office, the stage says so: the people's names then
1785
+ // show as a row of chips over its foot (the CSS: a phone's whole office, or a desk zoomed out), each opening their card.
1786
+ // #4466 Hide names (data-names-off on the same element): the row keeps only the callers, as the tags do.
1787
+ if (ooRef.current && typeof ooRef.current.toggleAttribute === "function") ooRef.current.toggleAttribute("data-tags-off", !overview && view0().k < TAG_READ_K);
1788
+ desksCue();
1663
1789
  const v = view0(), m = miniViewRef.current;
1664
1790
  if (m) {
1665
1791
  const f = miniFrame(v, size, L.width, L.height);
@@ -1880,7 +2006,7 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1880
2006
  const parts = tiles.map((tl, i) => ({ ...partOf(tl.L, tileLooks[i], tl.skin, tl.zones, tl.walkers, tl.flights), night, key: tl.key, prefix: tl.prefix, tile: arranged.tiles[i], ups: ups.current, levelsOn: !!(lv && lv.enabled), levels: wordsOf(tl.skin) }));
1881
2007
  scene.current = { ...base, overview: true, parts, lay: arranged };
1882
2008
  } else {
1883
- scene.current = { ...base, overview: false, part: { ...partOf(L, looks, skin, zones, walkers, flights), ghosts, night, mail, acts: actsHere, actSeen: actSeen.current, ups: ups.current, levelsOn: !!(lv && lv.enabled), levels: wordsOf(skin), reacts: reacts.current, riding: riders.riding,
2009
+ scene.current = { ...base, overview: false, part: { ...partOf(L, looks, skin, zones, walkers, flights), ghosts, night, mail, acts: actsHere, actSeen: actSeen.current, ups: ups.current, levelsOn: !!(lv && lv.enabled), levels: wordsOf(skin), reacts: reacts.current, preview, riding: riders.riding, waitingFor: riders.waitingFor,
1884
2010
  hold: play ? hold : null, seatDrop: seatDropRef,
1885
2011
  snacks: play ? snacks : null, snacksById, ownArea, snackDrop: snackDropRef, onSnackClaim, onSnacksChanged: () => walkNow.current?.() } };
1886
2012
  }
@@ -1892,7 +2018,7 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1892
2018
  const s = scene.current;
1893
2019
  if (!s) return false;
1894
2020
  placeCard();
1895
- const { ctx, BW, BH, env } = s;
2021
+ const { ctx, BW, BH } = s, env = { ...s.env, ratio: s.ratio }; // ratio: drawPart's CSS zoom is a / ratio (Prism #4423)
1896
2022
  s.bubbleHits = [];
1897
2023
  const seenClips = ms > 0 ? new Set() : null;
1898
2024
  const clocked = (prefix) => (seenClips
@@ -1914,7 +2040,8 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
1914
2040
  s.part.cover = r.width > 0 && r.height > 0 ? { x: (r.left - c.left) * s.ratio, y: (r.top - c.top) * s.ratio, w: r.width * s.ratio, h: r.height * s.ratio } : null;
1915
2041
  } else s.part.cover = null;
1916
2042
  const e0 = clocked(""), kc = keepClearOf(canvasRef.current, v);
1917
- const moved = drawPart(ctx, s.part, a, ox, oy, ms, still, tipNow.current, kc.length ? { ...e0, keepClear: kc } : e0, s.namesOff ? "names" : false, null, s.bubbleHits);
2043
+ // M-3665 (too far out to read: no tags) and #4466 (Hide names: callers keep theirs), as the All-offices tiles do.
2044
+ const moved = drawPart(ctx, s.part, a, ox, oy, ms, still, tipNow.current, kc.length ? { ...e0, keepClear: kc } : e0, v.k < TAG_READ_K || (s.namesOff ? "names" : false), null, s.bubbleHits);
1918
2045
  if (seenClips) clipClocks.current.prune(seenClips);
1919
2046
  return drawDialogue(ctx, s, ms) || moved;
1920
2047
  }
@@ -2080,6 +2207,8 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
2080
2207
  area: tl.zones ? areaName(d.area) : roomOf(tl.L, d), skin: tl.skin, look: lk && lk.get(d.key) })) : []; })
2081
2208
  : desksOf(L).map((d) => ({ key: d.key, node: d.node, box: d, office: null, dot: zones ? d.seat : { x: d.x + d.w / 2, y: d.y + d.h / 2 },
2082
2209
  area: zones ? areaName(d.area) : roomOf(L, d), skin, look: looks.get(d.key) }));
2210
+ // The name row's fade (desksCue) follows who is in it and how wide the stage is, as well as the zoom (mark).
2211
+ useEffect(() => { desksCue(); }, [people.length, size.w, namesOff]);
2083
2212
  // #2861: who the dialogue box may speak for — everyone drawn here (All offices: the first tile they are in), with what
2084
2213
  // draws them; null while it is off (draw() then draws nothing of it).
2085
2214
  replyRef.current = tmode === "bubble" ? { chat, draw: chatUi.drawReply, style: chatUi.replyStyle, pace: chatUi.readPace, read: readMode } : null;
@@ -2557,6 +2686,8 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
2557
2686
  cardDesk.current = cardOf ? { name: cardOf.node.name, state: cardOf.node.state, box: cardOf.box, walks: zones && !overview, skin: cardOf.skin } : null;
2558
2687
  useEffect(() => { if (card && !cardOf) setCard(null); }, [card, !!cardOf]);
2559
2688
  useEffect(() => { walkNow.current?.(); }, [cardOf ? cardOf.node.name : null]); // stop there now; walk again once it closes
2689
+ // A preview ends with its card, or when the card turns to someone else.
2690
+ useEffect(() => { if (preview.current && (!cardOf || preview.current.name !== cardOf.node.name)) { preview.current = null; setPreviewRev((x) => x + 1); loop.current?.wake(); } }, [cardOf ? cardOf.node.name : null]);
2560
2691
  const closeCard = () => {
2561
2692
  setCard(null);
2562
2693
  const from = cardFrom.current; cardFrom.current = null;
@@ -2737,7 +2868,8 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
2737
2868
  const displayMenu = (opener) => html`<div class=${`oo-display${roomGear ? " oo-display-zoom" : ""}`} ref=${displayRef}>${opener}
2738
2869
  ${dispOpen ? html`<div class="oo-display-pop" role="group" aria-label=${to("display")} ref=${fitPop}><h3 class="oo-display-h">${to("display")}</h3>
2739
2870
  <div class="oo-bar oo-display-list">${optionItems}</div></div>` : null}</div>`;
2740
- return html`<div class=${`oo${fs ? ` fs ${fs}` : ""}${compact ? " phone" : ""}${dockShown ? " has-dialogue" : ""}${sidePanel && !phone ? " ot-side" : ""}`} ref=${ooRef}>
2871
+ return html`<div class=${`oo${fs ? ` fs ${fs}` : ""}${compact ? " phone" : ""}${dockShown ? " has-dialogue" : ""}${sidePanel && !phone ? " ot-side" : ""}`} ref=${ooRef}
2872
+ data-names-off=${namesOff ? "" : undefined}>
2741
2873
  ${folded ? null : html`<div class="oo-bar oo-bar-row">
2742
2874
  <div class="oo-bar-scope">${scopeItems}</div>
2743
2875
  <div class="oo-bar-actions">${actionItems}
@@ -2802,16 +2934,22 @@ export function Office({ view: given, traffic, q = "", lease, onOpen, assetUrl,
2802
2934
  reacts.current.set(n, { kind, t0, ...(patSt ? { until: t0 + Math.max(PLAY.REACT_MS, stripDurationMs(patSt)) } : {}) });
2803
2935
  loop.current?.wake(); if (store.tellOn(n)) void store.tell(n, kind);
2804
2936
  } : null}
2937
+ preview=${zones && !overview && skin && skin.pack ? {
2938
+ poses: PREVIEW_POSES,
2939
+ pose: preview.current && preview.current.name === cardOf.node.name ? preview.current.pose : "",
2940
+ set: (pose) => { preview.current = pose ? { name: cardOf.node.name, pose, t0: now() } : null; setPreviewRev((x) => x + 1); loop.current?.wake(); },
2941
+ replay: () => { if (preview.current) { preview.current = { ...preview.current, t0: now() }; loop.current?.wake(); } },
2942
+ } : null}
2805
2943
  tell=${play ? { on: store.tellOn(cardOf.node.name), set: (v) => { store.saveTell(cardOf.node.name, v); setTellRev((x) => x + 1); } } : null}
2806
2944
  packCard=${cardOf.skin?.pack?.card || null}
2807
2945
  picture=${typeof cardOf.skin?.picture === "function" ? cardOf.skin.picture : null}
2808
2946
  portrait=${cardOf.skin?.pack ? portraitSrc(cardOf.skin.pack, { agent: cardOf.node.name, state: cardOf.node.state }) : null}
2809
2947
  packScale=${cardOf.skin?.pack?.scale || 2} action=${cardAction ? cardAction(cardOf.node.name) : null}
2810
2948
  photo=${cardPhoto ? cardPhoto(cardOf.node.name) : null} />` : null}
2811
- <ul class="oo-desks" aria-label=${to("desks")}>${people.map((d) => {
2949
+ <ul class="oo-desks" ref=${desksRef} onScroll=${desksCue} aria-label=${to("desks")}>${people.map((d) => {
2812
2950
  const nt = nodeText(d.node), cap = nowOf(d.node), where = d.office ? ` · ${d.office}` : "";
2813
2951
  const full = words ? `${nt.primary} — ${stateOf(d.node)}` : nt.full;
2814
- return html`<li key=${d.key}>${d.node.i
2952
+ return html`<li key=${d.key} data-call=${CALLING.has(d.node.state) ? "" : undefined}>${d.node.i
2815
2953
  ? html`<button type="button" class="oo-desk" data-name=${d.node.name} data-key=${d.key} data-slot=${Number.isInteger(d.box?.slot) ? d.box.slot : undefined} aria-label=${`${full}${where}${cap ? ` · ${cap}` : ""}.`} aria-haspopup="dialog"
2816
2954
  onFocus=${() => setTip(d.key)} onBlur=${() => setTip(null)} onClick=${() => { cardFrom.current = d.key; setCard((cur) => (cur === d.key ? null : d.key)); }}>${nt.primary}</button>`
2817
2955
  : html`<span class="oo-desk" data-name=${d.node.name} data-key=${d.key}>${full}</span>`}</li>`;
@@ -131,7 +131,7 @@ function HtmlPreview({ f }) {
131
131
  : blocked ? null
132
132
  : html`<button type="button" class="btn btn-sm btn-primary" onClick=${() => void run(false)}><${Icon} name="play" size=${14} />${t("taskfiles.preview")}</button>`}
133
133
  </div>
134
- <div class="pv-note tf-note" role="status">${note || (blocked ? here.reason : "")}</div>
134
+ <div class="pv-note tf-note" role="status">${note || (blocked ? here.reason : "")}${!note && blocked && here.fix ? html` <a class="pv-fix" href=${here.fix.href}>${here.fix.label}</a>` : null}</div>
135
135
  ${going && !P.bannerAcked() ? html`<div class="pv-banner" role="note"><span class="pv-banner-text">${P.banner()}</span>
136
136
  <button type="button" class="btn btn-sm btn-ghost pv-ack" title=${P.bannerAckTitle()} onClick=${() => { P.ackBanner(); redraw((n) => n + 1); }}>${P.bannerAckLabel()}</button></div>` : null}
137
137
  <div class="pv-holder tf-holder" ref=${holder}></div>
@@ -5,7 +5,9 @@ import { register, t } from "/assets/app-i18n.js";
5
5
 
6
6
  register("hubAdminRooms", {
7
7
  en: {
8
- adminOnly: "Right now only Hub administrators can start rooms.",
8
+ adminOnly: "No one else is on this list yet.",
9
+ roleCreators: "The Hub's first administrator and people with an active Create rooms role permission can also create rooms. Manage role grants in Roles.",
10
+ independentGrants: "Removing someone from this list does not remove their role grant, and removing a role grant does not remove them from this list.",
9
11
  colPeople: "People", colAgents: "Agents", colLast: "Last activity", colState: "Status",
10
12
  none: "No rooms yet.",
11
13
  rowMenu: "More for {0}",
@@ -15,7 +17,9 @@ register("hubAdminRooms", {
15
17
  joined: "You are a room manager of “{0}” now. A line in the room says so.",
16
18
  },
17
19
  "zh-TW": {
18
- adminOnly: "目前只有 Hub 管理員可以開房間。",
20
+ adminOnly: "名單上還沒有其他人。",
21
+ roleCreators: "Hub 的第一位管理員與目前角色授予「開房間」權限的人,也可以開房間。角色權限請至「角色」管理。",
22
+ independentGrants: "從這份名單移除某人,不會移除他的角色授權;移除角色授權,也不會將他從這份名單移除。",
19
23
  colPeople: "人數", colAgents: "Agent 數", colLast: "最後活動", colState: "狀態",
20
24
  none: "還沒有房間。",
21
25
  rowMenu: "{0} 的更多動作",
@@ -1,5 +1,5 @@
1
1
  // Hub rooms, Administration → Rooms (docs/design/hub-rooms-ux.md section 11), for the Hub administrator:
2
- // - 「誰可以開房間」: people and teams who may start rooms besides the administrators (empty: administrators only);
2
+ // - 「誰可以開房間」: people and teams who may start rooms besides the administrators (roles are an independent grant);
3
3
  // saved as soon as it changes; everyone can always start a one-to-one chat.
4
4
  // - 「所有房間」: every group room's name, people, agents, managers, last activity and status, never its content. Each
5
5
  // row's menu: 加入自己成為房間管理 (the room then shows a line saying so) and 封存 (after a confirmation).
@@ -54,9 +54,11 @@ export function AdminRooms({ client = hubClient() } = {}) {
54
54
  ${error ? html`<p class="note" role="alert">${error}</p>` : null}
55
55
  ${note ? html`<p class="note" role="status">${note}</p>` : null}
56
56
  <section class="form hub-admin-creators"><h3>${hroom("whoCanCreate")}</h3>
57
+ <p class="note">${ha("roleCreators")}</p>
57
58
  <${RoomPicker} client=${client} id="hubRoomCreators" kinds=${["person", "team"]} label=${hroom("addPeopleOrTeams")} placeholder=${hroom("addPeopleOrTeams")}
58
59
  picked=${creators} onChange=${(next) => { if (!busy) void saveCreators(next); }} />
59
60
  ${creators.length ? null : html`<p class="note">${ha("adminOnly")}</p>`}
61
+ <p class="note">${ha("independentGrants")}</p>
60
62
  <p class="note">${hroom("everyoneDirect")}</p>
61
63
  </section>
62
64
  <section class="hub-admin-all-rooms"><h3>${hroom("allRooms")}</h3>
@@ -15,13 +15,13 @@ export const groupSearchV1 = true;
15
15
  export const groupSearchIdV1 = true;
16
16
  register("hubGroupSearch", {
17
17
  en: {
18
- label: "Find a group", placeholder: "Start of the group's name, e.g. eng", hint: "Type at least 2 characters.",
18
+ label: "Find an AD group", placeholder: "Start of the AD group's name, e.g. eng", hint: "Type at least 2 characters.",
19
19
  searching: "Searching…", none: "No group starts with “{0}”.", more: "More groups match. Type more of the name.",
20
20
  limited: "Too many searches. Try again in {0} seconds.", unknown: "The directory could not be searched just now. Try again, or add the group by its distinguished name.",
21
21
  invalid: "Use 2 to 64 characters.", add: "Add {0}", addShort: "Add", added: "Added",
22
22
  },
23
23
  "zh-TW": {
24
- label: "尋找群組", placeholder: "群組名稱的開頭,例如 eng", hint: "請至少輸入 2 個字。",
24
+ label: "尋找 AD 群組", placeholder: "AD 群組名稱的開頭,例如 eng", hint: "請至少輸入 2 個字。",
25
25
  searching: "搜尋中…", none: "沒有以「{0}」開頭的群組。", more: "還有更多群組符合。請多輸入幾個字。",
26
26
  limited: "搜尋太多次了。請 {0} 秒後再試。", unknown: "目前無法搜尋目錄。請再試一次,或用辨別名稱新增群組。",
27
27
  invalid: "請輸入 2 到 64 個字。", add: "新增 {0}", addShort: "新增", added: "已新增",
@@ -0,0 +1,49 @@
1
+ // S-257 step 1 (M-3828): turn Hub notifications on, and the first time they go on on this device, say what keeps them
2
+ // coming once every Hub window is closed — the installed app left running, or started at sign-in (S-255).
3
+ // Its own module and its own strings (Prism #4548): a tab that still holds an older hub-room-notify.js or
4
+ // hub-room-strings.js (cached by URL) loads this new file fresh, so nothing here depends on what those files export.
5
+ import { setNotify } from "/assets/app-needs.js";
6
+ import { installStore } from "/assets/app-install.js";
7
+ import { confirmDialog } from "/assets/ui-confirm.js";
8
+ import { register, t } from "/assets/app-i18n.js";
9
+
10
+ register("hubkeep", {
11
+ en: {
12
+ title: "Keep notifications coming",
13
+ tab: "Notifications arrive while a Hub tab is open, even in the background; closing every Hub tab stops them. To keep them coming, install the Hub as an app (the button beside the bell) and leave it running, minimized is fine. In Edge or Chrome, the app's settings also offer \"Start app when you sign in\".",
14
+ app: "Notifications arrive while this app is open, even minimized; quitting it stops them. Leave it running. In Edge or Chrome, the app's settings offer \"Start app when you sign in\", so it is there after a restart.",
15
+ noInstall: "Notifications arrive while a Hub tab is open, even in the background; closing every Hub tab stops them. Keep a Hub tab open. This Hub can't be installed as an app yet: its address doesn't have a certificate this browser trusts yet (the button beside the bell says more).",
16
+ ok: "OK",
17
+ },
18
+ "zh-TW": {
19
+ title: "持續收到通知",
20
+ tab: "Hub 分頁開著時(在背景也可以)會收到通知;關掉所有 Hub 分頁後就不會再通知。想一直收到,可以把 Hub 安裝成應用程式(鈴鐺旁的按鈕)並讓它保持開著,縮到最小也可以。在 Edge 或 Chrome 的應用程式設定中,也可以開啟「登入時啟動應用程式」。",
21
+ app: "這個應用程式開著時(縮到最小也可以)會收到通知;把它關掉就不會再通知。請讓它保持開著。在 Edge 或 Chrome 的應用程式設定中,可以開啟「登入時啟動應用程式」,重新開機後也會自動開啟。",
22
+ noInstall: "Hub 分頁開著時(在背景也可以)會收到通知;關掉所有 Hub 分頁後就不會再通知。請讓一個 Hub 分頁保持開著。這個 Hub 目前還不能安裝成應用程式:它的網址還沒有這個瀏覽器信任的憑證(鈴鐺旁的按鈕有說明)。",
23
+ ok: "知道了",
24
+ },
25
+ });
26
+ const tk = (k) => t(`hubkeep.${k}`);
27
+
28
+ const KEEP_HINT_KEY = "agend_hub_notify_kept";
29
+ /** Shown on this page already (when the browser's storage refuses, it is still shown once per page). */
30
+ let shownHere = false;
31
+ /** Tests only (a new page starts with nothing shown); nothing in the app calls it. */
32
+ export function forgetKeepHint() { shownHere = false; }
33
+ function firstTime() {
34
+ if (shownHere) return false;
35
+ shownHere = true;
36
+ try { if (localStorage.getItem(KEEP_HINT_KEY) === "1") return false; localStorage.setItem(KEEP_HINT_KEY, "1"); } catch { /* this page only */ }
37
+ return true;
38
+ }
39
+
40
+ /** Notify on or off (app-needs.js setNotify); the first "on" on this device also says how to keep notifications coming. */
41
+ export async function setHubNotify(on) {
42
+ const state = await setNotify(on);
43
+ if (!on || state !== "on" || !firstTime()) return state;
44
+ // In the app: leave it running. A Hub that can't be installed here (an untrusted certificate, plain http): keep a tab.
45
+ const where = installStore.get().state;
46
+ const words = where === "installed" ? "app" : where === "untrusted" || where === "insecure" ? "noInstall" : "tab";
47
+ void confirmDialog({ title: tk("title"), message: tk(words), confirmLabel: tk("ok"), notice: true });
48
+ return state;
49
+ }
@@ -3,7 +3,7 @@ import {hr} from "./hub-roles-strings.js";
3
3
  import { dateTimeText } from "/assets/clock-text.js";
4
4
  export const personKey=p=>`${p?.realm}/${p?.objectId}`;
5
5
  export const management=["fleets.manage","join.manage","roles.assign","audit.view","hub.admin"];
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"]}];
6
+ export const permissionGroups=[{key:"usingHub",permissions:["ask_agents","publish_agents","pair_fleet","rooms.create"]},{key:"theirTeam",permissions:["team.view","team.usage"]},{key:"runningHub",permissions:["fleets.manage","join.manage","roles.assign","audit.view"]}];
7
7
  const builtinNames={admin:"Administrator",manager:"Manager",member:"Member"};
8
8
  export function roleName(role,view){
9
9
  if(!role)return hr("unknownRole");
@@ -40,7 +40,7 @@ register("hubRole",{
40
40
  "start": "Starts (optional)",
41
41
  "expiry": "Expires (optional)",
42
42
  "override": "Fleet limit override (optional)",
43
- "personOnly": "A role with these can be given to people only, not to groups.",
43
+ "personOnly": "A role with these can be given to people only, not to AD groups.",
44
44
  "groupCost": "Whoever manages this AD group can change who receives the role.",
45
45
  "firstAdmin": "First administrator",
46
46
  "firstAdminHelp": "Configured on the Hub host; cannot be removed here.",
@@ -80,6 +80,7 @@ register("hubRole",{
80
80
  "ask_agents": "Chat with agents",
81
81
  "publish_agents": "Share agents",
82
82
  "pair_fleet": "Connect Fleets",
83
+ "rooms.create": "Create rooms",
83
84
  "team.view": "View team roster",
84
85
  "team.usage": "View team usage",
85
86
  "team.approve_join": "Approve Fleet connection requests",
@@ -98,13 +99,13 @@ register("hubRole",{
98
99
  "assignedTo": "Assigned to",
99
100
  "nobodyAssigned": "Nobody yet",
100
101
  "peopleCount": "{0} people",
101
- "groupCount": "{0} groups",
102
+ "groupCount": "{0} AD groups",
102
103
  "builtin": "Built-in",
103
104
  "assignNamed": "Assign {0}",
104
- "assignPeople": "Assign people or groups",
105
+ "assignPeople": "Assign people or AD groups",
105
106
  "backRoles": "Back to Roles",
106
107
  "editPermissions": "Edit permissions",
107
- "adminFixed": "Built-in. It always has every permission for running the Hub.",
108
+ "adminFixed": "Built-in Hub administration permissions. Creating rooms is granted separately.",
108
109
  "usingHub": "Using the Hub",
109
110
  "theirTeam": "Their team",
110
111
  "runningHub": "Running the Hub",
@@ -194,6 +195,7 @@ register("hubRole",{
194
195
  "description_ask_agents": "Ask the agents they are allowed to ask.",
195
196
  "description_publish_agents": "Share their own agents and choose who may ask them.",
196
197
  "description_pair_fleet": "Connect their own Fleet, up to the Fleet limit.",
198
+ "description_rooms.create": "Create group rooms. Removing this permission does not change existing rooms or their managers.",
197
199
  "description_team.view": "See who is on their team and who has joined.",
198
200
  "description_team.usage": "See their team’s question counts. Never what was asked.",
199
201
  "description_fleets.manage": "See every connected Fleet and disconnect one.",
@@ -202,7 +204,7 @@ register("hubRole",{
202
204
  "description_audit.view": "See who did what in this Hub. Actions only, never conversations.",
203
205
  "description_hub.admin": "Edit roles and Hub settings, including the allowed list and the recommended version.",
204
206
  "peopleCountOne": "1 person",
205
- "groupCountOne": "1 group",
207
+ "groupCountOne": "1 AD group",
206
208
  "losingPeopleOne": "1 person loses something they can do now",
207
209
  "pausingResourcesOne": "1 shared agent or Fleet will be paused",
208
210
  "unverifiedPeopleOne": "1 person could not be checked in AD",
@@ -254,7 +256,7 @@ register("hubRole",{
254
256
  "start": "開始時間(選填)",
255
257
  "expiry": "到期時間(選填)",
256
258
  "override": "Fleet 台數上限(選填)",
257
- "personOnly": "含有這些權限的角色只能指派給個人,不能指派給群組。",
259
+ "personOnly": "含有這些權限的角色只能指派給個人,不能指派給 AD 群組。",
258
260
  "groupCost": "管理這個 AD 群組的人,可以變更誰取得這個角色。",
259
261
  "firstAdmin": "第一位管理員",
260
262
  "firstAdminHelp": "由 Hub 主機設定,不能在這裡移除。",
@@ -294,6 +296,7 @@ register("hubRole",{
294
296
  "ask_agents": "和 Agent 對話",
295
297
  "publish_agents": "分享 Agent",
296
298
  "pair_fleet": "連接 Fleet",
299
+ "rooms.create": "開房間",
297
300
  "team.view": "查看團隊名單",
298
301
  "team.usage": "查看團隊用量",
299
302
  "team.approve_join": "核准連接申請",
@@ -312,13 +315,13 @@ register("hubRole",{
312
315
  "assignedTo": "已指派給",
313
316
  "nobodyAssigned": "還沒有人",
314
317
  "peopleCount": "{0} 人",
315
- "groupCount": "{0} 個群組",
318
+ "groupCount": "{0} 個 AD 群組",
316
319
  "builtin": "內建",
317
320
  "assignNamed": "指派「{0}」",
318
- "assignPeople": "指派人員或群組",
321
+ "assignPeople": "指派人員或 AD 群組",
319
322
  "backRoles": "返回角色清單",
320
323
  "editPermissions": "編輯權限",
321
- "adminFixed": "內建角色,一律擁有管理 Hub 的所有權限。",
324
+ "adminFixed": "內建的 Hub 管理權限;開房間權限另外授予。",
322
325
  "usingHub": "使用 Hub",
323
326
  "theirTeam": "所屬團隊",
324
327
  "runningHub": "管理 Hub",
@@ -408,6 +411,7 @@ register("hubRole",{
408
411
  "description_ask_agents": "向可以問的 Agent 提問。",
409
412
  "description_publish_agents": "分享自己的 Agent,並決定誰可以問。",
410
413
  "description_pair_fleet": "連接自己的 Fleet,數量不超過上限。",
414
+ "description_rooms.create": "開群組房間。移除此權限不會變更既有房間或房間管理。",
411
415
  "description_team.view": "查看團隊有哪些人,以及誰已經加入。",
412
416
  "description_team.usage": "查看團隊的提問次數,看不到提問內容。",
413
417
  "description_fleets.manage": "查看所有已連接的 Fleet,並可中斷連接。",
@@ -416,7 +420,7 @@ register("hubRole",{
416
420
  "description_audit.view": "查看誰在這個 Hub 做了什麼;只有動作,沒有對話內容。",
417
421
  "description_hub.admin": "編輯角色與 Hub 設定,包含允許清單與建議版本。",
418
422
  "peopleCountOne": "1 人",
419
- "groupCountOne": "1 個群組",
423
+ "groupCountOne": "1 個 AD 群組",
420
424
  "losingPeopleOne": "1 人會失去目前可以做的事",
421
425
  "pausingResourcesOne": "1 個分享的 Agent 或 Fleet 會暫停",
422
426
  "unverifiedPeopleOne": "1 人無法在 AD 確認",
@@ -36,7 +36,7 @@ function RolePage({view,role,busy,canEdit,canAssign,onBack,onAssign,onEdit,onDel
36
36
  const count=assignedSubjects(view,role.id).length;
37
37
  return html`<section class="hub-role-detail"><button type="button" class="btn btn-sm" disabled=${busy} onClick=${onBack}>‹ ${hr("roles")}</button><div class="hub-card-head"><h2>${roleName(role,view)} <span class="tag">${hr(["custom","carried-over"].includes(role.kind)?role.kind==="custom"?"custom":"carried":"builtin")}</span></h2>
38
38
  ${editable&&role.kind==="custom"?html`<details class="hub-role-menu"><summary>${hr("more")}</summary><button type="button" class="btn danger" disabled=${busy} onClick=${onDelete}>${hr("delete")}</button></details>`:null}</div><p>${roleDescription(role,view)}</p><p class="note">${hr("quota")}: ${role.defaultMaxFleets}</p>
39
- <${Tabs} label=${roleName(role,view)} items=${[{key:"people",label:hr("people")+" · "+count},{key:"permissions",label:hr("permissions")+" · "+hr("permissionCount",role.permissions.length,12)}]} value=${tab} disabled=${busy} onChange=${setTab}/>
39
+ <${Tabs} label=${roleName(role,view)} items=${[{key:"people",label:hr("people")+" · "+count},{key:"permissions",label:hr("permissions")+" · "+hr("permissionCount",role.permissions.length,view.permissions.length)}]} value=${tab} disabled=${busy} onChange=${setTab}/>
40
40
  ${tab==="people"?html`<${People} key=${role.id} view=${view} roleId=${role.id} busy=${busy} onOpen=${onPerson} onAssign=${canAssign?onAssign:null}/>`:html`<section class="card"><div class="hub-card-head"><h3>${hr("permissions")}</h3>${editable?html`<button type="button" class="btn" disabled=${busy} onClick=${onEdit}>${hr("editPermissions")}</button>`:null}</div>
41
41
  ${role.kind==="admin"?html`<p class="s-info">${hr("adminFixed")}</p>`:null}${role.kind==="carried-over"?html`<p class="note">${hr("inherited")}</p>`:null}<${PermissionSections} permissions=${role.permissions} readOnly=${true} administrator=${role.kind==="admin"}/></section>`}</section>`;
42
42
  }