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

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 (430) hide show
  1. package/dist/agent-endpoint.d.ts +1 -0
  2. package/dist/agent-endpoint.js +5 -0
  3. package/dist/agent-endpoint.js.map +1 -1
  4. package/dist/agent-whats-new.js +4 -0
  5. package/dist/agent-whats-new.js.map +1 -1
  6. package/dist/backend/kiro-auth-store.d.ts +15 -2
  7. package/dist/backend/kiro-auth-store.js +64 -0
  8. package/dist/backend/kiro-auth-store.js.map +1 -1
  9. package/dist/build-provenance.json +1 -1
  10. package/dist/channel/adapters/discord.js +4 -4
  11. package/dist/channel/adapters/discord.js.map +1 -1
  12. package/dist/channel/adapters/telegram.js +3 -3
  13. package/dist/channel/adapters/telegram.js.map +1 -1
  14. package/dist/channel/ipc-bridge.d.ts +7 -0
  15. package/dist/channel/ipc-bridge.js +45 -11
  16. package/dist/channel/ipc-bridge.js.map +1 -1
  17. package/dist/channel/mcp-server.js +3 -1
  18. package/dist/channel/mcp-server.js.map +1 -1
  19. package/dist/channel/mcp-tools.js +5 -3
  20. package/dist/channel/mcp-tools.js.map +1 -1
  21. package/dist/cli.js +35 -2
  22. package/dist/cli.js.map +1 -1
  23. package/dist/daemon.d.ts +64 -3
  24. package/dist/daemon.js +497 -102
  25. package/dist/daemon.js.map +1 -1
  26. package/dist/delivery-outbox.d.ts +107 -7
  27. package/dist/delivery-outbox.js +293 -8
  28. package/dist/delivery-outbox.js.map +1 -1
  29. package/dist/detached-fleet-stop.d.ts +40 -0
  30. package/dist/detached-fleet-stop.js +126 -0
  31. package/dist/detached-fleet-stop.js.map +1 -0
  32. package/dist/fleet-lock.d.ts +5 -0
  33. package/dist/fleet-lock.js +21 -2
  34. package/dist/fleet-lock.js.map +1 -1
  35. package/dist/fleet-manager.d.ts +482 -4
  36. package/dist/fleet-manager.js +2692 -215
  37. package/dist/fleet-manager.js.map +1 -1
  38. package/dist/fleet-windows-runtime.d.ts +39 -3
  39. package/dist/fleet-windows-runtime.js +208 -30
  40. package/dist/fleet-windows-runtime.js.map +1 -1
  41. package/dist/general-knowledge/skills/hub/SKILL.md +5 -1
  42. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +95 -25
  43. package/dist/hub/admin-dashboard.js +1 -1
  44. package/dist/hub/admin-dashboard.js.map +1 -1
  45. package/dist/hub/agent-catalog.d.ts +1 -1
  46. package/dist/hub/agent-catalog.js +4 -3
  47. package/dist/hub/agent-catalog.js.map +1 -1
  48. package/dist/hub/agent-intro.d.ts +1 -1
  49. package/dist/hub/agent-intro.js +1 -1
  50. package/dist/hub/agent-intro.js.map +1 -1
  51. package/dist/hub/agent-pictures.d.ts +1 -1
  52. package/dist/hub/agent-pictures.js +4 -3
  53. package/dist/hub/agent-pictures.js.map +1 -1
  54. package/dist/hub/catalog.d.ts +2 -2
  55. package/dist/hub/catalog.js +16 -13
  56. package/dist/hub/catalog.js.map +1 -1
  57. package/dist/hub/client.js +9 -2
  58. package/dist/hub/client.js.map +1 -1
  59. package/dist/hub/compose/member.js +8 -1
  60. package/dist/hub/compose/member.js.map +1 -1
  61. package/dist/hub/compose/server.js +4 -2
  62. package/dist/hub/compose/server.js.map +1 -1
  63. package/dist/hub/fleet-updates.d.ts +2 -2
  64. package/dist/hub/fleet-updates.js +7 -5
  65. package/dist/hub/fleet-updates.js.map +1 -1
  66. package/dist/hub/fleet-versions.d.ts +1 -1
  67. package/dist/hub/fleet-versions.js +3 -2
  68. package/dist/hub/fleet-versions.js.map +1 -1
  69. package/dist/hub/group-policy/resources.d.ts +1 -1
  70. package/dist/hub/http/compose.js +57 -30
  71. package/dist/hub/http/compose.js.map +1 -1
  72. package/dist/hub/http/schema.js +4 -1
  73. package/dist/hub/http/schema.js.map +1 -1
  74. package/dist/hub/join/service.d.ts +6 -0
  75. package/dist/hub/join/service.js +10 -0
  76. package/dist/hub/join/service.js.map +1 -1
  77. package/dist/hub/member/room-ask.js +2 -0
  78. package/dist/hub/member/room-ask.js.map +1 -1
  79. package/dist/hub/member/room-post.d.ts +4 -0
  80. package/dist/hub/member/room-post.js +26 -1
  81. package/dist/hub/member/room-post.js.map +1 -1
  82. package/dist/hub/protocol.d.ts +58 -0
  83. package/dist/hub/protocol.js +3 -2
  84. package/dist/hub/protocol.js.map +1 -1
  85. package/dist/hub/quota.d.ts +2 -2
  86. package/dist/hub/quota.js +6 -4
  87. package/dist/hub/quota.js.map +1 -1
  88. package/dist/hub/read-statement.d.ts +6 -0
  89. package/dist/hub/read-statement.js +33 -0
  90. package/dist/hub/read-statement.js.map +1 -0
  91. package/dist/hub/recommendations.d.ts +1 -1
  92. package/dist/hub/recommendations.js +3 -2
  93. package/dist/hub/recommendations.js.map +1 -1
  94. package/dist/hub/representative.d.ts +2 -0
  95. package/dist/hub/representative.js +8 -4
  96. package/dist/hub/representative.js.map +1 -1
  97. package/dist/hub/roles/clock.js +6 -5
  98. package/dist/hub/roles/clock.js.map +1 -1
  99. package/dist/hub/roles/read.d.ts +2 -0
  100. package/dist/hub/roles/read.js +27 -6
  101. package/dist/hub/roles/read.js.map +1 -1
  102. package/dist/hub/room-history-model.d.ts +87 -0
  103. package/dist/hub/room-history-model.js +14 -0
  104. package/dist/hub/room-history-model.js.map +1 -0
  105. package/dist/hub/rooms/agents.d.ts +1 -1
  106. package/dist/hub/rooms/agents.js +3 -2
  107. package/dist/hub/rooms/agents.js.map +1 -1
  108. package/dist/hub/rooms/history.d.ts +8 -0
  109. package/dist/hub/rooms/history.js +31 -0
  110. package/dist/hub/rooms/history.js.map +1 -0
  111. package/dist/hub/rooms/schema.d.ts +2 -0
  112. package/dist/hub/rooms/schema.js +4 -0
  113. package/dist/hub/rooms/schema.js.map +1 -1
  114. package/dist/hub/rooms/service.d.ts +35 -19
  115. package/dist/hub/rooms/service.js +105 -26
  116. package/dist/hub/rooms/service.js.map +1 -1
  117. package/dist/hub/server.js +10 -3
  118. package/dist/hub/server.js.map +1 -1
  119. package/dist/hub/session-epoch.js +2 -1
  120. package/dist/hub/session-epoch.js.map +1 -1
  121. package/dist/hub/settings-directory-decision.js +3 -2
  122. package/dist/hub/settings-directory-decision.js.map +1 -1
  123. package/dist/hub/settings-member-address-decision.js +2 -1
  124. package/dist/hub/settings-member-address-decision.js.map +1 -1
  125. package/dist/hub/settings-web-address-decision.js +2 -1
  126. package/dist/hub/settings-web-address-decision.js.map +1 -1
  127. package/dist/hub/store.d.ts +1 -0
  128. package/dist/hub/store.js +12 -4
  129. package/dist/hub/store.js.map +1 -1
  130. package/dist/hub/types.d.ts +2 -2
  131. package/dist/hub-agent-incarnation-record.d.ts +24 -0
  132. package/dist/hub-agent-incarnation-record.js +46 -0
  133. package/dist/hub-agent-incarnation-record.js.map +1 -0
  134. package/dist/human-delivery-receipts.d.ts +16 -4
  135. package/dist/human-delivery-receipts.js +26 -5
  136. package/dist/human-delivery-receipts.js.map +1 -1
  137. package/dist/instance-lifecycle.d.ts +9 -3
  138. package/dist/instance-lifecycle.js +27 -10
  139. package/dist/instance-lifecycle.js.map +1 -1
  140. package/dist/instructions.d.ts +1 -1
  141. package/dist/local-pane-endpoint.d.ts +14 -0
  142. package/dist/local-pane-endpoint.js +32 -0
  143. package/dist/local-pane-endpoint.js.map +1 -1
  144. package/dist/locale.js +52 -4
  145. package/dist/locale.js.map +1 -1
  146. package/dist/native-agent-admission.js +9 -0
  147. package/dist/native-agent-admission.js.map +1 -1
  148. package/dist/native-exec-context.d.ts +11 -0
  149. package/dist/native-exec-context.js +18 -0
  150. package/dist/native-exec-context.js.map +1 -0
  151. package/dist/native-exec-input.d.ts +56 -0
  152. package/dist/native-exec-input.js +89 -0
  153. package/dist/native-exec-input.js.map +1 -0
  154. package/dist/native-mcp.d.ts +9 -1
  155. package/dist/native-mcp.js +29 -7
  156. package/dist/native-mcp.js.map +1 -1
  157. package/dist/native-pane-lifecycle.d.ts +3 -0
  158. package/dist/native-pane-lifecycle.js +2 -0
  159. package/dist/native-pane-lifecycle.js.map +1 -1
  160. package/dist/native-pane-manager.d.ts +18 -0
  161. package/dist/native-pane-manager.js +85 -8
  162. package/dist/native-pane-manager.js.map +1 -1
  163. package/dist/needs-you.d.ts +2 -1
  164. package/dist/needs-you.js.map +1 -1
  165. package/dist/outbound-handlers.d.ts +1 -0
  166. package/dist/outbound-handlers.js +9 -3
  167. package/dist/outbound-handlers.js.map +1 -1
  168. package/dist/outbound-schemas.d.ts +5 -0
  169. package/dist/outbound-schemas.js +2 -0
  170. package/dist/outbound-schemas.js.map +1 -1
  171. package/dist/public-web-gateway.js +3 -1
  172. package/dist/public-web-gateway.js.map +1 -1
  173. package/dist/recover.cjs +1 -0
  174. package/dist/reply-buttons-controller.d.ts +1 -0
  175. package/dist/reply-buttons-controller.js +1 -1
  176. package/dist/reply-buttons-controller.js.map +1 -1
  177. package/dist/request-contact-gate.d.ts +2 -0
  178. package/dist/request-contact-gate.js +8 -3
  179. package/dist/request-contact-gate.js.map +1 -1
  180. package/dist/request-context-activation.d.ts +29 -0
  181. package/dist/request-context-activation.js +74 -0
  182. package/dist/request-context-activation.js.map +1 -0
  183. package/dist/request-context-admission.d.ts +22 -0
  184. package/dist/request-context-admission.js +12 -0
  185. package/dist/request-context-admission.js.map +1 -0
  186. package/dist/request-context-boot.d.ts +35 -0
  187. package/dist/request-context-boot.js +97 -0
  188. package/dist/request-context-boot.js.map +1 -0
  189. package/dist/request-context-call.d.ts +2 -0
  190. package/dist/request-context-call.js.map +1 -1
  191. package/dist/request-context-continuation.d.ts +6 -0
  192. package/dist/request-context-continuation.js +24 -0
  193. package/dist/request-context-continuation.js.map +1 -0
  194. package/dist/request-context-control-api.d.ts +101 -0
  195. package/dist/request-context-control-api.js +177 -0
  196. package/dist/request-context-control-api.js.map +1 -0
  197. package/dist/request-context-control-copy.d.ts +3 -0
  198. package/dist/request-context-control-copy.js +7 -0
  199. package/dist/request-context-control-copy.js.map +1 -0
  200. package/dist/request-context-controller.d.ts +44 -0
  201. package/dist/request-context-controller.js +129 -0
  202. package/dist/request-context-controller.js.map +1 -0
  203. package/dist/request-context-delivery-resolver.d.ts +13 -0
  204. package/dist/request-context-delivery-resolver.js +30 -0
  205. package/dist/request-context-delivery-resolver.js.map +1 -0
  206. package/dist/request-context-drain.d.ts +13 -0
  207. package/dist/request-context-drain.js +79 -6
  208. package/dist/request-context-drain.js.map +1 -1
  209. package/dist/request-context-enable-offer.d.ts +13 -0
  210. package/dist/request-context-enable-offer.js +31 -0
  211. package/dist/request-context-enable-offer.js.map +1 -0
  212. package/dist/request-context-exec-owner.d.ts +39 -0
  213. package/dist/request-context-exec-owner.js +128 -0
  214. package/dist/request-context-exec-owner.js.map +1 -0
  215. package/dist/request-context-go-back-view.d.ts +1 -0
  216. package/dist/request-context-go-back-view.js +17 -0
  217. package/dist/request-context-go-back-view.js.map +1 -0
  218. package/dist/request-context-helper-readiness.d.ts +14 -0
  219. package/dist/request-context-helper-readiness.js +23 -0
  220. package/dist/request-context-helper-readiness.js.map +1 -0
  221. package/dist/request-context-helper.d.ts +20 -0
  222. package/dist/request-context-helper.js +41 -0
  223. package/dist/request-context-helper.js.map +1 -0
  224. package/dist/request-context-hub-resolver.d.ts +29 -0
  225. package/dist/request-context-hub-resolver.js +90 -0
  226. package/dist/request-context-hub-resolver.js.map +1 -0
  227. package/dist/request-context-human-resolver.d.ts +20 -0
  228. package/dist/request-context-human-resolver.js +77 -0
  229. package/dist/request-context-human-resolver.js.map +1 -0
  230. package/dist/request-context-human.d.ts +106 -0
  231. package/dist/request-context-human.js +153 -0
  232. package/dist/request-context-human.js.map +1 -0
  233. package/dist/request-context-inputs.d.ts +21 -0
  234. package/dist/request-context-inputs.js +63 -0
  235. package/dist/request-context-inputs.js.map +1 -0
  236. package/dist/request-context-installation.d.ts +117 -0
  237. package/dist/request-context-installation.js +328 -0
  238. package/dist/request-context-installation.js.map +1 -0
  239. package/dist/request-context-knowledge.d.ts +5 -0
  240. package/dist/request-context-knowledge.js +32 -0
  241. package/dist/request-context-knowledge.js.map +1 -0
  242. package/dist/request-context-native-human.d.ts +20 -0
  243. package/dist/request-context-native-human.js +91 -0
  244. package/dist/request-context-native-human.js.map +1 -0
  245. package/dist/request-context-native-output.d.ts +15 -0
  246. package/dist/request-context-native-output.js +46 -0
  247. package/dist/request-context-native-output.js.map +1 -0
  248. package/dist/request-context-native-result.d.ts +15 -0
  249. package/dist/request-context-native-result.js +46 -0
  250. package/dist/request-context-native-result.js.map +1 -0
  251. package/dist/request-context-off.d.ts +22 -0
  252. package/dist/request-context-off.js +77 -0
  253. package/dist/request-context-off.js.map +1 -0
  254. package/dist/request-context-outside-label.d.ts +5 -0
  255. package/dist/request-context-outside-label.js +28 -0
  256. package/dist/request-context-outside-label.js.map +1 -0
  257. package/dist/request-context-pane.d.ts +8 -0
  258. package/dist/request-context-pane.js +19 -0
  259. package/dist/request-context-pane.js.map +1 -1
  260. package/dist/request-context-pending-work.d.ts +11 -0
  261. package/dist/request-context-pending-work.js +43 -0
  262. package/dist/request-context-pending-work.js.map +1 -0
  263. package/dist/request-context-policy.d.ts +17 -1
  264. package/dist/request-context-policy.js +84 -6
  265. package/dist/request-context-policy.js.map +1 -1
  266. package/dist/request-context-readiness.d.ts +49 -0
  267. package/dist/request-context-readiness.js +64 -0
  268. package/dist/request-context-readiness.js.map +1 -0
  269. package/dist/request-context-recovery.d.ts +6 -2
  270. package/dist/request-context-recovery.js +25 -0
  271. package/dist/request-context-recovery.js.map +1 -1
  272. package/dist/request-context-relay.d.ts +2 -2
  273. package/dist/request-context-relay.js +10 -10
  274. package/dist/request-context-relay.js.map +1 -1
  275. package/dist/request-context-retirement.d.ts +19 -0
  276. package/dist/request-context-retirement.js +16 -0
  277. package/dist/request-context-retirement.js.map +1 -0
  278. package/dist/request-context-start.d.ts +15 -0
  279. package/dist/request-context-start.js +2 -0
  280. package/dist/request-context-start.js.map +1 -0
  281. package/dist/request-context-turns.d.ts +1 -1
  282. package/dist/request-context-turns.js +3 -2
  283. package/dist/request-context-turns.js.map +1 -1
  284. package/dist/request-context-unproved-label.d.ts +4 -0
  285. package/dist/request-context-unproved-label.js +25 -0
  286. package/dist/request-context-unproved-label.js.map +1 -0
  287. package/dist/request-context-update-guard.d.ts +15 -0
  288. package/dist/request-context-update-guard.js +54 -0
  289. package/dist/request-context-update-guard.js.map +1 -0
  290. package/dist/request-context-work.d.ts +50 -0
  291. package/dist/request-context-work.js +178 -0
  292. package/dist/request-context-work.js.map +1 -0
  293. package/dist/request-hub-context.d.ts +1 -0
  294. package/dist/request-hub-output.d.ts +2 -0
  295. package/dist/request-hub-output.js +12 -0
  296. package/dist/request-hub-output.js.map +1 -1
  297. package/dist/retained-human-control.d.ts +11 -0
  298. package/dist/retained-human-control.js +11 -0
  299. package/dist/retained-human-control.js.map +1 -0
  300. package/dist/runtime-build-info.js +1 -1
  301. package/dist/runtime-build-info.js.map +1 -1
  302. package/dist/runtime-cli.js +1 -1
  303. package/dist/runtime-cli.js.map +1 -1
  304. package/dist/runtime-client-store.js +7 -1
  305. package/dist/runtime-client-store.js.map +1 -1
  306. package/dist/runtime-client.js +15 -3
  307. package/dist/runtime-client.js.map +1 -1
  308. package/dist/runtime-coordinator.d.ts +23 -0
  309. package/dist/runtime-coordinator.js +103 -4
  310. package/dist/runtime-coordinator.js.map +1 -1
  311. package/dist/runtime-pane-mcp.d.ts +9 -0
  312. package/dist/runtime-pane-mcp.js +22 -2
  313. package/dist/runtime-pane-mcp.js.map +1 -1
  314. package/dist/runtime-protocol.d.ts +2 -0
  315. package/dist/runtime-protocol.js.map +1 -1
  316. package/dist/runtime-update-controller.js +1 -1
  317. package/dist/runtime-update-controller.js.map +1 -1
  318. package/dist/runtime-windows-bridge.d.ts +8 -0
  319. package/dist/runtime-windows-bridge.js +50 -3
  320. package/dist/runtime-windows-bridge.js.map +1 -1
  321. package/dist/service-install-handover.d.ts +52 -0
  322. package/dist/service-install-handover.js +50 -0
  323. package/dist/service-install-handover.js.map +1 -0
  324. package/dist/service-installer.d.ts +12 -0
  325. package/dist/service-installer.js +24 -10
  326. package/dist/service-installer.js.map +1 -1
  327. package/dist/settings-api.d.ts +2 -0
  328. package/dist/settings-api.js +4 -0
  329. package/dist/settings-api.js.map +1 -1
  330. package/dist/settings-baseline.d.ts +1 -0
  331. package/dist/settings-baseline.js +5 -4
  332. package/dist/settings-baseline.js.map +1 -1
  333. package/dist/settings-confirmation.d.ts +2 -0
  334. package/dist/settings-confirmation.js +6 -0
  335. package/dist/settings-confirmation.js.map +1 -1
  336. package/dist/settings-effect.d.ts +2 -0
  337. package/dist/settings-effect.js +44 -1
  338. package/dist/settings-effect.js.map +1 -1
  339. package/dist/settings-http-confirmation.d.ts +3 -0
  340. package/dist/settings-http-confirmation.js +29 -0
  341. package/dist/settings-http-confirmation.js.map +1 -1
  342. package/dist/settings-route-lifetime.d.ts +3 -1
  343. package/dist/settings-route-lifetime.js +15 -5
  344. package/dist/settings-route-lifetime.js.map +1 -1
  345. package/dist/settings-transaction.d.ts +3 -2
  346. package/dist/settings-transaction.js.map +1 -1
  347. package/dist/tips.js +1 -1
  348. package/dist/tips.js.map +1 -1
  349. package/dist/tool-permissions.js +3 -3
  350. package/dist/tool-permissions.js.map +1 -1
  351. package/dist/tool-receipt-output.d.ts +6 -6
  352. package/dist/turn-reply-guard.d.ts +16 -1
  353. package/dist/turn-reply-guard.js +20 -2
  354. package/dist/turn-reply-guard.js.map +1 -1
  355. package/dist/ui/app.html +2 -2
  356. package/dist/ui/contact-auth-strings.js +6 -6
  357. package/dist/ui/contact-authorizations.js +19 -1
  358. package/dist/ui/contact-grant-editor.js +71 -11
  359. package/dist/ui/contact-needs.js +27 -8
  360. package/dist/ui/contact-permissions.js +25 -8
  361. package/dist/ui/contact-tool-groups.js +1 -1
  362. package/dist/ui/hub-client.js +3 -0
  363. package/dist/ui/hub-room-members.js +4 -2
  364. package/dist/ui/hub-room-settings-strings.js +8 -0
  365. package/dist/ui/hub-room-settings.js +32 -0
  366. package/dist/ui/hub-room-thread.js +7 -1
  367. package/dist/ui/icons/hub-apple-touch-icon.png +0 -0
  368. package/dist/ui/icons/hub-favicon.ico +0 -0
  369. package/dist/ui/icons/hub-favicon.svg +10 -0
  370. package/dist/ui/icons/hub-icon-192.png +0 -0
  371. package/dist/ui/icons/hub-icon-512.png +0 -0
  372. package/dist/ui/icons/hub-icon-maskable-192.png +0 -0
  373. package/dist/ui/icons/hub-icon-maskable-512.png +0 -0
  374. package/dist/ui/icons/hub-maskable.svg +12 -0
  375. package/dist/ui/panel-hub.js +14 -3
  376. package/dist/ui/panel-needs.js +2 -1
  377. package/dist/ui/panel-settings.js +2 -1
  378. package/dist/ui/request-contact-card.js +287 -0
  379. package/dist/ui/request-contact-client.js +83 -0
  380. package/dist/ui/request-contact-page.js +78 -0
  381. package/dist/ui/request-context-control.js +171 -0
  382. package/dist/ui/settings-registry.js +2 -0
  383. package/dist/ui/settings-update.js +3 -2
  384. package/dist/ui/shared/app-install.js +2 -2
  385. package/dist/ui/shared/app-shell.js +13 -3
  386. package/dist/ui/shared/app-stream.js +1 -0
  387. package/dist/ui/shared/app-update.js +2 -1
  388. package/dist/ui/shared/app.css +93 -8
  389. package/dist/ui/shared/app.js +16 -2
  390. package/dist/ui/shared/ui-states.js +6 -0
  391. package/dist/ui/shared/update-card-ui.js +178 -11
  392. package/dist/ui/shared/view-strings.js +18 -0
  393. package/dist/ui/shared/web-authorize.js +1 -1
  394. package/dist/update-card.d.ts +1 -1
  395. package/dist/update-card.js +7 -7
  396. package/dist/update-card.js.map +1 -1
  397. package/dist/update-fix.d.ts +66 -0
  398. package/dist/update-fix.js +67 -0
  399. package/dist/update-fix.js.map +1 -0
  400. package/dist/update-goback.js +12 -2
  401. package/dist/update-goback.js.map +1 -1
  402. package/dist/update-readiness.d.ts +2 -0
  403. package/dist/update-readiness.js +5 -1
  404. package/dist/update-readiness.js.map +1 -1
  405. package/dist/update-snapshot-scope.js +1 -0
  406. package/dist/update-snapshot-scope.js.map +1 -1
  407. package/dist/usage/i18n-keys.d.ts +1 -1
  408. package/dist/usage/i18n-keys.js +9 -0
  409. package/dist/usage/i18n-keys.js.map +1 -1
  410. package/dist/usage/providers.d.ts +3 -11
  411. package/dist/usage/providers.js +93 -131
  412. package/dist/usage/providers.js.map +1 -1
  413. package/dist/web-api.d.ts +4 -0
  414. package/dist/web-api.js +50 -7
  415. package/dist/web-api.js.map +1 -1
  416. package/dist/web-chat-history.d.ts +2 -0
  417. package/dist/web-chat-history.js.map +1 -1
  418. package/dist/web-icons.d.ts +9 -3
  419. package/dist/web-icons.js +62 -5
  420. package/dist/web-icons.js.map +1 -1
  421. package/dist/web-update.d.ts +9 -0
  422. package/dist/windows-agents.d.ts +24 -2
  423. package/dist/windows-agents.js +110 -4
  424. package/dist/windows-agents.js.map +1 -1
  425. package/dist/windows-cli-worker.js +9 -1
  426. package/dist/windows-cli-worker.js.map +1 -1
  427. package/dist/windows-cli.d.ts +15 -0
  428. package/dist/windows-cli.js +54 -6
  429. package/dist/windows-cli.js.map +1 -1
  430. package/package.json +1 -1
