@songsid/agend 2.4.0-alpha.2 → 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 (654) hide show
  1. package/dist/account-isolation.d.ts +6 -0
  2. package/dist/account-isolation.js +40 -0
  3. package/dist/account-isolation.js.map +1 -0
  4. package/dist/accounts-signout.d.ts +15 -2
  5. package/dist/accounts-signout.js +52 -4
  6. package/dist/accounts-signout.js.map +1 -1
  7. package/dist/accounts-view.d.ts +114 -27
  8. package/dist/accounts-view.js +123 -60
  9. package/dist/accounts-view.js.map +1 -1
  10. package/dist/agent-cli-instructions.md +15 -9
  11. package/dist/agent-cli.js +47 -20
  12. package/dist/agent-cli.js.map +1 -1
  13. package/dist/agent-endpoint.js +23 -8
  14. package/dist/agent-endpoint.js.map +1 -1
  15. package/dist/agent-list-output.d.ts +23 -0
  16. package/dist/agent-list-output.js +53 -0
  17. package/dist/agent-list-output.js.map +1 -0
  18. package/dist/agent-runtime-change.js +4 -4
  19. package/dist/agent-runtime-change.js.map +1 -1
  20. package/dist/agent-whats-new.js +9 -7
  21. package/dist/agent-whats-new.js.map +1 -1
  22. package/dist/antigravity-first-run.d.ts +4 -0
  23. package/dist/antigravity-first-run.js +57 -0
  24. package/dist/antigravity-first-run.js.map +1 -0
  25. package/dist/antigravity-identity.d.ts +6 -0
  26. package/dist/antigravity-identity.js +27 -0
  27. package/dist/antigravity-identity.js.map +1 -0
  28. package/dist/antigravity-store.d.ts +22 -0
  29. package/dist/antigravity-store.js +79 -0
  30. package/dist/antigravity-store.js.map +1 -0
  31. package/dist/auth-api.js +11 -1
  32. package/dist/auth-api.js.map +1 -1
  33. package/dist/backend/agy-onboarding.d.ts +14 -0
  34. package/dist/backend/agy-onboarding.js +114 -0
  35. package/dist/backend/agy-onboarding.js.map +1 -0
  36. package/dist/backend/antigravity.d.ts +15 -0
  37. package/dist/backend/antigravity.js +44 -4
  38. package/dist/backend/antigravity.js.map +1 -1
  39. package/dist/backend/claude-code.d.ts +8 -0
  40. package/dist/backend/claude-code.js +11 -4
  41. package/dist/backend/claude-code.js.map +1 -1
  42. package/dist/backend/codex.js +7 -3
  43. package/dist/backend/codex.js.map +1 -1
  44. package/dist/backend/credential-profile.d.ts +22 -3
  45. package/dist/backend/credential-profile.js +61 -9
  46. package/dist/backend/credential-profile.js.map +1 -1
  47. package/dist/backend/grok.d.ts +19 -0
  48. package/dist/backend/grok.js +112 -1
  49. package/dist/backend/grok.js.map +1 -1
  50. package/dist/backend/types.d.ts +10 -0
  51. package/dist/backend/types.js.map +1 -1
  52. package/dist/backend-availability.d.ts +6 -0
  53. package/dist/backend-availability.js +11 -0
  54. package/dist/backend-availability.js.map +1 -1
  55. package/dist/browser-backend-signins.d.ts +9 -1
  56. package/dist/browser-backend-signins.js +9 -5
  57. package/dist/browser-backend-signins.js.map +1 -1
  58. package/dist/build-provenance.json +1 -1
  59. package/dist/channel/mcp-tools.js +10 -10
  60. package/dist/channel/mcp-tools.js.map +1 -1
  61. package/dist/child-process.d.ts +1 -0
  62. package/dist/child-process.js.map +1 -1
  63. package/dist/claude-auth-status.d.ts +1 -0
  64. package/dist/claude-auth-status.js +25 -0
  65. package/dist/claude-auth-status.js.map +1 -1
  66. package/dist/claude-model-observation.d.ts +71 -0
  67. package/dist/claude-model-observation.js +169 -0
  68. package/dist/claude-model-observation.js.map +1 -0
  69. package/dist/cli-capability.d.ts +104 -19
  70. package/dist/cli-capability.js +3 -1
  71. package/dist/cli-capability.js.map +1 -1
  72. package/dist/cli-caps-module.d.ts +14 -0
  73. package/dist/cli-caps-module.js +8 -1
  74. package/dist/cli-caps-module.js.map +1 -1
  75. package/dist/cli-registry-check.js +114 -18
  76. package/dist/cli-registry-check.js.map +1 -1
  77. package/dist/cli-registry.d.ts +116 -12
  78. package/dist/cli-registry.js +16 -1
  79. package/dist/cli-registry.js.map +1 -1
  80. package/dist/cli-spec-antigravity.d.ts +53 -11
  81. package/dist/cli-spec-antigravity.js +44 -13
  82. package/dist/cli-spec-antigravity.js.map +1 -1
  83. package/dist/cli-spec-claude-code.d.ts +14 -1
  84. package/dist/cli-spec-claude-code.js +5 -4
  85. package/dist/cli-spec-claude-code.js.map +1 -1
  86. package/dist/cli-spec-codex.d.ts +8 -0
  87. package/dist/cli-spec-codex.js +4 -3
  88. package/dist/cli-spec-codex.js.map +1 -1
  89. package/dist/cli-spec-grok.d.ts +4 -0
  90. package/dist/cli-spec-grok.js +2 -1
  91. package/dist/cli-spec-grok.js.map +1 -1
  92. package/dist/cli-spec-kiro-cli.d.ts +7 -0
  93. package/dist/cli-spec-kiro-cli.js +3 -2
  94. package/dist/cli-spec-kiro-cli.js.map +1 -1
  95. package/dist/cli-spec-muse.d.ts +4 -0
  96. package/dist/cli-spec-muse.js +2 -1
  97. package/dist/cli-spec-muse.js.map +1 -1
  98. package/dist/cli-spec-opencode.d.ts +1 -0
  99. package/dist/cli-spec-opencode.js +1 -0
  100. package/dist/cli-spec-opencode.js.map +1 -1
  101. package/dist/credential-store-proof.d.ts +6 -0
  102. package/dist/credential-store-proof.js +30 -0
  103. package/dist/credential-store-proof.js.map +1 -0
  104. package/dist/cross-instance-envelope.d.ts +4 -1
  105. package/dist/cross-instance-envelope.js +12 -7
  106. package/dist/cross-instance-envelope.js.map +1 -1
  107. package/dist/daemon.d.ts +24 -2
  108. package/dist/daemon.js +265 -37
  109. package/dist/daemon.js.map +1 -1
  110. package/dist/decision-list.d.ts +5 -4
  111. package/dist/decision-list.js +22 -8
  112. package/dist/decision-list.js.map +1 -1
  113. package/dist/delivery-consumed-watch.d.ts +24 -0
  114. package/dist/delivery-consumed-watch.js +21 -10
  115. package/dist/delivery-consumed-watch.js.map +1 -1
  116. package/dist/delivery-outbox.d.ts +5 -1
  117. package/dist/delivery-outbox.js +5 -0
  118. package/dist/delivery-outbox.js.map +1 -1
  119. package/dist/fleet-manager.d.ts +31 -2
  120. package/dist/fleet-manager.js +238 -56
  121. package/dist/fleet-manager.js.map +1 -1
  122. package/dist/fleet-windows-runtime.js +6 -6
  123. package/dist/fleet-windows-runtime.js.map +1 -1
  124. package/dist/general-knowledge/skills/concepts/SKILL.md +48 -7
  125. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -6
  126. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +18 -8
  127. package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
  128. package/dist/general-knowledge/skills/hub/SKILL.md +518 -0
  129. package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -1
  130. package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
  131. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +199 -40
  132. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +5 -1
  133. package/dist/general-role.d.ts +1 -1
  134. package/dist/general-role.js +1 -0
  135. package/dist/general-role.js.map +1 -1
  136. package/dist/grok-delivery-proof.d.ts +24 -0
  137. package/dist/grok-delivery-proof.js +124 -0
  138. package/dist/grok-delivery-proof.js.map +1 -0
  139. package/dist/hub/assistant/admin-types.d.ts +43 -0
  140. package/dist/hub/assistant/admin-types.js +2 -0
  141. package/dist/hub/assistant/admin-types.js.map +1 -0
  142. package/dist/hub/assistant/claude-host.d.ts +17 -0
  143. package/dist/hub/assistant/claude-host.js +300 -0
  144. package/dist/hub/assistant/claude-host.js.map +1 -0
  145. package/dist/hub/assistant/context.d.ts +3 -0
  146. package/dist/hub/assistant/context.js +7 -0
  147. package/dist/hub/assistant/context.js.map +1 -0
  148. package/dist/hub/assistant/fleet-host.d.ts +19 -0
  149. package/dist/hub/assistant/fleet-host.js +28 -0
  150. package/dist/hub/assistant/fleet-host.js.map +1 -0
  151. package/dist/hub/assistant/runner.d.ts +64 -0
  152. package/dist/hub/assistant/runner.js +239 -0
  153. package/dist/hub/assistant/runner.js.map +1 -0
  154. package/dist/hub/assistant/service.d.ts +51 -0
  155. package/dist/hub/assistant/service.js +143 -0
  156. package/dist/hub/assistant/service.js.map +1 -0
  157. package/dist/hub/assistant/store.d.ts +3 -0
  158. package/dist/hub/assistant/store.js +65 -0
  159. package/dist/hub/assistant/store.js.map +1 -0
  160. package/dist/hub/assistant/types.d.ts +60 -0
  161. package/dist/hub/assistant/types.js +2 -0
  162. package/dist/hub/assistant/types.js.map +1 -0
  163. package/dist/hub/buttons.d.ts +3 -0
  164. package/dist/hub/buttons.js +11 -11
  165. package/dist/hub/buttons.js.map +1 -1
  166. package/dist/hub/catalog.d.ts +13 -6
  167. package/dist/hub/catalog.js +127 -35
  168. package/dist/hub/catalog.js.map +1 -1
  169. package/dist/hub/client.d.ts +16 -0
  170. package/dist/hub/client.js +52 -9
  171. package/dist/hub/client.js.map +1 -1
  172. package/dist/hub/compose/member.d.ts +8 -1
  173. package/dist/hub/compose/member.js +238 -57
  174. package/dist/hub/compose/member.js.map +1 -1
  175. package/dist/hub/compose/server.d.ts +17 -1
  176. package/dist/hub/compose/server.js +76 -13
  177. package/dist/hub/compose/server.js.map +1 -1
  178. package/dist/hub/directory/admission.d.ts +15 -0
  179. package/dist/hub/directory/admission.js +56 -0
  180. package/dist/hub/directory/admission.js.map +1 -0
  181. package/dist/hub/directory/directory.d.ts +1 -1
  182. package/dist/hub/directory/directory.js +114 -0
  183. package/dist/hub/directory/directory.js.map +1 -1
  184. package/dist/hub/directory/types.d.ts +27 -0
  185. package/dist/hub/directory/types.js.map +1 -1
  186. package/dist/hub/enrolment-code.d.ts +1 -1
  187. package/dist/hub/enrolment-code.js +4 -4
  188. package/dist/hub/enrolment-code.js.map +1 -1
  189. package/dist/hub/grant-access.d.ts +11 -0
  190. package/dist/hub/grant-access.js +113 -0
  191. package/dist/hub/grant-access.js.map +1 -0
  192. package/dist/hub/grant-search.d.ts +9 -0
  193. package/dist/hub/grant-search.js +92 -0
  194. package/dist/hub/grant-search.js.map +1 -0
  195. package/dist/hub/group-policy/admin-control.d.ts +1 -0
  196. package/dist/hub/group-policy/admin-control.js +4 -2
  197. package/dist/hub/group-policy/admin-control.js.map +1 -1
  198. package/dist/hub/group-policy/admin-facts.d.ts +1 -0
  199. package/dist/hub/group-policy/admin-facts.js +2 -1
  200. package/dist/hub/group-policy/admin-facts.js.map +1 -1
  201. package/dist/hub/group-policy/admin-impact.d.ts +2 -0
  202. package/dist/hub/group-policy/admin-impact.js +10 -2
  203. package/dist/hub/group-policy/admin-impact.js.map +1 -1
  204. package/dist/hub/group-policy/admin-inventory.js +1 -1
  205. package/dist/hub/group-policy/admin-inventory.js.map +1 -1
  206. package/dist/hub/group-policy/admin-read.d.ts +1 -0
  207. package/dist/hub/group-policy/admin-read.js +3 -2
  208. package/dist/hub/group-policy/admin-read.js.map +1 -1
  209. package/dist/hub/group-policy/authorization.d.ts +5 -2
  210. package/dist/hub/group-policy/authorization.js +73 -32
  211. package/dist/hub/group-policy/authorization.js.map +1 -1
  212. package/dist/hub/group-policy/errors.d.ts +9 -0
  213. package/dist/hub/group-policy/errors.js +13 -0
  214. package/dist/hub/group-policy/errors.js.map +1 -0
  215. package/dist/hub/group-policy/impact-inventory.js +20 -4
  216. package/dist/hub/group-policy/impact-inventory.js.map +1 -1
  217. package/dist/hub/group-policy/resources.d.ts +4 -5
  218. package/dist/hub/group-policy/resources.js +26 -19
  219. package/dist/hub/group-policy/resources.js.map +1 -1
  220. package/dist/hub/group-policy/store.d.ts +21 -12
  221. package/dist/hub/group-policy/store.js +99 -109
  222. package/dist/hub/group-policy/store.js.map +1 -1
  223. package/dist/hub/group-policy/welcome.js.map +1 -1
  224. package/dist/hub/http/compose.d.ts +1 -0
  225. package/dist/hub/http/compose.js +463 -20
  226. package/dist/hub/http/compose.js.map +1 -1
  227. package/dist/hub/http/core.d.ts +24 -5
  228. package/dist/hub/http/core.js +181 -54
  229. package/dist/hub/http/core.js.map +1 -1
  230. package/dist/hub/http/deps.d.ts +26 -0
  231. package/dist/hub/http/schema.js +19 -0
  232. package/dist/hub/http/schema.js.map +1 -1
  233. package/dist/hub/init/member-certificate.d.ts +1 -0
  234. package/dist/hub/init/member-certificate.js +39 -0
  235. package/dist/hub/init/member-certificate.js.map +1 -0
  236. package/dist/hub/init/plan-digest.js +1 -0
  237. package/dist/hub/init/plan-digest.js.map +1 -1
  238. package/dist/hub/invitations.d.ts +96 -0
  239. package/dist/hub/invitations.js +292 -0
  240. package/dist/hub/invitations.js.map +1 -0
  241. package/dist/hub/join/certificate-trust.d.ts +13 -0
  242. package/dist/hub/join/certificate-trust.js +41 -0
  243. package/dist/hub/join/certificate-trust.js.map +1 -0
  244. package/dist/hub/join/certificate.d.ts +11 -0
  245. package/dist/hub/join/certificate.js +67 -0
  246. package/dist/hub/join/certificate.js.map +1 -0
  247. package/dist/hub/join/client.d.ts +5 -0
  248. package/dist/hub/join/client.js +30 -3
  249. package/dist/hub/join/client.js.map +1 -1
  250. package/dist/hub/join/http.js +5 -3
  251. package/dist/hub/join/http.js.map +1 -1
  252. package/dist/hub/join/local.d.ts +37 -1
  253. package/dist/hub/join/local.js +142 -14
  254. package/dist/hub/join/local.js.map +1 -1
  255. package/dist/hub/join/service.d.ts +19 -0
  256. package/dist/hub/join/service.js +46 -35
  257. package/dist/hub/join/service.js.map +1 -1
  258. package/dist/hub/join/trust.d.ts +9 -0
  259. package/dist/hub/join/trust.js +35 -0
  260. package/dist/hub/join/trust.js.map +1 -1
  261. package/dist/hub/member/pairing-api.js +12 -1
  262. package/dist/hub/member/pairing-api.js.map +1 -1
  263. package/dist/hub/member/room-ask.d.ts +137 -0
  264. package/dist/hub/member/room-ask.js +358 -0
  265. package/dist/hub/member/room-ask.js.map +1 -0
  266. package/dist/hub/member-journal.d.ts +18 -1
  267. package/dist/hub/member-journal.js +76 -3
  268. package/dist/hub/member-journal.js.map +1 -1
  269. package/dist/hub/member-origin.d.ts +177 -0
  270. package/dist/hub/member-origin.js +314 -0
  271. package/dist/hub/member-origin.js.map +1 -0
  272. package/dist/hub/pairing-notices.d.ts +1 -0
  273. package/dist/hub/pairing-notices.js +2 -1
  274. package/dist/hub/pairing-notices.js.map +1 -1
  275. package/dist/hub/pairing.d.ts +11 -0
  276. package/dist/hub/pairing.js +69 -21
  277. package/dist/hub/pairing.js.map +1 -1
  278. package/dist/hub/policy.d.ts +1 -1
  279. package/dist/hub/policy.js +19 -6
  280. package/dist/hub/policy.js.map +1 -1
  281. package/dist/hub/protocol.d.ts +172 -0
  282. package/dist/hub/protocol.js +25 -2
  283. package/dist/hub/protocol.js.map +1 -1
  284. package/dist/hub/quota.d.ts +2 -1
  285. package/dist/hub/quota.js +2 -2
  286. package/dist/hub/quota.js.map +1 -1
  287. package/dist/hub/roles/authority.d.ts +45 -0
  288. package/dist/hub/roles/authority.js +199 -0
  289. package/dist/hub/roles/authority.js.map +1 -0
  290. package/dist/hub/roles/change.d.ts +18 -0
  291. package/dist/hub/roles/change.js +76 -0
  292. package/dist/hub/roles/change.js.map +1 -0
  293. package/dist/hub/roles/clock.d.ts +18 -0
  294. package/dist/hub/roles/clock.js +58 -0
  295. package/dist/hub/roles/clock.js.map +1 -0
  296. package/dist/hub/roles/convert.d.ts +11 -0
  297. package/dist/hub/roles/convert.js +27 -0
  298. package/dist/hub/roles/convert.js.map +1 -0
  299. package/dist/hub/roles/cutover-inventory.d.ts +14 -0
  300. package/dist/hub/roles/cutover-inventory.js +42 -0
  301. package/dist/hub/roles/cutover-inventory.js.map +1 -0
  302. package/dist/hub/roles/cutover-marker.d.ts +57 -0
  303. package/dist/hub/roles/cutover-marker.js +26 -0
  304. package/dist/hub/roles/cutover-marker.js.map +1 -0
  305. package/dist/hub/roles/cutover.d.ts +32 -0
  306. package/dist/hub/roles/cutover.js +170 -0
  307. package/dist/hub/roles/cutover.js.map +1 -0
  308. package/dist/hub/roles/delegation.d.ts +24 -0
  309. package/dist/hub/roles/delegation.js +111 -0
  310. package/dist/hub/roles/delegation.js.map +1 -0
  311. package/dist/hub/roles/evaluate.d.ts +50 -0
  312. package/dist/hub/roles/evaluate.js +96 -0
  313. package/dist/hub/roles/evaluate.js.map +1 -0
  314. package/dist/hub/roles/expiry.d.ts +46 -0
  315. package/dist/hub/roles/expiry.js +180 -0
  316. package/dist/hub/roles/expiry.js.map +1 -0
  317. package/dist/hub/roles/mode-effects.d.ts +5 -0
  318. package/dist/hub/roles/mode-effects.js +21 -0
  319. package/dist/hub/roles/mode-effects.js.map +1 -0
  320. package/dist/hub/roles/model.d.ts +171 -0
  321. package/dist/hub/roles/model.js +79 -0
  322. package/dist/hub/roles/model.js.map +1 -0
  323. package/dist/hub/roles/read.d.ts +33 -0
  324. package/dist/hub/roles/read.js +55 -0
  325. package/dist/hub/roles/read.js.map +1 -0
  326. package/dist/hub/roles/writer.d.ts +80 -0
  327. package/dist/hub/roles/writer.js +427 -0
  328. package/dist/hub/roles/writer.js.map +1 -0
  329. package/dist/hub/rooms/admin.d.ts +45 -0
  330. package/dist/hub/rooms/admin.js +105 -0
  331. package/dist/hub/rooms/admin.js.map +1 -0
  332. package/dist/hub/rooms/agents.d.ts +74 -0
  333. package/dist/hub/rooms/agents.js +333 -0
  334. package/dist/hub/rooms/agents.js.map +1 -0
  335. package/dist/hub/rooms/assistant.d.ts +44 -0
  336. package/dist/hub/rooms/assistant.js +179 -0
  337. package/dist/hub/rooms/assistant.js.map +1 -0
  338. package/dist/hub/rooms/context.d.ts +10 -0
  339. package/dist/hub/rooms/context.js +24 -0
  340. package/dist/hub/rooms/context.js.map +1 -0
  341. package/dist/hub/rooms/direct-view.d.ts +39 -0
  342. package/dist/hub/rooms/direct-view.js +38 -0
  343. package/dist/hub/rooms/direct-view.js.map +1 -0
  344. package/dist/hub/rooms/directory.d.ts +35 -0
  345. package/dist/hub/rooms/directory.js +98 -0
  346. package/dist/hub/rooms/directory.js.map +1 -0
  347. package/dist/hub/rooms/schema.d.ts +11 -0
  348. package/dist/hub/rooms/schema.js +73 -0
  349. package/dist/hub/rooms/schema.js.map +1 -0
  350. package/dist/hub/rooms/service.d.ts +449 -0
  351. package/dist/hub/rooms/service.js +581 -0
  352. package/dist/hub/rooms/service.js.map +1 -0
  353. package/dist/hub/rooms/types.d.ts +79 -0
  354. package/dist/hub/rooms/types.js +2 -0
  355. package/dist/hub/rooms/types.js.map +1 -0
  356. package/dist/hub/rooms.d.ts +15 -1
  357. package/dist/hub/rooms.js +76 -31
  358. package/dist/hub/rooms.js.map +1 -1
  359. package/dist/hub/runtime.d.ts +8 -0
  360. package/dist/hub/runtime.js +57 -3
  361. package/dist/hub/runtime.js.map +1 -1
  362. package/dist/hub/server.d.ts +28 -0
  363. package/dist/hub/server.js +66 -6
  364. package/dist/hub/server.js.map +1 -1
  365. package/dist/hub/sessions.js +6 -2
  366. package/dist/hub/sessions.js.map +1 -1
  367. package/dist/hub/settings-commit.d.ts +6 -1
  368. package/dist/hub/settings-commit.js +15 -0
  369. package/dist/hub/settings-commit.js.map +1 -1
  370. package/dist/hub/settings-directory-decision.d.ts +2 -2
  371. package/dist/hub/settings-directory-decision.js +7 -5
  372. package/dist/hub/settings-directory-decision.js.map +1 -1
  373. package/dist/hub/settings-directory-proof.js +3 -1
  374. package/dist/hub/settings-directory-proof.js.map +1 -1
  375. package/dist/hub/settings-directory-recovery.d.ts +5 -0
  376. package/dist/hub/settings-directory-recovery.js +14 -4
  377. package/dist/hub/settings-directory-recovery.js.map +1 -1
  378. package/dist/hub/settings-member-address-control.d.ts +84 -0
  379. package/dist/hub/settings-member-address-control.js +150 -0
  380. package/dist/hub/settings-member-address-control.js.map +1 -0
  381. package/dist/hub/settings-member-address-decision.d.ts +229 -0
  382. package/dist/hub/settings-member-address-decision.js +318 -0
  383. package/dist/hub/settings-member-address-decision.js.map +1 -0
  384. package/dist/hub/settings-member-address-http.d.ts +9 -0
  385. package/dist/hub/settings-member-address-http.js +78 -0
  386. package/dist/hub/settings-member-address-http.js.map +1 -0
  387. package/dist/hub/settings-member-address-network.d.ts +2 -0
  388. package/dist/hub/settings-member-address-network.js +22 -0
  389. package/dist/hub/settings-member-address-network.js.map +1 -0
  390. package/dist/hub/settings-member-address-notices.d.ts +22 -0
  391. package/dist/hub/settings-member-address-notices.js +21 -0
  392. package/dist/hub/settings-member-address-notices.js.map +1 -0
  393. package/dist/hub/settings-member-address-policy.d.ts +21 -0
  394. package/dist/hub/settings-member-address-policy.js +34 -0
  395. package/dist/hub/settings-member-address-policy.js.map +1 -0
  396. package/dist/hub/settings-member-address.d.ts +64 -0
  397. package/dist/hub/settings-member-address.js +239 -0
  398. package/dist/hub/settings-member-address.js.map +1 -0
  399. package/dist/hub/sharing.d.ts +10 -0
  400. package/dist/hub/sharing.js +74 -0
  401. package/dist/hub/sharing.js.map +1 -0
  402. package/dist/hub/socket.d.ts +2 -0
  403. package/dist/hub/socket.js +2 -0
  404. package/dist/hub/socket.js.map +1 -1
  405. package/dist/hub/store.js +6 -2
  406. package/dist/hub/store.js.map +1 -1
  407. package/dist/hub/teams/types.d.ts +41 -0
  408. package/dist/hub/teams/types.js +2 -0
  409. package/dist/hub/teams/types.js.map +1 -0
  410. package/dist/hub/tls.d.ts +47 -0
  411. package/dist/hub/tls.js +23 -6
  412. package/dist/hub/tls.js.map +1 -1
  413. package/dist/hub/types.d.ts +68 -4
  414. package/dist/hub/validation.d.ts +1 -1
  415. package/dist/hub/validation.js +2 -2
  416. package/dist/hub/validation.js.map +1 -1
  417. package/dist/hub/web-origin.d.ts +93 -0
  418. package/dist/hub/web-origin.js +174 -0
  419. package/dist/hub/web-origin.js.map +1 -0
  420. package/dist/hub-pilot-trust-settings.d.ts +4 -0
  421. package/dist/hub-pilot-trust-settings.js +13 -0
  422. package/dist/hub-pilot-trust-settings.js.map +1 -0
  423. package/dist/human-delivery-receipts.d.ts +4 -2
  424. package/dist/human-delivery-receipts.js +20 -13
  425. package/dist/human-delivery-receipts.js.map +1 -1
  426. package/dist/inbound-presentation.d.ts +28 -0
  427. package/dist/inbound-presentation.js +48 -0
  428. package/dist/inbound-presentation.js.map +1 -0
  429. package/dist/instance-lifecycle.d.ts +13 -1
  430. package/dist/instance-lifecycle.js +33 -10
  431. package/dist/instance-lifecycle.js.map +1 -1
  432. package/dist/instructions.d.ts +10 -2
  433. package/dist/instructions.js +32 -7
  434. package/dist/instructions.js.map +1 -1
  435. package/dist/locale.js +20 -6
  436. package/dist/locale.js.map +1 -1
  437. package/dist/log-service.d.ts +3 -0
  438. package/dist/log-service.js +39 -22
  439. package/dist/log-service.js.map +1 -1
  440. package/dist/log-steps.d.ts +56 -1
  441. package/dist/log-steps.js +318 -56
  442. package/dist/log-steps.js.map +1 -1
  443. package/dist/login-flows.d.ts +24 -2
  444. package/dist/login-flows.js +53 -22
  445. package/dist/login-flows.js.map +1 -1
  446. package/dist/login-url.js +3 -0
  447. package/dist/login-url.js.map +1 -1
  448. package/dist/machine-accounts.d.ts +42 -12
  449. package/dist/machine-accounts.js +144 -46
  450. package/dist/machine-accounts.js.map +1 -1
  451. package/dist/machine-signins.d.ts +35 -13
  452. package/dist/machine-signins.js +57 -27
  453. package/dist/machine-signins.js.map +1 -1
  454. package/dist/native-instance-input.js +4 -4
  455. package/dist/native-instance-input.js.map +1 -1
  456. package/dist/native-instance-registry.d.ts +3 -3
  457. package/dist/native-instance-registry.js +11 -10
  458. package/dist/native-instance-registry.js.map +1 -1
  459. package/dist/needs-you-hub.js +6 -2
  460. package/dist/needs-you-hub.js.map +1 -1
  461. package/dist/needs-you.d.ts +5 -1
  462. package/dist/needs-you.js +4 -8
  463. package/dist/needs-you.js.map +1 -1
  464. package/dist/office-share-page.js +1 -1
  465. package/dist/office-share-page.js.map +1 -1
  466. package/dist/outbound-handlers.d.ts +1 -0
  467. package/dist/outbound-handlers.js +25 -19
  468. package/dist/outbound-handlers.js.map +1 -1
  469. package/dist/outbound-schemas.d.ts +19 -0
  470. package/dist/outbound-schemas.js +23 -4
  471. package/dist/outbound-schemas.js.map +1 -1
  472. package/dist/profile-signins.d.ts +5 -0
  473. package/dist/profile-signins.js +1 -0
  474. package/dist/profile-signins.js.map +1 -1
  475. package/dist/queued-handoffs.d.ts +3 -1
  476. package/dist/queued-handoffs.js +1 -1
  477. package/dist/queued-handoffs.js.map +1 -1
  478. package/dist/runtime-build-info.js +6 -2
  479. package/dist/runtime-build-info.js.map +1 -1
  480. package/dist/runtime-cli.js +33 -11
  481. package/dist/runtime-cli.js.map +1 -1
  482. package/dist/runtime-client.d.ts +18 -2
  483. package/dist/runtime-client.js +84 -21
  484. package/dist/runtime-client.js.map +1 -1
  485. package/dist/runtime-credential-profiles.d.ts +36 -4
  486. package/dist/runtime-credential-profiles.js +82 -16
  487. package/dist/runtime-credential-profiles.js.map +1 -1
  488. package/dist/runtime-profile-ownership.d.ts +2 -2
  489. package/dist/runtime-profile-ownership.js +3 -3
  490. package/dist/runtime-profile-ownership.js.map +1 -1
  491. package/dist/runtime-protocol.d.ts +5 -3
  492. package/dist/runtime-protocol.js +4 -0
  493. package/dist/runtime-protocol.js.map +1 -1
  494. package/dist/runtime-remote-accounts.d.ts +72 -5
  495. package/dist/runtime-remote-accounts.js +293 -52
  496. package/dist/runtime-remote-accounts.js.map +1 -1
  497. package/dist/runtime-remote-setup.d.ts +2 -2
  498. package/dist/runtime-remote-setup.js +2 -2
  499. package/dist/runtime-remote-setup.js.map +1 -1
  500. package/dist/runtime-signin-transport.d.ts +22 -4
  501. package/dist/runtime-signin-transport.js +50 -12
  502. package/dist/runtime-signin-transport.js.map +1 -1
  503. package/dist/runtime-signin.d.ts +42 -0
  504. package/dist/runtime-signin.js +105 -9
  505. package/dist/runtime-signin.js.map +1 -1
  506. package/dist/runtime-transcript-source.d.ts +2 -0
  507. package/dist/runtime-transcript-source.js +23 -1
  508. package/dist/runtime-transcript-source.js.map +1 -1
  509. package/dist/runtime-windows-bridge.js +6 -1
  510. package/dist/runtime-windows-bridge.js.map +1 -1
  511. package/dist/scheduler/task-board.d.ts +1 -0
  512. package/dist/scheduler/task-board.js +10 -1
  513. package/dist/scheduler/task-board.js.map +1 -1
  514. package/dist/settings-api.d.ts +1 -0
  515. package/dist/settings-api.js +15 -8
  516. package/dist/settings-api.js.map +1 -1
  517. package/dist/settings-baseline.d.ts +3 -0
  518. package/dist/settings-baseline.js +2 -2
  519. package/dist/settings-baseline.js.map +1 -1
  520. package/dist/settings-effect.d.ts +3 -0
  521. package/dist/settings-effect.js +12 -2
  522. package/dist/settings-effect.js.map +1 -1
  523. package/dist/signin-keepalive.d.ts +31 -2
  524. package/dist/signin-keepalive.js +123 -12
  525. package/dist/signin-keepalive.js.map +1 -1
  526. package/dist/structured-signin-transport.d.ts +2 -2
  527. package/dist/structured-signin-transport.js +27 -6
  528. package/dist/structured-signin-transport.js.map +1 -1
  529. package/dist/structured-signin.d.ts +16 -2
  530. package/dist/structured-signin.js +59 -4
  531. package/dist/structured-signin.js.map +1 -1
  532. package/dist/task-board-tool.d.ts +0 -13
  533. package/dist/task-board-tool.js +42 -6
  534. package/dist/task-board-tool.js.map +1 -1
  535. package/dist/tool-receipt-output.d.ts +151 -0
  536. package/dist/tool-receipt-output.js +50 -0
  537. package/dist/tool-receipt-output.js.map +1 -0
  538. package/dist/topic-commands.js +2 -1
  539. package/dist/topic-commands.js.map +1 -1
  540. package/dist/transcript-jsonl.d.ts +24 -0
  541. package/dist/transcript-jsonl.js +72 -22
  542. package/dist/transcript-jsonl.js.map +1 -1
  543. package/dist/transcript-monitor.d.ts +5 -1
  544. package/dist/transcript-monitor.js +65 -3
  545. package/dist/transcript-monitor.js.map +1 -1
  546. package/dist/transcript-needles.d.ts +1 -1
  547. package/dist/transcript-needles.js +1 -1
  548. package/dist/transcript-records.d.ts +2 -1
  549. package/dist/transcript-records.js.map +1 -1
  550. package/dist/transcript-sources.d.ts +4 -0
  551. package/dist/transcript-sources.js +2 -0
  552. package/dist/transcript-sources.js.map +1 -1
  553. package/dist/ui/accounts-keepalive.js +15 -6
  554. package/dist/ui/accounts-manage.js +25 -5
  555. package/dist/ui/accounts-view.js +28 -24
  556. package/dist/ui/agent-details-settings.js +10 -1
  557. package/dist/ui/agent-proposals.js +22 -2
  558. package/dist/ui/agent-runtime-settings.js +3 -3
  559. package/dist/ui/backend-signin.js +4 -4
  560. package/dist/ui/chat-activity.js +2 -2
  561. package/dist/ui/cli-caps.js +7 -7
  562. package/dist/ui/credential-profile-select.js +32 -19
  563. package/dist/ui/fleet-canvas.js +5 -2
  564. package/dist/ui/fleet-office-card.js +4 -2
  565. package/dist/ui/fleet-org.js +2 -0
  566. package/dist/ui/hub-admin-rooms-strings.js +28 -0
  567. package/dist/ui/hub-admin-rooms.js +77 -0
  568. package/dist/ui/hub-assistant-admin-strings.js +26 -0
  569. package/dist/ui/hub-assistant-admin.js +85 -0
  570. package/dist/ui/hub-chat-store.js +8 -4
  571. package/dist/ui/hub-client.js +224 -33
  572. package/dist/ui/hub-enrolment-code.js +1 -1
  573. package/dist/ui/hub-grant-picker.js +100 -0
  574. package/dist/ui/hub-group-search.js +2 -2
  575. package/dist/ui/hub-invitations-strings.js +30 -0
  576. package/dist/ui/hub-invitations.js +108 -0
  577. package/dist/ui/hub-join-one-strings.js +4 -2
  578. package/dist/ui/hub-join-steps.js +5 -2
  579. package/dist/ui/hub-pairing-form-strings.js +48 -0
  580. package/dist/ui/hub-pilot-trust-strings.js +27 -0
  581. package/dist/ui/hub-pilot-trust.js +41 -0
  582. package/dist/ui/hub-room-composer.js +113 -0
  583. package/dist/ui/hub-room-favorites.js +90 -0
  584. package/dist/ui/hub-room-list.js +152 -0
  585. package/dist/ui/hub-room-members-strings.js +12 -0
  586. package/dist/ui/hub-room-members.js +104 -0
  587. package/dist/ui/hub-room-new-strings.js +46 -0
  588. package/dist/ui/hub-room-new.js +135 -0
  589. package/dist/ui/hub-room-presence.js +123 -0
  590. package/dist/ui/hub-room-settings-strings.js +26 -0
  591. package/dist/ui/hub-room-settings.js +134 -0
  592. package/dist/ui/hub-room-strings.js +222 -0
  593. package/dist/ui/hub-room-thread.js +262 -0
  594. package/dist/ui/hub-room-unread.js +51 -0
  595. package/dist/ui/hub-room-working.js +29 -0
  596. package/dist/ui/log-row.js +14 -5
  597. package/dist/ui/machine-signin.js +47 -14
  598. package/dist/ui/panel-details.js +6 -1
  599. package/dist/ui/panel-fleet.js +2 -2
  600. package/dist/ui/panel-hub.js +145 -59
  601. package/dist/ui/panel-needs.js +2 -0
  602. package/dist/ui/panel-settings.js +2 -2
  603. package/dist/ui/settings-hub-company-join.js +32 -11
  604. package/dist/ui/settings-hub-connection.js +9 -3
  605. package/dist/ui/settings-hub-member-address.js +205 -0
  606. package/dist/ui/settings-hub-section.js +4 -0
  607. package/dist/ui/settings-hub-web-address.js +233 -0
  608. package/dist/ui/settings-hub.js +16 -4
  609. package/dist/ui/shared/accounts-keepalive.css +8 -0
  610. package/dist/ui/shared/accounts-usage-pool.css +10 -0
  611. package/dist/ui/shared/accounts.css +9 -0
  612. package/dist/ui/shared/app-i18n.js +2 -2
  613. package/dist/ui/shared/app-needs.js +3 -0
  614. package/dist/ui/shared/app-shell.js +4 -1
  615. package/dist/ui/shared/app.css +43 -5
  616. package/dist/ui/shared/chat-render.js +10 -0
  617. package/dist/ui/shared/chat-thread.js +14 -5
  618. package/dist/ui/shared/hub-chat.css +17 -0
  619. package/dist/ui/shared/hub-grant-picker.css +4 -0
  620. package/dist/ui/shared/hub-rooms-u2.css +42 -0
  621. package/dist/ui/shared/hub-sharing.css +4 -0
  622. package/dist/ui/shared/model-observation.js +16 -0
  623. package/dist/ui/shared/stale-tab.css +6 -0
  624. package/dist/ui/shared/stale-tab.js +50 -0
  625. package/dist/ui/shared/view-strings.js +2 -2
  626. package/dist/ui/structured-signin.js +19 -6
  627. package/dist/ui/usage-pool.js +76 -0
  628. package/dist/usage/agent-output.d.ts +144 -0
  629. package/dist/usage/agent-output.js +75 -0
  630. package/dist/usage/agent-output.js.map +1 -0
  631. package/dist/usage/provider-alerts.d.ts +6 -0
  632. package/dist/usage/provider-alerts.js +6 -0
  633. package/dist/usage/provider-alerts.js.map +1 -1
  634. package/dist/usage/providers.d.ts +2 -2
  635. package/dist/usage/providers.js +60 -18
  636. package/dist/usage/providers.js.map +1 -1
  637. package/dist/usage/usage-api.d.ts +12 -0
  638. package/dist/usage/usage-api.js +39 -0
  639. package/dist/usage/usage-api.js.map +1 -1
  640. package/dist/web-api.d.ts +4 -0
  641. package/dist/web-api.js +32 -13
  642. package/dist/web-api.js.map +1 -1
  643. package/dist/web-backend-login.d.ts +4 -1
  644. package/dist/web-backend-login.js.map +1 -1
  645. package/dist/windows-cli-providers.js +5 -1
  646. package/dist/windows-cli-providers.js.map +1 -1
  647. package/dist/windows-cli-worker.d.ts +33 -1
  648. package/dist/windows-cli-worker.js +150 -10
  649. package/dist/windows-cli-worker.js.map +1 -1
  650. package/dist/windows-cli.d.ts +7 -1
  651. package/dist/windows-cli.js +19 -2
  652. package/dist/windows-cli.js.map +1 -1
  653. package/dist/workflow-templates/default.md +2 -2
  654. package/package.json +1 -1
