@songsid/agend 2.4.0-beta.1 → 2.4.0-beta.10

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 (860) hide show
  1. package/dist/agent-cli-instructions.md +4 -1
  2. package/dist/agent-cli.js +14 -2
  3. package/dist/agent-cli.js.map +1 -1
  4. package/dist/agent-endpoint.d.ts +3 -1
  5. package/dist/agent-endpoint.js +15 -3
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/agent-token-header.d.ts +1 -1
  8. package/dist/agent-token-header.js +1 -1
  9. package/dist/app-message-origin.d.ts +2 -0
  10. package/dist/app-message-origin.js +3 -0
  11. package/dist/app-message-origin.js.map +1 -0
  12. package/dist/auth-api.d.ts +8 -0
  13. package/dist/auth-api.js +39 -1
  14. package/dist/auth-api.js.map +1 -1
  15. package/dist/authority/authority-state.d.ts +7 -0
  16. package/dist/authority/authority-state.js +17 -2
  17. package/dist/authority/authority-state.js.map +1 -1
  18. package/dist/authority/web-authority.d.ts +11 -1
  19. package/dist/authority/web-authority.js +11 -1
  20. package/dist/authority/web-authority.js.map +1 -1
  21. package/dist/backend/agy-model-switch.d.ts +22 -0
  22. package/dist/backend/agy-model-switch.js +62 -0
  23. package/dist/backend/agy-model-switch.js.map +1 -0
  24. package/dist/backend/antigravity.d.ts +9 -2
  25. package/dist/backend/antigravity.js +84 -9
  26. package/dist/backend/antigravity.js.map +1 -1
  27. package/dist/backend/claude-code.js +20 -5
  28. package/dist/backend/claude-code.js.map +1 -1
  29. package/dist/backend/cli-env-probe.js +1 -1
  30. package/dist/backend/cli-env-probe.js.map +1 -1
  31. package/dist/backend/cli-runtime-switch.d.ts +90 -0
  32. package/dist/backend/cli-runtime-switch.js +273 -0
  33. package/dist/backend/cli-runtime-switch.js.map +1 -0
  34. package/dist/backend/codex-footer-hints.d.ts +1 -0
  35. package/dist/backend/codex-footer-hints.js +15 -0
  36. package/dist/backend/codex-footer-hints.js.map +1 -1
  37. package/dist/backend/codex-model-switch.d.ts +41 -0
  38. package/dist/backend/codex-model-switch.js +170 -0
  39. package/dist/backend/codex-model-switch.js.map +1 -0
  40. package/dist/backend/codex.d.ts +6 -4
  41. package/dist/backend/codex.js +26 -9
  42. package/dist/backend/codex.js.map +1 -1
  43. package/dist/backend/credential-profile.js +1 -1
  44. package/dist/backend/credential-profile.js.map +1 -1
  45. package/dist/backend/grok-model-switch.d.ts +16 -0
  46. package/dist/backend/grok-model-switch.js +45 -0
  47. package/dist/backend/grok-model-switch.js.map +1 -0
  48. package/dist/backend/grok.js +1 -1
  49. package/dist/backend/grok.js.map +1 -1
  50. package/dist/backend/kiro.js +4 -4
  51. package/dist/backend/kiro.js.map +1 -1
  52. package/dist/backend/muse.d.ts +2 -0
  53. package/dist/backend/muse.js +7 -3
  54. package/dist/backend/muse.js.map +1 -1
  55. package/dist/backend/native-pane.js +1 -1
  56. package/dist/backend/native-pane.js.map +1 -1
  57. package/dist/backend/types.d.ts +2 -0
  58. package/dist/backend/types.js.map +1 -1
  59. package/dist/backend-availability.d.ts +22 -0
  60. package/dist/backend-availability.js +71 -2
  61. package/dist/backend-availability.js.map +1 -1
  62. package/dist/backend-signin-guide.js +1 -1
  63. package/dist/backend-signin-guide.js.map +1 -1
  64. package/dist/build-provenance.json +1 -1
  65. package/dist/channel/adapters/discord.d.ts +10 -0
  66. package/dist/channel/adapters/discord.js +35 -0
  67. package/dist/channel/adapters/discord.js.map +1 -1
  68. package/dist/channel/adapters/telegram.d.ts +2 -0
  69. package/dist/channel/adapters/telegram.js +3 -0
  70. package/dist/channel/adapters/telegram.js.map +1 -1
  71. package/dist/channel/mcp-server.js +10 -1
  72. package/dist/channel/mcp-server.js.map +1 -1
  73. package/dist/channel/mcp-tools.js +9 -1
  74. package/dist/channel/mcp-tools.js.map +1 -1
  75. package/dist/channel/tool-router.js +9 -2
  76. package/dist/channel/tool-router.js.map +1 -1
  77. package/dist/channel/types.d.ts +10 -0
  78. package/dist/classic-channel-manager.d.ts +1 -1
  79. package/dist/classic-channel-manager.js +1 -1
  80. package/dist/cli-audited.js +14 -13
  81. package/dist/cli-audited.js.map +1 -1
  82. package/dist/cli-capability.d.ts +3 -0
  83. package/dist/cli-capability.js.map +1 -1
  84. package/dist/cli-registry-check.js +1 -1
  85. package/dist/cli-registry-check.js.map +1 -1
  86. package/dist/cli-registry.d.ts +1 -0
  87. package/dist/cli-spec-antigravity.d.ts +1 -0
  88. package/dist/cli-spec-antigravity.js +3 -1
  89. package/dist/cli-spec-antigravity.js.map +1 -1
  90. package/dist/cli.js +8 -0
  91. package/dist/cli.js.map +1 -1
  92. package/dist/config-validator.js +18 -1
  93. package/dist/config-validator.js.map +1 -1
  94. package/dist/connect/control.d.ts +20 -0
  95. package/dist/connect/control.js +236 -0
  96. package/dist/connect/control.js.map +1 -0
  97. package/dist/connect/install.d.ts +13 -0
  98. package/dist/connect/install.js +12 -0
  99. package/dist/connect/install.js.map +1 -0
  100. package/dist/connect/mcp.d.ts +9 -0
  101. package/dist/connect/mcp.js +10 -0
  102. package/dist/connect/mcp.js.map +1 -0
  103. package/dist/connect/protocol.d.ts +38 -0
  104. package/dist/connect/protocol.js +36 -0
  105. package/dist/connect/protocol.js.map +1 -0
  106. package/dist/connect/service.d.ts +19 -0
  107. package/dist/connect/service.js +79 -0
  108. package/dist/connect/service.js.map +1 -0
  109. package/dist/connect/stdio-entry.d.ts +1 -0
  110. package/dist/connect/stdio-entry.js +6 -0
  111. package/dist/connect/stdio-entry.js.map +1 -0
  112. package/dist/connect/stdio.d.ts +5 -0
  113. package/dist/connect/stdio.js +33 -0
  114. package/dist/connect/stdio.js.map +1 -0
  115. package/dist/daemon.d.ts +64 -2
  116. package/dist/daemon.js +397 -31
  117. package/dist/daemon.js.map +1 -1
  118. package/dist/delivery-consumed-watch.d.ts +2 -0
  119. package/dist/delivery-consumed-watch.js +4 -1
  120. package/dist/delivery-consumed-watch.js.map +1 -1
  121. package/dist/dispatcher-liveness.d.ts +51 -1
  122. package/dist/dispatcher-liveness.js +92 -2
  123. package/dist/dispatcher-liveness.js.map +1 -1
  124. package/dist/event-log.d.ts +1 -1
  125. package/dist/event-log.js +1 -1
  126. package/dist/fleet-manager.d.ts +222 -6
  127. package/dist/fleet-manager.js +1271 -100
  128. package/dist/fleet-manager.js.map +1 -1
  129. package/dist/fleet-windows-runtime.js +4 -2
  130. package/dist/fleet-windows-runtime.js.map +1 -1
  131. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +11 -1
  132. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +10 -0
  133. package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
  134. package/dist/general-knowledge/skills/hub/SKILL.md +290 -24
  135. package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -0
  136. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +118 -26
  137. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +2 -0
  138. package/dist/hub/admin-dashboard.d.ts +85 -0
  139. package/dist/hub/admin-dashboard.js +177 -0
  140. package/dist/hub/admin-dashboard.js.map +1 -0
  141. package/dist/hub/attachments/store.d.ts +2 -0
  142. package/dist/hub/attachments/store.js +6 -0
  143. package/dist/hub/attachments/store.js.map +1 -1
  144. package/dist/hub/audit/index.d.ts +2 -0
  145. package/dist/hub/audit/index.js +8 -0
  146. package/dist/hub/audit/index.js.map +1 -1
  147. package/dist/hub/buttons.js +3 -1
  148. package/dist/hub/buttons.js.map +1 -1
  149. package/dist/hub/catalog.d.ts +7 -4
  150. package/dist/hub/catalog.js +19 -10
  151. package/dist/hub/catalog.js.map +1 -1
  152. package/dist/hub/client.d.ts +13 -0
  153. package/dist/hub/client.js +85 -11
  154. package/dist/hub/client.js.map +1 -1
  155. package/dist/hub/compose/member.d.ts +22 -0
  156. package/dist/hub/compose/member.js +233 -18
  157. package/dist/hub/compose/member.js.map +1 -1
  158. package/dist/hub/compose/server.d.ts +13 -0
  159. package/dist/hub/compose/server.js +107 -14
  160. package/dist/hub/compose/server.js.map +1 -1
  161. package/dist/hub/display-name.d.ts +10 -0
  162. package/dist/hub/display-name.js +35 -0
  163. package/dist/hub/display-name.js.map +1 -0
  164. package/dist/hub/execution/service.d.ts +1 -0
  165. package/dist/hub/execution/service.js +1 -1
  166. package/dist/hub/execution/service.js.map +1 -1
  167. package/dist/hub/fleet-info.d.ts +12 -0
  168. package/dist/hub/fleet-info.js +14 -0
  169. package/dist/hub/fleet-info.js.map +1 -0
  170. package/dist/hub/fleet-update-model.d.ts +100 -0
  171. package/dist/hub/fleet-update-model.js +15 -0
  172. package/dist/hub/fleet-update-model.js.map +1 -0
  173. package/dist/hub/fleet-updates.d.ts +46 -0
  174. package/dist/hub/fleet-updates.js +282 -0
  175. package/dist/hub/fleet-updates.js.map +1 -0
  176. package/dist/hub/fleet-versions.d.ts +28 -0
  177. package/dist/hub/fleet-versions.js +80 -0
  178. package/dist/hub/fleet-versions.js.map +1 -0
  179. package/dist/hub/group-policy/admin-api.d.ts +1 -0
  180. package/dist/hub/group-policy/admin-api.js +10 -1
  181. package/dist/hub/group-policy/admin-api.js.map +1 -1
  182. package/dist/hub/group-policy/admin-control.d.ts +1 -0
  183. package/dist/hub/group-policy/admin-control.js +13 -4
  184. package/dist/hub/group-policy/admin-control.js.map +1 -1
  185. package/dist/hub/group-policy/admin-dto.d.ts +39 -1
  186. package/dist/hub/group-policy/admin-dto.js.map +1 -1
  187. package/dist/hub/group-policy/admin-facts.d.ts +4 -2
  188. package/dist/hub/group-policy/admin-facts.js +17 -2
  189. package/dist/hub/group-policy/admin-facts.js.map +1 -1
  190. package/dist/hub/group-policy/admin-impact.d.ts +36 -6
  191. package/dist/hub/group-policy/admin-impact.js +21 -7
  192. package/dist/hub/group-policy/admin-impact.js.map +1 -1
  193. package/dist/hub/group-policy/admin-inventory.d.ts +2 -0
  194. package/dist/hub/group-policy/admin-inventory.js +13 -4
  195. package/dist/hub/group-policy/admin-inventory.js.map +1 -1
  196. package/dist/hub/group-policy/admin-search.d.ts +2 -1
  197. package/dist/hub/group-policy/admin-search.js +56 -7
  198. package/dist/hub/group-policy/admin-search.js.map +1 -1
  199. package/dist/hub/group-policy/authorization.d.ts +2 -0
  200. package/dist/hub/group-policy/authorization.js +7 -2
  201. package/dist/hub/group-policy/authorization.js.map +1 -1
  202. package/dist/hub/group-policy/impact-inventory.d.ts +4 -1
  203. package/dist/hub/group-policy/impact-inventory.js +23 -2
  204. package/dist/hub/group-policy/impact-inventory.js.map +1 -1
  205. package/dist/hub/group-policy/model.d.ts +52 -1
  206. package/dist/hub/group-policy/model.js +20 -7
  207. package/dist/hub/group-policy/model.js.map +1 -1
  208. package/dist/hub/group-policy/resources.d.ts +2 -0
  209. package/dist/hub/group-policy/resources.js +12 -1
  210. package/dist/hub/group-policy/resources.js.map +1 -1
  211. package/dist/hub/group-policy/store.js +22 -3
  212. package/dist/hub/group-policy/store.js.map +1 -1
  213. package/dist/hub/group-policy/team-subjects.d.ts +16 -0
  214. package/dist/hub/group-policy/team-subjects.js +32 -0
  215. package/dist/hub/group-policy/team-subjects.js.map +1 -0
  216. package/dist/hub/http/compose.d.ts +2 -0
  217. package/dist/hub/http/compose.js +385 -32
  218. package/dist/hub/http/compose.js.map +1 -1
  219. package/dist/hub/http/core.js +27 -0
  220. package/dist/hub/http/core.js.map +1 -1
  221. package/dist/hub/http/deps.d.ts +13 -0
  222. package/dist/hub/http/schema.js +21 -1
  223. package/dist/hub/http/schema.js.map +1 -1
  224. package/dist/hub/join/client.js +75 -42
  225. package/dist/hub/join/client.js.map +1 -1
  226. package/dist/hub/join/service.d.ts +1 -1
  227. package/dist/hub/join/service.js.map +1 -1
  228. package/dist/hub/mcp/auth-schema.d.ts +7 -0
  229. package/dist/hub/mcp/auth-schema.js +31 -0
  230. package/dist/hub/mcp/auth-schema.js.map +1 -0
  231. package/dist/hub/mcp/auth.d.ts +89 -0
  232. package/dist/hub/mcp/auth.js +374 -0
  233. package/dist/hub/mcp/auth.js.map +1 -0
  234. package/dist/hub/mcp/catalog.d.ts +44 -0
  235. package/dist/hub/mcp/catalog.js +31 -0
  236. package/dist/hub/mcp/catalog.js.map +1 -0
  237. package/dist/hub/mcp/door-schema.d.ts +7 -0
  238. package/dist/hub/mcp/door-schema.js +20 -0
  239. package/dist/hub/mcp/door-schema.js.map +1 -0
  240. package/dist/hub/mcp/http.d.ts +25 -0
  241. package/dist/hub/mcp/http.js +259 -0
  242. package/dist/hub/mcp/http.js.map +1 -0
  243. package/dist/hub/mcp/policy.d.ts +65 -0
  244. package/dist/hub/mcp/policy.js +153 -0
  245. package/dist/hub/mcp/policy.js.map +1 -0
  246. package/dist/hub/mcp/server.d.ts +3 -0
  247. package/dist/hub/mcp/server.js +32 -0
  248. package/dist/hub/mcp/server.js.map +1 -0
  249. package/dist/hub/mcp/tools.d.ts +31 -0
  250. package/dist/hub/mcp/tools.js +176 -0
  251. package/dist/hub/mcp/tools.js.map +1 -0
  252. package/dist/hub/member/display-name.d.ts +9 -0
  253. package/dist/hub/member/display-name.js +71 -0
  254. package/dist/hub/member/display-name.js.map +1 -0
  255. package/dist/hub/member/exposure-api.d.ts +6 -0
  256. package/dist/hub/member/exposure-api.js +13 -6
  257. package/dist/hub/member/exposure-api.js.map +1 -1
  258. package/dist/hub/member/exposures.d.ts +4 -0
  259. package/dist/hub/member/exposures.js +20 -0
  260. package/dist/hub/member/exposures.js.map +1 -1
  261. package/dist/hub/member/pairing-api.js +3 -2
  262. package/dist/hub/member/pairing-api.js.map +1 -1
  263. package/dist/hub/member/recommendations.d.ts +37 -0
  264. package/dist/hub/member/recommendations.js +129 -0
  265. package/dist/hub/member/recommendations.js.map +1 -0
  266. package/dist/hub/member/room-ask.d.ts +65 -5
  267. package/dist/hub/member/room-ask.js +269 -24
  268. package/dist/hub/member/room-ask.js.map +1 -1
  269. package/dist/hub/member/room-mention-feedback.d.ts +44 -0
  270. package/dist/hub/member/room-mention-feedback.js +121 -0
  271. package/dist/hub/member/room-mention-feedback.js.map +1 -0
  272. package/dist/hub/member/room-notification.d.ts +9 -0
  273. package/dist/hub/member/room-notification.js +2 -0
  274. package/dist/hub/member/room-notification.js.map +1 -0
  275. package/dist/hub/member/room-post-answers.d.ts +46 -0
  276. package/dist/hub/member/room-post-answers.js +152 -0
  277. package/dist/hub/member/room-post-answers.js.map +1 -0
  278. package/dist/hub/member/room-post-receipt.d.ts +21 -0
  279. package/dist/hub/member/room-post-receipt.js +49 -0
  280. package/dist/hub/member/room-post-receipt.js.map +1 -0
  281. package/dist/hub/member/room-post.d.ts +103 -0
  282. package/dist/hub/member/room-post.js +231 -0
  283. package/dist/hub/member/room-post.js.map +1 -0
  284. package/dist/hub/member/updates.d.ts +92 -0
  285. package/dist/hub/member/updates.js +316 -0
  286. package/dist/hub/member/updates.js.map +1 -0
  287. package/dist/hub/pairing.d.ts +15 -1
  288. package/dist/hub/pairing.js +33 -2
  289. package/dist/hub/pairing.js.map +1 -1
  290. package/dist/hub/person-prefs.d.ts +22 -0
  291. package/dist/hub/person-prefs.js +34 -0
  292. package/dist/hub/person-prefs.js.map +1 -0
  293. package/dist/hub/personal/owner-host.d.ts +140 -0
  294. package/dist/hub/personal/owner-host.js +287 -0
  295. package/dist/hub/personal/owner-host.js.map +1 -0
  296. package/dist/hub/personal/refusals.d.ts +11 -0
  297. package/dist/hub/personal/refusals.js +33 -0
  298. package/dist/hub/personal/refusals.js.map +1 -0
  299. package/dist/hub/personal/runtime-host.d.ts +26 -0
  300. package/dist/hub/personal/runtime-host.js +51 -0
  301. package/dist/hub/personal/runtime-host.js.map +1 -0
  302. package/dist/hub/personal/schema.d.ts +4 -0
  303. package/dist/hub/personal/schema.js +54 -0
  304. package/dist/hub/personal/schema.js.map +1 -0
  305. package/dist/hub/personal/turns.d.ts +39 -0
  306. package/dist/hub/personal/turns.js +221 -0
  307. package/dist/hub/personal/turns.js.map +1 -0
  308. package/dist/hub/personal/types.d.ts +42 -0
  309. package/dist/hub/personal/types.js +2 -0
  310. package/dist/hub/personal/types.js.map +1 -0
  311. package/dist/hub/policy.d.ts +1 -1
  312. package/dist/hub/policy.js +2 -0
  313. package/dist/hub/policy.js.map +1 -1
  314. package/dist/hub/protocol.d.ts +701 -1
  315. package/dist/hub/protocol.js +103 -14
  316. package/dist/hub/protocol.js.map +1 -1
  317. package/dist/hub/published-version.d.ts +3 -0
  318. package/dist/hub/published-version.js +35 -0
  319. package/dist/hub/published-version.js.map +1 -0
  320. package/dist/hub/quota.js +3 -1
  321. package/dist/hub/quota.js.map +1 -1
  322. package/dist/hub/recommendation-model.d.ts +36 -0
  323. package/dist/hub/recommendation-model.js +9 -0
  324. package/dist/hub/recommendation-model.js.map +1 -0
  325. package/dist/hub/recommendations.d.ts +58 -0
  326. package/dist/hub/recommendations.js +211 -0
  327. package/dist/hub/recommendations.js.map +1 -0
  328. package/dist/hub/representative.d.ts +5 -0
  329. package/dist/hub/representative.js +6 -1
  330. package/dist/hub/representative.js.map +1 -1
  331. package/dist/hub/roles/admin-control.d.ts +29 -0
  332. package/dist/hub/roles/admin-control.js +187 -0
  333. package/dist/hub/roles/admin-control.js.map +1 -0
  334. package/dist/hub/roles/admin-types.d.ts +72 -0
  335. package/dist/hub/roles/admin-types.js +2 -0
  336. package/dist/hub/roles/admin-types.js.map +1 -0
  337. package/dist/hub/roles/allowed-list-control.d.ts +34 -0
  338. package/dist/hub/roles/allowed-list-control.js +179 -0
  339. package/dist/hub/roles/allowed-list-control.js.map +1 -0
  340. package/dist/hub/roles/allowed-list.d.ts +8 -0
  341. package/dist/hub/roles/allowed-list.js +49 -0
  342. package/dist/hub/roles/allowed-list.js.map +1 -0
  343. package/dist/hub/roles/audit-details.d.ts +144 -0
  344. package/dist/hub/roles/audit-details.js +26 -0
  345. package/dist/hub/roles/audit-details.js.map +1 -0
  346. package/dist/hub/roles/authority.d.ts +12 -0
  347. package/dist/hub/roles/authority.js +39 -3
  348. package/dist/hub/roles/authority.js.map +1 -1
  349. package/dist/hub/roles/change.d.ts +3 -1
  350. package/dist/hub/roles/change.js +7 -2
  351. package/dist/hub/roles/change.js.map +1 -1
  352. package/dist/hub/roles/clock.d.ts +3 -0
  353. package/dist/hub/roles/clock.js +1 -1
  354. package/dist/hub/roles/clock.js.map +1 -1
  355. package/dist/hub/roles/convert.js +1 -1
  356. package/dist/hub/roles/convert.js.map +1 -1
  357. package/dist/hub/roles/cutover-inventory.d.ts +2 -0
  358. package/dist/hub/roles/cutover-inventory.js +8 -1
  359. package/dist/hub/roles/cutover-inventory.js.map +1 -1
  360. package/dist/hub/roles/cutover.d.ts +2 -2
  361. package/dist/hub/roles/cutover.js +3 -4
  362. package/dist/hub/roles/cutover.js.map +1 -1
  363. package/dist/hub/roles/delegation.d.ts +4 -1
  364. package/dist/hub/roles/delegation.js +7 -2
  365. package/dist/hub/roles/delegation.js.map +1 -1
  366. package/dist/hub/roles/evaluate.d.ts +2 -1
  367. package/dist/hub/roles/evaluate.js +14 -0
  368. package/dist/hub/roles/evaluate.js.map +1 -1
  369. package/dist/hub/roles/expiry-effects.d.ts +8 -0
  370. package/dist/hub/roles/expiry-effects.js +50 -0
  371. package/dist/hub/roles/expiry-effects.js.map +1 -0
  372. package/dist/hub/roles/migrations.d.ts +7 -0
  373. package/dist/hub/roles/migrations.js +44 -0
  374. package/dist/hub/roles/migrations.js.map +1 -0
  375. package/dist/hub/roles/model.d.ts +25 -0
  376. package/dist/hub/roles/model.js +9 -3
  377. package/dist/hub/roles/model.js.map +1 -1
  378. package/dist/hub/roles/overview.d.ts +8 -0
  379. package/dist/hub/roles/overview.js +15 -0
  380. package/dist/hub/roles/overview.js.map +1 -0
  381. package/dist/hub/roles/resource-effects.d.ts +17 -0
  382. package/dist/hub/roles/resource-effects.js +62 -0
  383. package/dist/hub/roles/resource-effects.js.map +1 -0
  384. package/dist/hub/roles/review.d.ts +16 -0
  385. package/dist/hub/roles/review.js +42 -0
  386. package/dist/hub/roles/review.js.map +1 -0
  387. package/dist/hub/roles/writer.d.ts +14 -3
  388. package/dist/hub/roles/writer.js +64 -16
  389. package/dist/hub/roles/writer.js.map +1 -1
  390. package/dist/hub/room-context-model.d.ts +43 -0
  391. package/dist/hub/room-context-model.js +12 -0
  392. package/dist/hub/room-context-model.js.map +1 -0
  393. package/dist/hub/room-mention-feedback-model.d.ts +12 -0
  394. package/dist/hub/room-mention-feedback-model.js +12 -0
  395. package/dist/hub/room-mention-feedback-model.js.map +1 -0
  396. package/dist/hub/rooms/agents.d.ts +44 -10
  397. package/dist/hub/rooms/agents.js +277 -30
  398. package/dist/hub/rooms/agents.js.map +1 -1
  399. package/dist/hub/rooms/assistant.d.ts +1 -6
  400. package/dist/hub/rooms/assistant.js +7 -2
  401. package/dist/hub/rooms/assistant.js.map +1 -1
  402. package/dist/hub/rooms/automation.d.ts +24 -0
  403. package/dist/hub/rooms/automation.js +66 -0
  404. package/dist/hub/rooms/automation.js.map +1 -0
  405. package/dist/hub/rooms/buttons.d.ts +85 -0
  406. package/dist/hub/rooms/buttons.js +62 -0
  407. package/dist/hub/rooms/buttons.js.map +1 -0
  408. package/dist/hub/rooms/context-cursor.d.ts +18 -0
  409. package/dist/hub/rooms/context-cursor.js +61 -0
  410. package/dist/hub/rooms/context-cursor.js.map +1 -0
  411. package/dist/hub/rooms/context.d.ts +1 -1
  412. package/dist/hub/rooms/context.js +4 -4
  413. package/dist/hub/rooms/context.js.map +1 -1
  414. package/dist/hub/rooms/direct-view.d.ts +6 -2
  415. package/dist/hub/rooms/direct-view.js +3 -3
  416. package/dist/hub/rooms/direct-view.js.map +1 -1
  417. package/dist/hub/rooms/mentions.d.ts +15 -0
  418. package/dist/hub/rooms/mentions.js +43 -0
  419. package/dist/hub/rooms/mentions.js.map +1 -0
  420. package/dist/hub/rooms/post-replies.d.ts +23 -0
  421. package/dist/hub/rooms/post-replies.js +114 -0
  422. package/dist/hub/rooms/post-replies.js.map +1 -0
  423. package/dist/hub/rooms/schema.d.ts +9 -0
  424. package/dist/hub/rooms/schema.js +43 -0
  425. package/dist/hub/rooms/schema.js.map +1 -1
  426. package/dist/hub/rooms/service.d.ts +163 -4
  427. package/dist/hub/rooms/service.js +795 -25
  428. package/dist/hub/rooms/service.js.map +1 -1
  429. package/dist/hub/rooms/types.d.ts +29 -3
  430. package/dist/hub/rooms.d.ts +12 -2
  431. package/dist/hub/rooms.js +88 -18
  432. package/dist/hub/rooms.js.map +1 -1
  433. package/dist/hub/runtime.d.ts +1 -1
  434. package/dist/hub/runtime.js +17 -4
  435. package/dist/hub/runtime.js.map +1 -1
  436. package/dist/hub/server.d.ts +8 -1
  437. package/dist/hub/server.js +93 -7
  438. package/dist/hub/server.js.map +1 -1
  439. package/dist/hub/session-directory-transition.d.ts +2 -1
  440. package/dist/hub/session-directory-transition.js +10 -3
  441. package/dist/hub/session-directory-transition.js.map +1 -1
  442. package/dist/hub/sessions.d.ts +1 -1
  443. package/dist/hub/sessions.js +26 -4
  444. package/dist/hub/sessions.js.map +1 -1
  445. package/dist/hub/settings-commit.d.ts +32 -1
  446. package/dist/hub/settings-commit.js +11 -4
  447. package/dist/hub/settings-commit.js.map +1 -1
  448. package/dist/hub/settings-directory-ca.js +1 -1
  449. package/dist/hub/settings-directory-ca.js.map +1 -1
  450. package/dist/hub/settings-directory-control.js +7 -7
  451. package/dist/hub/settings-directory-control.js.map +1 -1
  452. package/dist/hub/settings-directory-http.d.ts +2 -0
  453. package/dist/hub/settings-directory-http.js +21 -6
  454. package/dist/hub/settings-directory-http.js.map +1 -1
  455. package/dist/hub/settings-directory-proof.d.ts +5 -1
  456. package/dist/hub/settings-directory-proof.js +49 -10
  457. package/dist/hub/settings-directory-proof.js.map +1 -1
  458. package/dist/hub/settings-directory-recovery.js +2 -1
  459. package/dist/hub/settings-directory-recovery.js.map +1 -1
  460. package/dist/hub/settings-directory-save.d.ts +2 -0
  461. package/dist/hub/settings-directory-save.js +9 -6
  462. package/dist/hub/settings-directory-save.js.map +1 -1
  463. package/dist/hub/sharing.js +2 -2
  464. package/dist/hub/sharing.js.map +1 -1
  465. package/dist/hub/socket.d.ts +1 -0
  466. package/dist/hub/socket.js +39 -2
  467. package/dist/hub/socket.js.map +1 -1
  468. package/dist/hub/teams/index.d.ts +8 -3
  469. package/dist/hub/teams/index.js +106 -31
  470. package/dist/hub/teams/index.js.map +1 -1
  471. package/dist/hub/teams/store.d.ts +5 -1
  472. package/dist/hub/teams/store.js +25 -2
  473. package/dist/hub/teams/store.js.map +1 -1
  474. package/dist/hub/teams/types.d.ts +19 -2
  475. package/dist/hub/types.d.ts +159 -5
  476. package/dist/hub-classic-private.d.ts +19 -0
  477. package/dist/hub-classic-private.js +64 -0
  478. package/dist/hub-classic-private.js.map +1 -0
  479. package/dist/hub-contact-windows.d.ts +11 -0
  480. package/dist/hub-contact-windows.js +56 -0
  481. package/dist/hub-contact-windows.js.map +1 -0
  482. package/dist/hub-pairing-summary.d.ts +1 -1
  483. package/dist/hub-room-conversation.d.ts +14 -0
  484. package/dist/hub-room-conversation.js +60 -0
  485. package/dist/hub-room-conversation.js.map +1 -0
  486. package/dist/hub-update-notice.d.ts +12 -0
  487. package/dist/hub-update-notice.js +35 -0
  488. package/dist/hub-update-notice.js.map +1 -0
  489. package/dist/human-delivery-receipts.js +8 -0
  490. package/dist/human-delivery-receipts.js.map +1 -1
  491. package/dist/instance-config-impact.js +3 -0
  492. package/dist/instance-config-impact.js.map +1 -1
  493. package/dist/instructions.js +3 -0
  494. package/dist/instructions.js.map +1 -1
  495. package/dist/locale.js +137 -24
  496. package/dist/locale.js.map +1 -1
  497. package/dist/login-controller.d.ts +19 -2
  498. package/dist/login-controller.js +26 -8
  499. package/dist/login-controller.js.map +1 -1
  500. package/dist/native-mcp.js +7 -5
  501. package/dist/native-mcp.js.map +1 -1
  502. package/dist/native-model-catalog.d.ts +15 -0
  503. package/dist/native-model-catalog.js +43 -3
  504. package/dist/native-model-catalog.js.map +1 -1
  505. package/dist/native-pane-lifecycle.js +3 -2
  506. package/dist/native-pane-lifecycle.js.map +1 -1
  507. package/dist/native-pane-tools.js +3 -0
  508. package/dist/native-pane-tools.js.map +1 -1
  509. package/dist/office-share-page.js +1 -1
  510. package/dist/office-share-page.js.map +1 -1
  511. package/dist/outbound-handlers.d.ts +14 -4
  512. package/dist/outbound-handlers.js +54 -1
  513. package/dist/outbound-handlers.js.map +1 -1
  514. package/dist/outbound-schemas.d.ts +17 -0
  515. package/dist/outbound-schemas.js +14 -0
  516. package/dist/outbound-schemas.js.map +1 -1
  517. package/dist/pane-port.d.ts +2 -0
  518. package/dist/public-web-gateway.js +152 -4
  519. package/dist/public-web-gateway.js.map +1 -1
  520. package/dist/queued-handoffs.d.ts +16 -4
  521. package/dist/queued-handoffs.js +18 -1
  522. package/dist/queued-handoffs.js.map +1 -1
  523. package/dist/quickstart-api.d.ts +0 -1
  524. package/dist/quickstart-api.js +8 -1
  525. package/dist/quickstart-api.js.map +1 -1
  526. package/dist/reply-dedup.js +3 -1
  527. package/dist/reply-dedup.js.map +1 -1
  528. package/dist/reply-preview-files.d.ts +38 -0
  529. package/dist/reply-preview-files.js +142 -0
  530. package/dist/reply-preview-files.js.map +1 -0
  531. package/dist/reply-preview-spec.d.ts +18 -0
  532. package/dist/reply-preview-spec.js +27 -0
  533. package/dist/reply-preview-spec.js.map +1 -0
  534. package/dist/runtime-api.js +10 -2
  535. package/dist/runtime-api.js.map +1 -1
  536. package/dist/runtime-build-info.js +1 -0
  537. package/dist/runtime-build-info.js.map +1 -1
  538. package/dist/runtime-cli-install.js +13 -10
  539. package/dist/runtime-cli-install.js.map +1 -1
  540. package/dist/runtime-cli.js +31 -5
  541. package/dist/runtime-cli.js.map +1 -1
  542. package/dist/runtime-client-store.d.ts +5 -0
  543. package/dist/runtime-client-store.js +28 -0
  544. package/dist/runtime-client-store.js.map +1 -1
  545. package/dist/runtime-client.d.ts +4 -0
  546. package/dist/runtime-client.js +33 -10
  547. package/dist/runtime-client.js.map +1 -1
  548. package/dist/runtime-coordinator.d.ts +4 -2
  549. package/dist/runtime-coordinator.js +33 -6
  550. package/dist/runtime-coordinator.js.map +1 -1
  551. package/dist/runtime-install.d.ts +6 -1
  552. package/dist/runtime-install.js +12 -4
  553. package/dist/runtime-install.js.map +1 -1
  554. package/dist/runtime-pane-native.js +3 -1
  555. package/dist/runtime-pane-native.js.map +1 -1
  556. package/dist/runtime-personal-answer-only-probe.d.ts +3 -0
  557. package/dist/runtime-personal-answer-only-probe.js +134 -0
  558. package/dist/runtime-personal-answer-only-probe.js.map +1 -0
  559. package/dist/runtime-personal-answer-only.d.ts +16 -0
  560. package/dist/runtime-personal-answer-only.js +54 -0
  561. package/dist/runtime-personal-answer-only.js.map +1 -0
  562. package/dist/runtime-personal-answer.d.ts +30 -0
  563. package/dist/runtime-personal-answer.js +124 -0
  564. package/dist/runtime-personal-answer.js.map +1 -0
  565. package/dist/runtime-personal-preflight.d.ts +8 -0
  566. package/dist/runtime-personal-preflight.js +103 -0
  567. package/dist/runtime-personal-preflight.js.map +1 -0
  568. package/dist/runtime-personal-profile.d.ts +40 -0
  569. package/dist/runtime-personal-profile.js +81 -0
  570. package/dist/runtime-personal-profile.js.map +1 -0
  571. package/dist/runtime-personal-protocol.d.ts +10 -0
  572. package/dist/runtime-personal-protocol.js +15 -0
  573. package/dist/runtime-personal-protocol.js.map +1 -0
  574. package/dist/runtime-personal-stage.d.ts +37 -0
  575. package/dist/runtime-personal-stage.js +167 -0
  576. package/dist/runtime-personal-stage.js.map +1 -0
  577. package/dist/runtime-protocol.d.ts +2 -0
  578. package/dist/settings-api.d.ts +15 -0
  579. package/dist/settings-api.js +210 -76
  580. package/dist/settings-api.js.map +1 -1
  581. package/dist/settings-change.js +32 -5
  582. package/dist/settings-change.js.map +1 -1
  583. package/dist/settings-effect.js +13 -2
  584. package/dist/settings-effect.js.map +1 -1
  585. package/dist/settings-http-confirmation.js +18 -44
  586. package/dist/settings-http-confirmation.js.map +1 -1
  587. package/dist/setup-form.js +10 -0
  588. package/dist/setup-form.js.map +1 -1
  589. package/dist/setup-i18n.js +2 -2
  590. package/dist/setup-i18n.js.map +1 -1
  591. package/dist/subagent-records.js +53 -11
  592. package/dist/subagent-records.js.map +1 -1
  593. package/dist/subagent-service.js +3 -1
  594. package/dist/subagent-service.js.map +1 -1
  595. package/dist/tmux-manager.d.ts +2 -0
  596. package/dist/tmux-manager.js +2 -0
  597. package/dist/tmux-manager.js.map +1 -1
  598. package/dist/tool-permissions.js +3 -0
  599. package/dist/tool-permissions.js.map +1 -1
  600. package/dist/tool-progress.d.ts +9 -0
  601. package/dist/tool-progress.js +141 -32
  602. package/dist/tool-progress.js.map +1 -1
  603. package/dist/transcript-needles.d.ts +4 -2
  604. package/dist/transcript-needles.js +35 -4
  605. package/dist/transcript-needles.js.map +1 -1
  606. package/dist/tunnel/lease.d.ts +14 -0
  607. package/dist/tunnel/lease.js +23 -0
  608. package/dist/tunnel/lease.js.map +1 -1
  609. package/dist/turn-reply-guard.d.ts +2 -2
  610. package/dist/turn-reply-guard.js +3 -3
  611. package/dist/turn-reply-guard.js.map +1 -1
  612. package/dist/types.d.ts +12 -2
  613. package/dist/ui/backend-signin.js +91 -22
  614. package/dist/ui/chat-activity-groups.js +41 -8
  615. package/dist/ui/chat-activity.js +5 -3
  616. package/dist/ui/chat-mentions.js +13 -0
  617. package/dist/ui/chat-msg-actions.js +3 -222
  618. package/dist/ui/chat-pins.js +106 -0
  619. package/dist/ui/chat-popout-header.js +2 -2
  620. package/dist/ui/chat-store.js +143 -7
  621. package/dist/ui/chat-tour.js +1 -1
  622. package/dist/ui/chat-workspace.js +3 -3
  623. package/dist/ui/fleet-canvas.js +14 -5
  624. package/dist/ui/fleet-office-carousel.d.ts +14 -0
  625. package/dist/ui/fleet-office-carousel.js +95 -0
  626. package/dist/ui/fleet-office-editor.js +6 -1
  627. package/dist/ui/fleet-office-model.js +2 -1
  628. package/dist/ui/fleet-office-skin.js +1 -1
  629. package/dist/ui/fleet-office-store.js +14 -2
  630. package/dist/ui/fleet-office-zones.js +50 -9
  631. package/dist/ui/fleet-office.js +203 -24
  632. package/dist/ui/fleet-tasks.js +1 -1
  633. package/dist/ui/host-install.js +5 -2
  634. package/dist/ui/hub-admin-overview.js +189 -0
  635. package/dist/ui/hub-admin-rooms.js +1 -1
  636. package/dist/ui/hub-agent-copy.js +6 -2
  637. package/dist/ui/hub-ai-apps-strings.js +6 -0
  638. package/dist/ui/hub-ai-apps.js +83 -0
  639. package/dist/ui/hub-chat-strings.js +7 -0
  640. package/dist/ui/hub-client.js +76 -5
  641. package/dist/ui/hub-directory-editor-strings.js +2 -2
  642. package/dist/ui/hub-directory-editor.js +1 -0
  643. package/dist/ui/hub-fleet-versions.js +393 -0
  644. package/dist/ui/hub-grant-picker.js +3 -37
  645. package/dist/ui/hub-group-policy.js +26 -13
  646. package/dist/ui/hub-group-strings.js +26 -17
  647. package/dist/ui/hub-join-steps.js +27 -15
  648. package/dist/ui/hub-owner-strings.js +2 -2
  649. package/dist/ui/hub-personal-agent-strings.js +246 -0
  650. package/dist/ui/hub-personal-agent.js +117 -0
  651. package/dist/ui/hub-policy-subjects.js +35 -0
  652. package/dist/ui/hub-quick-pairing.js +7 -2
  653. package/dist/ui/hub-role-audit.js +39 -0
  654. package/dist/ui/hub-role-forms.js +99 -0
  655. package/dist/ui/hub-role-notices.js +11 -0
  656. package/dist/ui/hub-role-view.js +86 -0
  657. package/dist/ui/hub-roles-strings.js +439 -0
  658. package/dist/ui/hub-roles.js +83 -0
  659. package/dist/ui/hub-room-agent-strings.js +28 -0
  660. package/dist/ui/hub-room-composer.js +19 -10
  661. package/dist/ui/hub-room-favorites.js +63 -5
  662. package/dist/ui/hub-room-list.js +4 -3
  663. package/dist/ui/hub-room-members-strings.js +2 -2
  664. package/dist/ui/hub-room-members.js +7 -4
  665. package/dist/ui/hub-room-notify.js +161 -0
  666. package/dist/ui/hub-room-search.js +126 -0
  667. package/dist/ui/hub-room-settings.js +6 -0
  668. package/dist/ui/hub-room-source-strings.js +17 -0
  669. package/dist/ui/hub-room-source.js +34 -0
  670. package/dist/ui/hub-room-strings.js +47 -1
  671. package/dist/ui/hub-room-thread.js +266 -41
  672. package/dist/ui/hub-room-unread.js +2 -1
  673. package/dist/ui/hub-strings.js +8 -0
  674. package/dist/ui/hub-subject-picker.js +58 -0
  675. package/dist/ui/hub-switcher.js +2 -2
  676. package/dist/ui/hub-teams-strings.js +10 -6
  677. package/dist/ui/hub-teams.js +56 -28
  678. package/dist/ui/hub-this-hub.js +2 -2
  679. package/dist/ui/hub-welcome.js +122 -75
  680. package/dist/ui/image-annotate.js +2 -283
  681. package/dist/ui/image-lightbox.js +2 -176
  682. package/dist/ui/image-zoom.js +2 -242
  683. package/dist/ui/model-picker.js +4 -1
  684. package/dist/ui/notice-hub-update.js +94 -0
  685. package/dist/ui/office-share-dialog.js +2 -2
  686. package/dist/ui/panel-chat.js +327 -28
  687. package/dist/ui/panel-details.js +3 -1
  688. package/dist/ui/panel-fleet.js +28 -7
  689. package/dist/ui/panel-hub.js +294 -99
  690. package/dist/ui/panel-log.js +4 -4
  691. package/dist/ui/panel-notices.js +3 -1
  692. package/dist/ui/panel-settings.js +45 -34
  693. package/dist/ui/preview-panel.js +3 -1
  694. package/dist/ui/reply-file-preview.js +64 -0
  695. package/dist/ui/runtime-commands.d.ts +2 -2
  696. package/dist/ui/runtime-commands.js +7 -4
  697. package/dist/ui/settings-access-overview.js +3 -3
  698. package/dist/ui/settings-appearance.js +7 -10
  699. package/dist/ui/settings-archive-files.js +109 -0
  700. package/dist/ui/settings-build-version.js +2 -2
  701. package/dist/ui/settings-catalog.js +22 -0
  702. package/dist/ui/settings-connector-strings.js +23 -0
  703. package/dist/ui/settings-connector.js +39 -0
  704. package/dist/ui/settings-guests-entries.js +16 -0
  705. package/dist/ui/settings-guests.js +57 -15
  706. package/dist/ui/settings-hub-connection.js +4 -5
  707. package/dist/ui/settings-hub-membership.js +6 -7
  708. package/dist/ui/settings-hub-section.js +2 -4
  709. package/dist/ui/settings-hub-setup.js +2 -1
  710. package/dist/ui/settings-hub-updates.js +67 -0
  711. package/dist/ui/settings-hub.js +30 -4
  712. package/dist/ui/settings-layout.js +10 -12
  713. package/dist/ui/settings-registry.js +18 -3
  714. package/dist/ui/settings-shared-strings.js +2 -0
  715. package/dist/ui/settings-strings.js +13 -2
  716. package/dist/ui/settings-update.js +11 -5
  717. package/dist/ui/settings-web-authority.js +7 -5
  718. package/dist/ui/shared/access-overview.css +1 -1
  719. package/dist/ui/shared/accounts-keepalive.css +1 -1
  720. package/dist/ui/shared/accounts.css +1 -1
  721. package/dist/ui/shared/agent-sheet.js +116 -0
  722. package/dist/ui/shared/agent-widget.js +1 -2
  723. package/dist/ui/shared/app-i18n.js +4 -0
  724. package/dist/ui/shared/app-nav.js +9 -5
  725. package/dist/ui/shared/app-prefs.js +9 -3
  726. package/dist/ui/shared/app-route.js +4 -2
  727. package/dist/ui/shared/app-shell.js +176 -21
  728. package/dist/ui/shared/app-store.js +1 -1
  729. package/dist/ui/shared/app-stream.js +6 -2
  730. package/dist/ui/shared/app-swipe.js +3 -1
  731. package/dist/ui/shared/app-themes.js +3 -5
  732. package/dist/ui/shared/app-update.js +90 -8
  733. package/dist/ui/shared/app.css +469 -203
  734. package/dist/ui/shared/app.js +1 -1
  735. package/dist/ui/shared/chat-composer.js +29 -5
  736. package/dist/ui/shared/chat-msg-actions.js +231 -0
  737. package/dist/ui/shared/chat-strings.js +19 -4
  738. package/dist/ui/shared/chat-thread.js +120 -17
  739. package/dist/ui/shared/chat-work-bar.css +118 -0
  740. package/dist/ui/shared/connector-prompt.d.ts +3 -0
  741. package/dist/ui/shared/connector-prompt.js +20 -0
  742. package/dist/ui/shared/hub-ai-apps.css +12 -0
  743. package/dist/ui/shared/hub-chat.css +58 -4
  744. package/dist/ui/shared/hub-groups.css +19 -15
  745. package/dist/ui/shared/hub-owner.css +118 -3
  746. package/dist/ui/shared/hub-roles.css +99 -0
  747. package/dist/ui/shared/hub-rooms-u2.css +34 -0
  748. package/dist/ui/shared/hub.css +23 -5
  749. package/dist/ui/shared/image-annotate.css +22 -3
  750. package/dist/ui/shared/image-annotate.js +415 -0
  751. package/dist/ui/shared/image-lightbox.js +218 -0
  752. package/dist/ui/shared/image-zoom.js +316 -0
  753. package/dist/ui/shared/instance-nav.js +120 -15
  754. package/dist/ui/shared/loading.css +1 -1
  755. package/dist/ui/shared/model-picker.css +32 -4
  756. package/dist/ui/shared/owner-css.js +1 -1
  757. package/dist/ui/shared/panel-view.js +7 -1
  758. package/dist/ui/shared/preview-panel-actions.js +1 -1
  759. package/dist/ui/shared/preview-panel.js +6 -2
  760. package/dist/ui/shared/reply-previews.css +4 -0
  761. package/dist/ui/shared/runtime-install.css +5 -0
  762. package/dist/ui/shared/settings-connector.css +7 -0
  763. package/dist/ui/shared/signin.js +27 -12
  764. package/dist/ui/shared/task-board.css +2 -2
  765. package/dist/ui/shared/theme.js +52 -0
  766. package/dist/ui/shared/tokens.css +27 -10
  767. package/dist/ui/shared/ui-icons.js +2 -0
  768. package/dist/ui/shared/ui-toast.js +4 -4
  769. package/dist/ui/shared/usage-dialog.js +113 -17
  770. package/dist/ui/shared/view-strings.js +26 -4
  771. package/dist/ui/shared/web-authorize.js +3 -3
  772. package/dist/ui/signin.html +4 -2
  773. package/dist/ui/structured-signin.js +64 -12
  774. package/dist/ui/web-terminal/terminal.css +1 -1
  775. package/dist/ui/workspace-panel.js +4 -3
  776. package/dist/update-dispatch.d.ts +8 -1
  777. package/dist/update-dispatch.js +16 -1
  778. package/dist/update-dispatch.js.map +1 -1
  779. package/dist/update-idle.d.ts +65 -0
  780. package/dist/update-idle.js +190 -0
  781. package/dist/update-idle.js.map +1 -0
  782. package/dist/update-launch.d.ts +1 -1
  783. package/dist/update-launch.js +9 -2
  784. package/dist/update-launch.js.map +1 -1
  785. package/dist/usage/i18n-keys.d.ts +1 -1
  786. package/dist/usage/i18n-keys.js +1 -1
  787. package/dist/usage/i18n-keys.js.map +1 -1
  788. package/dist/usage/profile-timeline.d.ts +2 -0
  789. package/dist/usage/profile-timeline.js +4 -0
  790. package/dist/usage/profile-timeline.js.map +1 -1
  791. package/dist/usage/providers.js +6 -6
  792. package/dist/usage/providers.js.map +1 -1
  793. package/dist/usage/quota-history.d.ts +1 -1
  794. package/dist/view-api.js +1 -1
  795. package/dist/view-api.js.map +1 -1
  796. package/dist/web-api.d.ts +9 -0
  797. package/dist/web-api.js +434 -188
  798. package/dist/web-api.js.map +1 -1
  799. package/dist/web-backend-login.d.ts +5 -1
  800. package/dist/web-backend-login.js +8 -2
  801. package/dist/web-backend-login.js.map +1 -1
  802. package/dist/web-chat-archive.d.ts +147 -0
  803. package/dist/web-chat-archive.js +530 -0
  804. package/dist/web-chat-archive.js.map +1 -0
  805. package/dist/web-chat-history.d.ts +76 -0
  806. package/dist/web-chat-history.js +145 -1
  807. package/dist/web-chat-history.js.map +1 -1
  808. package/dist/web-commands.d.ts +4 -3
  809. package/dist/web-commands.js +3 -2
  810. package/dist/web-commands.js.map +1 -1
  811. package/dist/web-guest-access.d.ts +3 -0
  812. package/dist/web-guest-access.js +6 -2
  813. package/dist/web-guest-access.js.map +1 -1
  814. package/dist/web-icons.js +3 -3
  815. package/dist/web-icons.js.map +1 -1
  816. package/dist/web-login.d.ts +7 -0
  817. package/dist/web-login.js +8 -1
  818. package/dist/web-login.js.map +1 -1
  819. package/dist/web-mentions.d.ts +2 -0
  820. package/dist/web-mentions.js +20 -0
  821. package/dist/web-mentions.js.map +1 -1
  822. package/dist/web-notices.d.ts +3 -0
  823. package/dist/web-notices.js +17 -2
  824. package/dist/web-notices.js.map +1 -1
  825. package/dist/web-office-store.d.ts +2 -0
  826. package/dist/web-office-store.js +15 -3
  827. package/dist/web-office-store.js.map +1 -1
  828. package/dist/web-pin-store.d.ts +58 -0
  829. package/dist/web-pin-store.js +170 -0
  830. package/dist/web-pin-store.js.map +1 -0
  831. package/dist/web-prefs.js +5 -1
  832. package/dist/web-prefs.js.map +1 -1
  833. package/dist/web-session-authorization.d.ts +24 -0
  834. package/dist/web-session-authorization.js +32 -0
  835. package/dist/web-session-authorization.js.map +1 -1
  836. package/dist/web-session.d.ts +6 -4
  837. package/dist/web-session.js +5 -3
  838. package/dist/web-session.js.map +1 -1
  839. package/dist/web-settings-patch.d.ts +24 -3
  840. package/dist/web-settings-patch.js +57 -1
  841. package/dist/web-settings-patch.js.map +1 -1
  842. package/dist/web-shell-routes.d.ts +1 -1
  843. package/dist/web-shell-routes.js +1 -1
  844. package/dist/web-shell-routes.js.map +1 -1
  845. package/dist/web-theme.js +2 -2
  846. package/dist/web-update.d.ts +15 -1
  847. package/dist/web-upload.d.ts +36 -0
  848. package/dist/web-upload.js +105 -5
  849. package/dist/web-upload.js.map +1 -1
  850. package/dist/windows-cli-api.d.ts +10 -7
  851. package/dist/windows-cli-api.js +13 -12
  852. package/dist/windows-cli-api.js.map +1 -1
  853. package/dist/windows-cli-worker.d.ts +10 -0
  854. package/dist/windows-cli-worker.js +109 -14
  855. package/dist/windows-cli-worker.js.map +1 -1
  856. package/dist/windows-cli.d.ts +10 -1
  857. package/dist/windows-cli.js +47 -13
  858. package/dist/windows-cli.js.map +1 -1
  859. package/package.json +1 -1
  860. package/templates/runtime-install/install.ps1 +24 -4
