@songsid/agend 2.4.0-alpha.3 → 2.4.0-alpha.4

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 (373) hide show
  1. package/dist/agent-cli-instructions.md +8 -4
  2. package/dist/agent-whats-new.js +7 -7
  3. package/dist/agent-whats-new.js.map +1 -1
  4. package/dist/auth-api.js +7 -1
  5. package/dist/auth-api.js.map +1 -1
  6. package/dist/backend/claude-code.d.ts +8 -0
  7. package/dist/backend/claude-code.js +11 -4
  8. package/dist/backend/claude-code.js.map +1 -1
  9. package/dist/backend/codex.js +7 -3
  10. package/dist/backend/codex.js.map +1 -1
  11. package/dist/backend/grok.d.ts +19 -0
  12. package/dist/backend/grok.js +112 -1
  13. package/dist/backend/grok.js.map +1 -1
  14. package/dist/backend/types.d.ts +10 -0
  15. package/dist/backend/types.js.map +1 -1
  16. package/dist/build-provenance.json +1 -1
  17. package/dist/channel/mcp-tools.js +2 -2
  18. package/dist/channel/mcp-tools.js.map +1 -1
  19. package/dist/child-process.d.ts +1 -0
  20. package/dist/child-process.js.map +1 -1
  21. package/dist/claude-model-observation.d.ts +71 -0
  22. package/dist/claude-model-observation.js +169 -0
  23. package/dist/claude-model-observation.js.map +1 -0
  24. package/dist/cross-instance-envelope.d.ts +4 -1
  25. package/dist/cross-instance-envelope.js +12 -7
  26. package/dist/cross-instance-envelope.js.map +1 -1
  27. package/dist/daemon.d.ts +24 -2
  28. package/dist/daemon.js +263 -35
  29. package/dist/daemon.js.map +1 -1
  30. package/dist/delivery-consumed-watch.d.ts +24 -0
  31. package/dist/delivery-consumed-watch.js +21 -10
  32. package/dist/delivery-consumed-watch.js.map +1 -1
  33. package/dist/delivery-outbox.d.ts +5 -1
  34. package/dist/delivery-outbox.js +5 -0
  35. package/dist/delivery-outbox.js.map +1 -1
  36. package/dist/fleet-manager.d.ts +11 -1
  37. package/dist/fleet-manager.js +80 -2
  38. package/dist/fleet-manager.js.map +1 -1
  39. package/dist/general-knowledge/skills/concepts/SKILL.md +16 -3
  40. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +5 -3
  41. package/dist/general-knowledge/skills/hub/SKILL.md +161 -4
  42. package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -1
  43. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +18 -7
  44. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  45. package/dist/grok-delivery-proof.d.ts +24 -0
  46. package/dist/grok-delivery-proof.js +124 -0
  47. package/dist/grok-delivery-proof.js.map +1 -0
  48. package/dist/hub/assistant/admin-types.d.ts +43 -0
  49. package/dist/hub/assistant/admin-types.js +2 -0
  50. package/dist/hub/assistant/admin-types.js.map +1 -0
  51. package/dist/hub/assistant/claude-host.d.ts +17 -0
  52. package/dist/hub/assistant/claude-host.js +300 -0
  53. package/dist/hub/assistant/claude-host.js.map +1 -0
  54. package/dist/hub/assistant/context.d.ts +3 -0
  55. package/dist/hub/assistant/context.js +7 -0
  56. package/dist/hub/assistant/context.js.map +1 -0
  57. package/dist/hub/assistant/fleet-host.d.ts +19 -0
  58. package/dist/hub/assistant/fleet-host.js +28 -0
  59. package/dist/hub/assistant/fleet-host.js.map +1 -0
  60. package/dist/hub/assistant/runner.d.ts +64 -0
  61. package/dist/hub/assistant/runner.js +239 -0
  62. package/dist/hub/assistant/runner.js.map +1 -0
  63. package/dist/hub/assistant/service.d.ts +51 -0
  64. package/dist/hub/assistant/service.js +143 -0
  65. package/dist/hub/assistant/service.js.map +1 -0
  66. package/dist/hub/assistant/store.d.ts +3 -0
  67. package/dist/hub/assistant/store.js +65 -0
  68. package/dist/hub/assistant/store.js.map +1 -0
  69. package/dist/hub/assistant/types.d.ts +60 -0
  70. package/dist/hub/assistant/types.js +2 -0
  71. package/dist/hub/assistant/types.js.map +1 -0
  72. package/dist/hub/catalog.js +22 -3
  73. package/dist/hub/catalog.js.map +1 -1
  74. package/dist/hub/client.d.ts +10 -0
  75. package/dist/hub/client.js +48 -8
  76. package/dist/hub/client.js.map +1 -1
  77. package/dist/hub/compose/member.d.ts +8 -1
  78. package/dist/hub/compose/member.js +224 -58
  79. package/dist/hub/compose/member.js.map +1 -1
  80. package/dist/hub/compose/server.d.ts +11 -1
  81. package/dist/hub/compose/server.js +68 -11
  82. package/dist/hub/compose/server.js.map +1 -1
  83. package/dist/hub/directory/admission.d.ts +15 -0
  84. package/dist/hub/directory/admission.js +56 -0
  85. package/dist/hub/directory/admission.js.map +1 -0
  86. package/dist/hub/directory/directory.d.ts +1 -1
  87. package/dist/hub/directory/directory.js +63 -0
  88. package/dist/hub/directory/directory.js.map +1 -1
  89. package/dist/hub/directory/types.d.ts +13 -0
  90. package/dist/hub/directory/types.js.map +1 -1
  91. package/dist/hub/group-policy/admin-control.d.ts +1 -0
  92. package/dist/hub/group-policy/admin-control.js +4 -2
  93. package/dist/hub/group-policy/admin-control.js.map +1 -1
  94. package/dist/hub/group-policy/admin-facts.d.ts +1 -0
  95. package/dist/hub/group-policy/admin-facts.js +2 -1
  96. package/dist/hub/group-policy/admin-facts.js.map +1 -1
  97. package/dist/hub/group-policy/admin-read.d.ts +1 -0
  98. package/dist/hub/group-policy/admin-read.js +3 -2
  99. package/dist/hub/group-policy/admin-read.js.map +1 -1
  100. package/dist/hub/group-policy/errors.d.ts +9 -0
  101. package/dist/hub/group-policy/errors.js +13 -0
  102. package/dist/hub/group-policy/errors.js.map +1 -0
  103. package/dist/hub/group-policy/store.d.ts +3 -9
  104. package/dist/hub/group-policy/store.js +5 -29
  105. package/dist/hub/group-policy/store.js.map +1 -1
  106. package/dist/hub/http/compose.d.ts +1 -0
  107. package/dist/hub/http/compose.js +429 -14
  108. package/dist/hub/http/compose.js.map +1 -1
  109. package/dist/hub/http/core.d.ts +6 -5
  110. package/dist/hub/http/core.js +74 -48
  111. package/dist/hub/http/core.js.map +1 -1
  112. package/dist/hub/http/deps.d.ts +18 -0
  113. package/dist/hub/http/schema.js +8 -0
  114. package/dist/hub/http/schema.js.map +1 -1
  115. package/dist/hub/init/member-certificate.d.ts +1 -0
  116. package/dist/hub/init/member-certificate.js +39 -0
  117. package/dist/hub/init/member-certificate.js.map +1 -0
  118. package/dist/hub/init/plan-digest.js +1 -0
  119. package/dist/hub/init/plan-digest.js.map +1 -1
  120. package/dist/hub/invitations.d.ts +96 -0
  121. package/dist/hub/invitations.js +292 -0
  122. package/dist/hub/invitations.js.map +1 -0
  123. package/dist/hub/join/certificate-trust.d.ts +13 -0
  124. package/dist/hub/join/certificate-trust.js +41 -0
  125. package/dist/hub/join/certificate-trust.js.map +1 -0
  126. package/dist/hub/join/certificate.d.ts +11 -0
  127. package/dist/hub/join/certificate.js +67 -0
  128. package/dist/hub/join/certificate.js.map +1 -0
  129. package/dist/hub/join/client.d.ts +5 -0
  130. package/dist/hub/join/client.js +30 -3
  131. package/dist/hub/join/client.js.map +1 -1
  132. package/dist/hub/join/http.js +5 -3
  133. package/dist/hub/join/http.js.map +1 -1
  134. package/dist/hub/join/local.d.ts +32 -1
  135. package/dist/hub/join/local.js +116 -11
  136. package/dist/hub/join/local.js.map +1 -1
  137. package/dist/hub/join/service.d.ts +17 -0
  138. package/dist/hub/join/service.js +12 -0
  139. package/dist/hub/join/service.js.map +1 -1
  140. package/dist/hub/join/trust.d.ts +9 -0
  141. package/dist/hub/join/trust.js +35 -0
  142. package/dist/hub/join/trust.js.map +1 -1
  143. package/dist/hub/member/pairing-api.js +9 -1
  144. package/dist/hub/member/pairing-api.js.map +1 -1
  145. package/dist/hub/member/room-ask.d.ts +137 -0
  146. package/dist/hub/member/room-ask.js +358 -0
  147. package/dist/hub/member/room-ask.js.map +1 -0
  148. package/dist/hub/member-journal.d.ts +18 -1
  149. package/dist/hub/member-journal.js +76 -3
  150. package/dist/hub/member-journal.js.map +1 -1
  151. package/dist/hub/member-origin.d.ts +177 -0
  152. package/dist/hub/member-origin.js +314 -0
  153. package/dist/hub/member-origin.js.map +1 -0
  154. package/dist/hub/pairing-notices.d.ts +1 -0
  155. package/dist/hub/pairing-notices.js +2 -1
  156. package/dist/hub/pairing-notices.js.map +1 -1
  157. package/dist/hub/pairing.d.ts +8 -0
  158. package/dist/hub/pairing.js +32 -5
  159. package/dist/hub/pairing.js.map +1 -1
  160. package/dist/hub/protocol.d.ts +159 -0
  161. package/dist/hub/protocol.js +19 -1
  162. package/dist/hub/protocol.js.map +1 -1
  163. package/dist/hub/roles/clock.d.ts +18 -0
  164. package/dist/hub/roles/clock.js +58 -0
  165. package/dist/hub/roles/clock.js.map +1 -0
  166. package/dist/hub/roles/cutover-marker.d.ts +57 -0
  167. package/dist/hub/roles/cutover-marker.js +26 -0
  168. package/dist/hub/roles/cutover-marker.js.map +1 -0
  169. package/dist/hub/roles/cutover.js +3 -17
  170. package/dist/hub/roles/cutover.js.map +1 -1
  171. package/dist/hub/roles/read.d.ts +7 -3
  172. package/dist/hub/roles/read.js +9 -1
  173. package/dist/hub/roles/read.js.map +1 -1
  174. package/dist/hub/rooms/admin.d.ts +45 -0
  175. package/dist/hub/rooms/admin.js +105 -0
  176. package/dist/hub/rooms/admin.js.map +1 -0
  177. package/dist/hub/rooms/agents.d.ts +74 -0
  178. package/dist/hub/rooms/agents.js +333 -0
  179. package/dist/hub/rooms/agents.js.map +1 -0
  180. package/dist/hub/rooms/assistant.d.ts +44 -0
  181. package/dist/hub/rooms/assistant.js +179 -0
  182. package/dist/hub/rooms/assistant.js.map +1 -0
  183. package/dist/hub/rooms/context.d.ts +10 -0
  184. package/dist/hub/rooms/context.js +24 -0
  185. package/dist/hub/rooms/context.js.map +1 -0
  186. package/dist/hub/rooms/direct-view.d.ts +39 -0
  187. package/dist/hub/rooms/direct-view.js +38 -0
  188. package/dist/hub/rooms/direct-view.js.map +1 -0
  189. package/dist/hub/rooms/directory.d.ts +35 -0
  190. package/dist/hub/rooms/directory.js +98 -0
  191. package/dist/hub/rooms/directory.js.map +1 -0
  192. package/dist/hub/rooms/schema.d.ts +11 -0
  193. package/dist/hub/rooms/schema.js +73 -0
  194. package/dist/hub/rooms/schema.js.map +1 -0
  195. package/dist/hub/rooms/service.d.ts +449 -0
  196. package/dist/hub/rooms/service.js +581 -0
  197. package/dist/hub/rooms/service.js.map +1 -0
  198. package/dist/hub/rooms/types.d.ts +79 -0
  199. package/dist/hub/rooms/types.js +2 -0
  200. package/dist/hub/rooms/types.js.map +1 -0
  201. package/dist/hub/rooms.d.ts +7 -1
  202. package/dist/hub/rooms.js +30 -5
  203. package/dist/hub/rooms.js.map +1 -1
  204. package/dist/hub/runtime.d.ts +8 -0
  205. package/dist/hub/runtime.js +57 -3
  206. package/dist/hub/runtime.js.map +1 -1
  207. package/dist/hub/server.d.ts +25 -0
  208. package/dist/hub/server.js +63 -5
  209. package/dist/hub/server.js.map +1 -1
  210. package/dist/hub/sessions.js +1 -1
  211. package/dist/hub/sessions.js.map +1 -1
  212. package/dist/hub/settings-commit.d.ts +6 -1
  213. package/dist/hub/settings-commit.js +15 -0
  214. package/dist/hub/settings-commit.js.map +1 -1
  215. package/dist/hub/settings-directory-recovery.d.ts +5 -0
  216. package/dist/hub/settings-directory-recovery.js +11 -1
  217. package/dist/hub/settings-directory-recovery.js.map +1 -1
  218. package/dist/hub/settings-member-address-control.d.ts +84 -0
  219. package/dist/hub/settings-member-address-control.js +150 -0
  220. package/dist/hub/settings-member-address-control.js.map +1 -0
  221. package/dist/hub/settings-member-address-decision.d.ts +229 -0
  222. package/dist/hub/settings-member-address-decision.js +318 -0
  223. package/dist/hub/settings-member-address-decision.js.map +1 -0
  224. package/dist/hub/settings-member-address-http.d.ts +9 -0
  225. package/dist/hub/settings-member-address-http.js +78 -0
  226. package/dist/hub/settings-member-address-http.js.map +1 -0
  227. package/dist/hub/settings-member-address-network.d.ts +2 -0
  228. package/dist/hub/settings-member-address-network.js +22 -0
  229. package/dist/hub/settings-member-address-network.js.map +1 -0
  230. package/dist/hub/settings-member-address-notices.d.ts +22 -0
  231. package/dist/hub/settings-member-address-notices.js +21 -0
  232. package/dist/hub/settings-member-address-notices.js.map +1 -0
  233. package/dist/hub/settings-member-address-policy.d.ts +21 -0
  234. package/dist/hub/settings-member-address-policy.js +34 -0
  235. package/dist/hub/settings-member-address-policy.js.map +1 -0
  236. package/dist/hub/settings-member-address.d.ts +64 -0
  237. package/dist/hub/settings-member-address.js +239 -0
  238. package/dist/hub/settings-member-address.js.map +1 -0
  239. package/dist/hub/socket.d.ts +2 -0
  240. package/dist/hub/socket.js +2 -0
  241. package/dist/hub/socket.js.map +1 -1
  242. package/dist/hub/teams/types.d.ts +41 -0
  243. package/dist/hub/teams/types.js +2 -0
  244. package/dist/hub/teams/types.js.map +1 -0
  245. package/dist/hub/tls.d.ts +47 -0
  246. package/dist/hub/tls.js +23 -6
  247. package/dist/hub/tls.js.map +1 -1
  248. package/dist/hub/types.d.ts +51 -3
  249. package/dist/hub/validation.d.ts +1 -1
  250. package/dist/hub/validation.js +2 -2
  251. package/dist/hub/validation.js.map +1 -1
  252. package/dist/hub/web-origin.d.ts +20 -7
  253. package/dist/hub/web-origin.js +26 -15
  254. package/dist/hub/web-origin.js.map +1 -1
  255. package/dist/hub-pilot-trust-settings.d.ts +4 -0
  256. package/dist/hub-pilot-trust-settings.js +13 -0
  257. package/dist/hub-pilot-trust-settings.js.map +1 -0
  258. package/dist/human-delivery-receipts.d.ts +4 -2
  259. package/dist/human-delivery-receipts.js +20 -13
  260. package/dist/human-delivery-receipts.js.map +1 -1
  261. package/dist/inbound-presentation.d.ts +28 -0
  262. package/dist/inbound-presentation.js +48 -0
  263. package/dist/inbound-presentation.js.map +1 -0
  264. package/dist/instance-lifecycle.js +1 -0
  265. package/dist/instance-lifecycle.js.map +1 -1
  266. package/dist/instructions.d.ts +4 -2
  267. package/dist/instructions.js +7 -4
  268. package/dist/instructions.js.map +1 -1
  269. package/dist/locale.js +14 -0
  270. package/dist/locale.js.map +1 -1
  271. package/dist/log-service.d.ts +3 -0
  272. package/dist/log-service.js +39 -22
  273. package/dist/log-service.js.map +1 -1
  274. package/dist/log-steps.d.ts +56 -1
  275. package/dist/log-steps.js +318 -56
  276. package/dist/log-steps.js.map +1 -1
  277. package/dist/needs-you-hub.js +6 -2
  278. package/dist/needs-you-hub.js.map +1 -1
  279. package/dist/needs-you.d.ts +5 -1
  280. package/dist/needs-you.js +4 -8
  281. package/dist/needs-you.js.map +1 -1
  282. package/dist/office-share-page.js +1 -1
  283. package/dist/office-share-page.js.map +1 -1
  284. package/dist/outbound-handlers.d.ts +1 -0
  285. package/dist/outbound-handlers.js +6 -0
  286. package/dist/outbound-handlers.js.map +1 -1
  287. package/dist/outbound-schemas.d.ts +1 -0
  288. package/dist/outbound-schemas.js +1 -0
  289. package/dist/outbound-schemas.js.map +1 -1
  290. package/dist/queued-handoffs.d.ts +3 -1
  291. package/dist/queued-handoffs.js +1 -1
  292. package/dist/queued-handoffs.js.map +1 -1
  293. package/dist/runtime-transcript-source.d.ts +2 -0
  294. package/dist/runtime-transcript-source.js +23 -1
  295. package/dist/runtime-transcript-source.js.map +1 -1
  296. package/dist/settings-api.d.ts +1 -0
  297. package/dist/settings-api.js +15 -8
  298. package/dist/settings-api.js.map +1 -1
  299. package/dist/settings-baseline.d.ts +3 -0
  300. package/dist/settings-baseline.js +2 -2
  301. package/dist/settings-baseline.js.map +1 -1
  302. package/dist/settings-effect.d.ts +3 -0
  303. package/dist/settings-effect.js +12 -2
  304. package/dist/settings-effect.js.map +1 -1
  305. package/dist/topic-commands.js +2 -1
  306. package/dist/topic-commands.js.map +1 -1
  307. package/dist/transcript-jsonl.d.ts +24 -0
  308. package/dist/transcript-jsonl.js +72 -22
  309. package/dist/transcript-jsonl.js.map +1 -1
  310. package/dist/transcript-monitor.d.ts +5 -1
  311. package/dist/transcript-monitor.js +65 -3
  312. package/dist/transcript-monitor.js.map +1 -1
  313. package/dist/transcript-needles.d.ts +1 -1
  314. package/dist/transcript-needles.js +1 -1
  315. package/dist/transcript-records.d.ts +2 -1
  316. package/dist/transcript-records.js.map +1 -1
  317. package/dist/transcript-sources.d.ts +4 -0
  318. package/dist/transcript-sources.js +2 -0
  319. package/dist/transcript-sources.js.map +1 -1
  320. package/dist/ui/agent-details-settings.js +10 -1
  321. package/dist/ui/chat-activity.js +2 -2
  322. package/dist/ui/fleet-canvas.js +5 -2
  323. package/dist/ui/fleet-office-card.js +4 -2
  324. package/dist/ui/fleet-org.js +2 -0
  325. package/dist/ui/hub-admin-rooms-strings.js +28 -0
  326. package/dist/ui/hub-admin-rooms.js +77 -0
  327. package/dist/ui/hub-assistant-admin-strings.js +26 -0
  328. package/dist/ui/hub-assistant-admin.js +85 -0
  329. package/dist/ui/hub-client.js +170 -14
  330. package/dist/ui/hub-invitations-strings.js +30 -0
  331. package/dist/ui/hub-invitations.js +108 -0
  332. package/dist/ui/hub-join-one-strings.js +2 -0
  333. package/dist/ui/hub-pairing-form-strings.js +48 -0
  334. package/dist/ui/hub-pilot-trust-strings.js +27 -0
  335. package/dist/ui/hub-pilot-trust.js +41 -0
  336. package/dist/ui/hub-room-composer.js +113 -0
  337. package/dist/ui/hub-room-favorites.js +90 -0
  338. package/dist/ui/hub-room-list.js +152 -0
  339. package/dist/ui/hub-room-members-strings.js +12 -0
  340. package/dist/ui/hub-room-members.js +104 -0
  341. package/dist/ui/hub-room-new-strings.js +46 -0
  342. package/dist/ui/hub-room-new.js +135 -0
  343. package/dist/ui/hub-room-presence.js +123 -0
  344. package/dist/ui/hub-room-settings-strings.js +26 -0
  345. package/dist/ui/hub-room-settings.js +134 -0
  346. package/dist/ui/hub-room-strings.js +222 -0
  347. package/dist/ui/hub-room-thread.js +262 -0
  348. package/dist/ui/hub-room-unread.js +51 -0
  349. package/dist/ui/hub-room-working.js +29 -0
  350. package/dist/ui/log-row.js +14 -5
  351. package/dist/ui/panel-details.js +6 -1
  352. package/dist/ui/panel-hub.js +91 -49
  353. package/dist/ui/panel-needs.js +2 -0
  354. package/dist/ui/settings-hub-company-join.js +31 -11
  355. package/dist/ui/settings-hub-connection.js +9 -3
  356. package/dist/ui/settings-hub-member-address.js +205 -0
  357. package/dist/ui/settings-hub-section.js +2 -0
  358. package/dist/ui/settings-hub.js +10 -4
  359. package/dist/ui/shared/app-i18n.js +2 -2
  360. package/dist/ui/shared/app-needs.js +3 -0
  361. package/dist/ui/shared/app-shell.js +4 -1
  362. package/dist/ui/shared/app.css +5 -0
  363. package/dist/ui/shared/chat-render.js +10 -0
  364. package/dist/ui/shared/chat-thread.js +14 -5
  365. package/dist/ui/shared/hub-chat.css +17 -0
  366. package/dist/ui/shared/hub-rooms-u2.css +42 -0
  367. package/dist/ui/shared/model-observation.js +16 -0
  368. package/dist/ui/shared/stale-tab.css +6 -0
  369. package/dist/ui/shared/stale-tab.js +50 -0
  370. package/dist/web-api.d.ts +2 -0
  371. package/dist/web-api.js +6 -2
  372. package/dist/web-api.js.map +1 -1
  373. package/package.json +1 -1