@@ -0,0 +1,78 @@
1
+ // M-3736 J (S-228): Fleet → Authorizations once the same-card host is installed (request-contact-client.js decides; until
2
+ // then contact-authorizations.js keeps today's page). The server scopes the list to the requests this session's person
3
+ // may manage (32 a page, then a cursor); the page sends no person, only an agent and a status.
4
+ // - Show: waiting (default) or all; one agent. ?ticket=<id> opens that request at the top (Needs you, a chat badge).
5
+ // - Each request is the one card (request-contact-card.js). It reads again on the stream's contact-auth frame and when the
6
+ // page is shown again (no timer); a cursor the server refused (its role snapshot changed) starts the list again.
7
+ import { html, useEffect, useState } from "/assets/app-html.js";
8
+ import { register, t } from "/assets/app-i18n.js";
9
+ import { appStore, useStore } from "/assets/app-store.js";
10
+ import { Skeleton, ErrorState, Empty } from "/assets/ui-states.js";
11
+ import { labelOf } from "/assets/instance-nav.js";
12
+ import { ca } from "./contact-auth-strings.js";
13
+ import { RequestContactCard } from "./request-contact-card.js";
14
+ import { getCard, listCards, RC_ID } from "./request-contact-client.js";
15
+
16
+ register("rcpage", {
17
+ en: { lead: "Contact requests between agents that wait for an admin, and what was decided.", forbidden: "You don't manage the agents these requests are for.",
18
+ signIn: "Sign in to see contact requests.", unavailable: "Contact requests are unavailable right now. Try again in a moment.", failed: "Couldn't load contact requests.", retry: "Try again" },
19
+ "zh-TW": { lead: "Agent 之間等待管理員處理的聯絡申請,以及處理結果。", forbidden: "你沒有管理這些申請所屬的 Agent。",
20
+ signIn: "請登入後查看聯絡申請。", unavailable: "目前無法取得聯絡申請,請稍後再試。", failed: "無法載入聯絡申請。", retry: "重試" },
21
+ });
22
+ const tp = (k, ...a) => t(`rcpage.${k}`, ...a);
23
+ /** Why the requests can't be shown (the host's answer was a refusal or a failure), with Try again. */
24
+ export function SameCardUnknown({ code, onRetry }) {
25
+ const said = code === "sign-in-required" ? tp("signIn") : code === "forbidden" ? tp("forbidden") : code === "unavailable" ? tp("unavailable") : tp("failed");
26
+ return html`<div class="rc-unknown" data-code=${code || "failed"}><p class="note">${said}</p>
27
+ ${code === "sign-in-required" || code === "forbidden" ? null : html`<button type="button" class="btn btn-sm" onClick=${onRetry}>${tp("retry")}</button>`}</div>`;
28
+ }
29
+ const ticketFromSearch = () => { try { const v = new URLSearchParams(location.search).get("ticket"); return v && RC_ID.test(v) ? v : null; } catch { return null; } };
30
+
31
+ export function RequestContactAuthorizations() {
32
+ const { instances } = useStore(appStore);
33
+ const [status, setStatus] = useState("pending");
34
+ const [agent, setAgent] = useState("");
35
+ const [page, setPage] = useState({ loading: true, items: [], next: null });
36
+ const [focus, setFocus] = useState(null);
37
+ const focusId = ticketFromSearch();
38
+ const filters = { status: status === "pending" ? "pending" : "all", ...(agent ? { agent } : {}) };
39
+ const read = async (cursor) => {
40
+ const r = await listCards({ ...filters, ...(cursor ? { cursor } : {}) });
41
+ if (!r.ok) {
42
+ if (cursor && (r.code === "invalid-cursor" || r.status === 409)) { void read(); return; } // its role snapshot changed: from the top
43
+ setPage((p) => ({ ...p, loading: false, error: r.code })); return;
44
+ }
45
+ const items = Array.isArray(r.data.items) ? r.data.items : [];
46
+ setPage((p) => ({ loading: false, items: cursor ? [...p.items, ...items] : items, next: r.data.nextCursor || null }));
47
+ };
48
+ const readFocus = async () => { if (!focusId) return; const r = await getCard(focusId); setFocus(r.ok ? r.data : null); };
49
+ const key = JSON.stringify(filters);
50
+ useEffect(() => {
51
+ setPage({ loading: true, items: [], next: null });
52
+ void read(); void readFocus();
53
+ const sub = appStore.get().streamOn;
54
+ const off = typeof sub === "function" ? sub("contact-auth", () => { void read(); void readFocus(); }) : null;
55
+ const onShow = () => { if (document.visibilityState === "visible") { void read(); void readFocus(); } };
56
+ document.addEventListener("visibilitychange", onShow);
57
+ return () => { if (typeof off === "function") off(); document.removeEventListener("visibilitychange", onShow); };
58
+ }, [key, focusId]);
59
+ const replace = (c) => { setPage((p) => ({ ...p, items: p.items.map((x) => (x.ticket.id === c.ticket.id ? c : x)) })); if (focus && focus.ticket.id === c.ticket.id) setFocus(c); };
60
+ const names = (instances || []).map((i) => i.name).filter(Boolean).sort();
61
+ const list = page.items.filter((x) => !focus || x.ticket.id !== focus.ticket.id);
62
+ return html`<div class="contact-auth-page rc-page">
63
+ <p class="s-page-lead">${tp("lead")}</p>
64
+ <div class="us-bar-top contact-filters">
65
+ <div class="seg-inline" role="group" aria-label=${ca("filterStatus")}>${["pending", "all"].map((s) => html`<button key=${s} type="button" class=${`btn btn-sm${status === s ? " btn-primary" : ""}`}
66
+ aria-pressed=${status === s ? "true" : "false"} onClick=${() => setStatus(s)}>${ca(`filter_${s}`)}</button>`)}</div>
67
+ <label class="us-group contact-agent-filter"><span>${ca("filterAgent")}</span><select value=${agent} onChange=${(e) => setAgent(e.currentTarget.value)}>
68
+ <option value="">${ca("filterAny")}</option>${names.map((n) => html`<option key=${n} value=${n}>${labelOf((instances || []).find((i) => i.name === n))}</option>`)}</select></label>
69
+ </div>
70
+ ${focus ? html`<${RequestContactCard} key=${`f:${focus.ticket.id}`} card=${focus} focus=${true} onChange=${replace} />` : null}
71
+ ${page.loading ? html`<${Skeleton} variant="cards" lines=${2} label=${ca("loading")} />`
72
+ : page.error && !page.items.length ? (page.error === "forbidden" ? html`<p class="note">${tp("forbidden")}</p>`
73
+ : html`<${ErrorState} message=${ca(page.error === "unavailable" ? "unavailable" : "loadFailed")} onRetry=${() => void read()} />`)
74
+ : !list.length && !focus ? html`<${Empty} icon="key" title=${ca(status === "pending" ? "emptyPending" : "empty")} action=${status === "pending" ? html`<button type="button" class="btn btn-sm" onClick=${() => setStatus("all")}>${ca("viewAll")}</button>` : null} />`
75
+ : html`<div class="contact-ticket-list">${list.map((c) => html`<${RequestContactCard} key=${c.ticket.id} card=${c} onChange=${replace} />`)}</div>`}
76
+ ${page.next ? html`<div class="field-row"><button type="button" class="btn btn-sm" onClick=${() => void read(page.next)}>${ca("more")}</button></div>` : null}
77
+ </div>`;
78
+ }
@@ -0,0 +1,171 @@
1
+ import { clockFormat } from "/assets/clock-text.js";
2
+ // S-230: the owner switch. Status comes from the host, never from a browser preference or an agent argument.
3
+ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
4
+ import { lang, register, t } from "/assets/app-i18n.js";
5
+ import { appStore, useStore } from "/assets/app-store.js";
6
+ import { useLease } from "/assets/app-ctx.js";
7
+ import { confirmedWrite } from "./settings-confirm.js";
8
+ import { confirmDialog } from "/assets/ui-confirm.js";
9
+ import { detailsPath, settingsPath } from "/assets/app-route.js";
10
+ import { AuthorizeChip } from "/assets/web-authorize.js";
11
+
12
+ register("requestContextControl", {
13
+ en: {
14
+ enableUnavailable: "Request-based approvals can't be turned on in this version yet.",
15
+ restart: "Turning this on restarts {0} agents (their conversations are kept); they can't chat for a minute or two.", goBack: "Go back for the latest update is available until {0}; turning this on ends it immediately.", viewUpdate: "View AgEnD update", viewOwners: "View these agents", waitTitle: "End this wait?", enableTitle: "Turn on request-based contact approvals?", enable: "Confirm turn on", unknown: "State unknown", inspect: "View held messages", update: "Finish or resolve the AgEnD update first, then check again.", stopTitle: "Stop this work?", stopBody: "This ends the saved work and prevents it from resuming. History stays. Other outside requests still wait for your decision.", waitBody: "A late reply will not resume this work. Other outside requests still wait for your decision.", title: "Request-based contact approvals", on: "On: approval applies only to this request.",
16
+ off: "Off. Your own messages go through as usual; requests that came from outside wait for your decision.",
17
+ offBefore: "Not enabled. Contacts haven't changed.",
18
+ draining: "Turning off. Waiting for current work to finish.", blocked: "Request-based approvals are waiting.", blockedBefore: "Turning this on has to wait for these first:",
19
+ legacyPending: "Decide these earlier contact requests first, in Fleet → Authorizations: {0}.",
20
+ legacyInflight: "These earlier approved messages are still being delivered: {0}. This clears by itself once each is delivered or fails.",
21
+ legacyUnsettled: "These earlier requests have no readable delivery record, so AgEnD can't tell whether they happened: {0}. They can't be settled from this page yet; leave request-based approvals off for now.",
22
+ legacyDeliveries: "These earlier messages are still waiting to be delivered: {0}. This clears by itself once they are delivered or fail.",
23
+ recoveryBlocked: "Request-based approvals need your attention.",
24
+ confirmTitle: "Turn off request-based approvals?", confirm: "Confirm turn off",
25
+ confirmBody: "New outside requests will wait while current work finishes. Then your own messages go through as usual; outside requests wait for your decision.",
26
+ legacy: "Resolve these earlier held messages first: {0}.", peers: "Update AgEnD on {0}, then press Check again.",
27
+ owners: "These agents need preparation: {0}.", ownersWork: "Finish the current work for these agents first: {0}. Wait for them to finish, or restart an agent that stays busy.", ownersUpdate: "Complete the AgEnD update for these agents first: {0}.", recovery: "This work needs your decision: {0}.",
28
+ returns: "Waiting for a reply: {0}.", tickets: "Resolve these held messages: {0}.", work: "Waiting for this work to finish: {0}.",
29
+ previous: "The previous rules still apply.", floor: "You can no longer downgrade to older AgEnD versions.",
30
+ floorBefore: "Note: once on, you can't go back to an older AgEnD, even if you turn this off later.",
31
+ check: "Check again", error: "Couldn't read the current state. Try again.", failed: "Couldn't confirm whether anything changed. Press Check again.",
32
+ notice: "Request-based contact approvals are on: approval applies only to this request. Earlier conversations won't block an administrator's new request. The switch is in Settings → Access & security. Warning: you can no longer downgrade to older AgEnD versions.",
33
+ open: "Open settings", loading: "Checking the current state…",
34
+ "stop-waiting": "End this wait", decline: "Decline", withdraw: "Withdraw", "stop-work": "Stop this work",
35
+ },
36
+ "zh-TW": {
37
+ enableUnavailable: "這一版還不能開啟依請求核准聯絡。",
38
+ restart: "開啟時會重新啟動 {0} 個 Agent(對話會保留),大約一兩分鐘內無法對話。", goBack: "最近一次更新的「退回上一版」原本可以用到 {0},開啟後會立刻結束。", viewUpdate: "查看 AgEnD 更新", viewOwners: "查看這些 Agent", waitTitle: "結束這次等候?", enableTitle: "開啟依請求核准聯絡?", enable: "確認開啟", unknown: "狀態不明", inspect: "查看擱置的訊息", update: "請先完成或處理 AgEnD 更新,再重新檢查。", stopTitle: "結束這項工作?", stopBody: "這會結束已儲存的工作,不會再繼續執行。歷史會保留,其他外部請求仍會等你決定。", waitBody: "之後的回覆不會再繼續這項工作;其他外部請求仍會等你決定。", title: "依請求核准聯絡", on: "已開啟:核准只對這一次請求有效。",
39
+ off: "已關閉。你自己的訊息照常;從外部來的請求會等你決定。",
40
+ offBefore: "尚未開啟,聯絡方式沒有變更。",
41
+ draining: "正在關閉,等目前的工作結束。", blocked: "依請求核准聯絡尚未開啟。", blockedBefore: "開啟前需要先處理這些項目:",
42
+ legacyPending: "請先在「Fleet → 授權」決定這些先前的聯絡申請:{0}。",
43
+ legacyInflight: "這些先前已核准的訊息仍在送出中:{0}。每則送達或失敗後就會自動解除。",
44
+ legacyUnsettled: "這些先前的申請沒有可讀取的送出紀錄,AgEnD 無法判斷是否已經發生:{0}。目前還無法在這一頁處理;請暫時不要開啟依請求核准聯絡。",
45
+ legacyDeliveries: "這些先前的訊息仍在等候送出:{0}。送達或失敗後就會自動解除。",
46
+ recoveryBlocked: "依請求核准聯絡需要你處理。",
47
+ confirmTitle: "關閉依請求核准聯絡?", confirm: "確認關閉",
48
+ confirmBody: "新的外部請求會先等候,直到目前的工作結束。之後,你自己的訊息照常;從外部來的請求會等你決定。",
49
+ legacy: "請先處理這些先前擱置的訊息:{0}。", peers: "請在 {0} 上更新 AgEnD,完成後按「重新檢查」。",
50
+ owners: "這些 Agent 需要先完成準備:{0}。", ownersWork: "請先結束這些 Agent 目前的工作:{0}。請等它們完成,或重新啟動一直忙碌的 Agent。", ownersUpdate: "請先完成這些 Agent 的 AgEnD 更新:{0}。", recovery: "這項工作需要你決定:{0}。",
51
+ returns: "正在等候回覆:{0}。", tickets: "請先處理這些擱置的訊息:{0}。", work: "正在等這項工作結束:{0}。",
52
+ previous: "目前仍使用原本的規則。", floor: "已不能再降回舊版 AgEnD。",
53
+ floorBefore: "注意:開啟後就不能再降回舊版 AgEnD,之後關閉也一樣。",
54
+ check: "重新檢查", error: "無法讀取目前狀態,請再試一次。", failed: "無法確認是否已變更,請按「重新檢查」。",
55
+ notice: "依請求核准聯絡已開啟:核准只對這一次請求有效,先前的對話不會再擋住管理員的新請求。開關在「設定」→「存取與安全」。注意:已不能再降回舊版 AgEnD。",
56
+ open: "開啟設定", loading: "正在確認目前狀態…",
57
+ "stop-waiting": "結束這次等候", decline: "拒絕", withdraw: "撤回", "stop-work": "結束這項工作",
58
+ },
59
+ });
60
+ export const requestContextControlText = (key, ...args) => t(`requestContextControl.${key}`, ...args);
61
+ const LEGACY_KEYS = { "legacy-pending": "legacyPending", "legacy-inflight": "legacyInflight", "legacy-unsettled": "legacyUnsettled", "legacy-deliveries": "legacyDeliveries" };
62
+ export function requestContextBlockerText(blocker) {
63
+ // S-272: an earlier ticket says what settles it (its own sentence by blocker id); an older server's "legacy" keeps its line.
64
+ const legacyKey = blocker.kind === "legacy" && LEGACY_KEYS[blocker.id];
65
+ return requestContextControlText(legacyKey || (blocker.kind === "owners" && blocker.ownerCause ? blocker.ownerCause === "work" ? "ownersWork" : "ownersUpdate" : blocker.kind), (blocker.labels || []).join(lang() === "zh-TW" ? "、" : ", "));
66
+ }
67
+ export function RequestContextBlocked({ state, onCheck, onResolve, busy = false, settingsLink = false }) {
68
+ // S-272: before the first attempt it shows what an On would wait for (Check runs the same inspection as the attempt).
69
+ const before = !state?.everActivated && !state?.attempted;
70
+ if (!state || before && !(state.blockers || []).length) return null;
71
+ const ownerAgents = [...new Map((state.blockers || []).filter(b => b.kind === "owners").flatMap(b => b.agents || []).map(a => [a.id, a])).values()];
72
+ return html`<div class="request-context-blocked">
73
+ <p>${requestContextControlText(state.phase === "draining" ? "draining" : state.everActivated ? "recoveryBlocked" : before ? "blockedBefore" : "blocked")}</p>
74
+ ${state.enableFailed ? html`<p class="notice warn" role="alert">${requestContextControlText("failed")}</p>` : null}
75
+ ${(state.blockers || []).map(blocker => html`<div key=${blocker.id}><p>${requestContextBlockerText(blocker)}</p>
76
+ ${blocker.action === "stop-waiting" ? html`<p>${requestContextControlText("waitBody")}</p>` : null}</div>`)}
77
+ ${!state.everActivated ? html`<p class="note">${requestContextControlText("previous")}</p>` : null}
78
+ <div class="request-context-actions">
79
+ ${(state.blockers || []).some(b => b.action === "inspect" && b.kind === "legacy") ? html`<a class="btn btn-sm" href="/ui/fleet/authorizations">${requestContextControlText("inspect")}</a>` : null}
80
+ ${(state.blockers || []).map(blocker => blocker.action === "inspect"
81
+ ? null // S-272: one Authorizations link, for earlier held requests only; agents and the update have their own links below
82
+ : state.canChange && onResolve && blocker.action ? html`<button key=${blocker.id} type="button" class=${`btn btn-sm ${["stop-work", "stop-waiting"].includes(blocker.action) ? "btn-danger" : ""}`} disabled=${busy}
83
+ title=${requestContextBlockerText(blocker)} onClick=${() => onResolve(blocker)}>${requestContextControlText(blocker.action)}</button>` : null)}
84
+ ${(state.blockers || []).some(b => b.kind === "update") ? html`<a class="btn btn-sm" href=${settingsPath("advanced") + "#settings-update"}>${requestContextControlText("viewUpdate")}</a>` : null}
85
+ ${ownerAgents.map(agent => html`<a class="btn btn-sm" key=${agent.id} href=${detailsPath(agent.id)}>${requestContextControlText("viewOwners")}${ownerAgents.length > 1 ? ` · ${agent.label}` : ""}</a>`)}
86
+ ${onCheck ? html`<button type="button" class="btn btn-sm" disabled=${busy} onClick=${onCheck}>${requestContextControlText("check")}</button>` : null}
87
+ ${settingsLink ? html`<a class="btn btn-sm" href="/settings/access#request-context">${requestContextControlText("open")}</a>` : null}
88
+ </div>
89
+ </div>`;
90
+ }
91
+ async function writeControl(lease, input) {
92
+ if (input.action !== "check") return confirmedWrite("/api/settings/request-context", { body: input, label: requestContextControlText("title") });
93
+ const response = await lease.fetch("/api/settings/request-context", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(input) });
94
+ return { ok: response.ok, status: response.status, body: await response.json() };
95
+ }
96
+ /** Passive Needs-you payload, from the same owner status as Settings. No background GET or timer. */
97
+ export function RequestContextNeed({ item }) {
98
+ const lease = useLease(`request-context-need:${item.id}`), [busy, setBusy] = useState(false), [failed, setFailed] = useState(false), writing = useRef(false);
99
+ const state = item.requestContextCutover;
100
+ useEffect(() => { setFailed(false); }, [state?.revision]);
101
+ const change = async (blocker = null) => {
102
+ if (writing.current || failed || !state || blocker && !state.canChange) return;
103
+ writing.current = true; setBusy(true); setFailed(false);
104
+ try {
105
+ if (["stop-work", "stop-waiting"].includes(blocker?.action) && !await confirmStopWork(blocker.action)) return;
106
+ const input = blocker ? { revision: state.revision, action: "resolve", blockerId: blocker.id, resolution: blocker.action } : { revision: state.revision, action: "check" };
107
+ const response = await writeControl(lease, input);
108
+ if (!lease.current()) return;
109
+ if (!response.ok && response.status !== 409) throw Error("refused");
110
+ } catch { if (lease.current()) setFailed(true); }
111
+ finally { writing.current = false; if (lease.current()) setBusy(false); }
112
+ };
113
+ return html`<article class="card request-context-need"><h3>${requestContextControlText("title")}</h3>
114
+ <${RequestContextBlocked} state=${state} settingsLink=${true} busy=${busy || failed} onCheck=${() => change()} onResolve=${state?.canChange ? change : null} />
115
+ ${state && !state.canChange ? html`<${AuthorizeChip} />` : null}
116
+ ${failed ? html`<p class="notice warn" role="alert">${requestContextControlText("failed")}</p>` : null}
117
+ </article>`;
118
+ }
119
+ async function confirmStopWork(action) { return confirmDialog({ title: requestContextControlText(action === "stop-waiting" ? "waitTitle" : "stopTitle"), message: requestContextControlText(action === "stop-waiting" ? "waitBody" : "stopBody"), confirmLabel: requestContextControlText(action), danger: true }); }
120
+ export function RequestContextSettings() {
121
+ const lease = useLease("request-context-control"), [state, setState] = useState(undefined), [failed, setFailed] = useState(false), [busy, setBusy] = useState(false);
122
+ const toggle = useRef(null);
123
+ useEffect(() => { if (toggle.current) toggle.current.indeterminate = failed; }, [failed, state]);
124
+ const writing = useRef(false), lastRevision = useRef(-1), { requestContextCutover: pushed } = useStore(appStore);
125
+ const accept = value => {
126
+ if (value !== null) {
127
+ if (!Number.isSafeInteger(value?.revision) || value.revision < lastRevision.current) return;
128
+ lastRevision.current = value.revision;
129
+ }
130
+ setState(value); setFailed(false);
131
+ };
132
+ const load = async () => {
133
+ try {
134
+ const response = await lease.fetch("/api/settings/request-context"), value = response.status === 404 ? null : await response.json();
135
+ if (!lease.current()) return;
136
+ if (response.status !== 404 && !response.ok) throw Error("unavailable");
137
+ accept(value);
138
+ } catch { if (lease.current()) setFailed(true); }
139
+ };
140
+ useEffect(() => { void load(); }, [lease]);
141
+ useEffect(() => { if (pushed !== undefined && lease.current()) accept(pushed); }, [pushed, lease]);
142
+ const change = async (action, blocker = null) => {
143
+ if (writing.current || failed || !state || action !== "check" && !state.canChange) return;
144
+ if (action === "enable" && state.enableUnavailable) return;
145
+ writing.current = true; setBusy(true); setFailed(false);
146
+ try {
147
+ if (action === "enable" && !await confirmDialog({ title: requestContextControlText("enableTitle"), message: requestContextControlText("floorBefore") + (state.goBack ? "\n\n" + requestContextControlText("goBack", clockFormat({ dateStyle: "medium", timeStyle: "short", timeZone: state.goBack.timeZone }, "en").format(new Date(state.goBack.availableUntil))) : "") + (state.restartCount ? "\n\n" + requestContextControlText("restart", state.restartCount) : ""), confirmLabel: requestContextControlText("enable"), danger: true })) return;
148
+ if (["stop-work", "stop-waiting"].includes(blocker?.action) && !await confirmStopWork(blocker.action)) return;
149
+ if (action === "disable" && !await confirmDialog({ title: requestContextControlText("confirmTitle"), message: requestContextControlText("confirmBody"), confirmLabel: requestContextControlText("confirm"), danger: false })) return;
150
+ if (!lease.current()) return;
151
+ const response = await writeControl(lease, blocker ? { revision: state.revision, action: "resolve", blockerId: blocker.id, resolution: blocker.action } : { revision: state.revision, action });
152
+ if (!lease.current()) return;
153
+ if (response.status === 409) { await load(); return; }
154
+ if (!response.ok) throw Error("refused");
155
+ const value = response.body; if (lease.current()) accept(value);
156
+ } catch { if (lease.current()) setFailed(true); }
157
+ finally { writing.current = false; if (lease.current()) setBusy(false); }
158
+ };
159
+ if (state === null) return null;
160
+ return html`<section id="request-context" class="card request-context-control"><h2>${requestContextControlText("title")}</h2>
161
+ ${state ? html`<label class="check request-context-toggle"><input type="checkbox" class="s-ui-toggle" ref=${toggle} aria-checked=${failed ? "mixed" : state.enabled ? "true" : "false"} checked=${!failed && state.enabled}
162
+ disabled=${busy || failed || !state.canChange || state.phase === "draining" || !state.enabled && state.enableUnavailable} onChange=${event => { event.target.checked = state.enabled; void change(state.enabled ? "disable" : "enable"); }} />
163
+ <span>${requestContextControlText("title")}</span></label>
164
+ ${!state.enabled && state.enableUnavailable ? html`<p role="status">${requestContextControlText("enableUnavailable")}</p>` : null}
165
+ ${failed ? html`<p role="status">${requestContextControlText("unknown")}</p>` : ["blocked", "draining"].includes(state.phase) ? html`<${RequestContextBlocked} state=${state} busy=${busy || failed} onCheck=${() => change("check")} onResolve=${state.canChange ? blocker => change("resolve", blocker) : null} />`
166
+ : html`<p role="status">${requestContextControlText(state.phase === "off" && !state.everActivated ? "offBefore" : state.phase)}</p>`}
167
+ <p class="notice warn">${requestContextControlText(state.everActivated ? "floor" : "floorBefore")}</p>
168
+ ${!state.canChange ? html`<${AuthorizeChip} />` : null}` : !failed ? html`<p>${requestContextControlText("loading")}</p>` : null}
169
+ ${failed ? html`<p class="notice warn" role="alert">${requestContextControlText(state ? "failed" : "error")}</p><button class="btn btn-sm" type="button" disabled=${busy} onClick=${load}>${requestContextControlText("check")}</button>` : null}
170
+ </section>`;
171
+ }
@@ -21,6 +21,7 @@ const L = (en, zh) => ({ en, "zh-TW": zh });
21
21
  const CLI_WORDS = Object.keys(CLI_CAPS).flatMap((id) => [id, id.split("-")[0]]);