@@ -0,0 +1,189 @@
1
+ // M-3162 (Lumen's approved mockup, docs/evidence/hub-admin-dashboard on docs/hub-ux-review-m2902; API M-3161,
2
+ // docs/design/hub-admin-dashboard-api.md): Administration → Overview — how the Hub is being used, in counts only.
3
+ // People, Questions (per day, answer time, not answered, the most-asked agents), Fleets and Rooms, for Today or 7 days in
4
+ // this browser's own time zone, read again every minute. Never what anyone asked or answered, never counted by person;
5
+ // the line under the range says so. No token or cost figures. A Hub nobody has joined yet shows one line and "Let
6
+ // colleagues join" instead of a page of zeros (the Fleets still show: a Fleet may be paired before anyone uses the Hub).
7
+ // A module of its own with its own words (upgrade skew: a tab holding an older dictionary still has every word).
8
+ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
9
+ import { register, t, lang } from "/assets/app-i18n.js";
10
+ import { ErrorState, Skeleton } from "/assets/ui-states.js";
11
+
12
+ register("hubOverview", {
13
+ en: {
14
+ today: "Today", week: "7 days", rangeLabel: "Period",
15
+ updated: "Updated {0} · refreshes every minute",
16
+ privacy: "Counts only. This page never shows what anyone asked or what an agent answered, and never counts by person.",
17
+ hPeople: "People", hAsk: "Questions", hFleet: "Fleets", hRoom: "Rooms",
18
+ pToday: "Active today", pTodaySub: "of {0} people who have joined", pWeek: "Active in 7 days", pWeekSub: "{0} have not signed in this week",
19
+ pWeekAll: "everyone who has joined", pJoin: "Joined this week", pJoinSub: "{0} in total", pNow: "Signed in now", pNowSub: "active in the last 5 minutes",
20
+ qPerDay: "Questions per day", qRange_today: "today", qRange_7d: "7 days", qHint: "Each agent asked counts once.", qToday: "Today",
21
+ aTime: "Answer time", aMed: "Typical (median)", aSlow: "Slowest 1 in 10", aWait: "Waiting now", aWaitOld: "Longest wait now",
22
+ notEnough: "Not enough answers yet", none: "—",
23
+ fTitle: "Not answered", fRate: "{0}% of questions", fOff: "The agent's Fleet was offline", fTime: "No answer in time",
24
+ fPerm: "Permission ended first", fBusy: "Agent stopped or refused", fUnknown: "Other or unknown",
25
+ topTitle: "Most-asked agents", topAgent: "Agent", topAsk: "Questions", topMed: "Typical answer", topFail: "Not answered",
26
+ topNone: "No agent has been asked anything in this period.", topShared: "{0} shared agents in all.",
27
+ flOn: "Connected now", flOnSub: "of {0} Fleets", flBehind: "Need an update", flBehindSub: "below the recommended v{0}",
28
+ flBehindNoRec: "no recommended version set", flOld: "Too old for rooms", flOldSub: "their agents cannot answer in rooms",
29
+ flUnk: "Version unknown", flUnkSub: "too old to report a version", flLink: "See Connected Fleets",
30
+ rmPosts: "Messages", rmP: "People", rmA: "Agents", rmH: "Room assistant", rmActive: "Active rooms", rmActiveSub: "of {0} rooms · {1} created this week",
31
+ rmAsk: "Agent questions in rooms", rmAskSub: "@mentions that asked an agent", rmAuto: "Agent-to-agent chains stopped", rmAutoSub: "hit the depth or rate limit",
32
+ rmNote: "Counts across all rooms. Room names and members are not listed here: an administrator is not a member of every room.",
33
+ emptyLine: "Nobody has joined yet. Let colleagues join to see activity here.", emptyButton: "Let colleagues join",
34
+ sec: "{0} s", min: "{0} min", hour: "{0} h",
35
+ },
36
+ "zh-TW": {
37
+ today: "今天", week: "7 天", rangeLabel: "期間",
38
+ updated: "更新於 {0} · 每分鐘更新一次",
39
+ privacy: "這裡只有數字。不會顯示任何人問了什麼、Agent 答了什麼,也不會按人統計。",
40
+ hPeople: "使用的人", hAsk: "提問", hFleet: "Fleet", hRoom: "房間",
41
+ pToday: "今天使用", pTodaySub: "已加入的 {0} 人當中", pWeek: "7 天內使用", pWeekSub: "有 {0} 人這週沒有登入",
42
+ pWeekAll: "已加入的人都有使用", pJoin: "這週加入", pJoinSub: "總共 {0} 人", pNow: "目前登入中", pNowSub: "最近 5 分鐘內有操作",
43
+ qPerDay: "每天的提問數", qRange_today: "今天", qRange_7d: "7 天", qHint: "每問一個 Agent 算一次。", qToday: "今天",
44
+ aTime: "回答時間", aMed: "一般(中位數)", aSlow: "最慢的十分之一", aWait: "正在等回答", aWaitOld: "目前等最久",
45
+ notEnough: "回答數還不夠", none: "—",
46
+ fTitle: "沒有得到回答", fRate: "占全部提問的 {0}%", fOff: "Agent 的 Fleet 沒有連接", fTime: "逾時沒有回答",
47
+ fPerm: "權限先到期", fBusy: "Agent 停止或拒絕", fUnknown: "其他或原因不明",
48
+ topTitle: "最常被問的 Agent", topAgent: "Agent", topAsk: "提問數", topMed: "一般回答時間", topFail: "沒有回答",
49
+ topNone: "這段期間還沒有人問過 Agent。", topShared: "總共分享了 {0} 個 Agent。",
50
+ flOn: "目前已連接", flOnSub: "共 {0} 個 Fleet", flBehind: "需要更新", flBehindSub: "低於建議版本 v{0}",
51
+ flBehindNoRec: "還沒有設定建議版本", flOld: "版本太舊,無法使用房間", flOldSub: "它們的 Agent 無法在房間裡回答",
52
+ flUnk: "版本不明", flUnkSub: "版本太舊,無法回報版本", flLink: "查看已連接的 Fleet",
53
+ rmPosts: "訊息數", rmP: "人", rmA: "Agent", rmH: "房間助理", rmActive: "有活動的房間", rmActiveSub: "共 {0} 個房間 · 這週新增 {1} 個",
54
+ rmAsk: "在房間裡問 Agent", rmAskSub: "用 @ 提及來問 Agent 的次數", rmAuto: "Agent 互問被停止", rmAutoSub: "達到層數或頻率上限",
55
+ rmNote: "所有房間的合計。這裡不列出房間名稱與成員:管理員不一定是每個房間的成員。",
56
+ emptyLine: "還沒有人加入。開放同仁加入之後,這裡會顯示使用情形。", emptyButton: "讓同仁加入",
57
+ sec: "{0} 秒", min: "{0} 分鐘", hour: "{0} 小時",
58
+ },
59
+ });
60
+ export const ho = (key, ...args) => t(`hubOverview.${key}`, ...args);
61
+
62
+ const RANGE_KEY = "agend_hub_overview_range";
63
+ const REFRESH_MS = 60_000;
64
+ const num = (n) => (typeof n === "number" && Number.isFinite(n) ? n.toLocaleString(lang() === "zh-TW" ? "zh-TW" : "en") : "0");
65
+ /** A duration in plain words: seconds under a minute, minutes (one decimal under ten) under an hour, hours beyond. */
66
+ export function durationText(ms) {
67
+ if (typeof ms !== "number" || !Number.isFinite(ms) || ms < 0) return null;
68
+ const s = ms / 1000;
69
+ if (s < 60) return ho("sec", String(Math.max(1, Math.round(s))));
70
+ const m = s / 60;
71
+ if (m < 60) return ho("min", m < 10 ? String(Math.round(m * 10) / 10) : String(Math.round(m)));
72
+ return ho("hour", String(Math.round((m / 60) * 10) / 10));
73
+ }
74
+ /** The day label under a bar: the last bar is Today; the others are their weekday, in this page's language. */
75
+ export function dayLabel(date, last) {
76
+ if (last) return ho("qToday");
77
+ const d = new Date(`${date}T12:00:00Z`);
78
+ if (Number.isNaN(d.getTime())) return date;
79
+ return new Intl.DateTimeFormat(lang() === "zh-TW" ? "zh-TW" : "en", { weekday: lang() === "zh-TW" ? "narrow" : "short", timeZone: "UTC" }).format(d);
80
+ }
81
+ const zone = () => { try { return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"; } catch { return "UTC"; } };
82
+ const readRange = () => { try { return sessionStorage.getItem(RANGE_KEY) === "today" ? "today" : "7d"; } catch { return "7d"; } };
83
+
84
+ function Card({ title, big, sub, cls = "" }) {
85
+ return html`<div class=${`hub-ov-card${cls ? ` ${cls}` : ""}`}><div class="hub-ov-card-title">${title}</div>
86
+ <div class="hub-ov-big">${big}</div>${sub ? html`<div class="hub-ov-sub">${sub}</div>` : null}</div>`;
87
+ }
88
+ function Rows({ rows }) {
89
+ return html`<dl class="hub-ov-kv">${rows.map(([k, v]) => html`<div key=${k}><dt>${k}</dt><dd>${v}</dd></div>`)}</dl>`;
90
+ }
91
+
92
+ /**
93
+ * The Overview. `client.adminDashboard({ range, timeZone })` → the M-3161 response (or { ok: false, status }). `onOpen(view,
94
+ * anchor)` opens another Administration tab (Manage at a card: "join", "fleets"); `onGone()` when the route is not there.
95
+ */
96
+ export function HubAdminOverview({ client, onOpen = () => {}, onGone = () => {} }) {
97
+ const [range, setRange] = useState(readRange), [data, setData] = useState(null), [error, setError] = useState(false), [at, setAt] = useState(0);
98
+ const live = useRef(true), asked = useRef(0);
99
+ const load = async (r = range) => {
100
+ const mine = ++asked.current;
101
+ const res = await client.adminDashboard({ range: r, timeZone: zone() }).catch(() => null);
102
+ if (!live.current || mine !== asked.current) return;
103
+ if (res && res.ok !== false && res.people) { setData(res); setError(false); setAt(Date.now()); }
104
+ else if (res && res.status === 404) onGone(); // an older Hub after all: the page shows Manage instead
105
+ else setError(true);
106
+ };
107
+ useEffect(() => { live.current = true; void load(range); const id = setInterval(() => { void load(range); }, REFRESH_MS); return () => { live.current = false; clearInterval(id); }; }, [range]);
108
+ const pick = (r) => { if (r === range) return; try { sessionStorage.setItem(RANGE_KEY, r); } catch { /* private mode */ } setRange(r); };
109
+ const head = html`<div class="hub-ov-bar">
110
+ <div class="hub-ov-range" role="group" aria-label=${ho("rangeLabel")}>
111
+ ${["today", "7d"].map((r) => html`<button key=${r} type="button" class=${`hub-ov-range-item${range === r ? " is-current" : ""}`} aria-pressed=${range === r ? "true" : "false"} onClick=${() => pick(r)}>${ho(r === "today" ? "today" : "week")}</button>`)}
112
+ </div>
113
+ ${at ? html`<span class="note hub-ov-updated">${ho("updated", new Date(at).toLocaleTimeString(lang() === "zh-TW" ? "zh-TW" : "en", { hour: "2-digit", minute: "2-digit" }))}</span>` : null}
114
+ </div>
115
+ <p class="note hub-ov-privacy">${ho("privacy")}</p>`;
116
+ if (!data) return html`<div class="hub-ov">${head}${error ? html`<${ErrorState} onRetry=${() => load(range)} />` : html`<${Skeleton} variant="rows" lines=${6} />`}</div>`;
117
+ const { people, questions: q, topAgents = [], fleets: f, rooms: rm } = data;
118
+ const fleetsSection = html`<section class="hub-ov-section"><h3>${ho("hFleet")}</h3>
119
+ <div class="hub-ov-grid4">
120
+ <${Card} title=${ho("flOn")} big=${num(f.connected)} sub=${ho("flOnSub", num(f.total))} />
121
+ <${Card} title=${ho("flBehind")} big=${num(f.needsUpdate)} sub=${f.recommendedVersion ? ho("flBehindSub", f.recommendedVersion) : ho("flBehindNoRec")} cls=${f.needsUpdate ? "warn" : ""} />
122
+ <${Card} title=${ho("flOld")} big=${num(f.tooOldRooms)} sub=${ho("flOldSub")} cls=${f.tooOldRooms ? "warn" : ""} />
123
+ <${Card} title=${ho("flUnk")} big=${num(f.unknownVersion)} sub=${ho("flUnkSub")} cls=${f.unknownVersion ? "warn" : ""} />
124
+ </div>
125
+ <a class="hub-ov-link" href="/ui/hub/admin?view=manage#fleets" onClick=${(e) => { if (e.metaKey || e.ctrlKey) return; e.preventDefault(); onOpen("manage", "fleets"); }}>${ho("flLink")} ›</a></section>`;
126
+ // A Hub nobody has joined yet: one line and the way to change that, instead of a page of zeros (Lumen, M-3162).
127
+ if (!people.total) return html`<div class="hub-ov">${head}
128
+ <section class="hub-ov-empty card"><p>${ho("emptyLine")}</p><button type="button" class="btn btn-primary" onClick=${() => onOpen("manage", "join")}>${ho("emptyButton")}</button></section>
129
+ ${fleetsSection}</div>`;
130
+ const perDay = Array.isArray(q.perDay) ? q.perDay : [];
131
+ const peak = Math.max(1, ...perDay.map((d) => d.count || 0));
132
+ const reasons = q.notAnswered?.reasons || {};
133
+ const failRows = [["fOff", reasons.offline], ["fTime", reasons.timedOut], ["fPerm", reasons.permissionEnded], ["fBusy", reasons.stoppedOrRefused],
134
+ ...(reasons.unknown ? [["fUnknown", reasons.unknown]] : [])].map(([k, v]) => [ho(k), num(v || 0)]);
135
+ const topPeak = Math.max(1, ...topAgents.map((a) => a.questions || 0));
136
+ const by = rm.byAuthor || {}, posts = Math.max(1, (by.people || 0) + (by.agents || 0) + (by.assistant || 0));
137
+ const share = (n) => `${Math.round(((n || 0) / posts) * 1000) / 10}%`;
138
+ return html`<div class="hub-ov">${head}
139
+ <section class="hub-ov-section"><h3>${ho("hPeople")}</h3>
140
+ <div class="hub-ov-grid4">
141
+ <${Card} title=${ho("pToday")} big=${num(people.activeToday)} sub=${ho("pTodaySub", num(people.total))} />
142
+ <${Card} title=${ho("pWeek")} big=${num(people.active7d)} sub=${people.total > people.active7d ? ho("pWeekSub", num(people.total - people.active7d)) : ho("pWeekAll")} />
143
+ <${Card} title=${ho("pJoin")} big=${num(people.joined7d)} sub=${ho("pJoinSub", num(people.total))} />
144
+ <${Card} title=${ho("pNow")} big=${num(people.signedInNow)} sub=${ho("pNowSub")} />
145
+ </div></section>
146
+ <section class="hub-ov-section"><h3>${ho("hAsk")}</h3>
147
+ <div class="hub-ov-split">
148
+ <div class="hub-ov-card hub-ov-perday"><div class="hub-ov-card-title">${ho("qPerDay")}</div>
149
+ <div class="hub-ov-big">${num(q.asked)} <small>${ho(`qRange_${data.range === "today" ? "today" : "7d"}`)}</small></div>
150
+ <div class="hub-ov-bars" role="img" aria-label=${perDay.map((d, i) => `${dayLabel(d.date, i === perDay.length - 1)} ${d.count}`).join(", ")}>
151
+ ${perDay.map((d, i) => html`<div key=${d.date} class=${i === perDay.length - 1 ? "today" : ""}><b>${num(d.count)}</b>
152
+ <i ref=${(el) => el?.style?.setProperty("height", `${Math.round(((d.count || 0) / peak) * 100)}%`)}></i><span>${dayLabel(d.date, i === perDay.length - 1)}</span></div>`)}
153
+ </div>
154
+ <p class="note">${ho("qHint")}</p></div>
155
+ <div class="hub-ov-stack">
156
+ <div class="hub-ov-card"><div class="hub-ov-card-title">${ho("aTime")}</div>
157
+ <${Rows} rows=${[[ho("aMed"), durationText(q.answerTime?.medianMs) ?? ho("notEnough")], [ho("aSlow"), durationText(q.answerTime?.p90Ms) ?? ho("notEnough")]]} />
158
+ <${Rows} rows=${[[ho("aWait"), num(q.waiting)], [ho("aWaitOld"), durationText(q.longestWaitMs) ?? ho("none")]]} /></div>
159
+ <div class="hub-ov-card"><div class="hub-ov-card-title">${ho("fTitle")}</div>
160
+ <div class="hub-ov-big">${num(q.notAnswered?.total)}${q.asked ? html` <small>${ho("fRate", String(Math.round(((q.notAnswered?.total || 0) / q.asked) * 1000) / 10))}</small>` : null}</div>
161
+ <${Rows} rows=${failRows} /></div>
162
+ </div>
163
+ </div>
164
+ <div class="hub-ov-card hub-ov-top"><div class="hub-ov-card-title">${ho("topTitle")}</div>
165
+ ${topAgents.length ? html`<table><thead><tr><th class="rank"></th><th>${ho("topAgent")}</th><th class="n">${ho("topAsk")}</th><th class="n">${ho("topMed")}</th><th class="n">${ho("topFail")}</th></tr></thead>
166
+ <tbody>${topAgents.map((a, i) => html`<tr key=${a.id}><td class="rank">${i + 1}</td>
167
+ <td><div class="hub-ov-agent">${a.name}</div>${a.ownerName ? html`<div class="note">${a.ownerName}</div>` : null}<div class="hub-ov-meter"><i ref=${(el) => el?.style?.setProperty("width", `${Math.round(((a.questions || 0) / topPeak) * 100)}%`)}></i></div></td>
168
+ <td class="n">${num(a.questions)}</td><td class="n">${durationText(a.medianMs) ?? html`<span class="note">${ho("notEnough")}</span>`}</td>
169
+ <td class="n">${a.notAnswered ? html`<span class="tag warn">${num(a.notAnswered)}</span>` : "0"}</td></tr>`)}</tbody></table>`
170
+ : html`<p class="note">${ho("topNone")}</p>`}
171
+ <p class="note">${ho("topShared", num(data.sharedAgents))}</p></div>
172
+ </section>
173
+ ${fleetsSection}
174
+ <section class="hub-ov-section"><h3>${ho("hRoom")}</h3>
175
+ <div class="hub-ov-split">
176
+ <div class="hub-ov-card"><div class="hub-ov-card-title">${ho("rmPosts")}</div>
177
+ <div class="hub-ov-big">${num(rm.messages)} <small>${ho(`qRange_${data.range === "today" ? "today" : "7d"}`)}</small></div>
178
+ <div class="hub-ov-split-bar" role="img" aria-label=${`${ho("rmP")} ${by.people || 0}, ${ho("rmA")} ${by.agents || 0}, ${ho("rmH")} ${by.assistant || 0}`}>
179
+ <i class="p" ref=${(el) => el?.style?.setProperty("flex-basis", share(by.people))}></i><i class="a" ref=${(el) => el?.style?.setProperty("flex-basis", share(by.agents))}></i><i class="h" ref=${(el) => el?.style?.setProperty("flex-basis", share(by.assistant))}></i></div>
180
+ <dl class="hub-ov-kv hub-ov-legend"><div><dt><i class="p"></i>${ho("rmP")}</dt><dd>${num(by.people)}</dd></div><div><dt><i class="a"></i>${ho("rmA")}</dt><dd>${num(by.agents)}</dd></div><div><dt><i class="h"></i>${ho("rmH")}</dt><dd>${num(by.assistant)}</dd></div></dl>
181
+ <p class="note">${ho("rmNote")}</p></div>
182
+ <div class="hub-ov-stack">
183
+ <${Card} title=${ho("rmActive")} big=${num(rm.active)} sub=${ho("rmActiveSub", num(rm.total), num(rm.created7d))} />
184
+ <${Card} title=${ho("rmAsk")} big=${num(rm.agentQuestions)} sub=${ho("rmAskSub")} />
185
+ <${Card} title=${ho("rmAuto")} big=${num(rm.chainsStopped)} sub=${ho("rmAutoSub")} />
186
+ </div>
187
+ </div></section>
188
+ </div>`;
189
+ }
@@ -67,7 +67,7 @@ export function AdminRooms({ client = hubClient() } = {}) {
67
67
  <td>${Array.isArray(room.managers) ? room.managers.join("、") : ""}</td>
68
68
  <td>${room.lastAt ? chatTime(room.lastAt) : ""}</td>
69
69
  <td>${room.archived ? hroom("archived") : hroom("active")}</td>
70
- <td><${Menu} label=${ha("rowMenu", room.name)} disabled=${busy} items=${[
70
+ <td><${Menu} cls="hub-admin-row-menu" fit=${true} topLayer=${true} label=${ha("rowMenu", room.name)} disabled=${busy} items=${[
71
71
  { key: "join", label: hroom("joinAsManager"), onSelect: () => { void act(() => client.joinRoomAsAdmin(room.id), () => setNote(ha("joined", room.name))); } },
72
72
  room.archived ? null : { key: "archive", label: hroom("archive"), danger: true, onSelect: () => { void archive(room); } },
73
73
  ]} /></td></tr>`)}</tbody></table>` : html`<p class="note">${ha("none")}</p>`}
@@ -3,18 +3,22 @@
3
3
  import { register } from "/assets/app-i18n.js";
4
4
  register("hub", {
5
5
  en: {
6
- agentLead: "Every agent is private unless you share it. A shared agent answers Hub questions in its own conversation, with its own folder and the tools its Settings allow. Actions that need approval still come to you. Only fleet agents can be shared for now: ClassicBot rooms can't be shared yet.",
6
+ agentLead: "Every agent is private unless you share it. A shared agent answers Hub questions in its own conversation, with its own folder and the tools its Settings allow. Actions that need approval still come to you.",
7
+ classicRoomLead: "You can also share the agent of a ClassicBot room. Hub questions and answers are not posted in its Discord or Telegram room, and the room's chat is not copied to the Hub. It is one agent with one memory, though: it may use what it learned in the room when it answers on the Hub, and the other way round.",
7
8
  agentShared: "Shared: Hub questions go to this agent's own conversation.",
8
9
  republishRequired: "Shared under the older restricted mode. Hub questions are refused until you share this agent again.",
9
10
  shareAgain: "Share again",
11
+ classicRoomTag: "ClassicBot room",
10
12
  agentNotShareable: "This agent can't be shared right now. Reload the page and try again.",
11
13
  agentDeliveryUnavailable: "Sharing isn't available on this fleet yet: Hub questions can't reach an agent here.",
12
14
  },
13
15
  "zh-TW": {
14
- agentLead: "每個 Agent 預設都不分享。分享後,Agent 會在自己的對話中回答 Hub 的提問,使用它自己的資料夾和設定允許的工具。需要核准的動作仍會交給你。目前只能分享 Fleet 的 Agent,ClassicBot 房間還不能分享。",
16
+ agentLead: "每個 Agent 預設都不分享。分享後,Agent 會在自己的對話中回答 Hub 的提問,使用它自己的資料夾和設定允許的工具。需要核准的動作仍會交給你。",
17
+ classicRoomLead: "也可以分享 ClassicBot 房間的 Agent。Hub 的提問與回答不會貼到它的 Discord 或 Telegram 房間,房間的聊天也不會複製到 Hub。但它是同一個 Agent、同一份記憶:回答 Hub 的提問時,可能用到它在房間裡得知的內容,反過來也一樣。",
15
18
  agentShared: "已分享:Hub 的提問會送到這個 Agent 自己的對話。",
16
19
  republishRequired: "這是舊的受限模式分享。重新分享這個 Agent 之前,Hub 的提問都會被拒絕。",
17
20
  shareAgain: "重新分享",
21
+ classicRoomTag: "ClassicBot 房間",
18
22
  agentNotShareable: "目前無法分享這個 Agent。請重新整理頁面後再試一次。",
19
23
  agentDeliveryUnavailable: "這個 Fleet 還不能分享:Hub 的提問目前無法送到這裡的 Agent。",
20
24
  },
@@ -0,0 +1,6 @@
1
+ import {register,t} from "/assets/app-i18n.js";
2
+ register("hubApps",{
3
+ en:{returnLabel:"After you allow, you go back to",localReturn:"This app is running on this computer.",returnWarning:"Only allow if you started from that app or site.",manual:"Set it up by hand",promptHint:"Paste this into {0} and it adds the address for you.",genericHint:"Add the address above as a remote MCP server in your app.",may:"May: {0}",justNow:"just now",title:"My AI apps",consentHeading:"Connect an AI app",consentTitle:"Let {0} use this Hub as you?",consentLead:"{0} will be able to do the things ticked below. People will see “{1} via {0}” on what it posts.",read:"Read the rooms you are in",post:"Post in those rooms",ask:"Ask the agents you may ask",inbox:"Answer questions sent to it",later:"Later",privacy:"What it reads goes to your AI app and its provider.",noAdmin:"It cannot change rooms, teams or settings, and it cannot do anything an administrator does.",unverified:"The app gave this name itself. The Hub can't check who made it.",allow:"Allow",cancel:"Cancel",denied:"Your administrator has not enabled AI app access for your account on this Hub.",failed:"That did not finish. Try again, or start connecting again in your app.",expired:"This connection request has expired. Start connecting again in your app.",retry:"Try again",loading:"Loading…",empty:"No AI apps are connected.",disconnect:"Disconnect",disconnected:"App disconnected.",idle:"A connection ends after 30 days without use. Disconnect takes effect at once.",connectTitle:"Connect your app",connectLead:"Add this remote MCP address in your app. Sign in with the account you use for this Hub and choose what the app may do. Nothing else needs to be installed.",address:"Hub MCP address",copyAddress:"Copy address",copied:"Copied.",copyFailed:"Copy failed. Select and copy the text below.",appChoice:"Your app",claude:"Claude Code",codex:"Codex",generic:"Another MCP app",copyPrompt:"Copy setup prompt",prompt:"Configure {app} to connect to my Hub using the remote HTTP MCP server below. Use the browser sign-in and consent flow. Install no AgEnD package or proxy. Never bypass certificate verification. Do not copy credentials or other personal configuration into this setup.",config:"Remote MCP configuration",adminTitle:"AI apps",adminSwitch:"Let people connect their own AI apps",everyone:"Everyone who can use this Hub",selected:"Only these groups, teams or people",save:"Save",saved:"Saved.",narrowWarning:"Narrowing this ends every existing app connection. People who are still allowed connect again in their app.",remove:"Remove",removeLabel:"Remove {0}",roomSwitch:"Allow AI apps to read and post",rateLimited:"{0}'s AI app was slowed down.",chooseScope:"Choose at least one permission.",dates:"Connected {0} · last used {1}",unknown:"Not yet",invalidReturn:"The app's return address could not be opened. Start connecting again in your app.",signInAgain:"Sign in again to see your apps.",styleFailed:"The page style could not load. Try again."},
4
+ "zh-TW":{returnLabel:"允許之後會回到",localReturn:"這個 App 在這台電腦上執行。",returnWarning:"只有在你是從這個 App 或網站開始時才允許。",manual:"手動設定",promptHint:"貼到 {0},它會幫你加入這個位址。",genericHint:"在你的 App 裡,把上面的位址新增為遠端 MCP 伺服器。",may:"可以:{0}",justNow:"剛剛",title:"我的 AI App",consentHeading:"連接 AI App",consentTitle:"要讓 {0} 以你的身分使用這個 Hub 嗎?",consentLead:"{0} 可以做下面勾選的事。它發的訊息會顯示「{1} 透過 {0}」。",read:"讀你所在的房間",post:"在這些房間發言",ask:"問你可以問的 Agent",inbox:"回答別人問它的問題",later:"之後開放",privacy:"它讀到的內容會交給你的 AI App 與它的服務商。",noAdmin:"它不能更改房間、團隊或設定,也不能做管理員的動作。",unverified:"這個名稱是 App 自己提供的,Hub 無法確認它的來源。",allow:"允許",cancel:"取消",denied:"管理員沒有開放讓你的帳號在這個 Hub 連接 AI App。",failed:"剛才沒有完成。請再試一次,或回到 App 重新開始連接。",expired:"這次連接要求已過期,請回到 App 重新開始連接。",retry:"重試",loading:"載入中…",empty:"尚未連接任何 AI App。",disconnect:"中斷連接",disconnected:"已中斷 App 連接。",idle:"30 天沒有使用,連接就會自動結束。中斷連接會立即生效。",connectTitle:"連接你的 App",connectLead:"在 App 加入這個遠端 MCP 位址,用你登入這個 Hub 的帳號登入,再選擇 App 可以做的事。不用另外安裝程式。",address:"Hub MCP 位址",copyAddress:"複製位址",copied:"已複製。",copyFailed:"複製失敗,請選取下方文字自行複製。",appChoice:"你的 App",claude:"Claude Code",codex:"Codex",generic:"其他 MCP App",copyPrompt:"複製設定提示",prompt:"請把 {app} 設定為透過下方遠端 HTTP MCP 伺服器連接我的 Hub,使用瀏覽器登入與同意流程。不要安裝 AgEnD 套件或其他程式,也不能略過憑證驗證。不要把憑證或其他個人設定複製到這份設定。",config:"遠端 MCP 設定",adminTitle:"AI App",adminSwitch:"允許同仁連接自己的 AI App",everyone:"所有可以使用這個 Hub 的人",selected:"只有這些群組、團隊或人員",save:"儲存",saved:"已儲存。",narrowWarning:"縮小這個範圍會結束所有現有 App 連接。仍可使用的人需要回到 App 重新連接。",remove:"移除",removeLabel:"移除 {0}",roomSwitch:"允許 AI App 讀取及發言",rateLimited:"{0} 的 AI App 被放慢了。",chooseScope:"請至少選一項權限。",dates:"連接於 {0} · 上次使用 {1}",unknown:"尚無",invalidReturn:"無法開啟 App 的返回位址,請回到 App 重新開始連接。",signInAgain:"請重新登入後查看你的 App。",styleFailed:"頁面樣式載入失敗,請再試一次。"}
5
+ });
6
+ export const ha=(key,...args)=>t(`hubApps.${key}`,...args);
@@ -0,0 +1,83 @@
1
+ /** Person-owned app connections. All authority remains in the Hub; names are display data. */
2
+ import {html,useEffect,useMemo,useRef,useState} from "/assets/app-html.js";
3
+ import {lang} from "/assets/app-i18n.js";
4
+ import {hubConnectorPrompt} from "/assets/connector-prompt.js";
5
+ import {SubjectPicker,subjectText} from "./hub-subject-picker.js";
6
+ import {ha} from "./hub-ai-apps-strings.js";
7
+
8
+ export const APP_SCOPES=Object.freeze(["rooms:read","rooms:post","agents:ask"]);
9
+ const keys={"rooms:read":"read","rooms:post":"post","agents:ask":"ask"};
10
+ const styles=new WeakMap();
11
+ export function linkHubAppsCss(doc=typeof document==="undefined"?null:document){
12
+ if(!doc?.head)return Promise.resolve(false);if(styles.has(doc))return styles.get(doc);
13
+ const loaded=new Promise(resolve=>{const link=doc.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("href","/assets/hub-ai-apps.css");link.setAttribute("data-hub-apps-css","1");
14
+ link.addEventListener("load",()=>resolve(true),{once:true});link.addEventListener("error",()=>{link.remove();styles.delete(doc);resolve(false);},{once:true});doc.head.appendChild(link);});styles.set(doc,loaded);return loaded;
15
+ }
16
+ function useStyle(){const[ready,setReady]=useState(null),[retry,setRetry]=useState(0);useEffect(()=>{let live=true;linkHubAppsCss().then(r=>{if(live)setReady(r);});return()=>{live=false;};},[retry]);return[ready,()=>setRetry(n=>n+1)];}
17
+ function StyleWait({ready,retry}){return html`<p role="status">${ha(ready===false?"styleFailed":"loading")}</p>${ready===false?html`<button class="btn hub-app-button" type="button" onClick=${retry}>${ha("retry")}</button>`:null}`;}
18
+ function useLife(client,key){const epoch=useRef(0),identity=useRef({client,key});if(identity.current.client!==client||identity.current.key!==key){epoch.current++;identity.current={client,key};}
19
+ useEffect(()=>{const off=client.onSignedOut?.(()=>{epoch.current++;});return()=>{epoch.current++;off?.();};},[client,key]);return epoch;}
20
+ function useRead(client,method,arg,scope){
21
+ const[slot,setSlot]=useState(null),[revision,setRevision]=useState(0),epoch=useRef(0),identity=useMemo(()=>({}),[client,method,arg,scope]);
22
+ useEffect(()=>{let live=true;const mine=++epoch.current;setSlot({identity,value:null});Promise.resolve().then(()=>client[method](scope,arg)).then(out=>{if(live&&mine===epoch.current)setSlot({identity,value:out});},()=>{if(live&&mine===epoch.current)setSlot({identity,value:{ok:false}});});
23
+ const off=client.onSignedOut?.(()=>{epoch.current++;setSlot({identity,value:{ok:false,status:401}});});return()=>{live=false;epoch.current++;off?.();};},[identity,revision]);
24
+ return[slot?.identity===identity?slot.value:null,()=>setRevision(n=>n+1)];
25
+ }
26
+ const errorText=r=>ha(r?.status===401?"signInAgain":r?.status===403?"denied":r?.status===400?"expired":"failed");
27
+ function ReadError({value,retry}){return html`<p class="err" role="alert">${errorText(value)}</p><button class="btn hub-app-button" type="button" onClick=${retry}>${ha("retry")}</button>`;}
28
+ export function appReturnUrl(value){try{const u=new URL(value);return !u.username&&!u.password&&!u.hash&&(u.protocol==="https:"||u.protocol==="http:"&&["127.0.0.1","[::1]","localhost"].includes(u.hostname))?u.href:null;}catch{return null;}}
29
+ export function appDestination(origin){try{const u=new URL(origin);if(u.origin!==origin||!appReturnUrl(origin))return null;return u.origin;}catch{return null;}}
30
+ export function AppConsentPage({client,request,person,returnTo=url=>location.assign(url)}){
31
+ const scope=useMemo(()=>client.aiAppsScope?.(),[client]),[view,reload]=useRead(client,"appConsent",request,scope),[scopes,setScopes]=useState([]),[busy,setBusy]=useState(false),[error,setError]=useState(""),life=useLife(client,request),[ready,retry]=useStyle();
32
+ const destination=appDestination(view?.redirectOrigin);
33
+ const offered=JSON.stringify(view?.scopes||[]);useEffect(()=>{setScopes(APP_SCOPES.filter(scope=>view?.scopes?.includes(scope)));setError("");},[request,offered]);
34
+ useEffect(()=>{setBusy(false);setError("");},[request]);
35
+ const finish=async cancel=>{if(busy||!cancel&&(!scopes.length||!destination))return;const mine=life.current;setBusy(true);setError("");let out;try{out=await client.saveAppConsent(scope,request,cancel?{cancel:true}:{scopes});}catch{out={ok:false};}
36
+ if(mine!==life.current)return;setBusy(false);const target=out.ok&&appReturnUrl(out.location);if(target)returnTo(target);else setError(out.ok?ha("invalidReturn"):errorText(out));};
37
+ return html`<div class="s-section-layout hub-ai-apps"><section class="card"><h2>${view?.ok?ha("consentTitle",view.name):ha("consentHeading")}</h2>
38
+ ${!ready?html`<${StyleWait} ready=${ready} retry=${retry}/>`:view===null?html`<p role="status">${ha("loading")}</p>`:!view.ok?html`<${ReadError} value=${view} retry=${reload}/>`:html`
39
+ <p>${ha("consentLead",view.name,person||"")}</p><p class="note">${ha("unverified")}</p>
40
+ <div class="hub-app-destination"><strong>${ha(destination?.startsWith("http:")?"localReturn":"returnLabel")}</strong><p>${destination||ha("invalidReturn")}</p><p class="note">${ha("returnWarning")}</p></div>
41
+ ${APP_SCOPES.filter(scope=>view.scopes.includes(scope)).map(scope=>html`<label class="check" key=${scope}><input type="checkbox" data-app-scope=${scope} checked=${scopes.includes(scope)} disabled=${busy} onChange=${e=>setScopes(old=>e.target.checked?[...old,scope]:old.filter(x=>x!==scope))}/><span>${ha(keys[scope])}</span></label>`)}
42
+ <label class="check"><input type="checkbox" disabled=${true} checked=${false}/><span>${ha("inbox")} · ${ha("later")}</span></label>
43
+ <p class="note">${ha("noAdmin")}</p><p class="note">${ha("privacy")}</p>${!scopes.length?html`<p class="note">${ha("chooseScope")}</p>`:null}
44
+ <div class="hub-app-actions"><button type="button" class="btn btn-primary hub-app-button" disabled=${busy||!scopes.length||!destination} onClick=${()=>finish(false)}>${ha("allow")}</button><button type="button" class="btn hub-app-button" disabled=${busy} onClick=${()=>finish(true)}>${ha("cancel")}</button></div>`}
45
+ ${error?html`<p class="err" role="alert">${error}</p>`:null}</section></div>`;
46
+ }
47
+ function SetupCard({address}){
48
+ const[app,setApp]=useState("claude"),[note,setNote]=useState("");const prompt=hubConnectorPrompt(address,app,ha);
49
+ const copy=async text=>{try{await navigator.clipboard.writeText(text);setNote(ha("copied"));}catch{setNote(ha("copyFailed"));}};
50
+ return html`<section class="card"><h3>${ha("connectTitle")}</h3><p class="note">${ha("connectLead")}</p>
51
+ <label class="field"><span>${ha("address")}</span><input type="url" readonly=${true} value=${address||""}/></label><div class="hub-app-actions"><button type="button" class="btn btn-primary hub-app-button" disabled=${!prompt} onClick=${()=>copy(address)}>${ha("copyAddress")}</button></div>
52
+ <label class="field"><span>${ha("appChoice")}</span><select value=${app} onChange=${e=>setApp(e.target.value)}>${["claude","codex","generic"].map(key=>html`<option value=${key}>${ha(key)}</option>`)}</select></label>
53
+ <p class="note">${app==="generic"?ha("genericHint"):ha("promptHint",ha(app))}</p>
54
+ ${app!=="generic"?html`<div class="hub-app-actions"><button type="button" class="btn hub-app-button" disabled=${!prompt} onClick=${()=>copy(prompt)}>${ha("copyPrompt")}</button></div>`:null}<p class="note" role="status">${note}</p>
55
+ <details class="s-ui-disclosure" open=${note===ha("copyFailed")?true:undefined}><summary>${ha("manual")}</summary><div class="s-disclosure-body"><textarea readonly=${true} rows="7" aria-label=${ha("config")} value=${prompt}/></div></details></section>`;
56
+ }
57
+ export function appConnectionDates(connected,lastUsed,now=Date.now()){
58
+ const locale=lang()==="zh-TW"?"zh-TW":"en-GB",at=Number(connected),last=Number(lastUsed);
59
+ const date=Number.isFinite(at)?new Intl.DateTimeFormat(locale,{day:"numeric",month:"short"}).format(at):ha("unknown");
60
+ const seconds=Math.max(0,(now-last)/1000),rtf=new Intl.RelativeTimeFormat(lang()==="zh-TW"?"zh-TW":"en",{numeric:"always"});
61
+ const relative=!Number.isFinite(last)?ha("unknown"):seconds<60?ha("justNow"):seconds<3600?rtf.format(-Math.floor(seconds/60),"minute"):seconds<86400?rtf.format(-Math.floor(seconds/3600),"hour"):rtf.format(-Math.floor(seconds/86400),"day");
62
+ return ha("dates",date,relative);
63
+ }
64
+ export function MyAiAppsPage({client}){
65
+ const scope=useMemo(()=>client.aiAppsScope?.(),[client]),[view,reload]=useRead(client,"aiApps",undefined,scope),[busy,setBusy]=useState(null),[note,setNote]=useState(""),life=useLife(client),[ready,retry]=useStyle();
66
+ const disconnect=async id=>{if(busy)return;const mine=life.current;setBusy(id);let out;try{out=await client.disconnectAiApp(scope,id);}catch{out={ok:false};}if(mine!==life.current)return;setBusy(null);setNote(out.ok?ha("disconnected"):errorText(out));if(out.ok)reload();};
67
+ return html`<div class="s-section-layout hub-ai-apps">${!ready?html`<section class="card"><${StyleWait} ready=${ready} retry=${retry}/></section>`:view===null?html`<section class="card"><p role="status">${ha("loading")}</p></section>`:!view.ok?html`<section class="card"><${ReadError} value=${view} retry=${reload}/></section>`:html`
68
+ ${view.available===false?html`<section class="card"><p role="status">${ha("denied")}</p></section>`:null}<${SetupCard} address=${view.address}/>
69
+ <section class="card"><h3>${ha("title")}</h3><p class="note">${ha("idle")}</p>${view.apps?.length?html`<ul class="hub-app-list">${view.apps.map(app=>html`<li class="s-row hub-app-entry" key=${app.id}><div class="hub-app-row"><strong>${app.name}</strong><small class="note">${appConnectionDates(app.connectedAt,app.lastUsedAt)}</small><small>${ha("may",APP_SCOPES.filter(scope=>app.scopes?.includes(scope)).map(scope=>ha(keys[scope])).join(" · "))}</small></div><button type="button" class="btn hub-app-button hub-app-disconnect" disabled=${busy!==null} onClick=${()=>disconnect(app.id)}>${ha("disconnect")}</button></li>`)}</ul>`:html`<p>${ha("empty")}</p>`}<p role="status" class="note">${note}</p></section>`}</div>`;
70
+ }
71
+ export function AiAppsAdminCard({client}){
72
+ const scope=useMemo(()=>client.aiAppsScope?.(),[client]),[view,reload]=useRead(client,"aiAppsSettings",undefined,scope),[draft,setDraft]=useState(null),[busy,setBusy]=useState(false),[note,setNote]=useState(""),life=useLife(client),[ready,retry]=useStyle();
73
+ useEffect(()=>{if(view?.ok)setDraft({revision:view.revision,enabled:view.enabled,everyone:view.everyone,subjects:view.subjects||[]});},[view]);
74
+ const search=useMemo(()=>(kind,q)=>client.searchAiAppSubjects(scope,kind,q),[client,scope]);
75
+ const pick=(kind,row)=>{const id=kind==="person"?`${row.person?.realm}/${row.person?.objectId}`:kind==="team"?row.id:row.objectId,name=row.name||row.displayName||row.cn||row.login;
76
+ setDraft(old=>old.subjects.some(s=>s.kind===kind&&s.id===id)?old:{...old,subjects:[...old.subjects,{kind,id,name}]});};
77
+ const save=async()=>{if(busy||!draft)return;const mine=life.current;setBusy(true);let out;try{out=await client.saveAiAppsSettings(scope,draft);}catch{out={ok:false};}if(mine!==life.current)return;setBusy(false);setNote(out.ok?ha("saved"):errorText(out));if(out.ok)reload();};
78
+ return html`<section class="card hub-ai-apps"><h3>${ha("adminTitle")}</h3>${!ready?html`<${StyleWait} ready=${ready} retry=${retry}/>`:view===null?html`<p role="status">${ha("loading")}</p>`:!view.ok?html`<${ReadError} value=${view} retry=${reload}/>`:draft?html`
79
+ <label class="check"><input class="s-ui-toggle" type="checkbox" role="switch" checked=${draft.enabled} disabled=${busy} onChange=${e=>{const value=e.target.checked;setDraft(old=>({...old,enabled:value}));}}/><span>${ha("adminSwitch")}</span></label>
80
+ ${[true,false].map(everyone=>html`<label class="check"><input type="radio" name="hubAppAllowed" checked=${draft.everyone===everyone} disabled=${busy||!draft.enabled} onChange=${()=>setDraft(old=>({...old,everyone}))}/><span>${ha(everyone?"everyone":"selected")}</span></label>`)}
81
+ ${!draft.everyone?html`<ul class="hub-app-list">${draft.subjects.map(row=>html`<li class="s-row" key=${`${row.kind}:${row.id}`}><span class="grow">${row.name} · ${subjectText(row.kind)}</span><button type="button" class="btn hub-app-button" disabled=${busy||!draft.enabled} aria-label=${ha("removeLabel",row.name)} onClick=${()=>setDraft({...draft,subjects:draft.subjects.filter(x=>x!==row)})}>${ha("remove")}</button></li>`)}</ul><${SubjectPicker} client=${client} search=${search} disabled=${busy||!draft.enabled} onPick=${pick}/>`:null}
82
+ <p class="note">${ha("narrowWarning")}</p><div class="hub-app-actions"><button type="button" class="btn btn-primary hub-app-button" disabled=${busy} onClick=${save}>${ha("save")}</button></div><p class="note" role="status">${note}</p>`:null}</section>`;
83
+ }
@@ -6,6 +6,10 @@ import { register, t } from "/assets/app-i18n.js";
6
6
  register("hubChat", {
7
7
  en: {
8
8
  navSearch: "Search", notices: "Notices", noticesTitle: "Notices", noNotices: "No security notices", noticesLead: "When a new fleet connects to this Hub, you're told here. If you don't recognize it, revoke it.", settings: "Settings", signedIn: "Signed in", signOut: "Sign out",
9
+ // M-3190: the chat launcher (新對話, or 對話 with nothing to open)
10
+ launchTitle: "Who do you want to talk to today?", launchOwner: "Owner: {0}", launchInRoom: "In #{0}", launchGo: "Chat →", launchFilter: "Filter agents",
11
+ launchNone: "No agent has been shared with you directly yet", launchNoneHint: "Ask a colleague to share one with you in My shared agents, or go into a room on the left and work with its agents.",
12
+ launchNewRoom: "New room", launchShare: "Share my agent", launchNoMatch: "No agent matches.",
9
13
  chats: "Chats", newChat: "New chat", search: "Search chats", noChats: "No chats yet", noChatsHint: "Start one with New chat: it lists the agents someone allowed you to ask.",
10
14
  noMatch: "No chat matches.", waiting: "Waiting for an answer", represents: "Answers for {0}",
11
15
  pickTitle: "New chat", pickSearch: "Search agents or owners", pickHint: "Only the agents someone allowed you to ask are listed.",
@@ -36,6 +40,9 @@ register("hubChat", {
36
40
  },
37
41
  "zh-TW": {
38
42
  navSearch: "搜尋", notices: "通知", noticesTitle: "通知", noNotices: "沒有安全通知", noticesLead: "有新的 Fleet 連接到這個 Hub 時,會在這裡通知你。如果你不認得它,請撤銷。", settings: "設定", signedIn: "已登入", signOut: "登出",
43
+ launchTitle: "今天想找哪位 Agent?", launchOwner: "擁有者:{0}", launchInRoom: "位於 #{0}", launchGo: "對話 →", launchFilter: "篩選 Agent",
44
+ launchNone: "還沒有人直接分享 Agent 給你", launchNoneHint: "請同事在「我分享的 Agent」授權給你,或直接進入左側的房間與 Agent 協作。",
45
+ launchNewRoom: "開新房間", launchShare: "分享我的 Agent", launchNoMatch: "沒有符合的 Agent。",
39
46
  chats: "對話", newChat: "新對話", search: "搜尋對話", noChats: "還沒有對話", noChatsHint: "用「新對話」開始:會列出有人允許你提問的 Agent。",
40
47
  noMatch: "沒有符合的對話。", waiting: "等待回答", represents: "代表 {0} 回答",
41
48
  pickTitle: "新對話", pickSearch: "搜尋 Agent 或擁有者", pickHint: "只列出有人允許你提問的 Agent。",
@@ -56,7 +56,7 @@ export function hubName(doc = typeof document !== "undefined" ? document : null)
56
56
  * marks a mapping from the older restricted mode that answers nothing until the owner shares the agent again.
57
57
  * @typedef {{ agent: string, display: string, exposureId: string | null, revision: number,
58
58
  * state: "published" | "withdrawn" | "frozen", policy: { dataView: string, tools: string[] } | null,
59
- * enforceable: boolean, reason?: string }} HubExposureView
59
+ * enforceable: boolean, reason?: string, contactLimit?: boolean, contactLimitNotice?: boolean }} HubExposureView
60
60
  */
61
61
  /**
62
62
  * Results (docs/design/hub-ui-client.md "Results"). A withdrawal or disconnect fences locally at once (even offline) but
@@ -120,13 +120,16 @@ export function legacyRoom(item) {
120
120
  if (!item || typeof item !== "object" || typeof item.id !== "string") return null;
121
121
  return { id: item.id, kind: "direct", name: String(item.exposureName || ""), people: 1, agents: 1, online: null, unread: 0,
122
122
  lastAt: Number.isFinite(item.lastAt) ? item.lastAt : 0, lastText: "", lastAuthor: "",
123
- agent: { exposureId: String(item.exposureId || ""), owner: { name: String(item.ownerName || "") }, presence: null }, limited: true, legacy: item };
123
+ agent: { ...(item.answerOnly?{answerOnly:true}:{}), exposureId: String(item.exposureId || ""), owner: { name: String(item.ownerName || "") }, presence: null }, limited: true, legacy: item };
124
124
  }
125
125
  export const ADDRESS_HINT = /^https:\/\/[^\s/?#@]+\/?$/i;
126
126
  export const CODE_HINT = /^[A-Za-z0-9][A-Za-z0-9 -]{4,62}[A-Za-z0-9]$/;
127
127
  /** The part of a fingerprint people compare: its first 32 hex digits (128 bits) in 8 groups of 4. */
128
128
  export function compareGroups(digest) { return String(digest || "").replace(/[^0-9a-f]/gi, "").toLowerCase().slice(0, 32).replace(/(.{4})(?=.)/g, "$1 "); }
129
129
  /** An origin the switcher may open: the approved webOrigin of a paired Hub, https only, nothing after the host. */
130
+ /** M-3235: the most a Hub's name can be, in every editor (Hub setup, This Hub) — what the brand shows (src/hub-mode.ts
131
+ * HUB_NAME_MAX, pinned to it by tests/hub-web-setup-ui), so a name typed is never cut afterwards. */
132
+ export const HUB_NAME_MAX = 60;
130
133
  export function safeWebOrigin(pairing) {
131
134
  if (!pairing || pairing.state !== "paired" || !pairing.hub) return null;
132
135
  try {
@@ -151,7 +154,7 @@ export function createStubClient({ now = () => Date.now(), agents = () => [] } =
151
154
  const c = consent.get(a.name) || { state: "withdrawn", revision: 0 };
152
155
  const ok = enforceable.has(a.name);
153
156
  return { agent: a.name, display: a.display_name || a.name, exposureId: c.revision ? `stub-${a.name}` : null, revision: c.revision,
154
- state: c.state, policy: ok && c.state === "published" ? { dataView: c.dataView || "agent", tools: c.tools ? [...c.tools] : [] } : null, enforceable: ok, ...(ok ? {} : { reason: "restricted_execution_pending" }),
157
+ state: c.state, contactLimit: c.contactLimit !== false, policy: ok && c.state === "published" ? { dataView: c.dataView || "agent", tools: c.tools ? [...c.tools] : [] } : null, enforceable: ok, ...(ok ? {} : { reason: "restricted_execution_pending" }),
155
158
  // P1 representative agent: the one choice is the agent itself, with no Hub tools; no pending confirmation.
156
159
  choices: ok ? { dataViews: [{ id: "agent", label: a.display_name || a.name }], tools: [] } : { dataViews: [], tools: [] },
157
160
  pending: null };
@@ -198,7 +201,7 @@ export function createStubClient({ now = () => Date.now(), agents = () => [] } =
198
201
  }
199
202
  if (pairing.state !== "paired") return { ok: false, error: "not_paired" };
200
203
  if (!enforceable.has(agent)) return { ok: false, error: "not_enforceable" };
201
- consent.set(agent, { state: "published", revision: c.revision + 1, dataView: choice && choice.dataViewId, tools: choice && choice.tools });
204
+ consent.set(agent, { state: "published", revision: c.revision + 1, dataView: choice && choice.dataViewId, tools: choice && choice.tools, contactLimit: choice?.contactLimit !== false });
202
205
  return { ok: true, view: view(a) };
203
206
  },
204
207
  /** Hear pairing changes (slice 1: the member's local status projections). @returns {() => void} */
@@ -361,6 +364,20 @@ export function createHubWebClient({ fetchImpl = (...a) => fetch(...a), readTime
361
364
  async session() { const r = await call("GET", "/hub/v1/session"); if (r.ok) { csrf = r.signedIn ? r.csrf || null : null; codeNotices = r.signedIn === true && r.features?.includes("enrolment-code-v1") === true; roomsLive = r.signedIn === true && r.features?.includes(ROOMS_FEATURE) === true; teamsLive = r.signedIn === true && r.features?.includes(TEAMS_FEATURE) === true; } return r; },
362
365
  async signIn(login, password) { retireReads(); teamsLive = false; const r = await call("POST", "/hub/v1/session", { login, password }); if (r.ok) { csrf = r.csrf || null; codeNotices = r.features?.includes("enrolment-code-v1") === true; roomsLive = r.features?.includes(ROOMS_FEATURE) === true; teamsLive = r.features?.includes(TEAMS_FEATURE) === true; } return r; },
363
366
  async signOut() { retireReads(); const r = await call("DELETE", "/hub/v1/session"); csrf = null; codeNotices = false; roomsLive = false; teamsLive = false; return r; },
367
+ aiAppsScope() { return csrf; },
368
+ aiApps(scope) { return scope && scope === csrf ? call("GET", "/hub/v1/me/ai-apps") : Promise.resolve(retired()); },
369
+ disconnectAiApp(scope, appId) { return scope && scope === csrf ? call("DELETE", `/hub/v1/me/ai-apps/${id(appId)}`) : Promise.resolve(retired()); },
370
+ appConsent(scope, request) { return scope && scope === csrf ? call("GET", `/hub/v1/mcp/consent?${new URLSearchParams({request})}`) : Promise.resolve(retired()); },
371
+ saveAppConsent(scope, request, value) { return scope && scope === csrf ? call("POST", "/hub/v1/mcp/consent", {request,...value}) : Promise.resolve(retired()); },
372
+ aiAppsSettings(scope) { return scope && scope === csrf ? call("GET", "/hub/v1/admin/ai-apps") : Promise.resolve(retired()); },
373
+ saveAiAppsSettings(scope, value) { return scope && scope === csrf ? call("PATCH", "/hub/v1/admin/ai-apps", value) : Promise.resolve(retired()); },
374
+ searchAiAppSubjects(scope, kind, q, signal) { return scope && scope === csrf ? call("GET", `/hub/v1/admin/ai-apps/search?${new URLSearchParams({kind,q})}`, undefined, signal) : Promise.resolve(retired()); },
375
+ setRoomAiApps(scope, roomId, enabled) { return scope && scope === csrf ? call("PATCH", `/hub/v1/rooms/${id(roomId)}/ai-apps`, {enabled}) : Promise.resolve(retired()); },
376
+ // A source captures the session CSRF: a queued write from a previous sign-in cannot use the new person's cookie.
377
+ personPrefs(sessionCsrf) { return sessionCsrf && sessionCsrf === csrf ? call("GET", "/hub/v1/me/prefs") : Promise.resolve(retired()); },
378
+ savePersonPrefs(sessionCsrf, favorites, onlyIfUnset = false) {
379
+ return sessionCsrf && sessionCsrf === csrf ? call("PUT", "/hub/v1/me/prefs", { favorites, onlyIfUnset }) : Promise.resolve(retired());
380
+ },
364
381
  catalog() { return call("GET", "/hub/v1/exposures"); },
365
382
  sharingPauseV1: true,
366
383
  sharing(exposureId, revision, sharingEpoch, paused) { return call("POST", `/hub/v1/exposures/${id(exposureId)}/sharing`, { revision, sharingEpoch, paused }); },
@@ -438,6 +455,15 @@ export function createHubWebClient({ fetchImpl = (...a) => fetch(...a), readTime
438
455
  return call("POST", `/hub/v1/rooms/${id(roomId)}/messages`, { text, mentions, idempotencyKey,
439
456
  ...(replyTo ? { replyTo } : {}), ...(Array.isArray(files) && files.length ? { files } : {}) });
440
457
  },
458
+ /** M-3127 C: messages with these words in the group rooms I am in → { hits, cursor? } (newest first). */
459
+ searchRoomMessages(q, { limit, cursor } = {}) {
460
+ const p = new URLSearchParams({ q: String(q || "") });
461
+ if (Number.isSafeInteger(limit) && limit > 0) p.set("limit", String(limit));
462
+ if (cursor) p.set("cursor", String(cursor));
463
+ return call("GET", `/hub/v1/rooms/search?${p.toString()}`);
464
+ },
465
+ /** M-3127: add (`on`) or take back my reaction `emoji` on a group-room message → { reactions }. */
466
+ reactRoomMessage(roomId, messageId, emoji, on) { return call("POST", `/hub/v1/rooms/${id(roomId)}/messages/${id(messageId)}/reactions`, { emoji: String(emoji), on: on === true }); },
441
467
  markRoomRead(roomId, upTo) { return call("POST", `/hub/v1/rooms/${id(roomId)}/read`, { upTo }); },
442
468
  /**
443
469
  * The one live stream of everything this person may see (seam 1): `handlers[name](data)` for each of ROOM_EVENTS,
@@ -456,6 +482,20 @@ export function createHubWebClient({ fetchImpl = (...a) => fetch(...a), readTime
456
482
  acceptInvitation(invitationId) { return call("POST", `/hub/v1/invitations/${id(invitationId)}/accept`, {}); },
457
483
  declineInvitation(invitationId) { return call("POST", `/hub/v1/invitations/${id(invitationId)}/decline`, {}); },
458
484
  // Seam 5: teams, who may open rooms, and the administrator's list of rooms (names and members, no content).
485
+ // Role settings: calls remain authoritative on the Hub, never in these display flags.
486
+ roleSettingsV1: true,
487
+ roleAuditFiltersV1: true,
488
+ roles() { return call("GET", "/hub/v1/roles"); },
489
+ roleSearch(kind,q) { return call("GET", `/hub/v1/roles/search?${new URLSearchParams({kind,q})}`); },
490
+ rolePreview(policy) { return call("POST", "/hub/v1/roles/preview", {policy}); },
491
+ roleApply(policy,previewDigest) { return call("POST", "/hub/v1/roles/apply", {policy,previewDigest}); },
492
+ roleRootPreview() { return call("POST", "/hub/v1/roles/root-self/preview", {}); },
493
+ roleRootApply(previewDigest) { return call("POST", "/hub/v1/roles/root-self/apply", {previewDigest}); },
494
+ roleAudit(cursor, filters = {}) { const query = new URLSearchParams(); for (const key of ["from", "to", "person", "action"]) if (filters[key] !== undefined && filters[key] !== "") query.set(key, String(filters[key])); if (cursor) query.set("cursor", cursor); return call("GET", `/hub/v1/roles/audit${query.size ? `?${query}` : ""}`); },
495
+ roleNotices() { return call("GET", "/hub/v1/roles/notices"); },
496
+ acknowledgeRoleNotice(noticeId) { return call("POST", `/hub/v1/roles/notices/${id(noticeId)}/ack`, {}); },
497
+ teamSettings() { return call("GET", "/hub/v1/teams/settings"); },
498
+ saveTeamSettings(input) { return call("PUT", "/hub/v1/teams/settings", input); },
459
499
  teams() { return call("GET", "/hub/v1/teams"); },
460
500
  team(teamId) { return call("GET", `/hub/v1/teams/${id(teamId)}`); },
461
501
  createTeam(input) { return call("POST", "/hub/v1/teams", input); },
@@ -533,6 +573,7 @@ export function createHubWebClient({ fetchImpl = (...a) => fetch(...a), readTime
533
573
  resolveGroup(dn) { return call("POST", "/hub/v1/admin/group-policy/resolve", { dn }); },
534
574
  /** M-2932 (Hub UX U2, S2): a prefix search of the directory's groups — input feedback only; choosing one still resolves its DN. */
535
575
  searchGroups(q) { return call("POST", "/hub/v1/admin/group-policy/search", { q }); },
576
+ searchAllowedPeople(q, signal) { return call("POST", "/hub/v1/admin/group-policy/people/search", { q }, signal); },
536
577
  /** #3698 r1: the public join metadata a Fleet's discovery reads — its features name company-join-v1 only while joining is ON. */
537
578
  joinMetadata() { return call("GET", "/hub/v1/join/metadata"); },
538
579
  previewGroupPolicy(policy) { return call("POST", "/hub/v1/admin/group-policy/preview", { policy }); },
@@ -543,6 +584,25 @@ export function createHubWebClient({ fetchImpl = (...a) => fetch(...a), readTime
543
584
  return call("POST", "/hub/v1/admin/group-policy/resources/resume", { resource, expectedPolicyRevision, expectedLifecycleRevision });
544
585
  },
545
586
  welcome() { return call("GET", "/hub/v1/me/welcome"); },
587
+ // M-3137 / M-3136 (versions spec §2.3): the signed-in person's own active Fleets with their version state (the banner).
588
+ personalAgent(scope) { return scope && scope === csrf ? call("GET", "/hub/v1/me/personal-agent") : Promise.resolve(retired()); },
589
+ refreshPersonalAgent(scope) { return scope && scope === csrf ? call("POST", "/hub/v1/me/personal-agent/refresh", {}) : Promise.resolve(retired()); },
590
+ savePersonalAgent(scope, input) { return scope && scope === csrf ? call("PUT", "/hub/v1/me/personal-agent", input) : Promise.resolve(retired()); },
591
+ personalEnrollment(scope) { return scope && scope === csrf ? call("POST", "/hub/v1/me/personal-agent/enrollment", {}) : Promise.resolve(retired()); },
592
+ disconnectPersonalAgent(scope) { return scope && scope === csrf ? call("DELETE", "/hub/v1/me/personal-agent", {}) : Promise.resolve(retired()); },
593
+ personalAgentSettings(scope) { return scope && scope === csrf ? call("GET", "/hub/v1/admin/personal-agents") : Promise.resolve(retired()); },
594
+ savePersonalAgentSettings(scope, input) { return scope && scope === csrf ? call("PUT", "/hub/v1/admin/personal-agents", input) : Promise.resolve(retired()); },
595
+ myFleets() { return call("GET", "/hub/v1/me/fleets"); },
596
+ // M-3162 / M-3161: Administration → Overview's counts for Today or 7 days, in the viewer's time zone (counts only).
597
+ adminDashboard({ range = "7d", timeZone = "UTC" } = {}) { return call("GET", `/hub/v1/admin/dashboard?range=${encodeURIComponent(range)}&timeZone=${encodeURIComponent(timeZone)}`); },
598
+ // M-3141 / M-3138 (versions spec §3.1): the Hub's recommended AgEnD version — read, preview (nothing saved), save.
599
+ recommendedVersion() { return call("GET", "/hub/v1/admin/recommended-version"); },
600
+ previewRecommendedVersion(input) { return call("POST", "/hub/v1/admin/recommended-version/preview", input); },
601
+ saveRecommendedVersion(input) { return call("PUT", "/hub/v1/admin/recommended-version", input); },
602
+ // M-3145 / M-3144 (versions spec §4.2, §4.5): update the Fleets that allow it — one or many ids, the target always
603
+ // the saved recommendation (ifRevision guards it) — and cancel a waiting request.
604
+ updateFleets(input) { return call("POST", "/hub/v1/admin/fleet-updates", input); },
605
+ cancelFleetUpdate(requestId) { return call("POST", `/hub/v1/admin/fleet-updates/${encodeURIComponent(requestId)}/cancel`, {}); },
546
606
  // M-2682: Administration → This Hub — what it is, and its rename (two steps: the server binds the second to the first).
547
607
  thisHub() { return call("GET", "/hub/v1/admin/hub"); },
548
608
  prepareHubName(name) { return call("POST", "/hub/v1/admin/hub/name/prepare", { name }); },
@@ -645,7 +705,18 @@ export function createMemberClient({ confirm, pollMs = 5000, doc = typeof docume
645
705
  async cancel() { const r = await confirm.api("/api/hub/member/pairing/cancel", { method: "POST", body: "{}" }); return r.ok && r.body && r.body.pairing ? r.body.pairing : pairingNow(); },
646
706
  /** The local status, every pollMs while visible (one request at a time; none while hidden); stops with the last listener. */
647
707
  subscribe(fn) { listeners.add(fn); if (!timer) timer = timers.setTimeout(tick, pollMs); return () => { listeners.delete(fn); if (!listeners.size && timer) { timers.clearTimeout(timer); timer = null; } }; },
708
+ // M-3145 (versions spec §4.1; API M-3144, Ridge): the owner's switch for updates started by this Hub's administrator.
709
+ // An older host (404) answers ok: false, and the switch is not drawn.
710
+ async hubUpdateConsent() { const r = await confirm.api("/api/settings/hub/update-consent"); return r.ok && r.body && typeof r.body === "object" ? { ok: true, ...r.body } : { ok: false, status: r.status }; },
711
+ async setHubUpdateConsent(on) {
712
+ const r = await confirm.api("/api/settings/hub/update-consent", { method: "PUT", body: JSON.stringify({ on: on === true }) });
713
+ return r.ok && r.body && typeof r.body === "object" ? { ok: true, ...r.body } : { ok: false, status: r.status };
714
+ },
648
715
  async exposures() { const rows = await listed(); return rows || []; },
716
+ async acknowledgeContactLimitNotice() {
717
+ const r = await confirm.api("/api/hub/member/contact-limit-notice", { method: "POST", body: "{}" });
718
+ return r.ok && r.body?.ok === true;
719
+ },
649
720
  async setExposed(agent, on, expectedRevision, choice = null) {
650
721
  const rows = await listed();
651
722
  if (rows === null) return { ok: false, error: "unavailable" };
@@ -658,7 +729,7 @@ export function createMemberClient({ confirm, pollMs = 5000, doc = typeof docume
658
729
  }
659
730
  if (!choice || typeof choice.dataViewId !== "string" || !Array.isArray(choice.tools)) return { ok: false, error: "not_enforceable" };
660
731
  const r = await confirm.api("/api/hub/member/exposures", { method: "POST", headers: { "Idempotency-Key": confirm.newKey("hub") },
661
- body: JSON.stringify({ agent, dataViewId: choice.dataViewId, tools: choice.tools, expectedRevision }) });
732
+ body: JSON.stringify({ agent, dataViewId: choice.dataViewId, tools: choice.tools, expectedRevision, ...(choice.contactLimit !== undefined ? { contactLimit: choice.contactLimit } : {}) }) });
662
733
  if (confirm.isPendingResponse(r)) {
663
734
  const p = r.body.pending_change;
664
735
  return { ok: true, pending: { id: p.id, expiresAt: p.expires_at }, view: { ...row, pending: { expiresAt: p.expires_at } }, settled: confirm.track(p, "hub") };
@@ -14,7 +14,7 @@ register("hubDirectoryEditor", {
14
14
  trustHint: "Compare these fingerprints with your directory administrator. If they do not match, cancel.",
15
15
  fetchConfirm: "Fingerprint matches — fetch CA", fetchAuth: "Use service account and fetch CA", fetchAuthHint: "Anonymous CA retrieval was refused. Only the service account below will be sent over the confirmed, pinned connection.",
16
16
  confirmSave: "Confirm fingerprints and save", confirmTest: "Confirm fingerprints and test", fetching: "Checking the pinned server…", saving: "Saving and checking the new settings…", testing: "Testing the connection…",
17
- tested: "Connection test passed. Nothing was saved.", saved: "AD connection saved.", restored: "The new connection could not start. The previous settings were restored. Reload to check the current state.",
17
+ tested: "Connection test passed. Nothing was saved.", saved: "AD connection saved.",savedSignIn:"AD connection saved. Sign in again with the new connection.", restored: "The new connection could not start. The previous settings were restored. Reload to check the current state.",
18
18
  uncertain: "Save could not be confirmed. Reload the current settings before trying again; do not repeat Save.",
19
19
  conflict: "There are no new settings to save, or this page is out of date. Reload the current settings.",
20
20
  invalid: "Check the server address, search fields, CA certificates and password.", denied: "This session cannot change the AD connection. Sign in again or use this computer's own Settings page.",
@@ -39,7 +39,7 @@ register("hubDirectoryEditor", {
39
39
  trustHint: "請向目錄管理員核對這些指紋。若不相符,請取消。",
40
40
  fetchConfirm: "指紋相符,擷取 CA", fetchAuth: "使用服務帳號擷取 CA", fetchAuthHint: "目錄拒絕匿名擷取 CA。只會透過已確認並鎖定指紋的網路連線,傳送下方的服務帳號。",
41
41
  confirmSave: "確認指紋並儲存", confirmTest: "確認指紋並測試", fetching: "正在檢查已鎖定的伺服器…", saving: "正在儲存並檢查新設定…", testing: "正在測試連線…",
42
- tested: "測試連線通過,尚未儲存。", saved: "已儲存 AD 連線。", restored: "新的目錄連線無法啟動,已還原先前設定。請重新讀取,確認目前狀態。",
42
+ tested: "測試連線通過,尚未儲存。", saved: "已儲存 AD 連線。",savedSignIn:"已儲存 AD 連線,請使用新的目錄設定重新登入。", restored: "新的目錄連線無法啟動,已還原先前設定。請重新讀取,確認目前狀態。",
43
43
  uncertain: "無法確認是否已儲存。請先重新讀取目前設定,再決定下一步;不要重複儲存。",
44
44
  conflict: "沒有新設定可儲存,或此頁面已過期。請重新讀取目前設定。",
45
45
  invalid: "請檢查伺服器網址、搜尋欄位、CA 憑證與密碼。", denied: "此工作階段無法變更 AD 連線。請重新登入,或使用這部電腦自己的設定頁面。",
@@ -91,6 +91,7 @@ export function HubDirectoryEditor({ client, offered = false, host = false, logi
91
91
  if (!current(n)) return;
92
92
  setAuth(a => ({ ...a, password: "" })); setForm(f => ({ ...f, bindPassword: "" })); setDialog(null);
93
93
  if (result.state !== "ready" || !Number.isSafeInteger(result.directoryEpoch) || result.directoryEpoch <= view.epoch) { setUncertain(true); setFailureCode(result.state === "restored" ? "restored" : "uncertain"); return; }
94
+ if(result.reauthenticationRequired===true){saveSent.current=false;setNotice("savedSignIn");await afterSave();return;}
94
95
  if (await afterSave() !== true || !current(n)) { if (current(n)) { setUncertain(true); setFailureCode("uncertain"); } return; }
95
96
  const fresh = await read(signal); if (!current(n)) return;
96
97
  setView(fresh); setForm(formOf(fresh)); setRequireAuth(fresh.reauthentication === "required"); saveSent.current = false; setNotice("saved");