@@ -0,0 +1,205 @@
1
+ // #3429 (M-2901, option B): fleet Settings → Hub → "Fleet connection address", for this computer's host owner (the page
2
+ // mark; the server's D3 proof decides). Where connected Fleets reach this Hub — not the Hub address people use, which stays.
3
+ // Folded under its own disclosure: few ever change it. One field (+ where it listens, under Advanced), Check (prepare:
4
+ // the Fleets that will move are listed), one Confirm: Fleets online then follow on their own (an issuer-signed relocation);
5
+ // the rest must reconnect, and their owners get a notice. The certificate keeps its key (the server reissues its name).
6
+ // Own lazy module with its own words. Shared components: card, field, btn, note, err, s-web-ro, s-ui-disclosure, Skeleton.
7
+ import { html, useEffect, useState } from "/assets/app-html.js";
8
+ import { Skeleton, ErrorState } from "/assets/ui-states.js";
9
+ import { register, t } from "/assets/app-i18n.js";
10
+ import { api } from "./settings-confirm.js";
11
+ import { typedOrigin, shownAddress, defaultListen } from "./settings-hub-web-address.js";
12
+
13
+ register("hubMemberAddress", {
14
+ en: {
15
+ title: "Fleet connection address",
16
+ lead: "Where connected Fleets reach this Hub. Most Hubs never change it; the Hub address colleagues use stays the same.",
17
+ address: "Address", listens: "Listens on", fleets: "Connected Fleets", none: "None yet",
18
+ change: "Change connection address", newAddress: "New connection address", newHint: "https:// is added for you. If the port isn't 443, add a colon and the port number, for example :9443.",
19
+ advanced: "Advanced", listenHost: "Listen on (interface)", listenPort: "Port",
20
+ listenHint: "Where the Hub listens for Fleets on this computer. Usually the address's own port; change it only if a router or reverse proxy forwards another port.",
21
+ check: "Check", checking: "Checking…", cancel: "Cancel", back: "Back",
22
+ confirmTitle: "Change the Fleet connection address?", from: "From", to: "To",
23
+ moving: "Fleets that move ({0}):", noneMoving: "No Fleet is connected now.",
24
+ effect: "Fleets online now follow on their own. Any that are offline lose their connection and must reconnect from their own Settings → Hub; their owners get a notice. The Hub address and sign-ins stay the same.",
25
+ confirm: "Confirm change", saving: "Changing…",
26
+ allFollowed: "Done. All {0} Fleets followed to the new address.", oneFollowed: "Done. The Fleet followed to the new address.", noFleets: "Done. No Fleet was connected.",
27
+ sameKept: "Done. The address Fleets use didn't change; all {0} keep their connection.", sameKeptOne: "Done. The address Fleets use didn't change; the Fleet keeps its connection.",
28
+ connected: "Connected Fleets ({0}):",
29
+ sameEffect: "The address Fleets use doesn't change, only where the Hub listens on this computer. Connected Fleets keep their connection and reconnect on their own.",
30
+ someFollowed: "Done. {0} of {1} Fleets followed. These must reconnect from their own Settings → Hub: {2}.",
31
+ noneFollowed: "Done. No Fleet was online to follow. These must reconnect from their own Settings → Hub: {0}.",
32
+ unnamed: "a Fleet without a name", sep: ", ",
33
+ off: "Saved. The Hub is stopped; it uses the new address when it runs again.",
34
+ saved_unavailable: "Saved, but the Hub doesn't answer at the new address yet. Check that nothing else uses port {0} on this computer, then turn Run this Hub off and on.",
35
+ err_invalid: "That isn't a usable address. Use an https address such as hub.example.com:9443, and a port from 1 to 65535.",
36
+ err_port_conflict: "That is the Hub address or its port. Use a different address or port for Fleets.",
37
+ err_port_in_use: "Another program on this computer is using that port. Choose another port under Advanced.",
38
+ err_certificate: "The Hub's connection certificate can't cover that address. Check the address and try again.",
39
+ err_unchanged: "That is already the Fleet connection address.",
40
+ err_stale: "Something changed meanwhile (a Fleet connected, left or was revoked). Check again.",
41
+ err_expired: "That took too long. Check again.",
42
+ err_busy: "Another change is still finishing, or a device is finishing its sign-in. Try again in a moment.",
43
+ err_denied: "Only this computer's own dashboard can change it. Reload this page and try again.",
44
+ err_unavailable: "It can't be changed right now. Reload this page and try again.",
45
+ err_recovery: "The change didn't finish. Reload this page to see the current address.",
46
+ err_failed: "The address wasn't changed. Try again.",
47
+ },
48
+ "zh-TW": {
49
+ title: "Fleet 連接位址",
50
+ lead: "已連接的 Fleet 連到這個 Hub 的位址。大多數 Hub 不需要變更;同仁使用的 Hub 位址不會改變。",
51
+ address: "位址", listens: "監聽於", fleets: "已連接的 Fleet", none: "目前沒有",
52
+ change: "變更連接位址", newAddress: "新連接位址", newHint: "會自動加上 https://。如果連接埠不是 443,請加上冒號和連接埠號碼,例如 :9443。",
53
+ advanced: "進階", listenHost: "監聽介面", listenPort: "連接埠",
54
+ listenHint: "Hub 在這台電腦上監聽 Fleet 連接的位置。通常就是位址本身的連接埠;只有路由器或反向代理轉送其他連接埠時才需要變更。",
55
+ check: "檢查", checking: "檢查中…", cancel: "取消", back: "返回",
56
+ confirmTitle: "要變更 Fleet 連接位址嗎?", from: "原位址", to: "新位址",
57
+ moving: "會移動的 Fleet({0}):", noneMoving: "目前沒有已連接的 Fleet。",
58
+ effect: "目前在線上的 Fleet 會自動跟著移動。離線的 Fleet 會失去連接,需要在它自己的「設定 → Hub」重新連接,擁有者會收到通知。Hub 位址與登入狀態不變。",
59
+ confirm: "確認變更", saving: "變更中…",
60
+ allFollowed: "完成。全部 {0} 個 Fleet 都已跟著移動到新位址。", oneFollowed: "完成。這個 Fleet 已跟著移動到新位址。", noFleets: "完成。目前沒有已連接的 Fleet。",
61
+ sameKept: "完成。Fleet 使用的位址沒有變更,全部 {0} 個 Fleet 都保留連接。", sameKeptOne: "完成。Fleet 使用的位址沒有變更,這個 Fleet 保留連接。",
62
+ connected: "已連接的 Fleet({0}):",
63
+ sameEffect: "Fleet 使用的位址不變,只變更 Hub 在這台電腦上監聽的位置。已連接的 Fleet 會保留連接,並自動重新連接。",
64
+ someFollowed: "完成。{1} 個 Fleet 中有 {0} 個已跟著移動。以下 Fleet 需要在它自己的「設定 → Hub」重新連接:{2}。",
65
+ noneFollowed: "完成。沒有在線上的 Fleet 可以跟著移動。以下 Fleet 需要在它自己的「設定 → Hub」重新連接:{0}。",
66
+ unnamed: "未命名的 Fleet", sep: "、",
67
+ off: "已儲存。Hub 目前已停止,再次執行時會使用新位址。",
68
+ saved_unavailable: "已儲存,但 Hub 還沒有在新位址回應。請確認這台電腦上沒有其他程式使用 {0} 埠,再將「執行這個 Hub」關閉後重新開啟。",
69
+ err_invalid: "這不是可用的位址。請使用像 hub.example.com:9443 這樣的 https 位址,連接埠為 1 到 65535。",
70
+ err_port_conflict: "這是 Hub 位址或它的連接埠。請為 Fleet 改用其他位址或連接埠。",
71
+ err_port_in_use: "這台電腦上有其他程式正在使用這個連接埠。請在「進階」選擇其他連接埠。",
72
+ err_certificate: "Hub 的憑證無法涵蓋這個位址。請確認位址後再試一次。",
73
+ err_unchanged: "這已經是目前的 Fleet 連接位址。",
74
+ err_stale: "剛剛有變動(有 Fleet 連接、離開或被撤銷)。請再檢查一次。",
75
+ err_expired: "等候太久了,請再檢查一次。",
76
+ err_busy: "另一項變更還在完成中,或有裝置正在完成登入,請稍後再試。",
77
+ err_denied: "只有這台電腦自己的儀表板可以變更。請重新載入這個頁面後再試。",
78
+ err_unavailable: "目前無法變更。請重新載入這個頁面後再試。",
79
+ err_recovery: "變更沒有完成。請重新載入這個頁面查看目前的位址。",
80
+ err_failed: "位址沒有變更,請再試一次。",
81
+ },
82
+ });
83
+ const copy = (key, ...a) => t(`hubMemberAddress.${key}`, ...a);
84
+ const PREFIX = "/api/settings/hub/member-address";
85
+ const ERR = new Set(["invalid", "port_conflict", "port_in_use", "certificate", "unchanged", "stale", "expired", "busy", "denied", "unavailable", "recovery"]);
86
+ const errKey = (code) => `err_${ERR.has(code) ? code : "failed"}`;
87
+ const names = (fleets) => (fleets || []).map((f) => f.label || copy("unnamed")).join(copy("sep"));
88
+
89
+ export function createMemberAddressClient() {
90
+ const call = async (action, body) => {
91
+ try {
92
+ const r = await api(PREFIX + action, { credentials: "same-origin", cache: "no-store", ...(body === undefined ? {} : { method: "POST", body: JSON.stringify(body) }) });
93
+ return r.ok && r.body?.ok ? r.body : { ok: false, code: r.body?.code || "unavailable" };
94
+ } catch { return { ok: false, code: "unavailable" }; }
95
+ };
96
+ return { read: () => call(""), prepare: (candidate) => call("/prepare", candidate), commit: (ref) => call("/commit", { ref }) };
97
+ }
98
+
99
+ /** What a finished change says: who followed, and who must reconnect (by name). */
100
+ export function outcomeText(r, port) {
101
+ if (r.state === "off") return copy("off");
102
+ if (r.state === "saved_unavailable") return copy("saved_unavailable", String(port ?? ""));
103
+ const reconnect = Array.isArray(r.reconnect) ? r.reconnect : [], followed = Number(r.followed) || 0, total = followed + reconnect.length;
104
+ if (!total) return copy("noFleets");
105
+ if (!reconnect.length) return total === 1 ? copy(r.sameOrigin === true ? "sameKeptOne" : "oneFollowed") : copy(r.sameOrigin === true ? "sameKept" : "allFollowed", String(total));
106
+ if (!followed) return copy("noneFollowed", names(reconnect));
107
+ return copy("someFollowed", String(followed), String(total), names(reconnect));
108
+ }
109
+
110
+ export function HubMemberAddressSettings({ client: given = null } = {}) {
111
+ const [client] = useState(() => given || createMemberAddressClient());
112
+ const [view, setView] = useState(undefined); // undefined: reading; null: not offered; else { origin, listen, fleets }
113
+ const [step, setStep] = useState("show"); // show | edit | confirm
114
+ const [typed, setTyped] = useState(""), [host, setHost] = useState(""), [port, setPort] = useState(""), [touched, setTouched] = useState(false);
115
+ const [proposal, setProposal] = useState(null), [outcome, setOutcome] = useState(null), [busy, setBusy] = useState(false), [error, setError] = useState("");
116
+ const [attempt, setAttempt] = useState(0); // a failed first read retries in place (the shared ErrorState), no reload
117
+ useEffect(() => {
118
+ let live = true;
119
+ client.read().then((r) => { if (live) setView(r.ok && typeof r.origin === "string" ? r : r.code === "denied" ? null : { failed: true }); },
120
+ () => { if (live) setView({ failed: true }); });
121
+ return () => { live = false; };
122
+ }, [attempt]);
123
+ if (view === null) return null;
124
+ const head = html`<p class="note">${copy("lead")}</p>`; // the disclosure's summary is the title
125
+ const wrap = (body) => html`<section class="card hub-member-address" data-section="hub-member-address">
126
+ <details class="s-ui-disclosure" open=${step !== "show" || !!outcome || !!error}><summary>${copy("title")}</summary><div class="s-ui-disclosure-body">${body}</div></details></section>`;
127
+ if (view === undefined) return wrap(html`${head}<${Skeleton} variant="rows" lines=${3} />`);
128
+ if (view.failed) return wrap(html`${head}<${ErrorState} message=${copy("err_unavailable")} onRetry=${() => { setView(undefined); setAttempt((n) => n + 1); }} />`);
129
+
130
+ const origin = typedOrigin(typed);
131
+ const listen = touched ? { host: host.trim(), port: Number(port) } : defaultListen(view, origin || view.origin);
132
+ const touch = () => { if (!touched) { setTouched(true); setHost(listen.host); setPort(String(listen.port)); } };
133
+ const edit = () => { setStep("edit"); setTyped(""); setTouched(false); setError(""); setOutcome(null); };
134
+ const check = async (e) => {
135
+ e?.preventDefault?.();
136
+ if (busy) return;
137
+ if (!origin || !Number.isInteger(listen.port) || listen.port < 1 || listen.port > 65535 || !listen.host) { setError(copy("err_invalid")); return; }
138
+ if (origin === view.origin && listen.host === view.listen?.host && listen.port === view.listen?.port) { setError(copy("err_unchanged")); return; }
139
+ setBusy(true); setError("");
140
+ const r = await client.prepare({ origin, listen });
141
+ setBusy(false);
142
+ if (!r.ok) { setError(copy(errKey(r.code))); return; }
143
+ setProposal(r); setStep("confirm");
144
+ };
145
+ const confirm = async () => {
146
+ if (busy || !proposal) return;
147
+ setBusy(true); setError("");
148
+ const r = await client.commit(proposal.ref);
149
+ setBusy(false);
150
+ if (!r.ok) { setError(copy(errKey(r.code))); if (r.code === "expired" || r.code === "stale") { setProposal(null); setStep("edit"); } return; }
151
+ setOutcome(r); setStep("show");
152
+ // Connected now: only the Fleets that followed (the rest were disconnected and must reconnect).
153
+ const gone = new Set((Array.isArray(r.reconnect) ? r.reconnect : []).map((f) => f.id));
154
+ setView((v) => ({ ...v, origin: r.origin || proposal.summary?.to, listen: proposal.summary?.listen || v.listen,
155
+ fleets: (Array.isArray(v.fleets) ? v.fleets : []).filter((f) => !gone.has(f.id)) }));
156
+ setProposal(null);
157
+ };
158
+ const fleetCount = Array.isArray(view.fleets) ? view.fleets.length : 0;
159
+ const current = html`<dl class="s-web-ro hub-addr-now">
160
+ <dt>${copy("address")}</dt><dd><code>${shownAddress(view.origin)}</code></dd>
161
+ ${view.listen ? html`<dt>${copy("listens")}</dt><dd><code>${view.listen.host}:${view.listen.port}</code></dd>` : null}
162
+ <dt>${copy("fleets")}</dt><dd>${fleetCount ? String(fleetCount) : copy("none")}</dd>
163
+ </dl>`;
164
+ const err = error ? html`<p class="err" role="alert">${error}</p>` : null;
165
+
166
+ if (step === "confirm" && proposal) {
167
+ const s = proposal.summary || {}, moving = Array.isArray(s.fleets) ? s.fleets : [], same = s.fleetsRejoin === false;
168
+ return wrap(html`${head}<div class="hub-addr-confirm" role="group" aria-label=${copy("confirmTitle")}><h4>${copy("confirmTitle")}</h4>
169
+ <dl class="s-web-ro">
170
+ <dt>${copy("from")}</dt><dd>${shownAddress(s.from)}</dd>
171
+ <dt>${copy("to")}</dt><dd><strong>${shownAddress(s.to)}</strong></dd>
172
+ ${s.listen ? html`<dt>${copy("listens")}</dt><dd><code>${s.listen.host}:${s.listen.port}</code></dd>` : null}
173
+ </dl>
174
+ ${moving.length ? html`<p class="note hub-member-moving"><strong>${copy(same ? "connected" : "moving", String(moving.length))}</strong> ${moving.map((f, i) => html`<span key=${f.id} class="hub-member-fleet">${i ? copy("sep") : ""}${f.label || copy("unnamed")}</span>`)}</p>`
175
+ : html`<p class="note">${copy("noneMoving")}</p>`}
176
+ <p class="note hub-addr-effect">${copy(same ? "sameEffect" : "effect")}</p>
177
+ <div class="s-row">
178
+ <button type="button" class="btn btn-primary" disabled=${busy} onClick=${confirm}>${busy ? copy("saving") : copy("confirm")}</button>
179
+ <button type="button" class="btn" disabled=${busy} onClick=${() => { setProposal(null); setStep("edit"); setError(""); }}>${copy("back")}</button>
180
+ </div>
181
+ </div>${err}`);
182
+ }
183
+ if (step === "edit") {
184
+ return wrap(html`${head}${current}
185
+ <form class="form hub-addr-form" onSubmit=${check}>
186
+ <label class="field"><span>${copy("newAddress")}</span><input id="hubMemberNew" autocomplete="off" inputmode="url" value=${typed} disabled=${busy}
187
+ onInput=${(e) => { setTyped(e.target.value); setError(""); }} /><small class="note">${copy("newHint")}</small></label>
188
+ <details class="s-ui-disclosure hub-addr-advanced"><summary>${copy("advanced")}</summary><div class="s-ui-disclosure-body">
189
+ <div class="grid2">
190
+ <label class="field"><span>${copy("listenHost")}</span><input id="hubMemberHost" autocomplete="off" value=${listen.host} disabled=${busy} onInput=${(e) => { touch(); setHost(e.target.value); setError(""); }} /></label>
191
+ <label class="field"><span>${copy("listenPort")}</span><input id="hubMemberPort" type="number" inputmode="numeric" min="1" max="65535" step="1" value=${String(listen.port)} disabled=${busy}
192
+ onInput=${(e) => { touch(); setPort(e.target.value); setError(""); }} /></label>
193
+ </div>
194
+ <small class="note">${copy("listenHint")}</small>
195
+ </div></details>
196
+ <div class="s-row">
197
+ <button type="submit" class="btn btn-primary" disabled=${busy || !typed.trim()}>${busy ? copy("checking") : copy("check")}</button>
198
+ <button type="button" class="btn" disabled=${busy} onClick=${() => { setStep("show"); setError(""); }}>${copy("cancel")}</button>
199
+ </div>
200
+ </form>${err}`);
201
+ }
202
+ const done = outcome ? html`<p role="status" class=${outcome.state === "saved_unavailable" ? "err" : "note"}>${outcomeText(outcome, view.listen?.port)}</p>` : null;
203
+ return wrap(html`${head}${current}${done}
204
+ <div class="s-row"><button type="button" class="btn" id="hubMemberChange" onClick=${edit}>${copy("change")}</button></div>${err}`);
205
+ }
@@ -61,6 +61,8 @@ export function HubSection({ overPublicLink, hubHost, hubOrigin }) {
61
61
  ${hubHost ? html`<${Lazy} load=${() => import("./settings-hub-run.js")} pick=${(m) => m.HubRunSettings} />
62
62
  ${typeof document !== "undefined" && document.body?.dataset.hubWebAddress === "1"
63
63
  ? html`<${Lazy} load=${() => import("./settings-hub-web-address.js")} pick=${(m) => m.HubWebAddressSettings} />` : null}
64
+ ${typeof document !== "undefined" && document.body?.dataset.hubMemberAddress === "1"
65
+ ? html`<${Lazy} load=${() => import("./settings-hub-member-address.js")} pick=${(m) => m.HubMemberAddressSettings} />` : null}
64
66
  <${Lazy} load=${() => import("./settings-hub-retention.js")} pick=${(m) => m.HubRetentionSettings} />
65
67
  <${Lazy} load=${() => import("./settings-hub-browser-certificate.js")} pick=${(m) => m.HubBrowserCertificateSettings} />
66
68
  <${Lazy} load=${() => import("./settings-hub-preview.js")} pick=${(m) => m.HubPreviewSettings} />` : null}
@@ -20,6 +20,7 @@ import { appStore, useStore } from "/assets/app-store.js";
20
20
  import { confirmPlace, pendingView } from "./hub-confirm-place.js";
21
21
  import { hq } from "./hub-quick-strings.js";
22
22
  import { hp } from "./hub-pairing-progress-strings.js";
23
+ import { hpf, pairingCodeState, pairingFailure } from "./hub-pairing-form-strings.js";
23
24
 
24
25
  register("hubSharingFleet", {
25
26
  en: { hint: "To pause and resume without clearing the allow list, open this agent under My shared agents on the Hub. Turning Share off stops sharing." },
@@ -79,8 +80,11 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
79
80
  if (!current()) return;
80
81
  if (next) setPairing(next);
81
82
  activePending.current = null;
83
+ // #3840: a confirmed connect that failed names the handler's own reason (a wrong code, an unreachable Hub, …).
84
+ const specific = action === "connect" && outcome?.state === "failed" ? pairingFailure(outcome) : null;
82
85
  const text = !next || !["applied", "failed", "expired", "rejected", "stale"].includes(outcome?.state) ? hp("unknown")
83
86
  : outcome.state === "applied" || !waitingForPairing({ pending }, next) ? null
87
+ : specific ? specific
84
88
  : action === "connect" && next.state === "unpaired" && ["failed", "expired"].includes(outcome.state) ? hp("connectFailed") : hp("notApplied");
85
89
  setMsg(old => old?.pending === pending ? text ? { error: true, text } : null : old);
86
90
  };
@@ -135,12 +139,14 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
135
139
  let body = null;
136
140
  if (!p) body = readError ? html`<${ErrorState} message=${hw("errFailed")} onRetry=${readPairing} />` : html`<${Skeleton} variant="form" lines=${4} />`;
137
141
  else if (p.state === "unpaired") {
138
- const addressOk = ADDRESS_HINT.test(form.address.trim()), codeOk = CODE_HINT.test(form.code.trim());
139
- body = html`<form class="form hub-connect" onSubmit=${(e) => { e.preventDefault(); connect(); }}>
142
+ // #3840: the code's real shape (the server's 12 hex) before any confirmation; a join code is pointed up to the one box.
143
+ const codeState = pairingCodeState(form.code), addressOk = ADDRESS_HINT.test(form.address.trim()), codeOk = codeState === "ok" && CODE_HINT.test(form.code.trim());
144
+ body = html`<form class="form hub-connect" onSubmit=${(e) => { e.preventDefault(); if (addressOk && codeOk) connect(); }}>
140
145
  <label class="field"><span>${hw("address")}</span><input id="hubAddress" type="url" inputmode="url" autocomplete="off" spellcheck=${false}
141
- placeholder=${hw("addressPh")} value=${form.address} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, address: v })); }} /><small class="note">${hw("addressHint")}</small></label>
146
+ placeholder=${hw("addressPh")} value=${form.address} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, address: v })); }} /><small class="note">${hpf("addressHint")}</small></label>
142
147
  <label class="field"><span>${hw("code")}</span><input id="hubCode" autocomplete="one-time-code" spellcheck=${false} autocapitalize="characters"