@@ -0,0 +1,233 @@
1
+ // M-2901 / #3428: fleet Settings → Hub → "Hub address", for this computer's host owner (the page mark below; the server's D3
2
+ // proof decides). The address people enter in AgEnD Settings → Hub and open in their browser. One field; where the Hub
3
+ // listens and which certificate it uses follow from it, and can be set under Advanced. Check (prepare) shows what changes,
4
+ // then one Confirm: everyone signs in to the Hub's pages again, connected Fleets stay connected (their member address,
5
+ // pins and credentials are untouched — #3429 is the member address). Own lazy module with its own words, so an older tab
6
+ // or server simply leaves it out. 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 } from "/assets/ui-states.js";
9
+ import { register, t, lang } from "/assets/app-i18n.js";
10
+ import { api } from "./settings-confirm.js";
11
+
12
+ register("hubWebAddress", {
13
+ en: {
14
+ title: "Hub address",
15
+ lead: "The address colleagues enter in AgEnD Settings → Hub and open in their browser.",
16
+ address: "Address", listens: "Listens on", certificate: "Certificate", expires: "expires {0}", selfSigned: "Self-signed",
17
+ change: "Change address", newAddress: "New address", newHint: "https:// is added for you. If the port isn't 443, add a colon and the port number, for example :8443.",
18
+ advanced: "Advanced", listenHost: "Listen on (interface)", listenPort: "Port",
19
+ listenHint: "Where the Hub listens on this computer. Usually the address's own port; change it only if a router or reverse proxy forwards another port.",
20
+ cert_keep: "Keep the current certificate", cert_generate: "Create a self-signed certificate for the new address",
21
+ cert_import: "Use my own certificate", certPem: "Certificate (PEM)", keyPem: "Private key (PEM)",
22
+ importHint: "Paste the PEM text. The certificate must cover the new address. The key is sent once to this computer and never shown again.",
23
+ check: "Check", checking: "Checking…", cancel: "Cancel", back: "Back",
24
+ confirmTitle: "Change the Hub's address?", from: "From", to: "To",
25
+ effect: "Everyone signs in to the Hub's pages again, you too. The old address stops working. Connected Fleets stay connected and don't need to connect again.",
26
+ selfSignedWarn: "Self-signed: browsers warn until it is trusted. Compare this fingerprint before trusting it.",
27
+ confirm: "Confirm change", saving: "Changing…",
28
+ ready: "Done. The Hub now answers at {0}. Sign in there again.", open: "Open the Hub",
29
+ off: "Saved. The Hub is stopped; it uses the new address when it runs again.",
30
+ 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. The old address no longer works.",
31
+ err_invalid: "That isn't a usable address. Use an https address such as hub.example.com, and a port from 1 to 65535.",
32
+ err_port_conflict: "That address or port is the one Fleets connect to. Use a different port.",
33
+ err_port_in_use: "Another program on this computer is using that port. Choose another port under Advanced.",
34
+ err_certificate: "The certificate doesn't fit: it must cover the new address, match its private key and still be valid. Or create a new one under Advanced.",
35
+ err_unchanged: "That is already the Hub's address.",
36
+ err_stale: "The Hub's settings changed meanwhile. Check the address and try again.",
37
+ err_expired: "That took too long. Check again.",
38
+ err_busy: "Another change is still finishing, or a device is finishing its sign-in. Try again in a moment.",
39
+ err_denied: "Only this computer's own dashboard can change the Hub's address. Reload this page and try again.",
40
+ err_unavailable: "The Hub's address can't be changed right now. Reload this page and try again.",
41
+ err_recovery: "The change didn't finish. Reload this page to see the Hub's current address.",
42
+ err_failed: "The address wasn't changed. Try again.",
43
+ },
44
+ "zh-TW": {
45
+ title: "Hub 位址",
46
+ lead: "同仁在 AgEnD 設定 → Hub 輸入、並用瀏覽器開啟的位址。",
47
+ address: "位址", listens: "監聽於", certificate: "憑證", expires: "到期日 {0}", selfSigned: "自簽",
48
+ change: "變更位址", newAddress: "新位址", newHint: "會自動加上 https://。如果連接埠不是 443,請加上冒號和連接埠號碼,例如 :8443。",
49
+ advanced: "進階", listenHost: "監聽介面", listenPort: "連接埠",
50
+ listenHint: "Hub 在這台電腦上監聽的位置。通常就是位址本身的連接埠;只有路由器或反向代理轉送其他連接埠時才需要變更。",
51
+ cert_keep: "沿用目前的憑證", cert_generate: "為新位址建立自簽憑證",
52
+ cert_import: "使用我自己的憑證", certPem: "憑證(PEM)", keyPem: "私鑰(PEM)",
53
+ importHint: "貼上 PEM 文字。憑證必須涵蓋新位址。私鑰只會傳送到這台電腦一次,之後不會再顯示。",
54
+ check: "檢查", checking: "檢查中…", cancel: "取消", back: "返回",
55
+ confirmTitle: "要變更 Hub 的位址嗎?", from: "原位址", to: "新位址",
56
+ effect: "變更後,所有人(包括你)都要重新登入 Hub 網頁,舊位址也會停止運作。已連接的 Fleet 會保持連接,不需要重新連接。",
57
+ selfSignedWarn: "自簽憑證:在設定信任之前,瀏覽器會顯示警告。信任前請先核對這組指紋。",
58
+ confirm: "確認變更", saving: "變更中…",
59
+ ready: "完成。Hub 現在使用 {0},請在那裡重新登入。", open: "開啟 Hub",
60
+ off: "已儲存。Hub 目前已停止,再次執行時會使用新位址。",
61
+ saved_unavailable: "已儲存,但 Hub 還沒有在新位址回應。請確認這台電腦上沒有其他程式使用 {0} 埠,再將「執行這個 Hub」關閉後重新開啟。舊位址已停止運作。",
62
+ err_invalid: "這不是可用的位址。請使用像 hub.example.com 這樣的 https 位址,連接埠為 1 到 65535。",
63
+ err_port_conflict: "這個位址或連接埠是 Fleet 連接 Hub 用的,請改用其他連接埠。",
64
+ err_port_in_use: "這台電腦上有其他程式正在使用這個連接埠。請在「進階」選擇其他連接埠。",
65
+ err_certificate: "憑證不符:必須涵蓋新位址、與私鑰相符,而且尚未過期。也可以在「進階」建立新的憑證。",
66
+ err_unchanged: "這已經是 Hub 目前的位址。",
67
+ err_stale: "Hub 的設定剛剛有變更。請確認位址後再試一次。",
68
+ err_expired: "等候太久了,請再檢查一次。",
69
+ err_busy: "另一項變更還在完成中,或有裝置正在完成登入,請稍後再試。",
70
+ err_denied: "只有這台電腦自己的儀表板可以變更 Hub 的位址。請重新載入這個頁面後再試。",
71
+ err_unavailable: "目前無法變更 Hub 的位址。請重新載入這個頁面後再試。",
72
+ err_recovery: "變更沒有完成。請重新載入這個頁面查看 Hub 目前的位址。",
73
+ err_failed: "位址沒有變更,請再試一次。",
74
+ },
75
+ });
76
+ const copy = (key, ...a) => t(`hubWebAddress.${key}`, ...a);
77
+ const PREFIX = "/api/settings/hub/web-address";
78
+ const ERR = new Set(["invalid", "port_conflict", "port_in_use", "certificate", "unchanged", "stale", "expired", "busy", "denied", "unavailable", "recovery"]);
79
+ const errKey = (code) => `err_${ERR.has(code) ? code : "failed"}`;
80
+
81
+ /** What was typed, as the https origin the server is asked for ("hub.example.com" → "https://hub.example.com"); null if not one. */
82
+ export function typedOrigin(text) {
83
+ const v = String(text || "").trim();
84
+ if (!v) return null;
85
+ try {
86
+ const u = new URL(/^[a-z][a-z0-9+.-]*:\/\//i.test(v) ? v : `https://${v}`);
87
+ return u.protocol === "https:" && u.hostname ? u.origin : null;
88
+ } catch { return null; }
89
+ }
90
+ const portOf = (origin) => { try { const u = new URL(origin); return u.port ? Number(u.port) : 443; } catch { return null; } };
91
+ const hostOf = (origin) => { try { return new URL(origin).hostname; } catch { return ""; } };
92
+ /** The display form of an origin: no https://, no :443. */
93
+ export const shownAddress = (origin) => String(origin || "").replace(/^https:\/\//, "").replace(/:443$/, "");
94
+
95
+ /**
96
+ * Where the Hub should listen for a new address. Today's interface stays; the port follows the address — unless today's port
97
+ * is not the address's own (a router or proxy forwards it), and then it stays as it is.
98
+ */
99
+ export function defaultListen(current, origin) {
100
+ const forwarded = current?.listen && portOf(current.origin) !== current.listen.port;
101
+ return { host: current?.listen?.host || "0.0.0.0", port: forwarded ? current.listen.port : (portOf(origin) ?? current?.listen?.port ?? 443) };
102
+ }
103
+
104
+ export function createWebAddressClient() {
105
+ const call = async (action, body) => {
106
+ try {
107
+ const r = await api(PREFIX + action, { credentials: "same-origin", cache: "no-store", ...(body === undefined ? {} : { method: "POST", body: JSON.stringify(body) }) });
108
+ return r.ok && r.body?.ok ? r.body : { ok: false, code: r.body?.code || "unavailable" };
109
+ } catch { return { ok: false, code: "unavailable" }; }
110
+ };
111
+ return { read: () => call(""), prepare: (candidate) => call("/prepare", candidate), commit: (ref) => call("/commit", { ref }) };
112
+ }
113
+
114
+ /** A certificate's end date in the page's language ("Nov 13, 2027" / 「2027年11月13日」); the server's own text if it isn't a date. */
115
+ export function shownDate(validTo) {
116
+ const d = new Date(String(validTo || ""));
117
+ if (Number.isNaN(d.getTime())) return String(validTo || "");
118
+ try { return new Intl.DateTimeFormat(lang(), { dateStyle: "medium" }).format(d); } catch { return d.toISOString().slice(0, 10); }
119
+ }
120
+ function Fingerprint({ info }) {
121
+ if (!info?.fingerprint256) return null;
122
+ // People compare it byte by byte: a line may break only after a colon, never inside a byte.
123
+ const parts = String(info.fingerprint256).split(":");
124
+ return html`<code class="hub-addr-fp">${parts.map((p, i) => (i ? [":", html`<wbr />`, p] : p))}</code>${info.validTo ? html` <small class="note hub-addr-exp">${copy("expires", shownDate(info.validTo))}</small>` : null}${info.selfSigned ? html` <span class="tag">${copy("selfSigned")}</span>` : null}`;
125
+ }
126
+
127
+ export function HubWebAddressSettings({ client: given = null } = {}) {
128
+ const [client] = useState(() => given || createWebAddressClient());
129
+ const [view, setView] = useState(undefined); // undefined: reading; null: not offered; else { origin, listen, certificate }
130
+ const [step, setStep] = useState("show"); // show | edit | confirm | done
131
+ const [typed, setTyped] = useState(""), [host, setHost] = useState(""), [port, setPort] = useState(""), [cert, setCert] = useState(null);
132
+ const [touched, setTouched] = useState(false); // Advanced was changed by hand: the address no longer re-derives it
133
+ const [certPem, setCertPem] = useState(""), [keyPem, setKeyPem] = useState("");
134
+ const [proposal, setProposal] = useState(null), [outcome, setOutcome] = useState(null), [busy, setBusy] = useState(false), [error, setError] = useState("");
135
+ useEffect(() => {
136
+ let live = true;
137
+ client.read().then((r) => { if (live) setView(r.ok && typeof r.origin === "string" ? r : r.code === "denied" ? null : { failed: true }); });
138
+ return () => { live = false; };
139
+ }, []);
140
+ if (view === null) return null;
141
+ const head = html`<h3>${copy("title")}</h3><p class="note">${copy("lead")}</p>`;
142
+ if (view === undefined) return html`<section class="card hub-web-address" data-section="hub-address">${head}<${Skeleton} variant="rows" lines=${3} /></section>`;
143
+ if (view.failed) return html`<section class="card hub-web-address" data-section="hub-address">${head}<p class="err" role="alert">${copy("err_unavailable")}</p></section>`;
144
+
145
+ const origin = typedOrigin(typed);
146
+ const listen = touched ? { host: host.trim(), port: Number(port) } : defaultListen(view, origin || view.origin);
147
+ const sameHost = !!origin && hostOf(origin) === hostOf(view.origin);
148
+ // Today's certificate unless the address names another host (it only fits today's host name): then a new self-signed one,
149
+ // or the person's own under Advanced. A hand-picked "keep" falls back the same way.
150
+ const picked = touched && cert ? cert : "keep";
151
+ const mode = picked === "keep" && origin && !sameHost ? "generate" : picked;
152
+ const touch = () => { if (!touched) { setTouched(true); setHost(listen.host); setPort(String(listen.port)); setCert(mode); } };
153
+ const edit = () => { setStep("edit"); setTyped(""); setTouched(false); setCert(null); setCertPem(""); setKeyPem(""); setError(""); setOutcome(null); };
154
+ const check = async (e) => {
155
+ e?.preventDefault?.();
156
+ if (busy) return;
157
+ if (!origin || !Number.isInteger(listen.port) || listen.port < 1 || listen.port > 65535 || !listen.host) { setError(copy("err_invalid")); return; }
158
+ if (origin === view.origin && listen.host === view.listen?.host && listen.port === view.listen?.port && mode === "keep") { setError(copy("err_unchanged")); return; }
159
+ setBusy(true); setError("");
160
+ const certificate = mode === "import" ? { mode, certPem, keyPem } : { mode };
161
+ const r = await client.prepare({ origin, listen, certificate });
162
+ setBusy(false);
163
+ if (!r.ok) { setError(copy(errKey(r.code))); return; }
164
+ setKeyPem(""); // sent once; never kept in the page
165
+ setProposal(r); setStep("confirm");
166
+ };
167
+ const confirm = async () => {
168
+ if (busy || !proposal) return;
169
+ setBusy(true); setError("");
170
+ const r = await client.commit(proposal.ref);
171
+ setBusy(false);
172
+ if (!r.ok) { setError(copy(errKey(r.code))); if (r.code === "expired" || r.code === "stale") { setProposal(null); setStep("edit"); } return; }
173
+ setOutcome(r); setProposal(null); setStep("done");
174
+ setView((v) => ({ ...v, origin: r.origin || proposal.summary?.to, listen: proposal.summary?.listen || v.listen, certificate: proposal.certificate || v.certificate }));
175
+ };
176
+ const current = html`<dl class="s-web-ro hub-addr-now">
177
+ <dt>${copy("address")}</dt><dd><a href=${view.origin} target="_blank" rel="noopener noreferrer">${shownAddress(view.origin)}</a></dd>
178
+ ${view.listen ? html`<dt>${copy("listens")}</dt><dd><code>${view.listen.host}:${view.listen.port}</code></dd>` : null}
179
+ ${view.certificate ? html`<dt>${copy("certificate")}</dt><dd><${Fingerprint} info=${view.certificate} /></dd>` : null}
180
+ </dl>`;
181
+ const err = error ? html`<p class="err" role="alert">${error}</p>` : null;
182
+
183
+ if (step === "confirm" && proposal) {
184
+ const s = proposal.summary || {};
185
+ return html`<section class="card hub-web-address" data-section="hub-address">${head}
186
+ <div class="hub-addr-confirm" role="group" aria-label=${copy("confirmTitle")}><h4>${copy("confirmTitle")}</h4>
187
+ <dl class="s-web-ro">
188
+ <dt>${copy("from")}</dt><dd>${shownAddress(s.from)}</dd>
189
+ <dt>${copy("to")}</dt><dd><strong>${shownAddress(s.to)}</strong></dd>
190
+ ${s.listen ? html`<dt>${copy("listens")}</dt><dd><code>${s.listen.host}:${s.listen.port}</code></dd>` : null}
191
+ ${proposal.certificate ? html`<dt>${copy("certificate")}</dt><dd><${Fingerprint} info=${proposal.certificate} /></dd>` : null}
192
+ </dl>
193
+ ${proposal.certificate?.selfSigned && mode !== "keep" ? html`<p class="note">${copy("selfSignedWarn")}</p>` : null}
194
+ <p class="note hub-addr-effect">${copy("effect")}</p>
195
+ <div class="s-row">
196
+ <button type="button" class="btn btn-primary" disabled=${busy} onClick=${confirm}>${busy ? copy("saving") : copy("confirm")}</button>
197
+ <button type="button" class="btn" disabled=${busy} onClick=${() => { setProposal(null); setStep("edit"); setError(""); }}>${copy("back")}</button>
198
+ </div>
199
+ </div>${err}</section>`;
200
+ }
201
+ if (step === "edit") {
202
+ return html`<section class="card hub-web-address" data-section="hub-address">${head}${current}
203
+ <form class="form hub-addr-form" onSubmit=${check}>
204
+ <label class="field"><span>${copy("newAddress")}</span><input id="hubAddrNew" autocomplete="off" inputmode="url" placeholder="hub.example.com" value=${typed} disabled=${busy}
205
+ onInput=${(e) => { setTyped(e.target.value); setError(""); }} /><small class="note">${copy("newHint")}</small></label>
206
+ <details class="s-ui-disclosure hub-addr-advanced"><summary>${copy("advanced")}</summary><div class="s-ui-disclosure-body">
207
+ <div class="grid2">
208
+ <label class="field"><span>${copy("listenHost")}</span><input id="hubAddrHost" autocomplete="off" value=${listen.host} disabled=${busy} onInput=${(e) => { touch(); setHost(e.target.value); setError(""); }} /></label>
209
+ <label class="field"><span>${copy("listenPort")}</span><input id="hubAddrPort" type="number" inputmode="numeric" min="1" max="65535" step="1" value=${String(listen.port)} disabled=${busy}
210
+ onInput=${(e) => { touch(); setPort(e.target.value); setError(""); }} /></label>
211
+ </div>
212
+ <small class="note">${copy("listenHint")}</small>
213
+ <fieldset class="field hub-addr-cert"><legend>${copy("certificate")}</legend>
214
+ ${(sameHost || !origin ? ["keep", "generate", "import"] : ["generate", "import"]).map((m) => html`<label class="check"><input type="radio" name="hubAddrCert" value=${m} checked=${mode === m} disabled=${busy}
215
+ onChange=${() => { touch(); setCert(m); setError(""); }} /> ${copy(`cert_${m}`)}</label>`)}
216
+ ${mode === "import" ? html`<label class="field"><span>${copy("certPem")}</span><textarea id="hubAddrCertPem" rows="4" spellcheck=${false} value=${certPem} disabled=${busy} onInput=${(e) => setCertPem(e.target.value)}></textarea></label>
217
+ <label class="field"><span>${copy("keyPem")}</span><textarea id="hubAddrKeyPem" rows="4" spellcheck=${false} autocomplete="off" value=${keyPem} disabled=${busy} onInput=${(e) => setKeyPem(e.target.value)}></textarea></label>
218
+ <small class="note">${copy("importHint")}</small>` : null}
219
+ </fieldset>
220
+ </div></details>
221
+ <div class="s-row">
222
+ <button type="submit" class="btn btn-primary" disabled=${busy || !typed.trim() || (mode === "import" && (!certPem.trim() || !keyPem.trim()))}>${busy ? copy("checking") : copy("check")}</button>
223
+ <button type="button" class="btn" disabled=${busy} onClick=${() => { setStep("show"); setError(""); }}>${copy("cancel")}</button>
224
+ </div>
225
+ </form>${err}</section>`;
226
+ }
227
+ const done = outcome ? html`<p role="status" class=${outcome.state === "saved_unavailable" ? "err" : "note"}>${outcome.state === "ready" ? copy("ready", shownAddress(outcome.origin))
228
+ : outcome.state === "off" ? copy("off") : copy("saved_unavailable", String(view.listen?.port ?? ""))}</p>
229
+ ` : null;
230
+ // One row: Open the Hub (after a change that is ready) beside Change address.
231
+ return html`<section class="card hub-web-address" data-section="hub-address">${head}${current}${done}
232
+ <div class="s-row">${outcome?.state === "ready" ? html`<a class="btn btn-primary" href=${outcome.origin} target="_blank" rel="noopener noreferrer">${copy("open")}</a>` : null}<button type="button" class="btn" id="hubAddrChange" onClick=${edit}>${copy("change")}</button></div>${err}</section>`;
233
+ }
@@ -4,6 +4,7 @@
4
4
  // Hub key's fingerprint), the key changed (both keys, labelled; only pair again or disconnect), on hold (why) — then
5
5
  // this fleet's own agents with a Share switch each, against the revision shown (a stale tab gets a conflict, never a
6
6
  // silent widening). Everything goes through hubClient(); until slice 1 that is a stub, and the card says so.
7
+ import { register, t } from "/assets/app-i18n.js";
7
8
  import { html, useEffect, useRef, useState } from "/assets/app-html.js";
8
9
  import { Skeleton, ErrorState } from "/assets/ui-states.js";
9
10
  import { Icon } from "/assets/ui-icons.js";
@@ -19,7 +20,12 @@ import { appStore, useStore } from "/assets/app-store.js";
19
20
  import { confirmPlace, pendingView } from "./hub-confirm-place.js";
20
21
  import { hq } from "./hub-quick-strings.js";
21
22
  import { hp } from "./hub-pairing-progress-strings.js";
23
+ import { hpf, pairingCodeState, pairingFailure } from "./hub-pairing-form-strings.js";
22
24
 
25
+ register("hubSharingFleet", {
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." },
27
+ "zh-TW": { hint: "要保留允許名單並暫停或繼續分享,請在 Hub「我分享的 Agent」開啟這個 Agent。關閉「分享」會停止分享。" },
28
+ });
23
29
  const CONNECT_ERRORS = { address: "errAddress", code: "errCode", busy: "errBusy", unreachable: "errUnreachable", refused: "errRefused" };
24
30
  const HOLDS = new Set(["unknown_outcome", "expired", "unsaved", "refused", "revoked", "disconnected", "rejected"]);
25
31
  const PUBLISH_ERRORS = { conflict: "errConflict", unsaved: "errUnsaved", not_paired: "errNotPaired", not_enforceable: "agentNotShareable",
@@ -74,8 +80,11 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
74
80
  if (!current()) return;
75
81
  if (next) setPairing(next);
76
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;
77
85
  const text = !next || !["applied", "failed", "expired", "rejected", "stale"].includes(outcome?.state) ? hp("unknown")
78
86
  : outcome.state === "applied" || !waitingForPairing({ pending }, next) ? null
87
+ : specific ? specific
79
88
  : action === "connect" && next.state === "unpaired" && ["failed", "expired"].includes(outcome.state) ? hp("connectFailed") : hp("notApplied");
80
89
  setMsg(old => old?.pending === pending ? text ? { error: true, text } : null : old);
81
90
  };
@@ -130,12 +139,14 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {}, prefi
130
139
  let body = null;
131
140
  if (!p) body = readError ? html`<${ErrorState} message=${hw("errFailed")} onRetry=${readPairing} />` : html`<${Skeleton} variant="form" lines=${4} />`;
132
141
  else if (p.state === "unpaired") {
133
- const addressOk = ADDRESS_HINT.test(form.address.trim()), codeOk = CODE_HINT.test(form.code.trim());
134
- 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(); }}>
135
145
  <label class="field"><span>${hw("address")}</span><input id="hubAddress" type="url" inputmode="url" autocomplete="off" spellcheck=${false}
136
- 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>
137
147
  <label class="field"><span>${hw("code")}</span><input id="hubCode" autocomplete="one-time-code" spellcheck=${false} autocapitalize="characters"
138
- 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>
139
150
  <div class="field-row"><button type="submit" class="btn btn-primary" disabled=${busy || !addressOk || !codeOk}>${embedded ? labels.pair : hw("connect")}</button></div>
140
151
  </form>`;
141
152
  } else if (p.state === "pending") {
@@ -273,6 +284,7 @@ function HubExposures({ client, pairing }) {
273
284
  return html`<div class="hub-exposures">
274
285
  <h4>${hw("sharedTitle")}</h4>
275
286
  <p class="note">${hw("agentLead")}</p>
287
+ <p class="note hub-sharing-hint">${t("hubSharingFleet.hint")}</p>
276
288
  ${readError ? html`<${ErrorState} message=${hw("errFailed")} onRetry=${load} />` : !rows ? html`<${Skeleton} variant="rows" lines=${3} />` : null}
277
289
  ${rows && !rows.length ? html`<p class="note">${hw("noAgents")}</p>` : null}
278
290
  ${rows && rows.length ? html`<ul class="hub-exposure-list">${rows.map((row) => html`<li key=${row.agent} class=${`hub-exposure${row.state === "published" ? " is-shared" : ""}`}>
@@ -10,3 +10,11 @@
10
10
  /* The ⓘ sits against the switch it explains; the backup-renewal switch is on the same line, with its own ⓘ. */
11
11
  .s-account-keepalive > .s-tipwrap { margin-left: calc(-1 * var(--s-2)); }
12
12
  .s-account-keepalive .s-keepalive-fallback { display: flex; align-items: center; gap: var(--s-2); }
13
+
14
+ /* AGEND-250 (UI gate, rule 7): on a phone the switch is tapped through its label, which is --tap high, and the ⓘ is a --tap box whose 18px circle is drawn inside it (the gate measures the element's own box, so the circle is a pseudo-element). */
15
+ @media (max-width: 899px) {
16
+ .s-account-keepalive .check { min-height: var(--tap); }
17
+ .s-account-keepalive .s-i .s-tipbtn { position: relative; width: var(--tap); height: var(--tap); border-color: transparent; }
18
+ .s-account-keepalive .s-i .s-tipbtn::before { content: ""; position: absolute; inset: calc((var(--tap) - 18px) / 2); border: 1px solid var(--border-strong); border-radius: var(--r-full); }
19
+ .s-account-keepalive .s-i .s-tipbtn:hover::before, .s-account-keepalive .s-i .s-tipbtn:focus-visible::before { border-color: var(--accent); }
20
+ }
@@ -0,0 +1,10 @@
1
+ /* AGEND-113: an account's usage block when it has pools (usage-pool.js): a block per pool, its name over its windows. The block itself is `.s-account-usage` (accounts.css), whose grid a pool spans. */
2
+ .s-account-usage.is-pooled { row-gap: var(--s-2); }
3
+ .s-usage-group { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-1) var(--s-4); min-width: 0; }
4
+ .s-usage-pool { grid-column: 1 / -1; min-width: 0; color: var(--text-3); font-size: var(--fs-xs); font-weight: var(--fw-medium); overflow-wrap: anywhere; }
5
+ /* A window that has reset since the read: its tag, and the full card's "reset since" words where the bar would be. */
6
+ .s-usage-reset { align-items: center; }
7
+ .s-usage-reset-note { grid-column: 2 / -1; min-width: 0; color: var(--text-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
8
+ /* AGEND-119: why the numbers are the last known ones (the cause and when they were read, then what the read said), under the windows and across the block. */
9
+ .s-usage-stale { min-width: 0; overflow-wrap: anywhere; }
10
+ .s-usage-stale-detail { display: block; }
@@ -60,6 +60,8 @@ button.s-account-used { display: inline-flex; align-items: center; gap: var(--s-
60
60
  .s-account-usage.is-stale .u-cm-pct { color: var(--text-3); }
61
61
  .s-account-usage.is-stale .u-cm-fill { background: var(--text-3); }
62
62
  .s-usage-stale { grid-column: 1 / -1; color: var(--text-3); font-size: var(--fs-xs); }
63
+ /* AGEND-119: the reset cell is as wide as its words. The Usage panel's meter gives it a fixed 3.7em, which cuts a week's "↻ 47小時" in zh-TW (a CJK character is a full em); here the bar gives way instead. */
64
+ .s-account-usage .u-cm { grid-template-columns: 2.2em minmax(2em, 1fr) 2.9em minmax(3.7em, max-content); }
63
65
 
64
66
  .s-account-default { margin: 0; }
65
67
  .s-accounts .s-account-default { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--bg); }
@@ -86,3 +88,10 @@ button.s-account-used { display: inline-flex; align-items: center; gap: var(--s-
86
88
  .s-account-install-run > .signin-warn { color: var(--warn); font-weight: var(--fw-semibold); }
87
89
  .s-account-install-output { margin: 0; padding: var(--s-2) var(--s-3); max-height: 14em; overflow: auto; border-radius: var(--r-sm); background: var(--bg); color: var(--text-2); font-size: var(--fs-xs); line-height: 1.5; }
88
90
  .s-account-install-run .s-actions { justify-content: flex-end; }
91
+
92
+ /* AGEND-250 (#3771 review; UI gate, style guide rule 7): on a phone every control of the account cards is a tap target (--tap high). Antigravity made a fourth card with an Add account button and a Fleet-default select; the
93
+ gate's ratchet lets no small control be added, so these are made tap-high for every card (the three listed allowances for them are gone from ui-gate-tap-allowlist.json). The buttons of one kind share one height, so all of them grow. */
94
+ @media (max-width: 899px) {
95
+ .s-account-head .s-account-add, .s-account-machine-head .s-account-add { min-height: var(--tap); min-width: var(--tap); }
96
+ .s-accounts .s-account-default select { min-height: var(--tap); }
97
+ }
@@ -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()}`} />`;
@@ -1816,6 +1816,8 @@ body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-s
1816
1816
  .s-ident { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
1817
1817
  .s-facts { min-width: 0; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1818
1818
  .s-conn .s-actions { margin-left: 0; flex-wrap: nowrap; }
1819
+ /* Retry and Settings stay together: in a wide list they are the last of the connection's three action columns. */
1820
+ .s-conn-buttons { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); }
1819
1821
  @media (max-width: 899px) {
1820
1822
  .s-row.s-conn { grid-template-columns: minmax(0, 1fr) auto; }
1821
1823
  .s-conn .s-facts { grid-column: 1 / -1; grid-row: 2; }
@@ -3698,13 +3700,28 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
3698
3700
  }
3699
3701
  @container settings-page (min-width: 900px) {
3700
3702
  .p-settings .s-agents-list > .s-group:nth-child(2) > .s-group-head { border-radius: 0; }
3701
- .p-settings .s-agent-columns, .p-settings .s-agent-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(120px, .8fr) minmax(170px, 1.2fr) minmax(80px, .6fr) minmax(170px, auto); align-items: center; }
3702
- .p-settings .s-classic-columns, .p-settings .s-classic-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(180px, 1.3fr) minmax(90px, .6fr) minmax(150px, auto); align-items: center; }
3703
+ /* AGEND-256: the columns belong to the list, not to each row. Each row used to be its own grid, so its "auto"
3704
+ actions column took that row's buttons (Pause + Stop when running, only Wake when paused; a longer bot name) and
3705
+ the fr columns before it moved with it: a paused row sat 8–24px right of a running one. The list now holds the
3706
+ tracks; the header, each group and each row take them as a subgrid, so every row measures against the widest.
3707
+ A browser without subgrid keeps the per-row template (the second declaration is dropped). */
3708
+ .p-settings .s-agents-list { --s-cols: minmax(150px, 1.1fr) minmax(120px, .8fr) minmax(170px, 1.2fr) minmax(80px, .6fr) minmax(170px, auto); }
3709
+ .p-settings .s-classic-list { --s-cols: minmax(170px, 1fr) minmax(180px, 1.3fr) minmax(90px, .6fr) minmax(150px, auto); }
3710
+ /* A connection's actions are three columns of their own (token | state | Retry + Settings), so the token chip and the
3711
+ state start at one x in every row, whatever the bot's name and whether Retry is there. */
3712
+ .p-settings .s-connections-list { --s-cols: minmax(180px, .9fr) minmax(180px, 1.4fr) auto auto auto; }
3713
+ .p-settings :is(.s-agents-list, .s-classic-list, .s-connections-list) { display: grid; grid-template-columns: var(--s-cols); column-gap: 16px; row-gap: 0; }
3714
+ .p-settings :is(.s-agents-list, .s-classic-list, .s-connections-list) > *, .p-settings .s-agents-list > .s-group > * { grid-column: 1 / -1; }
3715
+ .p-settings .s-agents-list > .s-group { display: grid; grid-template-columns: var(--s-cols); grid-template-columns: subgrid; column-gap: 16px; }
3716
+ .p-settings :is(.s-agent-columns, .s-agent-row, .s-classic-columns, .s-classic-row, .s-connection-columns),
3717
+ .p-settings .s-connections-list > .s-conn { display: grid; grid-template-columns: var(--s-cols); grid-template-columns: subgrid; column-gap: 16px; align-items: center; }
3703
3718
  .p-settings :is(.s-agent-row, .s-classic-row) > * { grid-column: auto; grid-row: auto; }
3704
3719
  .p-settings :is(.s-agent-row, .s-classic-row) > .s-actions { grid-column: auto; grid-row: auto; }
3705
- .p-settings .s-connection-columns, .p-settings .s-connections-list > .s-conn { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(180px, 1.4fr) minmax(240px, auto); align-items: center; }
3706
- .p-settings .s-connections-list .s-facts, .p-settings .s-connections-list .s-actions { grid-column: auto; grid-row: auto; }
3707
- .p-settings .s-connections-list .s-actions { flex-wrap: wrap; }
3720
+ .p-settings .s-connections-list .s-facts { grid-column: auto; grid-row: auto; text-align: left; }
3721
+ .p-settings .s-connection-columns > span:last-child { grid-column: 3 / -1; }
3722
+ .p-settings .s-connections-list > .s-conn > .s-actions { grid-column: 3 / -1; grid-row: auto; display: grid; grid-template-columns: auto auto auto; grid-template-columns: subgrid; column-gap: 16px; justify-items: start; }
3723
+ .p-settings .s-connections-list .s-state { max-width: 22em; }
3724
+ .p-settings .s-connections-list .s-conn-buttons { justify-self: end; }
3708
3725
  }
3709
3726
  @container settings-page (max-width: 600px) {
3710
3727
  .p-settings :is([data-section="agent-defaults"], [data-section="chat"]) .s-general .grid2 { grid-template-columns: minmax(0, 1fr); }
@@ -4423,7 +4440,28 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
4423
4440
  .s-hub-section .hub-retention .grid2 { grid-template-columns: minmax(0, 1fr); }
4424
4441
  .s-hub-section .hub-retention input { min-width: 0; max-width: 100%; min-height: var(--tap); font-size: var(--fs-md); }
4425
4442
  .s-hub-section .hub-retention button { align-self: flex-start; max-width: 100%; min-height: var(--tap); white-space: normal; }
4443
+ /* M-2901: the Hub address card's fields, choices and buttons are phone tap targets (style guide rule 7). */
4444
+ .s-hub-section .hub-web-address :is(input:not([type="radio"]), .btn, label.check) { min-height: var(--tap); }
4445
+ .s-hub-section .hub-web-address input:not([type="radio"]) { font-size: var(--fs-md); }
4446
+ .s-hub-section .hub-web-address .grid2 { grid-template-columns: minmax(0, 1fr); }
4447
+ .s-hub-section .hub-web-address label.check { display: flex; align-items: center; gap: var(--s-2); }
4426
4448
  }
4449
+ /* M-2901: Settings → Hub → Hub address. Fields fill the card; a fingerprint breaks only after a colon (<wbr>), never inside a
4450
+ byte; an end date stays on one line; notes avoid a one-character last line (the longhand: the text-wrap shorthand would
4451
+ reset the end date's nowrap). Chinese text keeps breaking between characters (keep-all left long clauses with a lone
4452
+ 「。」 on a phone). The certificate choices sit in the Advanced box without a frame of their own. */
4453
+ .hub-web-address :is(input:not([type="radio"]), textarea) { display: block; width: 100%; max-width: 100%; min-width: 0; }
4454
+ .hub-web-address textarea { resize: vertical; font-family: var(--font-mono, monospace); }
4455
+ .hub-web-address .hub-addr-fp { overflow-wrap: normal; word-break: normal; }
4456
+ .hub-web-address .hub-addr-exp { white-space: nowrap; }
4457
+ .hub-web-address :is(.note, [role="status"], .err) { text-wrap-style: pretty; }
4458
+ .hub-web-address fieldset.hub-addr-cert { border: 0; padding: 0; margin: 0; min-width: 0; }
4459
+ .hub-web-address .hub-addr-confirm h4 { margin: 0 0 var(--s-2); }
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; }
4427
4465
 
4428
4466
  /* S-119: the existing company, manual and sharing controls share one Settings card. */
4429
4467
  .s-hub-connection { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
@@ -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");