22
22
  /** [id, section, target, labelKey | label, config key, words en, words zh] */
23
23
  const ROWS = [
24
+ ["request.context", "access", "#request-context", null, null, ["contact", "approval", "request", "permissions"], ["聯絡", "核准", "請求", "權限"], L("Request-based contact approvals", "依請求核准聯絡")],
24
25
  ["host.monitoring", "notifications", "#host-monitoring", null, "monitoring.enabled", ["host", "health", "monitoring", "disk", "memory", "cpu", "agent footprint"], ["主機", "監測", "磁碟", "記憶體", "資源用量"], L("Host monitoring", "主機監測")],
25
26
  ["general.location", "agent-defaults", "#general-location", null, null, ["general", "windows", "paired PC", "host", "location"], ["General", "Windows", "電腦", "主機", "執行位置"], L("Run General on", "General 執行位置")],
26
27
  // alpha.6 feedback (#2): "hub" found nothing — Settings → Hub's cards. Connect to a Hub is drawn once membership is on.
@@ -169,6 +170,7 @@ export function searchSettings(query, schema = null) {
169
170
  const scored = [];
170
171
  for (const entry of SETTINGS_REGISTRY) {
171
172
  if (entry.id === "host.monitoring" && !hostMonitoringVisible(schema)) continue;
173
+ if (entry.id === "request.context" && schema?.request_context_control !== true) continue;
172
174
  const names = [settingLabel(entry, "en"), settingLabel(entry, "zh-TW")].map(fold);
173
175
  const keys = fold(entry.key || "");
174
176
  const words = [...(entry.words.en || []), ...(entry.words["zh-TW"] || [])].map(fold);
@@ -66,13 +66,14 @@ export function UpdateSection() {
66
66
  ${need ? html`<button type="button" class="btn btn-primary" disabled=${starting || updateActive(info)} onClick=${() => { void openHubUpdateDialog(); }}>${t("update.now")}</button>`
67
67
  : info.card !== undefined ? cardButtons(info, starting)
68
68
  : offer && offer.installable ? html`<button type="button" class="btn btn-primary" disabled=${starting || updateActive(info)} onClick=${openUpdateDialog}>${t("update.now")}</button>` : null}
69
- <button type="button" class="btn" disabled=${checking || updateActive(info)} onClick=${check}>${checking ? t("supdate.checking") : t("supdate.check")}</button>
69
+ <button type="button" class="btn" disabled=${checking || starting || updateActive(info)} onClick=${check}>${checking ? t("supdate.checking") : t("supdate.check")}</button>
70
70
  </div>
71
71
  ${info.card !== undefined ? html`<${UpdateCardSettings} info=${info} deps=${CARD_DEPS} />` : null}
72
72
  </section>`;
73
73
  }
74
74
  /** M-3770 1.4: what update-card-ui.js needs from app-update.js, passed in. */
75
- const CARD_DEPS = { refresh: () => refreshUpdate(), setInfo: (i) => updateStore.set({ info: i }), getInfo: () => updateStore.get().info };
75
+ const CARD_DEPS = { refresh: () => refreshUpdate(), setInfo: (i) => updateStore.set({ info: i }), getInfo: () => updateStore.get().info,
76
+ setStarting: (starting) => updateStore.set({ starting }) }; // #4564: the row is off while Install as a service restarts AgEnD
76
77
  /** M-3770 1.4: with the card, the banner's answers in every state (#4487 review P2: the banner is hidden on this page, so
77
78
  * waiting and scheduled keep Cancel and Update now here; Pick a time only where a schedule is taken). One policy: cardActions. */
78
79
  function cardButtons(info, starting) {
@@ -61,14 +61,14 @@ export function startInstall(env = globalThis) {
61
61
  if (standalone(env)) { set("installed"); return; }
62
62
  env.addEventListener?.("beforeinstallprompt", (event) => { event.preventDefault(); offer = event; set("available"); });
63
63
  env.addEventListener?.("appinstalled", () => { offer = null; set("installed"); });
64
- if (iosSafari(env)) set("ios");
65
64
  // A plain-http address is not a secure context, and browsers hide the worker API there: say why before looking for it.
66
65
  if (env.isSecureContext === false) { if (installStore.get().state === "none") set("insecure"); return; }
66
+ if (iosSafari(env)) set("ios");
67
67
  const sw = env.navigator?.serviceWorker;
68
68
  if (!sw) return;
69
69
  sw.register("/sw.js", { scope: "/" }).catch((error) => {
70
70
  // A certificate the browser doesn't trust: registration is refused as a SecurityError.
71
- if (error && error.name === "SecurityError" && installStore.get().state === "none") set("untrusted");
71
+ if (error && error.name === "SecurityError" && ["none", "ios"].includes(installStore.get().state)) set("untrusted");
72
72
  });
73
73
  }
74
74
 
@@ -866,6 +866,13 @@ function pendingSummaryLine(line, descriptor) {
866
866
  }
867
867
  return legacyPendingSummaryLine(line);
868
868
  }
869
+ /** Presentation only: the server's canonical On summary identifies this irreversible consequence. */
870
+ function pendingRequestContextEnable(p) {
871
+ if (p.section !== "access" || !Array.isArray(p.summary) || !Array.isArray(p.summary_i18n) || p.summary.length !== p.summary_i18n.length) return false;
872
+ const keys = p.summary_i18n.flatMap((line, index) => line?.v === 1 && line.fallback === p.summary[index] && Array.isArray(line.parts)
873
+ ? line.parts.filter(part => part && typeof part === "object" && Array.isArray(part.args) && part.args.length === 0).map(part => part.key) : []);
874
+ return keys.includes("requestContextControl.enableTitle") && keys.includes("requestContextControl.floorBefore");
875
+ }
869
876
  export function PendingChanges({ inline = false } = {}) {
870
877
  const { pendingChanges } = useStore(appStore);
871
878
  const list = pendingChanges || [];
@@ -890,6 +897,7 @@ export function PendingChanges({ inline = false } = {}) {
890
897
  ${p.state === "pending" ? html`<span class="pending-left">${t("app.pendingLeft", mmss(p.deadline - NOW()))}</span>` : null}
891
898
  ${p.dismiss ? html`<button type="button" class="icon-btn" aria-label=${t("app.close")} title=${t("app.close")} onClick=${p.dismiss}><${Icon} name="close" size=${14} /></button>` : null}</div>
892
899
  ${p.label ? html`<div class="pending-label">${p.label}</div>` : null}
900
+ ${pendingRequestContextEnable(p) ? html`<p class="notice warn">${t("pendingHost.requestContextFloor")}</p>` : null}
893
901
  ${Array.isArray(p.summary) && p.summary.length ? html`<details class="pending-details" open=${Array.isArray(p.summary_i18n)&&p.summary_i18n.some(line=>line?.v===1&&Array.isArray(line.parts)&&line.parts.some(part=>part&&typeof part==="object"&&part.key==="hub.exposure.summary.classicRoom"))}><summary>${t("pendingHost.details")}</summary><ul class="pending-summary">${p.summary.map((line, i) => html`<li key=${i}>${String(pendingSummaryLine(line, Array.isArray(p.summary_i18n) && p.summary_i18n.length === p.summary.length ? p.summary_i18n[i] : null)).replace(/\\([\\`*_~[\]()<>|])/g, "$1")}</li>`)}</ul></details>` : null}
894
902
  ${p.state === "pending" ? html`<${PendingHow} p=${p} />` : null}
895
903
  ${(p.state === "applying" || p.state === "applied") && p.confirmation && p.confirmation.kind === "web" ? html`<p class="note">${t("app.pendingWeb")}</p>` : null}
@@ -931,6 +939,7 @@ function whereText(where) {
931
939
  // would let it through — never "type this command on the host". The host's command stays folded under Advanced, a last resort.
932
940
  register("pendingHost", {
933
941
  en: {
942
+ requestContextFloor: "Once on, AgEnD can't go back to an older version.",
934
943
  no_chat: "This fleet has no chat app connected, so there is no General to send the confirm card to.",
935
944
  no_chat_do: "To confirm from Discord or Telegram instead, connect one in Settings → Chat & connections.",
936
945
  cross_platform: "This change affects chat apps on more than one platform, so no single General can confirm it.",
@@ -963,6 +972,7 @@ register("pendingHost", {
963
972
  moreHost: "On the computer running AgEnD, open AgEnD in its own browser and press Apply now on this card.",
964
973
  },
965
974
  "zh-TW": {
975
+ requestContextFloor: "開啟後就不能再降回舊版 AgEnD。",
966
976
  no_chat: "這個 Fleet 沒有連接聊天平台,所以沒有 General 可以接收確認卡。",
967
977
  no_chat_do: "若要改從 Discord 或 Telegram 確認,請到「設定 → 聊天與連線」連接其中一個。",
968
978
  cross_platform: "這項變更涉及多個聊天平台,沒有單一的 General 可以確認。",
@@ -1075,7 +1085,7 @@ function PendingHow({ p }) {
1075
1085
  const mode = p.applyNow ? "apply" : p.confirmWithCode ? "code" : p.totpNotSetUp ? "setup" : p.onHost ? "link" : p.hostOnly ? "hostOnly" : "none";
1076
1086
  if (!cli && (mode === "none" || mode === "apply")) {
1077
1087
  const lead = c.kind === "posting" ? t("app.pendingPosting") : t("app.pendingChatWhere", whereText(c.where));
1078
- return html`<p class="note">${lead}</p>
1088
+ return html`${!p.applyNow ? html`<p class="note">${lead}</p>` : null}
1079
1089
  ${p.applyNow ? html`<div class="pending-self"><span class="note">${t("app.pendingSelf")}</span>
1080
1090
  <button type="button" class="btn btn-sm btn-primary" onClick=${apply}>${t("app.pendingApplyNow")}</button></div>` : null}
1081
1091
  ${refused && !p.applyNow ? html`<p class="note" role="status">${t("app.pendingApplyRefused")}</p>` : null}
@@ -1184,7 +1194,7 @@ export function retryable(load) {
1184
1194
  }
1185
1195
 
1186
1196
  /** Shows the panel for the route, loading its module the first time; Retry is a real new attempt. */
1187
- export function Outlet({ route, seq, panels }) {
1197
+ export function Outlet({ route, seq, panels, loading = null }) {
1188
1198
  const [attempt, setAttempt] = useState(0);
1189
1199
  const [, force] = useState(0);
1190
1200
  const entry = route ? panels.get(route.panel) : null;
@@ -1204,7 +1214,7 @@ export function Outlet({ route, seq, panels }) {
1204
1214
  // #3822: a panel that would not link (this tab is older than AgEnD) needs a reload, not a Retry that loads the same old copy.
1205
1215
  if (entry && entry.error && !entry.loading) return html`<div class="panel">${isStaleModuleError(entry.error) ? html`<${StaleTabPrompt} />`
1206
1216
  : html`<${ErrorState} onRetry=${() => setAttempt(n => n + 1)} />`}</div>`;
1207
- if (!entry || !entry.Component) return html`<div class="panel"><${Skeleton} lines=${4} /></div>`;
1217
+ if (!entry || !entry.Component) return loading ?? html`<div class="panel"><${Skeleton} lines=${4} /></div>`;
1208
1218
  const C = entry.Component;
1209
1219
  return html`<${C} route=${route} navKey=${`${routeKey(route)}|${seq}|${lang()}`} />`;
1210
1220
  }
@@ -164,6 +164,7 @@ export function createStream(opts) {
164
164
  if (Array.isArray(d.reply_buttons)) for (const u of d.reply_buttons) emit("reply_buttons", u); // #1266
165
165
  if (Array.isArray(d.reactions)) for (const u of d.reactions) emit("reactions", u); // #2305
166
166
  if (Array.isArray(d.needs)) emit("needs", { items: d.needs });
167
+ if (Object.hasOwn(d, "requestContextCutover")) emit("request-context-control", d.requestContextCutover);
167
168
  return true;
168
169
  } catch { return false; /* the next tick, or the catch-up's retry, tries again */ }
169
170
  })();
@@ -308,4 +308,5 @@ export function UpdateLine() {
308
308
  return html`${line}<${LogDialog} /><${PickTimeHost} />`;
309
309
  }
310
310
  /** M-3770 1.4: what update-card-ui.js needs from this module, passed in (it never imports this one). */
311
- export const cardDeps = { refresh: () => refreshUpdate(), setInfo: (info) => updateStore.set({ info }), getInfo: () => updateStore.get().info };
311
+ export const cardDeps = { refresh: () => refreshUpdate(), setInfo: (info) => updateStore.set({ info }), getInfo: () => updateStore.get().info,
312
+ setStarting: (starting) => updateStore.set({ starting }) };
@@ -35,12 +35,15 @@ a { color: inherit; text-decoration: none; }
35
35
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
36
36
  }
37
37
  .btn:hover:not(:disabled) { background: var(--surface); }
38
- .btn:disabled { opacity: 0.45; cursor: default; }
38
+ /* M-3842 (style guide §4, disabled controls): an off button stays readable (text ≥ 3:1 on the page and on a card, in every
39
+ theme and palette) and reads as off: no fill, muted text, a dashed edge. Never opacity, which washed it out on dark. */
40
+ .btn:disabled { opacity: 1; cursor: default; color: color-mix(in srgb, var(--text-3) 75%, var(--bg)); background: transparent; border-color: var(--border); border-style: dashed; }
39
41
  .btn-primary { background: var(--accent-fill); color: var(--on-accent); border-color: transparent; }
40
42
  .btn-primary:hover:not(:disabled) { background: var(--accent-fill); opacity: 0.88; }
41
43
  .btn-danger { background: var(--danger-fill); color: var(--on-danger); border-color: transparent; }
42
44
  .btn-danger:hover:not(:disabled) { background: var(--danger-fill); opacity: 0.9; }
43
45
  .btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
46
+ .btn-ghost:disabled { border-color: transparent; } /* a link-like button keeps no edge when off (M-3842) */
44
47
  .btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface); }
45
48
  .btn.danger, .btn-ghost.danger { color: var(--danger); }
46
49
  .btn-sm { min-height: 30px; padding: 0 var(--s-3); font-size: var(--fs-xs); }
@@ -805,6 +808,13 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
805
808
  .s-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; min-width: 0; padding: 14px 0; }
806
809
  .s-setting-row + .s-setting-row { border-top: 1px solid var(--border); }
807
810
  .s-setting-row .note { margin: 5px 0 0; }
811
+ .request-context-toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
812
+ .request-context-control, .request-context-blocked { overflow-wrap: anywhere; }
813
+ .request-context-control .btn, .request-context-need .btn { min-height: 44px; }
814
+ .request-context-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
815
+ .request-context-actions > .btn { width: auto; flex: 0 0 auto; }
816
+ .p-settings .request-context-toggle input.s-ui-toggle:not(:checked) { border-color: var(--text-2); background: var(--surface-3, var(--surface-2)); }
817
+ .p-settings .request-context-toggle input.s-ui-toggle:indeterminate::after { transform: translateX(8px); border-radius: 2px; }
808
818
  .p-settings input.s-ui-toggle, .p-hub input.s-ui-toggle, .p-fleet input.s-ui-toggle { appearance: none; position: relative; display: inline-block; flex: none; width: 38px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface-3, var(--surface-2)); cursor: pointer; }
809
819
  .p-settings input.s-ui-toggle::after, .p-hub input.s-ui-toggle::after, .p-fleet input.s-ui-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform var(--t-fast); }
810
820
  .p-settings input.s-ui-toggle:checked, .p-hub input.s-ui-toggle:checked, .p-fleet input.s-ui-toggle:checked { background: var(--accent); border-color: var(--accent); }
@@ -1308,10 +1318,10 @@ img.amb-p { object-fit: contain; }
1308
1318
  /* #1266: an agent reply's buttons — choices under the text; one answers for everyone. */
1309
1319
  .rb-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
1310
1320
  .rb-btn { max-width: 100%; white-space: normal; text-align: left; }
1311
- .rb-btn.chosen, .rb-btn.chosen:disabled { border-color: var(--ok); color: var(--text); background: color-mix(in srgb, var(--ok) 14%, transparent); font-weight: var(--fw-semibold); opacity: 1; }
1312
- .rb-btn:disabled:not(.chosen) { opacity: 0.55; }
1313
- /* #1823: a poll — its closed buttons show the tally, so they stay readable; the time left keeps its width. */
1314
- .rb-row.poll .rb-btn:disabled { opacity: 0.85; }
1321
+ .rb-btn.chosen, .rb-btn.chosen:disabled { border-color: var(--ok); border-style: solid; color: var(--text); background: color-mix(in srgb, var(--ok) 14%, transparent); font-weight: var(--fw-semibold); opacity: 1; }
1322
+ /* M-3842: an unchosen, answered or expired choice is the shared off button (.btn:disabled): muted, no fill, dashed; no opacity. */
1323
+ /* #1823: a poll — its closed buttons show the tally, so they stay readable (M-3842: --text-2, no opacity); the time left keeps its width. */
1324
+ .rb-row.poll .rb-btn:disabled:not(.chosen) { color: var(--text-2); }
1315
1325
  .rb-row.poll .poll-left { font-variant-numeric: tabular-nums; }
1316
1326
  .poll-voters { margin: var(--s-1) 0 0; padding-left: var(--s-4); color: var(--text-2); font-size: var(--fs-sm); }
1317
1327
  .rb-note { font-size: var(--fs-xs); color: var(--text-3); }
@@ -1396,6 +1406,7 @@ img.amb-p { object-fit: contain; }
1396
1406
  font-size: var(--fs-md); line-height: var(--lh-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1397
1407
  .composer-field textarea:not(:placeholder-shown) + .composer-ph { display: none; } /* text in the box, composing text too */
1398
1408
  .btn-send { width: 36px; padding: 0; }
1409
+ .btn-send:disabled { background: var(--surface-2); color: var(--text-3); border-color: transparent; border-style: solid; } /* M-3842: an empty composer's Send is a quiet filled circle a step off the composer, its icon ≥ 3:1 */
1399
1410
  .btn-send .send-label { display: none; }
1400
1411
  /* A narrow phone: Stop reply beside Send leaves the message box no room — the label is for screen readers there. */
1401
1412
  @media (max-width: 479px) { .btn-stop .stop-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } }
@@ -1484,6 +1495,11 @@ img.amb-p { object-fit: contain; }
1484
1495
  .webauth-chip .btn-sm { min-height: 24px; }
1485
1496
  /* M-3710 (#4447 review): Needs you's Authorize this browser is a full touch target on a phone. */
1486
1497
  @media (pointer: coarse), (max-width: 479px) { .contact-verify-need .webauth-chip .btn-sm { min-height: var(--tap); min-width: var(--tap); } }
1498
+ /* M-3864 R6 (#4583): Permissions / Authorizations when a verified administrator is needed: the line, this browser's
1499
+ authorize line, then Try again, stacked with room between them; touch-sized on a phone as the Needs you line is. */
1500
+ .contact-verify { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
1501
+ .contact-verify > .note { margin: 0; }
1502
+ @media (pointer: coarse), (max-width: 479px) { .contact-verify .btn-sm { min-height: var(--tap); min-width: var(--tap); } }
1487
1503
  /* #1939 S2a: Settings → Web → Web authority. */
1488
1504
  .s-web-authority .s-va-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
1489
1505
  .s-web-authority .s-va-sessions li { padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-sm); overflow-wrap: anywhere; }
@@ -1576,7 +1592,7 @@ img.amb-p { object-fit: contain; }
1576
1592
  .toast { padding: 10px var(--s-4); max-width: min(420px, calc(100vw - 32px)); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: var(--fw-medium); box-shadow: var(--shadow-2); background: var(--accent-fill); color: var(--on-accent); animation: toast-in var(--t-med) var(--ease); }
1577
1593
  .toast.err { background: var(--danger-fill); color: var(--on-danger); }
1578
1594
  /* Detailed refusal messages must keep their recovery steps visible on phones too. */
1579
- .toasts .toast.toast-detail { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; border-radius: var(--r-md); }
1595
+ .toasts .toast.toast-detail { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; border-radius: var(--r-md); word-break: keep-all; text-wrap: pretty; } /* M-3770 1.6: zh breaks at spaces and punctuation (no 「執 / 行」); a word too long still breaks */
1580
1596
  @keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
1581
1597
 
1582
1598
  /* ── #1366 tour: a card that names one thing at a time; the outline is a class (#1300) ── */
@@ -1648,7 +1664,7 @@ img.amb-p { object-fit: contain; }
1648
1664
  .dlg-actions { padding-bottom: max(var(--s-5), env(safe-area-inset-bottom)); }
1649
1665
  .dlg-actions .btn { flex: 1; min-height: var(--tap); }
1650
1666
  .dlg-head .dlg-x { min-width: var(--tap); min-height: var(--tap); }
1651
- .row-item .btn, .s-row .btn, .n-actions .btn { min-height: var(--tap); }
1667
+ .row-item .btn, .s-row .btn, .n-actions .btn, .rc-verify .btn, .rc-read-failed .btn { min-height: var(--tap); }
1652
1668
  /* Settings buttons share one phone target, including compact card actions. */
1653
1669
  .p-settings .btn { min-width: var(--tap); min-height: var(--tap); }
1654
1670
  /* Grow the clickable label around its text without moving the surrounding layout. */
@@ -2273,6 +2289,25 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
2273
2289
  .update-text { flex: 1 1 100%; }
2274
2290
  .update-actions.indent { margin-left: 26px; }
2275
2291
  }
2292
+ /* S-241 (Lumen's point 8): an answered update card (waiting for idle, scheduled) is one line on a phone — its short words
2293
+ and Change; Change opens the full line. The desk never shows the short words or Change. "A phone" is the app's own
2294
+ phone layout (the shell's narrow condition: up to 899 px, or a landscape touch screen), not the banner's 700 px. */
2295
+ .uc-answered { display: contents; }
2296
+ .uc-short, .uc-fold { display: none; }
2297
+ .uc-fold { gap: 4px; align-items: center; }
2298
+ .uc-answered.open .uc-fold svg { transform: rotate(180deg); }
2299
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
2300
+ .uc-fold { display: inline-flex; }
2301
+ .uc-answered.open .update-actions { flex: 1 1 100%; flex-wrap: wrap; } /* four buttons may need a second row */
2302
+ .uc-answered:not(.open) .update-line { flex-wrap: nowrap; }
2303
+ .uc-answered:not(.open) .update-text { flex: 1 1 auto; align-items: center; }
2304
+ .uc-answered:not(.open) :is(.update-icon, .update-spinner) { margin-top: 0; }
2305
+ .uc-answered:not(.open) .update-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
2306
+ .uc-answered:not(.open) .uc-long, .uc-answered:not(.open) .update-sub,
2307
+ .uc-answered:not(.open) .update-actions .btn:not(.uc-fold) { display: none; }
2308
+ .uc-answered:not(.open) .uc-short { display: inline; }
2309
+ .uc-answered:not(.open) .update-actions.indent { margin-left: 0; }
2310
+ }
2276
2311
  /* M-2738: Settings → Advanced → Version and update */
2277
2312
  /* M-3770 1.4: the update card's Settings part — its state, "Updates on this machine", and the controls (pause windows;
2278
2313
  Advanced: pin, longest wait). Phone: every control a 44 px box, the day ticks wrap. */
@@ -2282,6 +2317,16 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
2282
2317
  .uc-machine .uc-mark { font-weight: var(--fw-semibold); margin: 0 2px; }
2283
2318
  .uc-self .uc-mark { color: var(--ok); } .uc-admin-only .uc-mark { color: var(--warn); } .uc-stop .uc-mark { color: var(--danger); }
2284
2319
  .uc-checks { margin: var(--s-1) 0 0; padding-left: var(--s-4); color: var(--text-2); }
2320
+ /* M-3770 1.6: a check's words break only at spaces and punctuation, as the banner's (no 「回 / 來」); its fix button
2321
+ under it; How to fix's steps indented under their summary. */
2322
+ .uc-checks li { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
2323
+ .uc-checks .uc-fix { margin: var(--s-1) 0 var(--s-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
2324
+ .uc-checks .uc-fix-hint { font-size: var(--fs-sm); word-break: keep-all; overflow-wrap: anywhere; }
2325
+ .uc-checks .uc-fix-refused { margin: var(--s-1) 0 var(--s-2); font-weight: var(--fw-semibold); word-break: keep-all; overflow-wrap: anywhere; }
2326
+ .uc-checks .uc-fix-next { margin: 0 0 var(--s-2); word-break: keep-all; overflow-wrap: anywhere; } /* #4564: the next step after a refusal */
2327
+ .uc-checks .uc-fix-refused .uc-cmd { white-space: normal; overflow-wrap: anywhere; word-break: normal; } /* a refusal's raw words wrap on a phone */
2328
+ .uc-checks .uc-how { font-size: inherit; }
2329
+ .uc-checks .uc-how > p { padding-left: var(--s-3); border-left: 2px solid var(--border); }
2285
2330
  .uc-controls { display: flex; flex-direction: column; gap: var(--s-3); }
2286
2331
  .uc-pause { border: 0; padding: 0; margin: 0; min-width: 0; }
2287
2332
  .uc-pause legend { font-weight: var(--fw-semibold); font-size: var(--fs-sm); padding: 0; }
@@ -2442,6 +2487,8 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
2442
2487
  .notice-new { font-size: var(--fs-xs); color: var(--accent); font-weight: var(--fw-semibold); }
2443
2488
  .notice-sub { margin: 0 var(--s-1) var(--s-3); }
2444
2489
  .confirm-text { white-space: pre-wrap; font-size: var(--fs-sm); color: var(--text-2); }
2490
+ /* M-3770 S-246: zh breaks at spaces and punctuation (no 「短暫停 / 止」), as the toasts do (1.6); a word too long still breaks. */
2491
+ :lang(zh) .confirm-text { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
2445
2492
  /* M-3387: a list closed under a confirm's text (every tool name a restricted switch stops), and the same on Permissions. */
2446
2493
  .confirm-more, .contact-would-all { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--text-2); }
2447
2494
  .confirm-more > summary, .contact-would-all > summary { cursor: pointer; }
@@ -5392,6 +5439,19 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
5392
5439
  .contact-time-item { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
5393
5440
  .contact-decide { display: flex; flex-direction: column; gap: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--border); font-size: var(--fs-sm); }
5394
5441
  .contact-decide-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
5442
+ /* M-3736 J (S-228): the one card — Authorize this browser inline while unverified; the choice made before verification
5443
+ marked (a ring, not focus: focus stays where it was); a host whose state isn't known says why. */
5444
+ /* The credits card's layout (the user's approved one-card style): a standard .n-item; the verify line is one row. */
5445
+ .rc-verify { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--text-2); }
5446
+ .rc-verify > *, .rc-auth > *, .rc-more > p { margin: 0; }
5447
+ .rc-auth { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
5448
+ .rc-more > p { margin-top: var(--s-1); }
5449
+ .rc-card .rc-reason .rc-state { margin-right: var(--s-1); }
5450
+ .rc-card :is(.rc-reason, .rc-verify > span) { word-break: keep-all; overflow-wrap: anywhere; }
5451
+ /* The scope phrase wraps as a whole (never "繼續= / 只放行…"), onto its own line when the reason leaves no room. */
5452
+ .rc-card .rc-scope { display: inline-block; max-width: 100%; }
5453
+ .rc-unknown { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
5454
+ .rc-unknown > * { margin: 0; }
5395
5455
  .contact-allow .field { flex: 1; min-width: 10em; }
5396
5456
  .contact-person-filter { max-width: 100%; min-width: 0; }
5397
5457
  .contact-person-filter > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -5559,7 +5619,27 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
5559
5619
 
5560
5620
  /* Scoped grant metadata wraps as whole phrases; disabled decisions stay readable. */
5561
5621
  .contact-grant-meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
5562
- .contact-grant-dialog .btn-primary:disabled { opacity: 1; background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
5622
+ /* #4497: the expiry as a day and a 24-hour time from selects; they wrap as a group on a narrow sheet. */
5623
+ .contact-grant-when { display: flex; flex-direction: column; gap: var(--s-2); }
5624
+ .contact-until { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
5625
+ .contact-until > select { flex: 1 1 12rem; min-width: 0; }
5626
+ .contact-until-time { display: inline-flex; align-items: center; gap: var(--s-1); white-space: nowrap; }
5627
+ .contact-grant-dialog .dlg-body :is(p, .check span) { word-break: keep-all; overflow-wrap: anywhere; } /* zh words whole */
5628
+ /* #4497 recheck: the body scrolls between the head and the footer (a flex child's min-height: auto let it run under the
5629
+ footer buttons on a phone), with room after its last line so that line scrolls clear of them. */
5630
+ .contact-grant-dialog .dlg-body { min-height: 0; padding-bottom: var(--s-6); }
5631
+ .contact-grant-dialog .dlg-title { text-wrap: balance; } /* M-3783: a two-line title on a phone splits evenly, no one-word last line */
5632
+ /* M-3783: the essentials in one line; what the rule allows, folded under it. */
5633
+ .contact-grant-more summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); }
5634
+ .contact-grant-more > p { margin: var(--s-1) 0 0; }
5635
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
5636
+ .contact-grant-more summary { display: list-item; min-height: var(--tap); padding-block: var(--s-2); box-sizing: border-box; } /* keeps its ▶ marker */
5637
+ }
5638
+ /* #4497: the save button's two-part label wraps inside the button on a phone instead of widening the dialog (m3409's overflow
5639
+ check), as the Hub directory editor's footer does. */
5640
+ .contact-grant-dialog .dlg-actions .btn { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; text-align: center; padding-block: var(--s-2); } /* zh words whole: 「…並設為 / 常用轉交」, never 常 / 用 (M-3783) */
5641
+ /* #4497 recheck: the card's decision buttons keep their whole words; the row wraps to a second line instead of clipping. */
5642
+ .rc-card .rc-decide > .btn { flex: 0 0 auto; max-width: 100%; }
5563
5643
  @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
5564
5644
  .contact-grant-dialog :is(input:not([type=checkbox]), select, .check) { min-height: var(--tap); }
5565
5645
  }
@@ -5591,3 +5671,8 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
5591
5671
  .request-provenance summary { min-height: var(--tap); display: list-item; padding-block: var(--s-3); }
5592
5672
  .request-provenance .msg-tools button { min-height: var(--tap); min-width: var(--tap); }
5593
5673
  }
5674
+
5675
+ /* One neutral viewport for Hub startup, before any workspace identity is drawn. */
5676
+ .session-loading-page { display: grid; place-items: center; min-height: 100dvh; box-sizing: border-box; margin: 0; padding: var(--s-4); background: var(--bg); color: var(--text-2); }
5677
+ /* Like .sk-boot, the initial frame is visible immediately, without content's anti-flash delay. */
5678
+ .session-loading-page .skeleton { opacity: 1; animation: none; }