143
- value=${form.code} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, code: v })); }} /></label>
148
+ value=${form.code} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, code: v })); }} />
149
+ ${codeState === "join" || codeState === "shape" ? html`<small class="note hub-code-shape" role="status">${hpf(codeState === "join" ? "joinCode" : "codeShape")}</small>` : null}</label>
144
150
  <div class="field-row"><button type="submit" class="btn btn-primary" disabled=${busy || !addressOk || !codeOk}>${embedded ? labels.pair : hw("connect")}</button></div>
145
151
  </form>`;
146
152
  } else if (p.state === "pending") {
@@ -117,7 +117,7 @@ register("app", {
117
117
  confirmTitle: "Please confirm", confirmOk: "Continue", cancel: "Cancel",
118
118
  sidePanelLeave: "Leave {0} without saving? Your changes there will be lost.", sidePanelDiscard: "Discard changes",
119
119
  // The server's own wording (src/locale.ts needs.reason.*), so the web says what Discord says.
120
- needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_crashed: "Crashed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
120
+ needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
121
121
  },
122
122
  "zh-TW": {
123
123
  brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Agent", newInstance: "新增 Agent", newAgent: "新增 Agent",
@@ -163,6 +163,6 @@ register("app", {
163
163
  search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
164
164
  confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
165
165
  sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
166
- needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_crashed: "已崩潰", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
166
+ needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
167
167
  },
168
168
  });
@@ -1,3 +1,4 @@
1
+ import { modelSwitchText } from "./model-observation.js";
1
2
  // #1386 §6.3 (#1408 step 4): browser notifications for "Needs you", per device and opt-in, desktop browsers only.
2
3
  //
3
4
  // The list itself is the app store's `needs` (SSE `needs` / the /ui/poll field — no read of its own, #1374). This
@@ -60,6 +61,7 @@ export async function setNotify(on, env = globalThis) {
60
61
  }
61
62
 
62
63
  export const configDetail = (item) => {
64
+ if (item.modelSwitch) return modelSwitchText(item.modelSwitch);
63
65
  const issue = item.configIssue;
64
66
  return issue ? t(`app.config_history_${issue.mode === "fallback" ? "fallback" : issue.time ? "edit" : "no_history"}`, issue.file, issue.line, issue.column, issue.reason, issue.time || "") : item.detail;
65
67
  };
@@ -89,6 +91,7 @@ export function startNeedsNotifier({ open, env = globalThis } = {}) {
89
91
  const listed = new Set(items.map((i) => i.id));
90
92
  for (const [id, h] of timers) if (!listed.has(id)) { clearTimeout(h); timers.delete(id); }
91
93
  for (const item of items) {
94
+ if (item.quiet) { seen.add(item.id); continue; }
92
95
  if (seen.has(item.id) || timers.has(item.id)) continue;
93
96
  if (!hidden()) { seen.add(item.id); continue; }
94
97
  const wait = item.type === "awaiting_input" ? TERMINAL_WAIT_MS - (now() - item.since) : 0;
@@ -15,6 +15,7 @@ import { SessionMenu } from "./app-session.js";
15
15
  import { onPrefsChanged, savePref } from "./app-prefs.js";
16
16
  import { applyPageTheme, pageNow, resolvedMode, themesStore } from "./app-themes.js";
17
17
  import { ErrorState, Skeleton } from "./ui-states.js";
18
+ import { StaleTabPrompt, isStaleModuleError } from "./stale-tab.js";
18
19
  import { Dialog } from "./ui-dialog.js";
19
20
  import { InstanceNav, RosterNav, namesStore, setNamesPrimary } from "./instance-nav.js";
20
21
  import { usageRailStore } from "./header-tools.js";
@@ -1133,7 +1134,9 @@ export function Outlet({ route, seq, panels }) {
1133
1134
  return () => { current = false; };
1134
1135
  }, [entry, seq, attempt]);
1135
1136
  if (!route) return html`<div class="panel"><${ErrorState} message=${t("app.loadFailed")} /></div>`;
1136
- if (entry && entry.error && !entry.loading) return html`<div class="panel"><${ErrorState} onRetry=${() => setAttempt(n => n + 1)} /></div>`;
1137
+ // #3822: a panel that would not link (this tab is older than AgEnD) needs a reload, not a Retry that loads the same old copy.
1138
+ if (entry && entry.error && !entry.loading) return html`<div class="panel">${isStaleModuleError(entry.error) ? html`<${StaleTabPrompt} />`
1139
+ : html`<${ErrorState} onRetry=${() => setAttempt(n => n + 1)} />`}</div>`;
1137
1140
  if (!entry || !entry.Component) return html`<div class="panel"><${Skeleton} lines=${4} /></div>`;
1138
1141
  const C = entry.Component;
1139
1142
  return html`<${C} route=${route} navKey=${`${routeKey(route)}|${seq}|${lang()}`} />`;
@@ -4458,6 +4458,11 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
4458
4458
  .hub-web-address fieldset.hub-addr-cert { border: 0; padding: 0; margin: 0; min-width: 0; }
4459
4459
  .hub-web-address .hub-addr-confirm h4 { margin: 0 0 var(--s-2); }
4460
4460
 
4461
+ /* Pilot trust in the Fleet's one Hub address box. Byte separators remain wrap points with held CSS too. */
4462
+ .hub-pilot-trust { border-left: 3px solid var(--warn-line); background: var(--warn-bg); padding: var(--s-3); }
4463
+ .hub-pilot-trust code { white-space: normal; }
4464
+ .hub-pilot-trust .field { min-width: 0; }
4465
+
4461
4466
  /* S-119: the existing company, manual and sharing controls share one Settings card. */
4462
4467
  .s-hub-connection { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
4463
4468
  .s-hub-connection > .s-group-head { padding: 0; flex-wrap: wrap; cursor: default; text-transform: none; letter-spacing: normal; }
@@ -111,6 +111,13 @@
111
111
  var href = safeHref(url);
112
112
  return href ? pre + stash(store, link(href, url)) : m;
113
113
  });
114
+ // M-3092: a Hub room's own mention labels (「@所有 Agent」, "@project-helper"), exact, longest first, before the
115
+ // @username rule (which cannot take a space, a hyphen or CJK). Only a page that passes them gets any: the fleet passes none.
116
+ if (store.labels) for (var li = 0; li < store.labels.length; li++) {
117
+ var lab = escapeHtml(store.labels[li]);
118
+ // Bounded on both sides: "x@project-helper.com" is an address, not a mention (Fable on #3867).
119
+ s = s.replace(new RegExp("(?<![\\w@.-])" + lab.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "(?![\\w-])", "g"), function () { return stash(store, '<span class="mention tg">' + lab + "</span>"); });
120
+ }
114
121
  // #1682: a Telegram @username — after the links (a link is stashed by now, so an @ inside a URL is never touched).
115
122
  s = s.replace(TG_MENTION_RE, function (_m, pre, user) { return pre + stash(store, '<span class="mention tg">@' + user + "</span>"); });
116
123
  return emphasis(s);
@@ -337,6 +344,9 @@
337
344
  store.emojis = opts && typeof opts.emojis === "function" ? opts.emojis : null;
338
345
  // #1682: the names the page knows for mentions (a function (kind "u" | "r" | "c", id) → name or null).
339
346
  store.mentions = opts && typeof opts.mentions === "function" ? opts.mentions : null;
347
+ // M-3092: exact mention labels a Hub room accents (none elsewhere); longest first so a name never splits a longer one.
348
+ store.labels = opts && Array.isArray(opts.mentionLabels) ? opts.mentionLabels.filter(function (x) { return typeof x === "string" && x.length > 1; })
349
+ .sort(function (a, b) { return b.length - a.length; }) : null;
340
350
  var html = "";
341
351
  var re = new RegExp(FENCE_RE.source, "g");
342
352
  var last = 0;
@@ -108,9 +108,11 @@ const mdCache = new Map();
108
108
  const EMOJI_IDS = /<a?:[A-Za-z0-9_]{2,32}:(\d{15,25})>/g;
109
109
  const MENTION_IDS = /<(@!?|@&|#)(\d{15,25})>/g;
110
110
  const MENTION_KINDS = { "@": "u", "@!": "u", "@&": "r", "#": "c" };
111
- export function renderedMarkdown(text, cards, emojis, mentions) {
111
+ export function renderedMarkdown(text, cards, emojis, mentions, labels) {
112
112
  const src = typeof text === "string" ? text : String(text == null ? "" : text);
113
113
  let sig = cards ? "c" : "-";
114
+ // M-3092: a Hub room's mention labels change the drawing, so they are part of its key.
115
+ if (Array.isArray(labels) && labels.length) sig += `|L${labels.join("\u0001")}`;
114
116
  if (src.includes("<")) {
115
117
  // Read as renderMarkdown reads it: it drops NUL first (its placeholder mark), so "<@\0id>" is a mention there too.
116
118
  const seen = src.includes("\u0000") ? src.replace(/\u0000/g, "") : src;
@@ -119,7 +121,9 @@ export function renderedMarkdown(text, cards, emojis, mentions) {
119
121
  }
120
122
  const key = `${sig}\u0000${src}`;
121
123
  let html = mdCache.get(key);
122
- if (html === undefined) html = R().renderMarkdown(src, { htmlCards: cards, emojis, mentions });
124
+ // The fleet's call is unchanged; only a Hub room passes its mention labels (M-3092).
125
+ if (html === undefined) html = Array.isArray(labels) && labels.length ? R().renderMarkdown(src, { htmlCards: cards, emojis, mentions, mentionLabels: labels })
126
+ : R().renderMarkdown(src, { htmlCards: cards, emojis, mentions });
123
127
  else mdCache.delete(key);
124
128
  mdCache.set(key, html);
125
129
  while (mdCache.size > MD_CACHE_MAX) mdCache.delete(mdCache.keys().next().value);
@@ -196,7 +200,7 @@ export function createThread(list, scroller, opts) {
196
200
  // #2272: reply to it — a hover strip at its top right (phones: swipe left or long-press; R on a focused message).
197
201
  const key = msgKey(x);
198
202
  const act = opts.canReply?.() === false ? "" : `<div data-trust="thread-control" class="msg-actions"><button type="button" class="chip-btn icon-only" data-act="reply" data-arg="${escAttr(key)}" title="${escAttr(tr("chat.reply"))}" aria-label="${escAttr(tr("chat.reply"))}">${REPLY}</button></div>`;
199
- return `<div class="msg ${u ? "user" : "agent"}" data-key="${escAttr(key)}" tabindex="-1">${act}<div class="meta"><span class="sender">${escAttr(x.sender)}</span>${time}${ticks}</div>${quoteHtml(x.replyTo)}<div class="body">${clicked ? clickHtml(x.click) : `<div class="md">${renderedMarkdown(x.text, x.role === "agent", opts.emojis, opts.mentions)}</div>`}${R().attachmentsHtml(x.attachments, { htmlCards: x.role === "agent", goneTitle: tr("chat.attGone"), goneLabel: tr("chat.attUnavailable"), inlinePreviews: !PUBLIC_LINK(), textPreviews: true })}${buttons}</div>${R().reactionsHtml(x.reactions, tr("chat.reactedBy", x.instance || ""))}${tools}</div>`;
203
+ return `<div class="msg ${u ? "user" : "agent"}" data-key="${escAttr(key)}" tabindex="-1">${act}<div class="meta"><span class="sender">${escAttr(x.sender)}</span>${time}${ticks}</div>${quoteHtml(x.replyTo)}<div class="body">${clicked ? clickHtml(x.click) : `<div class="md">${renderedMarkdown(x.text, x.role === "agent", opts.emojis, opts.mentions, opts.mentionLabels?.())}</div>`}${R().attachmentsHtml(x.attachments, { htmlCards: x.role === "agent", goneTitle: tr("chat.attGone"), goneLabel: tr("chat.attUnavailable"), inlinePreviews: !PUBLIC_LINK(), textPreviews: true })}${buttons}</div>${R().reactionsHtml(x.reactions, tr("chat.reactedBy", x.instance || ""))}${tools}</div>`;
200
204
  }
201
205
  /**
202
206
  * A message this page is sending (chat-store.js): its own bubble at once, dimmed with "Sending…" until the server
@@ -219,7 +223,7 @@ export function createThread(list, scroller, opts) {
219
223
  + `<button type="button" class="btn btn-sm" data-act="deleteOut" data-arg="${escAttr(x.clientId)}">${escAttr(tr("chat.deleteUnsent"))}</button></span></div>` : "";
220
224
  const state = going ? `<span class="out-state" role="status"><span class="out-spin" aria-hidden="true"></span>${escAttr(tr("chat.sending"))}</span>` : "";
221
225
  return `<div class="msg user out out-${st}" data-out="${escAttr(x.clientId)}"${going ? ' aria-busy="true"' : ""} tabindex="-1"><div class="meta"><span class="sender">${escAttr(x.sender)}</span>${state}</div>`
222
- + `${quoteHtml(x.replyTo)}<div class="body">${x.text ? `<div class="md">${renderedMarkdown(x.text, false, opts.emojis, opts.mentions)}</div>` : ""}`
226
+ + `${quoteHtml(x.replyTo)}<div class="body">${x.text ? `<div class="md">${renderedMarkdown(x.text, false, opts.emojis, opts.mentions, opts.mentionLabels?.())}</div>` : ""}`
223
227
  + `${files ? `<div class="out-files">${files}</div>` : ""}</div>${failed}</div>`;
224
228
  }
225
229
  /** The pending bubbles' upload bars and percentages, as their files stand now (in place: CSSOM, no redraw). */
@@ -283,7 +287,11 @@ export function createThread(list, scroller, opts) {
283
287
  // Each line its own row (folded: the first two, each clipped to one row); the line breaks stay in the text.
284
288
  const body = textLinkSegments(text, x.links).map(sg => sg.href ? `<a data-trust="link" class="st-link" href="${escAttr(sg.href)}">${escAttr(sg.text)}</a>` : escAttr(sg.text)).join("")
285
289
  .split(/\r\n?|\n/).map(l => `<span class="st-ln">${l}</span>`).join("\n");
286
- return `<div class="msg status-line folded${overflows ? " overflows" : ""}"><div class="meta">${time}</div><div class="body"><div class="st-text">${body}</div>${more}</div>${tools}</div>`;
290
+ // `bare` (a Hub room's own lines: created, joined, its progress): no message tools, Copy included. The fleet never sets it.
291
+ // M-3092: a Hub room's line may carry one action (「展開其餘 N 則」): a button the page answers through opts.statusAction.
292
+ const action = x.action && typeof x.action.label === "string" && typeof x.action.arg === "string"
293
+ ? `<button type="button" data-trust="thread-control" class="chip-btn st-action" data-act="statusAction" data-arg="${escAttr(x.action.arg)}">${escAttr(x.action.label)}</button>` : "";
294
+ return `<div class="msg status-line folded${overflows ? " overflows" : ""}"><div class="meta">${time}</div><div class="body"><div class="st-text">${body}</div>${more}${action}</div>${x.bare === true ? "" : tools}</div>`;
287
295
  }
288
296
  /**
289
297
  * #1266: an agent reply's buttons. Labels are text (escaped, never Markdown); the click names the set and the index,
@@ -907,6 +915,7 @@ export function createThread(list, scroller, opts) {
907
915
  const act = el.dataset.act;
908
916
  if (act === "copyMsg") { const x = msgs.find(y => msgKey(y) === el.dataset.arg); if (x) copyFrom(el, x.text); }
909
917
  else if (act === "copyCode") { const pre = el.closest(".codeblock")?.querySelector("pre"); if (pre) copyFrom(el, pre.textContent); }
918
+ else if (act === "statusAction") opts.statusAction?.(el.dataset.arg);
910
919
  else if (act === "toggleFold") {
911
920
  const box = el.closest(".codeblock, .msg.status-line"); if (!box) return;
912
921
  const folded = box.classList.toggle("folded");
@@ -24,6 +24,19 @@
24
24
  @keyframes hub-pulse { 50% { opacity: .3; } }
25
25
  @media (prefers-reduced-motion: reduce) { .hub-room-side .pulse { animation: none; } }
26
26
  .hub-list-empty, .hub-list-err { margin: var(--s-2); font-size: var(--fs-sm); }
27
+ /* M-3092: the list as the Fleet roster draws it (its row, avatar, dot and nav-count); only what the Hub adds is here. */
28
+ .hub-room-group + .hub-room-group { margin-top: var(--s-2); }
29
+ .av.av-square { border-radius: var(--r-sm); }
30
+ .hub-room-at { flex: none; color: var(--accent); font-weight: var(--fw-semibold); font-size: var(--fs-xs); }
31
+ .inst-line2 > .nav-count { flex: none; height: 18px; min-width: 18px; line-height: 18px; }
32
+ .hub-room-archived .inst-name { color: var(--text-3); }
33
+ /* The room composer's fixed hint and @all bar wrap without leaving a lone word on the last line. */
34
+ .hub-room-hint, .hub-room-allbar { text-wrap: pretty; }
35
+ /* A question's folded answers: a left-aligned link under the last one shown (Lumen), not a centred line. */
36
+ .hub-room-page .msg.status-line:has(.st-action) .st-text { display: none; }
37
+ .hub-room-page .msg.status-line:has(.st-action) .body { justify-content: flex-start; }
38
+ .hub-room-page .status-line .st-action { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; }
39
+ .hub-room-page .status-line .st-action:hover { text-decoration: underline; }
27
40
 
28
41
  /* a name's letter on a tone (the same tones in both themes) */
29
42
  .hub-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff; flex: none; }
@@ -91,6 +104,10 @@
91
104
  background: var(--surface); border-radius: var(--r-sm); color: var(--text-3); }
92
105
  .hub-side-filter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 7px 0; font: inherit; font-size: var(--fs-sm); outline: none; }
93
106
  .hub-side-rooms .inst-head > .count { padding: var(--s-3) var(--s-3) var(--s-1); color: var(--text-3); font-size: var(--fs-xs); }
107
+ /* S-145: 「最愛」's head — the Fleet's star before the name (fav-mark: its colour), the Edit chip after the count. */
108
+ .hub-side-rooms .fav-head > .side-label { display: flex; align-items: center; gap: var(--s-1); }
109
+ .hub-side-rooms .fav-head > .count { padding-right: var(--s-1); }
110
+ .hub-side-rooms .fav-head > .fav-edit { margin-top: var(--s-2); } /* on the label's line (side-label is padded above) */
94
111
  .side-foot > .hub-prefs { flex: 1; min-width: 0; }
95
112
  .side-foot > .hub-session-row, .hub-session-row > .menu, .hub-session-row > .menu > .side-row { width: 100%; min-width: 0; }
96
113
  /* The foot is the sidebar's bottom: its session menu opens upward (as the dashboard's), never below the screen. */
@@ -0,0 +1,42 @@
1
+ /* Hub rooms, track U2: New room, Room settings, the members panel, invitations and Administration → Rooms. Its own
2
+ stylesheet (linked by hub-room-new-strings.js's linkRoomsU2Css, which every U2 module calls), so a tab holding an older
3
+ hub-chat.css or hub-owner.css still draws these. Built on the shared field / btn / tag / dot / note pieces; only the
4
+ layout of tags, results, rows and the rail is here. */
5
+ .hub-room-picker { display: flex; flex-direction: column; gap: var(--s-1); }
6
+ .hub-room-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
7
+ .hub-room-tags > .tag { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-xs); max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
8
+ .hub-room-results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); max-height: 240px; overflow-y: auto; }
9
+ .hub-room-result { display: flex; width: 100%; align-items: baseline; gap: var(--s-2); padding: var(--s-2); background: transparent; border: 0; text-align: start; cursor: pointer; color: inherit; font: inherit; min-height: 40px; }
10
+ .hub-room-result:hover, .hub-room-result:focus-visible { background: var(--surface-2); }
11
+ .hub-room-new .form, .hub-room-settings section.form { display: flex; flex-direction: column; gap: var(--s-3); }
12
+ .hub-room-settings section + section { margin-top: var(--s-4); }
13
+ /* Room settings → Name: the label above, then the input and 儲存 on one line, the input taking the rest of it. */
14
+ .hub-room-name-row .field-row > input { flex: 1; min-width: 0; }
15
+ .hub-room-name-row .field-row > .btn { flex: none; min-height: 40px; }
16
+ .hub-room-settings h4, .hub-room-members h4, .hub-agent-rooms h4 { margin: 0 0 var(--s-2); font-size: var(--fs-sm); color: var(--text-2); }
17
+ .hub-room-settings fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-1); }
18
+ .hub-settings-people, .hub-settings-agents, .hub-settings-invited, .hub-agent-rooms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
19
+ .hub-settings-row, .hub-agent-rooms li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-1) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
20
+ .hub-settings-row > span { min-width: 0; overflow-wrap: anywhere; }
21
+ .hub-room-members { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-3); }
22
+ .hub-room-members ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
23
+ .hub-member, .hub-member-open { display: flex; flex-direction: column; gap: 2px; }
24
+ .hub-member-open { width: 100%; background: transparent; border: 0; padding: var(--s-1); border-radius: var(--r-sm); text-align: start; cursor: pointer; color: inherit; font: inherit; }
25
+ .hub-member-open:hover, .hub-member-open:focus-visible { background: var(--surface-2); }
26
+ .hub-member-state { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 var(--s-1); font-size: var(--fs-xs); color: var(--text-2); }
27
+ .hub-member-owner { overflow-wrap: anywhere; }
28
+ .hub-member-card { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-2); margin: var(--s-1) 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
29
+ .hub-member-card .field-row { display: flex; flex-wrap: wrap; gap: var(--s-1); }
30
+ .hub-invitations { display: flex; flex-direction: column; gap: var(--s-2); }
31
+ .hub-invitation { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
32
+ .hub-invitation p { margin: 0; overflow-wrap: anywhere; }
33
+ .hub-admin-rooms { display: flex; flex-direction: column; gap: var(--s-4); }
34
+ .hub-admin-all-rooms { overflow-x: auto; }
35
+ .hub-admin-rooms-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
36
+ .hub-admin-rooms-table th, .hub-admin-rooms-table td { text-align: start; padding: var(--s-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
37
+ .hub-admin-rooms-table td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 8em; }
38
+ /* Phone and touch: every button in these screens is at least a fingertip (--tap, 44px) tall and wide — the invitations
39
+ list's 同意/拒絕, its retry, the sidebar's invitations row, 退出這個房間, the member card, Room settings, admin rooms. */
40
+ @media (max-width: 899px), (pointer: coarse) {
41
+ :is(.hub-invitations, .hub-agent-rooms, .hub-room-members, .hub-room-settings, .hub-room-new, .hub-admin-rooms) .btn { min-height: var(--tap); min-width: var(--tap); }
42
+ }
@@ -0,0 +1,16 @@
1
+ // Metadata-only presentation. New leaf module: retained shell modules need no new named exports.
2
+ import { register, t } from "./app-i18n.js";
3
+ register("app", { en: { needs_reason_model_switch: "Claude model switched" }, "zh-TW": { needs_reason_model_switch: "Claude 模型已切換" } });
4
+ register("modelObservation", {
5
+ en: { title: "Model switched", safeguards: "Model switched by safeguards", availability: "Model switched due to availability", observed: "Different served model observed",
6
+ turn: "turn", session: "session", unknown: "scope unknown", configured: "Configured model", selection: "Session model", served: "Last served model", unresolved: "Not resolved" },
7
+ "zh-TW": { title: "模型已切換", safeguards: "安全機制已切換模型", availability: "模型因供應狀況而切換", observed: "觀察到不同的回應模型",
8
+ turn: "此回合", session: "此工作階段", unknown: "範圍未知", configured: "設定模型", selection: "工作階段模型", served: "最近回應模型", unresolved: "尚未確認" },
9
+ });
10
+ export const modelName = (value) => {
11
+ const id = String(value || "").replace(/\[1m\]$/i, "").replace(/^claude-/i, "").replace(/-\d{8}$/, "");
12
+ const m = /^(opus|sonnet|haiku)-(\d+)(?:[-.](\d+))?$/i.exec(id);
13
+ return m ? `${m[1][0].toUpperCase()}${m[1].slice(1).toLowerCase()} ${m[2]}${m[3] ? `.${m[3]}` : ""}` : id;
14
+ };
15
+ export const observationLabel = (key) => t(`modelObservation.${key}`);
16
+ export const modelSwitchText = (s) => s ? `${observationLabel(s.cause)}: ${modelName(s.original)} → ${modelName(s.served)} · ${observationLabel(s.scope)}` : "";
@@ -0,0 +1,6 @@
1
+ /* #3822: the "this tab is older than AgEnD" prompt. Its own public stylesheet, linked by stale-tab.js, because the tab
2
+ that shows it kept its OLD app.css (no rule for it there). On a phone or a coarse pointer its Reload is a full touch
3
+ target (style guide rule 7); --tap is a token every version has. */
4
+ @media (max-width: 899px), (pointer: coarse) {
5
+ .stale-tab .btn { min-height: var(--tap, 44px); min-width: var(--tap, 44px); }
6
+ }