@aeolus-fleet/gateway 0.31.0 → 0.32.1

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 (346) hide show
  1. package/dist/adapters/fleet/core-version.d.ts +1 -1
  2. package/dist/adapters/fleet/core-version.js +1 -1
  3. package/dist/adapters/fleet/proxy-ships-as-actor.js +5 -1
  4. package/dist/adapters/fleet/proxy-ships-as-actor.js.map +1 -1
  5. package/dist/adapters/fleet/rest-fleet-door.js +15 -6
  6. package/dist/adapters/fleet/rest-fleet-door.js.map +1 -1
  7. package/dist/adapters/http/mcp-endpoint.js +1 -1
  8. package/dist/adapters/http/mcp-endpoint.js.map +1 -1
  9. package/dist/adapters/http/person-tools.js +1 -1
  10. package/dist/adapters/http/person-tools.js.map +1 -1
  11. package/dist/adapters/pagasae/email-channel.js +4 -2
  12. package/dist/adapters/pagasae/email-channel.js.map +1 -1
  13. package/dist/adapters/prisma/generated/commonInputTypes.d.ts +50 -50
  14. package/dist/adapters/prisma/generated/internal/class.js +4 -4
  15. package/dist/adapters/prisma/generated/internal/class.js.map +1 -1
  16. package/dist/adapters/prisma/generated/internal/prismaNamespace.d.ts +2 -0
  17. package/dist/adapters/prisma/generated/internal/prismaNamespace.js +2 -0
  18. package/dist/adapters/prisma/generated/internal/prismaNamespace.js.map +1 -1
  19. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.d.ts +2 -0
  20. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js +2 -0
  21. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -1
  22. package/dist/adapters/prisma/generated/models/A2aPush.d.ts +0 -7
  23. package/dist/adapters/prisma/generated/models/Party.d.ts +70 -1
  24. package/dist/adapters/prisma/scope-requirements.d.ts +10 -0
  25. package/dist/adapters/prisma/scope-requirements.js +37 -0
  26. package/dist/adapters/prisma/scope-requirements.js.map +1 -0
  27. package/dist/adapters/trpc/router.d.ts +91 -8
  28. package/dist/adapters/trpc/router.js +98 -11
  29. package/dist/adapters/trpc/router.js.map +1 -1
  30. package/dist/app.js +34 -9
  31. package/dist/app.js.map +1 -1
  32. package/dist/core/a2a-out/agent-event.d.ts +1 -1
  33. package/dist/core/a2a-out/agent-event.js +2 -2
  34. package/dist/core/a2a-out/agent-event.js.map +1 -1
  35. package/dist/core/a2a-out/agent-statement.d.ts +2 -1
  36. package/dist/core/a2a-out/agent-statement.js +5 -2
  37. package/dist/core/a2a-out/agent-statement.js.map +1 -1
  38. package/dist/core/a2a-out/hand-a2a-message.d.ts +7 -2
  39. package/dist/core/a2a-out/hand-a2a-message.js +15 -1
  40. package/dist/core/a2a-out/hand-a2a-message.js.map +1 -1
  41. package/dist/core/a2a-out/read-agent-statement.d.ts +1 -0
  42. package/dist/core/a2a-out/read-agent-statement.js +1 -1
  43. package/dist/core/a2a-out/read-agent-statement.js.map +1 -1
  44. package/dist/core/a2a-out/state-a2a-agent.d.ts +3 -2
  45. package/dist/core/a2a-out/state-a2a-agent.js +3 -2
  46. package/dist/core/a2a-out/state-a2a-agent.js.map +1 -1
  47. package/dist/core/account-sign-in/account-in-view.d.ts +10 -1
  48. package/dist/core/account-sign-in/account-in-view.js +17 -4
  49. package/dist/core/account-sign-in/account-in-view.js.map +1 -1
  50. package/dist/core/connection/ports.d.ts +8 -0
  51. package/dist/core/mcp-out/hand-call.d.ts +6 -2
  52. package/dist/core/mcp-out/hand-call.js +14 -1
  53. package/dist/core/mcp-out/hand-call.js.map +1 -1
  54. package/dist/core/mcp-out/state-party.d.ts +3 -2
  55. package/dist/core/mcp-out/state-party.js +2 -2
  56. package/dist/core/mcp-out/state-party.js.map +1 -1
  57. package/dist/core/mcp-out/statement.d.ts +16 -0
  58. package/dist/core/mcp-out/statement.js +10 -3
  59. package/dist/core/mcp-out/statement.js.map +1 -1
  60. package/dist/core/operator/ports.d.ts +4 -4
  61. package/dist/core/parties/add-a2a-agent.js +1 -1
  62. package/dist/core/parties/add-a2a-agent.js.map +1 -1
  63. package/dist/core/parties/check-approving.d.ts +36 -0
  64. package/dist/core/parties/check-approving.js +48 -0
  65. package/dist/core/parties/check-approving.js.map +1 -0
  66. package/dist/core/parties/check-required-scopes.d.ts +34 -0
  67. package/dist/core/parties/check-required-scopes.js +27 -0
  68. package/dist/core/parties/check-required-scopes.js.map +1 -0
  69. package/dist/core/parties/ports.d.ts +21 -0
  70. package/dist/core/parties/read-listed-scopes.d.ts +17 -0
  71. package/dist/core/parties/read-listed-scopes.js +23 -0
  72. package/dist/core/parties/read-listed-scopes.js.map +1 -0
  73. package/dist/core/parties/read-scope-requirements.d.ts +18 -0
  74. package/dist/core/parties/read-scope-requirements.js +17 -0
  75. package/dist/core/parties/read-scope-requirements.js.map +1 -0
  76. package/dist/core/parties/scope-requirements.d.ts +34 -0
  77. package/dist/core/parties/scope-requirements.js +37 -0
  78. package/dist/core/parties/scope-requirements.js.map +1 -0
  79. package/dist/core/parties/set-scope-requirements.d.ts +45 -0
  80. package/dist/core/parties/set-scope-requirements.js +48 -0
  81. package/dist/core/parties/set-scope-requirements.js.map +1 -0
  82. package/dist/core/parties/switch-tools.d.ts +39 -0
  83. package/dist/core/parties/switch-tools.js +38 -0
  84. package/dist/core/parties/switch-tools.js.map +1 -0
  85. package/dist/core/parties/tool-switches.d.ts +4 -2
  86. package/dist/core/parties/tool-switches.js +2 -1
  87. package/dist/core/parties/tool-switches.js.map +1 -1
  88. package/dist/core/people/ports.d.ts +4 -2
  89. package/dist/core/people/wake-person.d.ts +22 -10
  90. package/dist/core/people/wake-person.js +88 -20
  91. package/dist/core/people/wake-person.js.map +1 -1
  92. package/dist/core/people/web-push-channel.js +1 -1
  93. package/dist/core/people/web-push-channel.js.map +1 -1
  94. package/dist/core/shared/errors.d.ts +1 -1
  95. package/dist/core/shared/errors.js.map +1 -1
  96. package/package.json +3 -3
  97. package/src/adapters/prisma/migrations/20261025140000_scope_requirements/migration.sql +3 -0
  98. package/src/adapters/prisma/schema.prisma +69 -65
  99. package/web/.next/BUILD_ID +1 -1
  100. package/web/.next/app-path-routes-manifest.json +1 -0
  101. package/web/.next/build-manifest.json +15 -3
  102. package/web/.next/diagnostics/route-bundle-stats.json +113 -77
  103. package/web/.next/fallback-build-manifest.json +3 -3
  104. package/web/.next/prerender-manifest.json +3 -3
  105. package/web/.next/routes-manifest.json +6 -0
  106. package/web/.next/server/app/(console)/gateway-off/page/app-paths-manifest.json +3 -0
  107. package/web/.next/server/app/(console)/gateway-off/page/build-manifest.json +23 -0
  108. package/web/.next/server/app/(console)/gateway-off/page/next-font-manifest.json +11 -0
  109. package/web/.next/server/app/(console)/gateway-off/page/react-loadable-manifest.json +1 -0
  110. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +15 -0
  111. package/web/.next/server/app/(console)/gateway-off/page.js +19 -0
  112. package/web/.next/server/app/(console)/gateway-off/page.js.map +5 -0
  113. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -0
  114. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +3 -0
  115. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  116. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  117. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  118. package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +17 -7
  119. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js +4 -4
  120. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
  121. package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +15 -5
  123. package/web/.next/server/app/(console)/outside-parties/[name]/page.js +4 -4
  124. package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
  125. package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  126. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +17 -7
  127. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js +4 -4
  128. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  129. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  130. package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +17 -7
  131. package/web/.next/server/app/(console)/outside-parties/add/page.js +3 -4
  132. package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
  133. package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
  134. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
  135. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  136. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
  138. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  139. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
  141. package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
  142. package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
  143. package/web/.next/server/app/(console)/overview/changes/route.js.nft.json +1 -1
  144. package/web/.next/server/app/(console)/overview/focus/route.js.nft.json +1 -1
  145. package/web/.next/server/app/(console)/overview/page/server-reference-manifest.json +7 -7
  146. package/web/.next/server/app/(console)/overview/page.js.nft.json +1 -1
  147. package/web/.next/server/app/(console)/overview/page_client-reference-manifest.js +1 -1
  148. package/web/.next/server/app/(console)/overview/requests/[requestId]/page/server-reference-manifest.json +2 -2
  149. package/web/.next/server/app/(console)/overview/requests/[requestId]/page.js.nft.json +1 -1
  150. package/web/.next/server/app/(console)/overview/requests/[requestId]/page_client-reference-manifest.js +1 -1
  151. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +7 -7
  152. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  153. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  154. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  155. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  156. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  157. package/web/.next/server/app/_global-error.html +1 -1
  158. package/web/.next/server/app/_global-error.rsc +1 -1
  159. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  160. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  161. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  162. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  163. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  164. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  165. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  166. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  167. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  168. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  169. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  170. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  171. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  172. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  173. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  174. package/web/.next/server/app-paths-manifest.json +1 -0
  175. package/web/.next/server/chunks/[root-of-the-server]__0ykc8bq_c06a1._.js +1 -1
  176. package/web/.next/server/chunks/[root-of-the-server]__0ykc8bq_c06a1._.js.map +1 -1
  177. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
  178. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
  179. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
  180. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
  182. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
  183. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
  184. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
  185. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
  186. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
  187. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js +1 -1
  188. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/[root-of-the-server]__0-og0bl8lr2xq._.js +1 -1
  190. package/web/.next/server/chunks/ssr/[root-of-the-server]__0-og0bl8lr2xq._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/[root-of-the-server]__00q22dte1g2ww._.js +3 -0
  192. package/web/.next/server/chunks/ssr/[root-of-the-server]__00q22dte1g2ww._.js.map +1 -0
  193. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
  194. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n2us07jk-78w._.js +1 -1
  196. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rr5u24i9tjyc._.js +1 -1
  197. package/web/.next/server/chunks/ssr/[root-of-the-server]__1-c9wugbbwsp3._.js +4 -0
  198. package/web/.next/server/chunks/ssr/[root-of-the-server]__1-c9wugbbwsp3._.js.map +1 -0
  199. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  200. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/{[root-of-the-server]__11w36a4le04vy._.js → [root-of-the-server]__1dc6okf5os70a._.js} +2 -2
  202. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dc6okf5os70a._.js.map +1 -0
  203. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dtyycvqa6uht._.js +1 -1
  204. package/web/.next/server/chunks/ssr/_0-lfpqqlgfhzj._.js.map +1 -1
  205. package/web/.next/server/chunks/ssr/_00dg5cvqofspn._.js +3 -0
  206. package/web/.next/server/chunks/ssr/_00dg5cvqofspn._.js.map +1 -0
  207. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  208. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/_03lk54yp-yhw3._.js +2 -2
  210. package/web/.next/server/chunks/ssr/_03lk54yp-yhw3._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/_0_kakdt7lb6z-._.js +3 -0
  212. package/web/.next/server/chunks/ssr/_0_kakdt7lb6z-._.js.map +1 -0
  213. package/web/.next/server/chunks/ssr/_0bhvvyz0q_0ja._.js +1 -1
  214. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +4 -0
  215. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -0
  216. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  217. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/_0w2ptjht34s6t._.js +3 -0
  219. package/web/.next/server/chunks/ssr/_0w2ptjht34s6t._.js.map +1 -0
  220. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  221. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/_12fsn_33ga-n0._.js +1 -1
  223. package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
  224. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  225. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  227. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/_1uuy6gkkhq6bx._.js +3 -0
  229. package/web/.next/server/chunks/ssr/_1uuy6gkkhq6bx._.js.map +1 -0
  230. package/web/.next/server/chunks/ssr/_1y1ovmdhl9_ml._.js +3 -0
  231. package/web/.next/server/chunks/ssr/_1y1ovmdhl9_ml._.js.map +1 -0
  232. package/web/.next/server/chunks/ssr/node_modules_07sxnbglqc5q9._.js +3 -0
  233. package/web/.next/server/chunks/ssr/node_modules_07sxnbglqc5q9._.js.map +1 -0
  234. package/web/.next/server/chunks/ssr/node_modules_0_cxkn6vujxay._.js +3 -0
  235. package/web/.next/server/chunks/ssr/node_modules_0_cxkn6vujxay._.js.map +1 -0
  236. package/web/.next/server/chunks/ssr/node_modules_0qlo87g8tugr4._.js +3 -0
  237. package/web/.next/server/chunks/ssr/node_modules_0qlo87g8tugr4._.js.map +1 -0
  238. package/web/.next/server/chunks/ssr/node_modules_15ceu3jhtifcw._.js +3 -0
  239. package/web/.next/server/chunks/ssr/node_modules_15ceu3jhtifcw._.js.map +1 -0
  240. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_1jvz31plyg2f-._.js +1 -1
  241. package/web/.next/server/chunks/ssr/node_modules_@aeolus-fleet_common_dist_header_1jvz31plyg2f-._.js.map +1 -1
  242. package/web/.next/server/chunks/ssr/node_modules_@base-ui_react_utils_FloatingPortalLite_mjs_1uzc1ezeugtex._.js +3 -0
  243. package/web/.next/server/chunks/ssr/node_modules_@base-ui_react_utils_FloatingPortalLite_mjs_1uzc1ezeugtex._.js.map +1 -0
  244. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1s46s8vlfx01v.js +3 -0
  245. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1s46s8vlfx01v.js.map +1 -0
  246. package/web/.next/server/chunks/ssr/web_0v-7sowo0hupw._.js +1 -1
  247. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
  248. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
  249. package/web/.next/server/chunks/ssr/web_1wcpaty_bz55q._.js +3 -0
  250. package/web/.next/server/chunks/ssr/web_1wcpaty_bz55q._.js.map +1 -0
  251. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js +1 -1
  252. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js.map +1 -1
  253. package/web/.next/server/chunks/ssr/{web_features_0ahlkugj7fu3n._.js → web_features_0xbnkk4hfgr9v._.js} +2 -2
  254. package/web/.next/server/chunks/ssr/{web_features_0ahlkugj7fu3n._.js.map → web_features_0xbnkk4hfgr9v._.js.map} +1 -1
  255. package/web/.next/server/chunks/ssr/web_features_10xz3ojtvfi7h._.js +3 -0
  256. package/web/.next/server/chunks/ssr/web_features_10xz3ojtvfi7h._.js.map +1 -0
  257. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  258. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  259. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  260. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  262. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/web_features_forms_1u0akr22eh_x_._.js +3 -0
  264. package/web/.next/server/chunks/ssr/web_features_forms_1u0akr22eh_x_._.js.map +1 -0
  265. package/web/.next/server/chunks/ssr/web_features_frame_0pe8cwpxe1egb._.js +1 -1
  266. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
  267. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
  268. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  269. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  270. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  271. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/web_features_outside-party_0_9c27knfvw7u._.js +3 -0
  273. package/web/.next/server/chunks/ssr/web_features_outside-party_0_9c27knfvw7u._.js.map +1 -0
  274. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  275. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js.map +1 -1
  276. package/web/.next/server/chunks/ssr/web_features_overview_0udx5lm8igils._.js +3 -0
  277. package/web/.next/server/chunks/ssr/{web_features_overview_16dyz2ngvs14b._.js.map → web_features_overview_0udx5lm8igils._.js.map} +1 -1
  278. package/web/.next/server/chunks/ssr/web_features_overview_hooks_overview-actions_ts_0-wrat07d1y5g._.js +1 -1
  279. package/web/.next/server/chunks/ssr/web_features_overview_state_1wuk95dw2_whp._.js +1 -1
  280. package/web/.next/server/chunks/ssr/web_features_overview_state_1wuk95dw2_whp._.js.map +1 -1
  281. package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js +1 -1
  282. package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js.map +1 -1
  283. package/web/.next/server/chunks/ssr/{web_features_overview_ui_action-button_tsx_14-5f45xbzbi6._.js → web_features_overview_ui_10mb24kjiffea._.js} +2 -2
  284. package/web/.next/server/chunks/ssr/{web_features_overview_ui_action-button_tsx_14-5f45xbzbi6._.js.map → web_features_overview_ui_10mb24kjiffea._.js.map} +1 -1
  285. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  286. package/web/.next/server/middleware-build-manifest.js +15 -3
  287. package/web/.next/server/next-font-manifest.js +1 -1
  288. package/web/.next/server/next-font-manifest.json +4 -0
  289. package/web/.next/server/pages/500.html +1 -1
  290. package/web/.next/server/preview-props.json +3 -3
  291. package/web/.next/server/server-reference-manifest.js +1 -1
  292. package/web/.next/server/server-reference-manifest.json +55 -29
  293. package/web/.next/static/chunks/0coxy5zad812a.js +1 -0
  294. package/web/.next/static/chunks/{2hsi-sahla2aj.js → 0u_4xjk1j74g3.js} +1 -1
  295. package/web/.next/static/chunks/0v9r_hyyubykq.js +1 -0
  296. package/web/.next/static/chunks/0zesq1ng-v3s6.js +1 -0
  297. package/web/.next/static/chunks/10wzmy096av_5.css +3 -0
  298. package/web/.next/static/chunks/{1juj2_tl8d16x.js → 12c3qjvto3m0f.js} +1 -1
  299. package/web/.next/static/chunks/1ahn4kx4ld-rc.js +1 -0
  300. package/web/.next/static/chunks/{21s2_ccrw90ok.js → 1xrn7oqwd48vi.js} +1 -1
  301. package/web/.next/static/chunks/{3o8h4o3utbvgc.js → 20n2z_lok8v0f.js} +1 -1
  302. package/web/.next/static/chunks/2cd4e71s711ad.js +1 -0
  303. package/web/.next/static/chunks/{1pafc2gfswboo.js → 2ew9kpu2kohk4.js} +1 -1
  304. package/web/.next/static/chunks/2i3ydqqupow_x.js +1 -0
  305. package/web/.next/static/chunks/2riya89_i0je8.js +1 -0
  306. package/web/.next/static/chunks/3_pwm8b3mf4mf.js +1 -0
  307. package/web/.next/static/chunks/{2x00o45pdbkok.js → 3x_8doukmdfpu.js} +1 -1
  308. package/web/.next/trace +1 -1
  309. package/web/.next/trace-build +1 -1
  310. package/web/.next/types/routes.d.ts +2 -1
  311. package/web/.next/types/validator.ts +17 -0
  312. package/dist/core/parties/switch-tool.d.ts +0 -29
  313. package/dist/core/parties/switch-tool.js +0 -33
  314. package/dist/core/parties/switch-tool.js.map +0 -1
  315. package/web/.next/server/chunks/ssr/[root-of-the-server]__0m57jyae0dn_7._.js +0 -3
  316. package/web/.next/server/chunks/ssr/[root-of-the-server]__0m57jyae0dn_7._.js.map +0 -1
  317. package/web/.next/server/chunks/ssr/[root-of-the-server]__11w36a4le04vy._.js.map +0 -1
  318. package/web/.next/server/chunks/ssr/[root-of-the-server]__1k25lo5ka4mgd._.js +0 -3
  319. package/web/.next/server/chunks/ssr/[root-of-the-server]__1k25lo5ka4mgd._.js.map +0 -1
  320. package/web/.next/server/chunks/ssr/[root-of-the-server]__1yjb00o7x58xv._.js +0 -3
  321. package/web/.next/server/chunks/ssr/[root-of-the-server]__1yjb00o7x58xv._.js.map +0 -1
  322. package/web/.next/server/chunks/ssr/node_modules_0cyjln1rocvt5._.js +0 -3
  323. package/web/.next/server/chunks/ssr/node_modules_0cyjln1rocvt5._.js.map +0 -1
  324. package/web/.next/server/chunks/ssr/node_modules_1ins1z8o_qrka._.js +0 -3
  325. package/web/.next/server/chunks/ssr/node_modules_1ins1z8o_qrka._.js.map +0 -1
  326. package/web/.next/server/chunks/ssr/web_features_0i_kwiszuiqcp._.js +0 -3
  327. package/web/.next/server/chunks/ssr/web_features_0i_kwiszuiqcp._.js.map +0 -1
  328. package/web/.next/server/chunks/ssr/web_features_1--8ungjj--ht._.js +0 -3
  329. package/web/.next/server/chunks/ssr/web_features_1--8ungjj--ht._.js.map +0 -1
  330. package/web/.next/server/chunks/ssr/web_features_1qq_ruz59ldc9._.js +0 -3
  331. package/web/.next/server/chunks/ssr/web_features_1qq_ruz59ldc9._.js.map +0 -1
  332. package/web/.next/server/chunks/ssr/web_features_forms_form-state_ts_2142hiopykfk1._.js +0 -3
  333. package/web/.next/server/chunks/ssr/web_features_forms_form-state_ts_2142hiopykfk1._.js.map +0 -1
  334. package/web/.next/server/chunks/ssr/web_features_outside-party_ui_20x5u9bhxeehi._.js +0 -3
  335. package/web/.next/server/chunks/ssr/web_features_outside-party_ui_20x5u9bhxeehi._.js.map +0 -1
  336. package/web/.next/server/chunks/ssr/web_features_overview_16dyz2ngvs14b._.js +0 -3
  337. package/web/.next/static/chunks/183mifyxtyab5.css +0 -3
  338. package/web/.next/static/chunks/1bnlc-p1_cm01.js +0 -1
  339. package/web/.next/static/chunks/1ca21kggixrjz.js +0 -1
  340. package/web/.next/static/chunks/2-t4g6oq6tjkg.js +0 -1
  341. package/web/.next/static/chunks/2l27ty2dy2pb4.js +0 -1
  342. package/web/.next/static/chunks/2n2qsek2y94y5.js +0 -1
  343. package/web/.next/static/chunks/3tss77vu57zju.js +0 -1
  344. /package/web/.next/static/{3whgLnRJ9iJe_25h6KGzQ → wnr2MrrQvcto8MOm16D8r}/_buildManifest.js +0 -0
  345. /package/web/.next/static/{3whgLnRJ9iJe_25h6KGzQ → wnr2MrrQvcto8MOm16D8r}/_clientMiddlewareManifest.js +0 -0
  346. /package/web/.next/static/{3whgLnRJ9iJe_25h6KGzQ → wnr2MrrQvcto8MOm16D8r}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/meeting/state/meeting-controls.tsx","../../../../../web/features/meeting/hooks/data%3A97926a%20%3Ctext/javascript%3E","../../../../../web/features/meeting/hooks/data%3A231edd%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { ActionButton } from '../../overview/ui/action-button';\nimport { Notice } from '../../overview/ui/notice';\nimport type { ActionOutcome } from '../../overview/hooks/overview-actions';\nimport { changeMic, contribute, type OwnMicChange } from '../hooks/meeting-actions';\nimport type { MeetingControl } from '../services/meeting';\n\n/** Each mic control's words, and what it says while it works. */\nconst MIC_CONTROLS: Record<OwnMicChange, { label: string; pending: string }> = {\n request: { label: 'Request the mic', pending: 'Requesting...' },\n withdraw: { label: 'Withdraw my request', pending: 'Withdrawing...' },\n release: { label: 'Release the mic', pending: 'Releasing...' },\n};\n\n/**\n * What the person may do in the meeting now: write a contribution while they\n * hold the mic or moderate, and their own mic calls. A draft keeps one key\n * until it is taken, so a contribution tried again goes once. The page reads\n * itself again after each call.\n */\nexport function MeetingControls({ fleetId, meetingId, controls }: { fleetId: string; meetingId: string; controls: readonly MeetingControl[] }) {\n const router = useRouter();\n const [text, setText] = useState('');\n const [draftKey, setDraftKey] = useState(() => crypto.randomUUID());\n const [working, setWorking] = useState<MeetingControl | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n\n const run = ({ control, action, onDone }: { control: MeetingControl; action: () => Promise<ActionOutcome<undefined>>; onDone?: () => void }) => {\n setWorking(control);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await action();\n setWorking(undefined);\n if (outcome.isOk) {\n onDone?.();\n router.refresh();\n } else {\n setFailure(outcome.message);\n }\n });\n };\n\n const isWorking = working !== undefined;\n const micControls = controls.filter((control): control is OwnMicChange => control !== 'contribute');\n return (\n <div className=\"grid gap-3\">\n {controls.includes('contribute') ? (\n <div className=\"grid gap-2\">\n <label className=\"grid gap-1\">\n <span>Your contribution</span>\n <textarea\n data-testid=\"meeting-text\"\n rows={4}\n value={text}\n onChange={(event) => { setText(event.target.value); }}\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n <ActionButton\n data-testid=\"meeting-contribute\"\n variant=\"primary\"\n className=\"justify-self-start\"\n isPending={working === 'contribute'}\n pendingLabel=\"Sending...\"\n disabled={isWorking}\n onClick={() => {\n run({\n control: 'contribute',\n action: () => contribute({ fleet: fleetId, meetingId, text, idempotencyKey: draftKey }),\n onDone: () => {\n setText('');\n setDraftKey(crypto.randomUUID());\n },\n });\n }}\n >\n Contribute\n </ActionButton>\n </div>\n ) : null}\n {micControls.length === 0 ? null : (\n <div className=\"flex flex-wrap gap-2\">\n {micControls.map((change) => (\n <ActionButton\n key={change}\n data-testid={`meeting-${change}`}\n variant={change === 'request' ? 'primary' : 'secondary'}\n isPending={working === change}\n pendingLabel={MIC_CONTROLS[change].pending}\n disabled={isWorking}\n onClick={() => { run({ control: change, action: () => changeMic({ fleet: fleetId, meetingId, change }) }); }}\n >\n {MIC_CONTROLS[change].label}\n </ActionButton>\n ))}\n </div>\n )}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"402c3f4a58ce2be6200f615fad4c4a6aae87d2cee8\":{\"name\":\"changeMic\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"402c3f4a58ce2be6200f615fad4c4a6aae87d2cee8\",callServer,void 0,findSourceMapURL,\"changeMic\");export{$$RSC_SERVER_ACTION_1 as changeMic};","/* __next_internal_action_entry_do_not_use__ [{\"40b0532bec43dd2e7b8929465b389b6eaa110395a8\":{\"name\":\"contribute\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40b0532bec43dd2e7b8929465b389b6eaa110395a8\",callServer,void 0,findSourceMapURL,\"contribute\");export{$$RSC_SERVER_ACTION_0 as contribute};"],"names":["$$RSC_SERVER_ACTION_1"],"mappings":"uDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OCNyM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,aCAxI,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,cFYzb,EAAyE,CAC7E,QAAS,CAAE,MAAO,kBAAmB,QAAS,eAAgB,EAC9D,SAAU,CAAE,MAAO,sBAAuB,QAAS,gBAAiB,EACpE,QAAS,CAAE,MAAO,kBAAmB,QAAS,cAAe,CAC/D,2BAQO,SAAS,AAAgB,CAAE,SAAO,CAAE,WAAS,UAAE,CAAQ,CAA+E,EAC3I,IAAM,EAAS,CAAA,EAAA,EAAA,SAAS,AAAT,IACT,CAAC,EAAM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ACrF,OAAQ,KACN,EAAQ,IACR,EAAY,OAAO,UAAU,GAC/B,CACF,EACF,WACD,kBAID,KACH,AAAuB,MAAX,MAAM,CAAS,KAC1B,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,gCACZ,EAAY,GAAG,CAAC,AAAC,GAChB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAEX,cAAa,CAAC,QAAQ,EAAE,EAAA,CAAQ,CAChC,QAAoB,YAAX,EAAuB,UAAY,YAC5C,UAAW,IAAY,EACvB,aAAc,CAAY,CAAC,EAAO,CAAC,OAAO,CAC1C,SAAU,EACV,QAAS,KAAQ,EAAI,CAAE,QAAS,EAAQ,OAAQ,IAAM,EAAU,CAAE,MAAO,YAAS,SAAW,CAAO,EAAG,EAAI,WAE1G,CAAY,CAAC,EAAO,CAAC,KAAK,EARtB,WAaA,IAAZ,EAAwB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,CAAA,CAAC,QAAS,EAAS,SAAS,CAAA,CAAA,MAGzE"}
1
+ {"version":3,"sources":["../../../../../web/features/meeting/state/meeting-controls.tsx","../../../../../web/features/meeting/hooks/data%3A710ab7%20%3Ctext/javascript%3E","../../../../../web/features/meeting/hooks/data%3Aaf9570%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { ActionButton } from '../../overview/ui/action-button';\nimport { Notice } from '../../overview/ui/notice';\nimport type { ActionOutcome } from '../../overview/hooks/overview-actions';\nimport { changeMic, contribute, type OwnMicChange } from '../hooks/meeting-actions';\nimport type { MeetingControl } from '../services/meeting';\n\n/** Each mic control's words, and what it says while it works. */\nconst MIC_CONTROLS: Record<OwnMicChange, { label: string; pending: string }> = {\n request: { label: 'Request the mic', pending: 'Requesting...' },\n withdraw: { label: 'Withdraw my request', pending: 'Withdrawing...' },\n release: { label: 'Release the mic', pending: 'Releasing...' },\n};\n\n/**\n * What the person may do in the meeting now: write a contribution while they\n * hold the mic or moderate, and their own mic calls. A draft keeps one key\n * until it is taken, so a contribution tried again goes once. The page reads\n * itself again after each call.\n */\nexport function MeetingControls({ fleetId, meetingId, controls }: { fleetId: string; meetingId: string; controls: readonly MeetingControl[] }) {\n const router = useRouter();\n const [text, setText] = useState('');\n const [draftKey, setDraftKey] = useState(() => crypto.randomUUID());\n const [working, setWorking] = useState<MeetingControl | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n\n const run = ({ control, action, onDone }: { control: MeetingControl; action: () => Promise<ActionOutcome<undefined>>; onDone?: () => void }) => {\n setWorking(control);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await action();\n setWorking(undefined);\n if (outcome.isOk) {\n onDone?.();\n router.refresh();\n } else {\n setFailure(outcome.message);\n }\n });\n };\n\n const isWorking = working !== undefined;\n const micControls = controls.filter((control): control is OwnMicChange => control !== 'contribute');\n return (\n <div className=\"grid gap-3\">\n {controls.includes('contribute') ? (\n <div className=\"grid gap-2\">\n <label className=\"grid gap-1\">\n <span>Your contribution</span>\n <textarea\n data-testid=\"meeting-text\"\n rows={4}\n value={text}\n onChange={(event) => { setText(event.target.value); }}\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n <ActionButton\n data-testid=\"meeting-contribute\"\n variant=\"primary\"\n className=\"justify-self-start\"\n isPending={working === 'contribute'}\n pendingLabel=\"Sending...\"\n disabled={isWorking}\n onClick={() => {\n run({\n control: 'contribute',\n action: () => contribute({ fleet: fleetId, meetingId, text, idempotencyKey: draftKey }),\n onDone: () => {\n setText('');\n setDraftKey(crypto.randomUUID());\n },\n });\n }}\n >\n Contribute\n </ActionButton>\n </div>\n ) : null}\n {micControls.length === 0 ? null : (\n <div className=\"flex flex-wrap gap-2\">\n {micControls.map((change) => (\n <ActionButton\n key={change}\n data-testid={`meeting-${change}`}\n variant={change === 'request' ? 'primary' : 'secondary'}\n isPending={working === change}\n pendingLabel={MIC_CONTROLS[change].pending}\n disabled={isWorking}\n onClick={() => { run({ control: change, action: () => changeMic({ fleet: fleetId, meetingId, change }) }); }}\n >\n {MIC_CONTROLS[change].label}\n </ActionButton>\n ))}\n </div>\n )}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"407538588eafa59277711f2487cd440212bef1526d\":{\"name\":\"changeMic\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"407538588eafa59277711f2487cd440212bef1526d\",callServer,void 0,findSourceMapURL,\"changeMic\");export{$$RSC_SERVER_ACTION_1 as changeMic};","/* __next_internal_action_entry_do_not_use__ [{\"40070e1d29da0530feb5bb31e48e3f1ee981236d5a\":{\"name\":\"contribute\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40070e1d29da0530feb5bb31e48e3f1ee981236d5a\",callServer,void 0,findSourceMapURL,\"contribute\");export{$$RSC_SERVER_ACTION_0 as contribute};"],"names":["$$RSC_SERVER_ACTION_1"],"mappings":"uDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OCNyM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,aCAxI,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,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,CACC,cAAY,eACZ,KAAM,EACN,MAAO,EACP,SAAU,AAAC,IAAY,EAAQ,EAAM,MAAM,CAAC,KAAK,CAAG,EACpD,UAAU,wDAGd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CACX,cAAY,qBACZ,QAAQ,UACR,UAAU,qBACV,UAAuB,eAAZ,EACX,aAAa,aACb,SAAU,EACV,QAAS,KACP,EAAI,CACF,QAAS,aACT,OAAQ,IAAM,EAAW,CAAE,MAAO,YAAS,OAAW,EAAM,eAAgB,CAAS,GACrF,OAAQ,KACN,EAAQ,IACR,EAAY,OAAO,UAAU,GAC/B,CACF,EACF,WACD,kBAID,KACH,AAAuB,MAAX,MAAM,CAAS,KAC1B,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,gCACZ,EAAY,GAAG,CAAC,AAAC,GAChB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAEX,cAAa,CAAC,QAAQ,EAAE,EAAA,CAAQ,CAChC,QAAoB,YAAX,EAAuB,UAAY,YAC5C,UAAW,IAAY,EACvB,aAAc,CAAY,CAAC,EAAO,CAAC,OAAO,CAC1C,SAAU,EACV,QAAS,KAAQ,EAAI,CAAE,QAAS,EAAQ,OAAQ,IAAM,EAAU,CAAE,MAAO,YAAS,SAAW,CAAO,EAAG,EAAI,WAE1G,CAAY,CAAC,EAAO,CAAC,KAAK,EARtB,WAaA,IAAZ,EAAwB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,CAAA,CAAC,QAAS,EAAS,SAAS,CAAA,CAAA,MAGzE"}
@@ -1,3 +1,3 @@
1
- module.exports=[18434,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(30587),e=a.i(88412),f=a.i(36855),g=a.i(77237),h=a.i(5050);let i=(0,h.createServerReference)("603d48acf7914a939a2dd1c7e194f0e8b3f44c3bb3",h.callServer,void 0,h.findSourceMapURL,"switchOutsideParties");var j=a.i(47763);a.s(["SwitchCard",0,function({isOn:a,canSwitch:h,fleetId:k}){let[l,m]=(0,c.useActionState)(i,d.Q);return(0,b.jsxs)("section",{className:`${e.r} grid gap-3`,"data-testid":"outside-parties-switch",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-section font-semibold",children:["Outside parties are ",a?"on":"off"," ",a?(0,b.jsx)(j.T,{tone:"ok",label:"On"}):(0,b.jsx)(j.T,{tone:"ended",label:"Off"})]}),(0,b.jsx)("p",{className:"text-muted-foreground",children:a?"Approved outside MCP servers and clients reach the fleet, as its network rules allow.":"No outside MCP server or client reaches the fleet, and no request for one can be approved."}),"openNetwork"===l.kind?(0,b.jsxs)("form",{action:m,role:"alert",className:"grid gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg p-4 text-tone-attention-fg",children:[(0,b.jsx)("h3",{className:"font-semibold",children:"Open network"}),(0,b.jsx)("p",{children:l.message}),(0,b.jsx)("input",{type:"hidden",name:d.H,value:k}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:"true"}),(0,b.jsx)("input",{type:"hidden",name:"isOpenNetworkConfirmed",value:"true"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(g.f,{kind:"destructive",pending:"Turning on…",testId:"outside-parties-turn-on-anyway",children:"Turn on anyway"}),(0,b.jsx)("a",{className:e.x.secondary,href:"",children:"Keep off"})]})]}):h?(0,b.jsxs)("form",{action:m,children:[(0,b.jsx)("input",{type:"hidden",name:d.H,value:k}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:String(!a)}),(0,b.jsx)(g.f,{kind:a?"secondary":"primary",pending:a?"Turning off…":"Turning on…",testId:"outside-parties-turn",children:a?"Turn off":"Turn on"})]}):(0,b.jsxs)("p",{className:"text-muted-foreground",children:["Turning them on or off needs ","fleet:network","."]}),"openNetwork"===l.kind?null:(0,b.jsx)(f.f,{state:l})]})}],18434)}];
1
+ module.exports=[18434,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(30587),e=a.i(88412),f=a.i(36855),g=a.i(77237),h=a.i(5050);let i=(0,h.createServerReference)("60524375d4d6c00fa1586ec7e0298fe0edb3f68ddd",h.callServer,void 0,h.findSourceMapURL,"switchOutsideParties");var j=a.i(47763);a.s(["SwitchCard",0,function({isOn:a,canSwitch:h,fleetId:k}){let[l,m]=(0,c.useActionState)(i,d.Q);return(0,b.jsxs)("section",{className:`${e.r} grid gap-3`,"data-testid":"outside-parties-switch",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-section font-semibold",children:["Outside parties are ",a?"on":"off"," ",a?(0,b.jsx)(j.T,{tone:"ok",label:"On"}):(0,b.jsx)(j.T,{tone:"ended",label:"Off"})]}),(0,b.jsx)("p",{className:"text-muted-foreground",children:a?"Approved outside MCP servers and clients reach the fleet, as its network rules allow.":"No outside MCP server or client reaches the fleet, and no request for one can be approved."}),"openNetwork"===l.kind?(0,b.jsxs)("form",{action:m,role:"alert",className:"grid gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg p-4 text-tone-attention-fg",children:[(0,b.jsx)("h3",{className:"font-semibold",children:"Open network"}),(0,b.jsx)("p",{children:l.message}),(0,b.jsx)("input",{type:"hidden",name:d.H,value:k}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:"true"}),(0,b.jsx)("input",{type:"hidden",name:"isOpenNetworkConfirmed",value:"true"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(g.f,{kind:"destructive",pending:"Turning on…",testId:"outside-parties-turn-on-anyway",children:"Turn on anyway"}),(0,b.jsx)("a",{className:e.x.secondary,href:"",children:"Keep off"})]})]}):h?(0,b.jsxs)("form",{action:m,children:[(0,b.jsx)("input",{type:"hidden",name:d.H,value:k}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:String(!a)}),(0,b.jsx)(g.f,{kind:a?"secondary":"primary",pending:a?"Turning off…":"Turning on…",testId:"outside-parties-turn",children:a?"Turn off":"Turn on"})]}):(0,b.jsxs)("p",{className:"text-muted-foreground",children:["Turning them on or off needs ","fleet:network","."]}),"openNetwork"===l.kind?null:(0,b.jsx)(f.f,{state:l})]})}],18434)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/outside-parties/ui/switch-card.tsx","../../../../../web/features/outside-parties/data%3A13ca35%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useActionState } from 'react';\n\nimport { FLEET_FIELD, IDLE } from '../../forms/form-state';\nimport { BUTTONS, CARD } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { switchOutsideParties } from '../actions';\nimport { StatusBadge } from './status-badge';\n\n/** The scope that turns outside parties on or off (0056). */\nconst SWITCHING_SCOPE = 'fleet:network';\n\n/**\n * Whether the fleet's outside parties are on, and the switch for an account\n * holding fleet:network. An open network's warning asks to confirm, or to\n * keep them off.\n */\nexport function SwitchCard({ isOn, canSwitch, fleetId }: { isOn: boolean; canSwitch: boolean; fleetId: string }) {\n const [state, formAction] = useActionState(switchOutsideParties, IDLE);\n return (\n <section className={`${CARD} grid gap-3`} data-testid=\"outside-parties-switch\">\n <h2 className=\"flex items-center gap-2 text-section font-semibold\">\n Outside parties are {isOn ? 'on' : 'off'} {isOn ? <StatusBadge tone=\"ok\" label=\"On\" /> : <StatusBadge tone=\"ended\" label=\"Off\" />}\n </h2>\n <p className=\"text-muted-foreground\">\n {isOn ? 'Approved outside MCP servers and clients reach the fleet, as its network rules allow.' : 'No outside MCP server or client reaches the fleet, and no request for one can be approved.'}\n </p>\n {state.kind === 'openNetwork' ? (\n <form action={formAction} role=\"alert\" className=\"grid gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg p-4 text-tone-attention-fg\">\n <h3 className=\"font-semibold\">Open network</h3>\n <p>{state.message}</p>\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"isOn\" value=\"true\" />\n <input type=\"hidden\" name=\"isOpenNetworkConfirmed\" value=\"true\" />\n <div className=\"flex gap-2\">\n <SubmitButton kind=\"destructive\" pending=\"Turning on…\" testId=\"outside-parties-turn-on-anyway\">\n Turn on anyway\n </SubmitButton>\n <a className={BUTTONS.secondary} href=\"\">\n Keep off\n </a>\n </div>\n </form>\n ) : canSwitch ? (\n <form action={formAction}>\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"isOn\" value={String(!isOn)} />\n <SubmitButton kind={isOn ? 'secondary' : 'primary'} pending={isOn ? 'Turning off…' : 'Turning on…'} testId=\"outside-parties-turn\">\n {isOn ? 'Turn off' : 'Turn on'}\n </SubmitButton>\n </form>\n ) : (\n <p className=\"text-muted-foreground\">Turning them on or off needs {SWITCHING_SCOPE}.</p>\n )}\n {state.kind === 'openNetwork' ? null : <Outcome state={state} />}\n </section>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"603d48acf7914a939a2dd1c7e194f0e8b3f44c3bb3\":{\"name\":\"switchOutsideParties\"}},\"web/features/outside-parties/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"603d48acf7914a939a2dd1c7e194f0e8b3f44c3bb3\",callServer,void 0,findSourceMapURL,\"switchOutsideParties\");export{$$RSC_SERVER_ACTION_0 as switchOutsideParties};"],"names":["$$RSC_SERVER_ACTION_0"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCP8M,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,E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AA,CAAI,UAAU,uBACb,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,KAAK,cAAc,QAAQ,cAAc,OAAO,0CAAiC,mBAG/F,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAW,EAAA,CAAO,CAAC,SAAS,CAAE,KAAK,YAAG,mBAK3C,EACF,CAAA,EAAA,EAAA,IAAA,EAAC,OAAA,CAAK,OAAQ,YACZ,CAAA,EAAA,EAAA,GAAA,EAAC,QAAA,CAAM,KAAK,SAAS,KAAM,EAAA,CAAW,CAAE,MAAO,IAC/C,CAAA,EAAA,EAAA,GAAA,EAAC,QAAA,CAAM,KAAK,SAAS,KAAK,OAAO,MAAO,OAAO,CAAC,KAChD,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,KAAM,EAAO,YAAc,UAAW,QAAS,EAAO,eAAiB,cAAe,OAAO,gCACxG,EAAO,WAAa,eAIzB,CAAA,EAAA,EAAA,IAAA,EAAC,IAAA,CAAE,UAAU,kCAAwB,gCA1CrB,gBA0CmE,OAErE,gBAAf,EAAM,IAAI,CAAqB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAO,CAAA,CAAC,MAAO,MAG7D"}
1
+ {"version":3,"sources":["../../../../../web/features/outside-parties/ui/switch-card.tsx","../../../../../web/features/outside-parties/data%3Ac50d9d%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useActionState } from 'react';\n\nimport { FLEET_FIELD, IDLE } from '../../forms/form-state';\nimport { BUTTONS, CARD } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { switchOutsideParties } from '../actions';\nimport { StatusBadge } from './status-badge';\n\n/** The scope that turns outside parties on or off (0056). */\nconst SWITCHING_SCOPE = 'fleet:network';\n\n/**\n * Whether the fleet's outside parties are on, and the switch for an account\n * holding fleet:network. An open network's warning asks to confirm, or to\n * keep them off.\n */\nexport function SwitchCard({ isOn, canSwitch, fleetId }: { isOn: boolean; canSwitch: boolean; fleetId: string }) {\n const [state, formAction] = useActionState(switchOutsideParties, IDLE);\n return (\n <section className={`${CARD} grid gap-3`} data-testid=\"outside-parties-switch\">\n <h2 className=\"flex items-center gap-2 text-section font-semibold\">\n Outside parties are {isOn ? 'on' : 'off'} {isOn ? <StatusBadge tone=\"ok\" label=\"On\" /> : <StatusBadge tone=\"ended\" label=\"Off\" />}\n </h2>\n <p className=\"text-muted-foreground\">\n {isOn ? 'Approved outside MCP servers and clients reach the fleet, as its network rules allow.' : 'No outside MCP server or client reaches the fleet, and no request for one can be approved.'}\n </p>\n {state.kind === 'openNetwork' ? (\n <form action={formAction} role=\"alert\" className=\"grid gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg p-4 text-tone-attention-fg\">\n <h3 className=\"font-semibold\">Open network</h3>\n <p>{state.message}</p>\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"isOn\" value=\"true\" />\n <input type=\"hidden\" name=\"isOpenNetworkConfirmed\" value=\"true\" />\n <div className=\"flex gap-2\">\n <SubmitButton kind=\"destructive\" pending=\"Turning on…\" testId=\"outside-parties-turn-on-anyway\">\n Turn on anyway\n </SubmitButton>\n <a className={BUTTONS.secondary} href=\"\">\n Keep off\n </a>\n </div>\n </form>\n ) : canSwitch ? (\n <form action={formAction}>\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"isOn\" value={String(!isOn)} />\n <SubmitButton kind={isOn ? 'secondary' : 'primary'} pending={isOn ? 'Turning off…' : 'Turning on…'} testId=\"outside-parties-turn\">\n {isOn ? 'Turn off' : 'Turn on'}\n </SubmitButton>\n </form>\n ) : (\n <p className=\"text-muted-foreground\">Turning them on or off needs {SWITCHING_SCOPE}.</p>\n )}\n {state.kind === 'openNetwork' ? null : <Outcome state={state} />}\n </section>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60524375d4d6c00fa1586ec7e0298fe0edb3f68ddd\":{\"name\":\"switchOutsideParties\"}},\"web/features/outside-parties/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60524375d4d6c00fa1586ec7e0298fe0edb3f68ddd\",callServer,void 0,findSourceMapURL,\"switchOutsideParties\");export{$$RSC_SERVER_ACTION_0 as switchOutsideParties};"],"names":["$$RSC_SERVER_ACTION_0"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCP8M,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,wBDSnc,IAAA,EAAA,EAAA,CAAA,CAAA,2BAUO,SAAS,AAAW,MAAE,CAAI,WAAE,CAAS,SAAE,CAAO,CAA0D,EAC7G,GAAM,CAAC,EAAO,EAAW,CAAG,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAsB,EAAA,CAAI,EACrE,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,UAAA,CAAQ,UAAW,CAAA,EAAG,EAAA,CAAI,CAAC,WAAW,CAAC,CAAE,cAAY,mCACpD,CAAA,EAAA,EAAA,IAAA,EAAC,KAAA,CAAG,UAAU,+DAAqD,uBAC5C,EAAO,KAAO,MAAM,IAAE,EAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAW,CAAA,CAAC,KAAK,KAAK,MAAM,OAAU,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAW,CAAA,CAAC,KAAK,QAAQ,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AC,IAAA,CAAE,UAAU,kCAAwB,gCA1CrB,gBA0CmE,OAErE,gBAAf,EAAM,IAAI,CAAqB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAO,CAAA,CAAC,MAAO,MAG7D"}
@@ -0,0 +1,3 @@
1
+ (()=>{"use strict";module.exports=[69717,a=>{let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AgentNeeds() from the server but AgentNeeds is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/web/features/outside-party/tools-table/ui/agent-needs.tsx","AgentNeeds");a.s(["AgentNeeds",0,b])},4741,a=>{var b=a.i(69717);a.n(b)},64256,a=>{let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call ToolsTable() from the server but ToolsTable is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/web/features/outside-party/tools-table/ui/tools-table.tsx","ToolsTable");a.s(["ToolsTable",0,b])},46736,a=>{var b=a.i(64256);a.n(b)},9181,a=>{var b=a.i(7997),c=a.i(717),d=a.i(55476),e=a.i(66283),f=a.i(29493),g=a.i(49144),h=a.i(65253),i=a.i(72913),j=a.i(1130),k=a.i(98323),l=a.i(4741),m=a.i(46736);async function n({api:a,name:b}){let c=await (0,e.F)(a.parties.approving.query({name:b})),d=c.isOk&&c.value.isApproving,f=d?await (0,e.F)(a.parties.listedScopes.query()):void 0;return{canChange:d&&f?.isOk===!0,listed:f?.isOk===!0?f.value.scopes:null,reason:c.isOk?c.value.isApproving?f?.isOk===!1?f.refusal:null:c.value.reason:c.refusal}}async function o({api:a,fleetId:c,name:d,isApprover:f}){let[g,h,i]=await Promise.all([(0,e.F)(a.parties.tools.query({name:d})),(0,e.F)(a.parties.scopeRequirements.query({name:d})),f?n({api:a,name:d}):{canChange:!1,listed:null,reason:null}]);return h.isOk?(0,b.jsxs)("div",{className:"grid gap-3",children:[null===i.reason?null:(0,b.jsxs)("p",{className:"text-muted-foreground","data-testid":"tools-table-read-only-reason",children:["You see these read-only: ",i.reason]}),(0,b.jsx)(m.ToolsTable,{fleetId:c,party:d,tools:function({read:a,requirements:b}){let c=new Map(b.tools.map(({tool:a,scopes:b})=>[a,b]));return a.isOk?a.value.tools.map(a=>({...a,scopes:c.get(a.name)??[]})):b.tools.map(({tool:a,scopes:b})=>({name:a,isOn:null,isNew:!1,scopes:b}))}({read:g,requirements:h.value}),version:h.value.version,partyScopes:h.value.party,listed:i.listed,canChange:i.canChange,serverRefusal:g.isOk?null:g.refusal})]}):(0,b.jsx)("p",{className:"text-muted-foreground",children:h.refusal})}function p({party:a}){return(0,b.jsxs)("div",{"aria-busy":"true","aria-label":`Reading the tools ${a} lists`,className:"grid gap-2","data-testid":"tools-table-skeleton",children:[(0,b.jsx)("span",{className:"block h-9 w-full animate-pulse rounded-md bg-muted"}),Array.from({length:8},(a,c)=>(0,b.jsx)("span",{className:"block h-10 animate-pulse rounded-md bg-muted"},c))]})}var q=a.i(35670);let r="fleet:owner",s="scopes:grant",t="gateway:approve";function u({fleetId:a}){return(0,b.jsx)("a",{href:(0,d.i)(i.$,a),className:"text-muted-foreground hover:text-foreground",children:"← Outside parties"})}function v({children:a}){return(0,b.jsx)("p",{role:"alert",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:a})}let w={mcpServer:"Address",mcpClient:"Client id",a2aClient:"Address",a2aAgent:"Card address"},x=(0,b.jsx)("span",{className:"text-muted-foreground",children:"Not known"});function y({label:a,children:c}){return(0,b.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[10rem_1fr]",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:a}),(0,b.jsx)("dd",{className:"flex flex-wrap items-center gap-2",children:c})]})}function z({party:a}){let{protocol:c,side:d}=h.G[a.kind],e=h.Y[a.state];return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("h1",{className:"text-title font-semibold",children:a.name}),(0,b.jsx)(k.E,{children:c}),(0,b.jsx)(k.E,{children:h.N[d].one}),(0,b.jsx)(k.T,{tone:e.tone,label:e.label})]})}async function A({page:a,name:m}){let{api:B,fleetId:C,scopes:D}=a,E=await (0,e.F)(B.parties.get.query({name:m}));if(!E.isOk)return(0,b.jsxs)("div",{className:"grid gap-4",children:[(0,b.jsx)(u,{fleetId:C}),(0,b.jsx)(v,{children:E.refusal})]});let F=E.value,G=(0,h.M)(F),H=D.includes(t),[I,J]=await Promise.all(["a2aClient"===F.kind?(0,e.F)(B.parties.cardAddresses.query({name:m})):void 0,"a2aAgent"===F.kind?Promise.all([(0,e.F)(B.parties.scopeRequirements.query({name:m})),H?n({api:B,name:m}):{canChange:!1,listed:null,reason:null}]):void 0]),K=(0,b.jsx)("a",{href:(0,d.i)((0,i.N)(F.name,"change"),C),className:"text-primary hover:underline","data-testid":"outside-party-change",children:"Change"});return(0,b.jsxs)("div",{className:"grid gap-4",children:[(0,b.jsx)(u,{fleetId:C}),(0,b.jsx)(z,{party:F}),(0,b.jsxs)("dl",{className:`${g.r} grid gap-3`,children:[(0,b.jsx)(y,{label:"Proxy ship",children:F.proxyShipName??x}),(0,b.jsxs)(y,{label:"Owner",children:[F.ownerName??x,D.includes(r)?K:null]}),(0,b.jsxs)(y,{label:"Scopes",children:[null===F.scopes?x:F.scopes.map(a=>{let c;return(0,b.jsx)(k.E,{children:(c=j.K.safeParse(a)).success?j.q[c.data]:a},a)}),D.includes(s)?K:null]}),"mcpServer"===F.kind||"a2aAgent"===F.kind?(0,b.jsx)(y,{label:"Credential",children:f.x.find(({kind:a})=>a===F.credentialKind)?.label}):null,null===G?null:(0,b.jsx)(y,{label:w[F.kind],children:(0,b.jsx)("span",{className:"font-mono",children:G})}),"a2aAgent"===F.kind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y,{label:"Messages at once",children:F.concurrencyLimit}),(0,b.jsx)(y,{label:"Needs",children:void 0===J?null:J[0].isOk?(0,b.jsx)(l.AgentNeeds,{fleetId:C,party:F.name,version:J[0].value.version,scopes:J[0].value.party,listed:J[1].listed,canChange:J[1].canChange}):(0,b.jsx)("span",{className:"text-muted-foreground",children:J[0].refusal})}),(0,b.jsx)(y,{label:"Repeatable",children:D.includes(t)?(0,b.jsx)(q.RepeatableSwitch,{fleetId:C,party:F.name,isRepeatable:F.isRepeatable}):(0,b.jsx)(k.E,{children:F.isRepeatable?"Repeatable":"Not repeatable"})})]}):null]}),"mcpServer"===F.kind?(0,b.jsxs)("section",{className:`${g.r} grid gap-3`,"data-testid":"outside-party-tools",children:[(0,b.jsx)("h2",{className:"text-section font-semibold",children:"Tools"}),(0,b.jsxs)("p",{className:"text-muted-foreground",children:["The fleet may call only the tools switched on, and a calling ship must hold every scope a tool needs; every ship that may reach ",F.name," reaches the same tools. ",H?null:"Changing them needs gateway:approve."]}),(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)(p,{party:F.name}),children:(0,b.jsx)(o,{api:B,fleetId:C,name:F.name,isApprover:H})})]}):null,void 0===I?null:(0,b.jsxs)("section",{className:`${g.r} grid gap-2`,"data-testid":"outside-party-cards",children:[(0,b.jsxs)("h2",{className:"flex justify-between text-section font-semibold",children:[(0,b.jsx)("span",{children:"Card addresses"}),I.isOk?(0,b.jsx)("span",{children:I.value.addresses.length}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground",children:"One per ship its proxy ship reaches now. Its owner hands them to the client."}),I.isOk?0===I.value.addresses.length?(0,b.jsx)("p",{className:"text-muted-foreground",children:"It reaches no ship now."}):(0,b.jsx)("ul",{className:"grid gap-1",children:I.value.addresses.map(a=>(0,b.jsx)("li",{className:"break-all font-mono text-code",children:a},a))}):(0,b.jsx)("p",{className:"text-muted-foreground",children:I.refusal})]}),D.includes("fleet:manage")?(0,b.jsx)("div",{children:(0,b.jsxs)("a",{className:g.x.secondary,href:(0,d.i)((0,i.N)(F.name,"retire"),C),"data-testid":"outside-party-retire",children:["Retire ",F.name,"…"]})}):null]})}a.s(["N",0,t,"W",0,u,"p",0,s,"J",0,r,"b",0,A,"y",0,v],9181)},56786,a=>{let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call RepeatableSwitch() from the server but RepeatableSwitch is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/web/features/outside-party/ui/repeatable-switch.tsx","RepeatableSwitch");a.s(["RepeatableSwitch",0,b])},35670,a=>{var b=a.i(56786);a.n(b)}]})();
2
+
3
+ //# sourceMappingURL=web_features_outside-party_0_9c27knfvw7u._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../web/features/outside-party/tools-table/ui/agent-needs.tsx/__nextjs-internal-proxy.mjs%20%7B%20server%20%3D%3E%20%22%5Bproject%5D/web/features/outside-party/tools-table/ui/agent-needs.tsx%22%20%7D","../../../../../web/features/outside-party/tools-table/ui/tools-table.tsx/__nextjs-internal-proxy.mjs%20%7B%20server%20%3D%3E%20%22%5Bproject%5D/web/features/outside-party/tools-table/ui/tools-table.tsx%22%20%7D","../../../../../web/features/outside-party/ui/outside-party.tsx","../../../../../web/features/outside-parties/scope-words.ts","../../../../../web/features/outside-party/tools-table/table-tools.ts","../../../../../web/features/outside-party/tools-table/ui/tools-section.tsx","../../../../../web/features/outside-party/tools-table/ui/tools-skeleton.tsx","../../../../../web/features/outside-party/ui/repeatable-switch.tsx/__nextjs-internal-proxy.mjs%20%7B%20server%20%3D%3E%20%22%5Bproject%5D/web/features/outside-party/ui/repeatable-switch.tsx%22%20%7D"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const AgentNeeds = registerClientReference(\n function() { throw new Error(\"Attempted to call AgentNeeds() from the server but AgentNeeds is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/web/features/outside-party/tools-table/ui/agent-needs.tsx\",\n \"AgentNeeds\",\n);\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const ToolsTable = registerClientReference(\n function() { throw new Error(\"Attempted to call ToolsTable() from the server but ToolsTable is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/web/features/outside-party/tools-table/ui/tools-table.tsx\",\n \"ToolsTable\",\n);\n","import { Suspense, type ReactNode } from 'react';\n\nimport { inFleet } from '../../../lib/gateway-api/page-account';\nimport { readOf, type SignedInPage } from '../../../lib/gateway-api/page-api';\nimport { CREDENTIAL_KINDS } from '../../forms/server-credential';\nimport { BUTTONS, CARD } from '../../forms/ui/look';\nimport { outsideAddressOf, PARTY_KINDS, PARTY_STATES, SIDES, type ListedParty } from '../../outside-parties/party-kinds';\nimport { OUTSIDE_PARTIES_PATH, partyPath } from '../../outside-parties/paths';\nimport { scopeWords } from '../../outside-parties/scope-words';\nimport { StatusBadge, Tag } from '../../outside-parties/ui/status-badge';\nimport { AgentNeeds } from '../tools-table/ui/agent-needs';\nimport { approvalOf, ToolsSection } from '../tools-table/ui/tools-section';\nimport { ToolsSkeleton } from '../tools-table/ui/tools-skeleton';\nimport { RepeatableSwitch } from './repeatable-switch';\n\n/** The scopes that change a party's owner, its scopes, and retire it (0056). */\nexport const OWNING_SCOPE = 'fleet:owner';\nexport const GRANTING_SCOPE = 'scopes:grant';\nexport const RETIRING_SCOPE = 'fleet:manage';\n\n/** The scope that switches a server's tools (aeolus-fleet#1151) and marks an A2A agent (A9). */\nexport const APPROVING_SCOPE = 'gateway:approve';\n\n/** The way back to the list, in the page's fleet. */\nexport function Back({ fleetId }: { fleetId: string }) {\n return (\n <a href={inFleet(OUTSIDE_PARTIES_PATH, fleetId)} className=\"text-muted-foreground hover:text-foreground\">\n ← Outside parties\n </a>\n );\n}\n\n/** Why the API refused: said in place of the page. */\nexport function Refusal({ children }: { children: ReactNode }) {\n return (\n <p role=\"alert\" className=\"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\">\n {children}\n </p>\n );\n}\n\n/** What a party's outside address is called on its page. */\nconst ADDRESS_LABELS: Record<ListedParty['kind'], string> = { mcpServer: 'Address', mcpClient: 'Client id', a2aClient: 'Address', a2aAgent: 'Card address' };\n\nconst UNKNOWN = <span className=\"text-muted-foreground\">Not known</span>;\n\nfunction Fact({ label, children }: { label: string; children: ReactNode }) {\n return (\n <div className=\"grid gap-1 sm:grid-cols-[10rem_1fr]\">\n <dt className=\"text-muted-foreground\">{label}</dt>\n <dd className=\"flex flex-wrap items-center gap-2\">{children}</dd>\n </div>\n );\n}\n\n/** The party's head: its name, protocol, side and state. */\nexport function PartyHead({ party }: { party: ListedParty }) {\n const { protocol, side } = PARTY_KINDS[party.kind];\n const state = PARTY_STATES[party.state];\n return (\n <div className=\"flex flex-wrap items-center gap-2\">\n <h1 className=\"text-title font-semibold\">{party.name}</h1>\n <Tag>{protocol}</Tag>\n <Tag>{SIDES[side].one}</Tag>\n <StatusBadge tone={state.tone} label={state.label} />\n </div>\n );\n}\n\n/**\n * One outside party (design B, screens 12 and 14): its proxy ship's state,\n * then its facts as the fleet holds them, and for an MCP server the tools\n * it lists now as a table, with the switch and the scopes each needs\n * (aeolus-fleet#1151, gateway scopes 4.3); for an A2A agent the scopes it\n * needs and its repeatable mark, a switch for an approver (A9). Each control shows only to an account holding\n * its scope; the API checks it again.\n */\nexport async function OutsideParty({ page, name }: { page: SignedInPage; name: string }) {\n const { api, fleetId, scopes } = page;\n const read = await readOf(api.parties.get.query({ name }));\n if (!read.isOk) {\n return (\n <div className=\"grid gap-4\">\n <Back fleetId={fleetId} />\n <Refusal>{read.refusal}</Refusal>\n </div>\n );\n }\n const party = read.value;\n const address = outsideAddressOf(party);\n const isApprover = scopes.includes(APPROVING_SCOPE);\n const [cards, agentNeeds] = await Promise.all([\n party.kind === 'a2aClient' ? readOf(api.parties.cardAddresses.query({ name })) : undefined,\n party.kind === 'a2aAgent' ? Promise.all([readOf(api.parties.scopeRequirements.query({ name })), isApprover ? approvalOf({ api, name }) : { canChange: false, listed: null, reason: null }]) : undefined,\n ]);\n const change = (\n <a href={inFleet(partyPath(party.name, 'change'), fleetId)} className=\"text-primary hover:underline\" data-testid=\"outside-party-change\">\n Change\n </a>\n );\n return (\n <div className=\"grid gap-4\">\n <Back fleetId={fleetId} />\n <PartyHead party={party} />\n <dl className={`${CARD} grid gap-3`}>\n <Fact label=\"Proxy ship\">{party.proxyShipName ?? UNKNOWN}</Fact>\n <Fact label=\"Owner\">\n {party.ownerName ?? UNKNOWN}\n {scopes.includes(OWNING_SCOPE) ? change : null}\n </Fact>\n <Fact label=\"Scopes\">\n {party.scopes === null\n ? UNKNOWN\n : party.scopes.map((scope) => <Tag key={scope}>{scopeWords(scope)}</Tag>)}\n {scopes.includes(GRANTING_SCOPE) ? change : null}\n </Fact>\n {party.kind === 'mcpServer' || party.kind === 'a2aAgent' ? <Fact label=\"Credential\">{CREDENTIAL_KINDS.find(({ kind }) => kind === party.credentialKind)?.label}</Fact> : null}\n {address === null ? null : (\n <Fact label={ADDRESS_LABELS[party.kind]}>\n <span className=\"font-mono\">{address}</span>\n </Fact>\n )}\n {party.kind === 'a2aAgent' ? (\n <>\n <Fact label=\"Messages at once\">{party.concurrencyLimit}</Fact>\n <Fact label=\"Needs\">\n {agentNeeds === undefined ? null : agentNeeds[0].isOk ? (\n <AgentNeeds fleetId={fleetId} party={party.name} version={agentNeeds[0].value.version} scopes={agentNeeds[0].value.party} listed={agentNeeds[1].listed} canChange={agentNeeds[1].canChange} />\n ) : (\n <span className=\"text-muted-foreground\">{agentNeeds[0].refusal}</span>\n )}\n </Fact>\n <Fact label=\"Repeatable\">\n {scopes.includes(APPROVING_SCOPE) ? <RepeatableSwitch fleetId={fleetId} party={party.name} isRepeatable={party.isRepeatable} /> : <Tag>{party.isRepeatable ? 'Repeatable' : 'Not repeatable'}</Tag>}\n </Fact>\n </>\n ) : null}\n </dl>\n {party.kind === 'mcpServer' ? (\n <section className={`${CARD} grid gap-3`} data-testid=\"outside-party-tools\">\n <h2 className=\"text-section font-semibold\">Tools</h2>\n <p className=\"text-muted-foreground\">\n The fleet may call only the tools switched on, and a calling ship must hold every scope a tool needs; every ship that may reach {party.name} reaches the same tools. {isApprover ? null : 'Changing them needs gateway:approve.'}\n </p>\n <Suspense fallback={<ToolsSkeleton party={party.name} />}>\n <ToolsSection api={api} fleetId={fleetId} name={party.name} isApprover={isApprover} />\n </Suspense>\n </section>\n ) : null}\n {cards === undefined ? null : (\n <section className={`${CARD} grid gap-2`} data-testid=\"outside-party-cards\">\n <h2 className=\"flex justify-between text-section font-semibold\">\n <span>Card addresses</span>\n {cards.isOk ? <span>{cards.value.addresses.length}</span> : null}\n </h2>\n <p className=\"text-muted-foreground\">One per ship its proxy ship reaches now. Its owner hands them to the client.</p>\n {!cards.isOk ? (\n <p className=\"text-muted-foreground\">{cards.refusal}</p>\n ) : cards.value.addresses.length === 0 ? (\n <p className=\"text-muted-foreground\">It reaches no ship now.</p>\n ) : (\n <ul className=\"grid gap-1\">\n {cards.value.addresses.map((address) => (\n <li key={address} className=\"break-all font-mono text-code\">\n {address}\n </li>\n ))}\n </ul>\n )}\n </section>\n )}\n {scopes.includes(RETIRING_SCOPE) ? (\n <div>\n <a className={BUTTONS.secondary} href={inFleet(partyPath(party.name, 'retire'), fleetId)} data-testid=\"outside-party-retire\">\n Retire {party.name}…\n </a>\n </div>\n ) : null}\n </div>\n );\n}\n","import { CORE_SCOPE_DESCRIPTIONS, scopeSchema } from '@aeolus-fleet/common';\n\n/** A scope in plain words: what a core scope allows, as the fleet words it (decision 0046); a plugin's scope by its name. */\nexport function scopeWords(scope: string): string {\n const core = scopeSchema.safeParse(scope);\n return core.success ? CORE_SCOPE_DESCRIPTIONS[core.data] : scope;\n}\n","/**\n * The rows of an outside MCP server's tools table (gateway scopes 4.3):\n * each tool the server lists now, with its switch, the hints it gives and\n * the scopes it needs of its own; and the filters an approver narrows them by.\n */\nimport type { Read } from '../../../lib/gateway-api/page-api';\n\n/** A tool as the server lists it now, with its switch, as the API answers it. */\nexport interface ListedTool {\n name: string;\n description?: string | undefined;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n isOn: boolean;\n isNew: boolean;\n}\n\n/** A party's required scopes as the API answers them. */\nexport interface PartyRequirements {\n version: number;\n party: string[];\n tools: { tool: string; scopes: string[] }[];\n}\n\n/** One row: the tool, its switch (unknown while the server does not answer), and the scopes it needs of its own. */\nexport interface TableTool {\n name: string;\n description?: string | undefined;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n isOn: boolean | null;\n isNew: boolean;\n scopes: readonly string[];\n}\n\n/**\n * The rows: every tool the server lists with what it needs; while the server\n * does not answer, the requirements kept per tool name, so they can still be\n * read and changed.\n */\nexport function tableToolsOf({ read, requirements }: { read: Read<{ tools: ListedTool[] }>; requirements: PartyRequirements }): TableTool[] {\n const own = new Map(requirements.tools.map(({ tool, scopes }) => [tool, scopes]));\n if (!read.isOk) {\n return requirements.tools.map(({ tool, scopes }) => ({ name: tool, isOn: null, isNew: false, scopes }));\n }\n return read.value.tools.map((tool) => ({ ...tool, scopes: own.get(tool.name) ?? [] }));\n}\n\n/** The table's state filter. */\nexport const STATE_FILTERS = [\n { state: 'all', label: 'All' },\n { state: 'on', label: 'On' },\n { state: 'off', label: 'Off' },\n { state: 'new', label: 'New' },\n { state: 'needsNothing', label: 'Needs nothing' },\n] as const;\n\nexport type StateFilter = (typeof STATE_FILTERS)[number]['state'];\n\nfunction isInState(tool: TableTool, { state, partyScopes }: { state: StateFilter; partyScopes: readonly string[] }): boolean {\n switch (state) {\n case 'all':\n return true;\n case 'on':\n return tool.isOn === true;\n case 'off':\n return tool.isOn === false;\n case 'new':\n return tool.isNew;\n case 'needsNothing':\n return partyScopes.length === 0 && tool.scopes.length === 0;\n }\n}\n\n/** The tools whose name holds the text, in any case, and that are in the state picked. */\nexport function shownTools(tools: readonly TableTool[], filter: { name: string; state: StateFilter; partyScopes: readonly string[] }): TableTool[] {\n const name = filter.name.trim().toLowerCase();\n return tools.filter((tool) => tool.name.toLowerCase().includes(name) && isInState(tool, filter));\n}\n\n/** What the page kept since it read the rows: each changed tool's own scopes, and each switched tool's switch. */\nexport interface KeptChanges {\n scopes: ReadonlyMap<string, readonly string[]>;\n switches: ReadonlyMap<string, boolean>;\n}\n\n/** The rows with what was kept since they were read, so a change shows at once rather than when the page reads the server again. */\nexport function keptToolsOf(tools: readonly TableTool[], kept: KeptChanges): TableTool[] {\n return tools.map((tool) => ({ ...tool, scopes: kept.scopes.get(tool.name) ?? tool.scopes, isOn: tool.isOn === null ? null : (kept.switches.get(tool.name) ?? tool.isOn) }));\n}\n","import type { GatewayApi } from '../../../../lib/gateway-api/gateway-api';\nimport { readOf } from '../../../../lib/gateway-api/page-api';\nimport { tableToolsOf } from '../table-tools';\nimport { ToolsTable } from './tools-table';\n\n/** Whether the actor approves the party, and the scopes the fleet lists when it does: what the controls need. */\nexport async function approvalOf({ api, name }: { api: GatewayApi; name: string }) {\n const approving = await readOf(api.parties.approving.query({ name }));\n const canChange = approving.isOk && approving.value.isApproving;\n const listed = canChange ? await readOf(api.parties.listedScopes.query()) : undefined;\n return {\n canChange: canChange && listed?.isOk === true,\n listed: listed?.isOk === true ? listed.value.scopes : null,\n /** Why the controls are not shown, when the actor holds gateway:approve but may not use them now. */\n reason: approving.isOk ? (approving.value.isApproving ? (listed?.isOk === false ? listed.refusal : null) : approving.value.reason) : approving.refusal,\n };\n}\n\n/**\n * An outside MCP server's tools section (gateway scopes 4.3): the tools the\n * server lists now, the scopes each needs, and whether the actor may change\n * them, read side by side. It streams in behind skeleton rows, as the\n * server's tools/list may take a while.\n */\nexport async function ToolsSection({ api, fleetId, name, isApprover }: { api: GatewayApi; fleetId: string; name: string; isApprover: boolean }) {\n const [read, requirements, approval] = await Promise.all([\n readOf(api.parties.tools.query({ name })),\n readOf(api.parties.scopeRequirements.query({ name })),\n isApprover ? approvalOf({ api, name }) : { canChange: false, listed: null, reason: null },\n ]);\n if (!requirements.isOk) {\n return <p className=\"text-muted-foreground\">{requirements.refusal}</p>;\n }\n return (\n <div className=\"grid gap-3\">\n {approval.reason === null ? null : (\n <p className=\"text-muted-foreground\" data-testid=\"tools-table-read-only-reason\">\n You see these read-only: {approval.reason}\n </p>\n )}\n <ToolsTable\n fleetId={fleetId}\n party={name}\n tools={tableToolsOf({ read, requirements: requirements.value })}\n version={requirements.value.version}\n partyScopes={requirements.value.party}\n listed={approval.listed}\n canChange={approval.canChange}\n serverRefusal={read.isOk ? null : read.refusal}\n />\n </div>\n );\n}\n","/** How many rows the table shows while the server's tools/list is read. */\nconst SKELETON_ROWS = 8;\n\n/** The tools table's shape while the server's tools/list is read (gateway scopes 4.3). */\nexport function ToolsSkeleton({ party }: { party: string }) {\n return (\n <div aria-busy=\"true\" aria-label={`Reading the tools ${party} lists`} className=\"grid gap-2\" data-testid=\"tools-table-skeleton\">\n <span className=\"block h-9 w-full animate-pulse rounded-md bg-muted\" />\n {Array.from({ length: SKELETON_ROWS }, (_, row) => (\n <span key={row} className=\"block h-10 animate-pulse rounded-md bg-muted\" />\n ))}\n </div>\n );\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const RepeatableSwitch = registerClientReference(\n function() { throw new Error(\"Attempted to call RepeatableSwitch() from the server but RepeatableSwitch is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/web/features/outside-party/ui/repeatable-switch.tsx\",\n \"RepeatableSwitch\",\n);\n"],"names":["AgentNeeds","Error","ToolsTable","scopeWords","scope","core","safeParse","success","data","RepeatableSwitch"],"mappings":"6CAEO,IAAMA,EAAa,CAAA,EAAA,AAD1B,EAAA,CAAA,CAAA,OAC0B,uBAAA,AAAuB,EAC7C,WAAa,MAAUC,AAAJ,MAAU,kOAAoO,EACjQ,sEACA,mFCHG,IAAMC,EAAa,CAAA,EAD1B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EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,iCAAwB,4BAErC,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,sBACX,EAAM,KAAK,CAAC,SAAS,CAAC,GAAG,CAAE,AAAD,GACzB,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAiB,UAAU,yCACzB,GADM,MANb,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,iCAAyB,EAAM,OAAO,MAcxD,EAAO,QAAQ,CAAC,AAzJO,gBA0JtB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,UACC,CAAA,EAAA,EAAA,IAAA,EAAC,IAAA,CAAE,UAAW,EAAA,CAAO,CAAC,SAAS,CAAE,KAAM,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,CAAA,EAAA,EAAA,CAAA,AAAS,EAAC,EAAM,IAAI,CAAE,UAAW,GAAU,cAAY,iCAAuB,UACnH,EAAM,IAAI,CAAC,SAGrB,OAGV,wEKlLO,IAAMK,EAAmB,CAAA,EADhC,AACgC,EADhC,CAAA,CAAA,OACgC,uBAAA,AAAuB,EACnD,WAAa,MAAM,AAAIR,MAAM,8OAAgP,EAC7Q,gEACA","ignoreList":[0,1,7]}
@@ -1,3 +1,3 @@
1
- module.exports=[94705,a=>{"use strict";var b=a.i(37936),c=a.i(18558);a.i(70396);var d=a.i(73727),e=a.i(55476),f=a.i(66283),g=a.i(1324),h=a.i(72913),i=a.i(18379),j=a.i(13095);let k="name";async function l(a,b){let c=(0,g.v)(b,g.H),j=(0,g.v)(b,k),l=await (0,f.z)(c);try{let[a,c]=await Promise.all([l.parties.get.query({name:j}),l.account.inView.query()]),d=(0,i.t)(a,{form:(0,g.O)(b),scopes:"signedIn"===c.kind?c.scopes:[]});if("refused"===d.kind)return d;void 0!==d.ownerShipId&&await l.parties.changeOwner.mutate({name:j,ownerShipId:d.ownerShipId}),(d.grant.length>0||d.revoke.length>0)&&await l.parties.changeScopes.mutate({name:j,grant:d.grant,revoke:d.revoke})}catch(a){return{kind:"refused",message:(0,f.s)(a)}}(0,d.redirect)((0,e.i)((0,h.N)(j),c))}async function m(a,b){let d=(0,g.v)(b,g.H),e=(0,g.v)(b,k),i=await (0,f.z)(d);try{let{tool:a,isOn:d,statementRefusal:f}=await i.parties.switchTool.mutate({name:e,tool:(0,g.v)(b,"tool"),isOn:"true"===(0,g.v)(b,"isOn")});return(0,c.revalidatePath)((0,h.N)(e)),{kind:"switched",isOn:d,message:function({tool:a,isOn:b,statementRefusal:c}){let d=`${a} is ${b?"on":"off"}`;return null!==c?`${d}; the fleet sees it at the proxy ship's next statement: ${c}`:b?`${d}: the fleet may call it.`:`${d}: the fleet sees it no more, and a call to it is refused.`}({tool:a,isOn:d,statementRefusal:f})}}catch(a){return{kind:"refused",message:(0,f.s)(a)}}}async function n(a,b){let d=(0,g.v)(b,g.H),e=(0,g.v)(b,k),i=await (0,f.z)(d);try{let{isRepeatable:a,statementRefusal:d}=await i.parties.markA2aAgent.mutate({name:e,isRepeatable:"true"===(0,g.v)(b,"isRepeatable")});return(0,c.revalidatePath)((0,h.N)(e)),{kind:"marked",isRepeatable:a,message:function({name:a,isRepeatable:b,statementRefusal:c}){let d=`${a} is ${b?"repeatable":"not repeatable"}`;return null!==c?`${d}; the fleet sees it at the proxy ship's next statement: ${c}`:b?`${d}: a message that died before it confirmed it is handed again.`:`${d}: a message that died before it confirmed it is not handed again, as it may have run.`}({name:e,isRepeatable:a,statementRefusal:d})}}catch(a){return{kind:"refused",message:(0,f.s)(a)}}}async function o(a,b){let c=(0,g.v)(b,g.H),i=await (0,f.z)(c);try{await i.parties.retire.mutate({name:(0,g.v)(b,k)})}catch(a){return{kind:"refused",message:(0,f.s)(a)}}(0,d.redirect)((0,e.i)(h.$,c))}(0,j.ensureServerEntryExports)([l,m,n,o]),(0,b.registerServerReference)(l,"608ab6cfffc2114f840c36dc13ca12626fe0ac1287",null),(0,b.registerServerReference)(m,"60843dc8cdfba379c08634bd86c9ae1e6e20250457",null),(0,b.registerServerReference)(n,"609a0ac1fb8cf591f09ebeb0982ac9feae9848f7f9",null),(0,b.registerServerReference)(o,"6052d97ad8b5960f9b566565ef67965a41ebc6141e",null),a.s(["v",0,l,"o",0,n,"t",0,o,"z",0,m],94705)}];
1
+ module.exports=[94705,a=>{"use strict";var b=a.i(37936),c=a.i(18558);a.i(70396);var d=a.i(73727),e=a.i(55476),f=a.i(66283),g=a.i(1324),h=a.i(72913),i=a.i(18379),j=a.i(13095);let k="name";async function l(a,b){let c=(0,g.v)(b,g.H),j=(0,g.v)(b,k),l=await (0,f.z)(c);try{let[a,c]=await Promise.all([l.parties.get.query({name:j}),l.account.inView.query()]),d=(0,i.t)(a,{form:(0,g.O)(b),scopes:"signedIn"===c.kind?c.scopes:[]});if("refused"===d.kind)return d;void 0!==d.ownerShipId&&await l.parties.changeOwner.mutate({name:j,ownerShipId:d.ownerShipId}),(d.grant.length>0||d.revoke.length>0)&&await l.parties.changeScopes.mutate({name:j,grant:d.grant,revoke:d.revoke})}catch(a){return{kind:"refused",message:(0,f.s)(a)}}(0,d.redirect)((0,e.i)((0,h.N)(j),c))}function m(a){return{isOk:!1,message:(0,f.s)(a),isConflict:"CONFLICT"===(0,f.U)(a)}}async function n(a){let{fleetId:b,...d}=a,e=await (0,f.z)(b);try{let{version:a,statementRefusal:b}=await e.parties.setScopeRequirements.mutate(d);return(0,c.revalidatePath)((0,h.N)(d.name)),{isOk:!0,version:a,statementRefusal:b}}catch(a){return m(a)}}async function o(a){let{fleetId:b,...d}=a,e=await (0,f.z)(b);try{let{statementRefusal:a}=await e.parties.switchTools.mutate(d);return(0,c.revalidatePath)((0,h.N)(d.name)),{isOk:!0,version:null,statementRefusal:a}}catch(a){return m(a)}}async function p(a,b){let d=(0,g.v)(b,g.H),e=(0,g.v)(b,k),i=await (0,f.z)(d);try{let{isRepeatable:a,statementRefusal:d}=await i.parties.markA2aAgent.mutate({name:e,isRepeatable:"true"===(0,g.v)(b,"isRepeatable")});return(0,c.revalidatePath)((0,h.N)(e)),{kind:"marked",isRepeatable:a,message:function({name:a,isRepeatable:b,statementRefusal:c}){let d=`${a} is ${b?"repeatable":"not repeatable"}`;return null!==c?`${d}; the fleet sees it at the proxy ship's next statement: ${c}`:b?`${d}: a message that died before it confirmed it is handed again.`:`${d}: a message that died before it confirmed it is not handed again, as it may have run.`}({name:e,isRepeatable:a,statementRefusal:d})}}catch(a){return{kind:"refused",message:(0,f.s)(a)}}}async function q(a,b){let c=(0,g.v)(b,g.H),i=await (0,f.z)(c);try{await i.parties.retire.mutate({name:(0,g.v)(b,k)})}catch(a){return{kind:"refused",message:(0,f.s)(a)}}(0,d.redirect)((0,e.i)(h.$,c))}(0,j.ensureServerEntryExports)([l,n,o,p,q]),(0,b.registerServerReference)(l,"600cf1a8901e0ac6d6426275868f04bcdac025ede0",null),(0,b.registerServerReference)(n,"40dad6e23692304530c149129641a4a94433905443",null),(0,b.registerServerReference)(o,"40e82407011c6d236a4a2c8db8e53c307a6e8aa98f",null),(0,b.registerServerReference)(p,"60566e54974f37ea23543482d9cf63a66aa5f76a47",null),(0,b.registerServerReference)(q,"60fba1793c7b1fc178b8dc82db711bb4ed74328d86",null),a.s(["v",0,l,"o",0,p,"t",0,q,"L",0,n,"M",0,o],94705)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_outside-party_actions_ts_102ar5pdowf8s._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/outside-party/actions.ts","../../../../../web/features/outside-party/marked-message.ts","../../../../../web/features/outside-party/switched-message.ts"],"sourcesContent":["'use server';\n\n/**\n * One outside party's forms, as the account signed in (decision 0056):\n * changing its owner and scopes, switching a server's tools, marking an\n * A2A agent repeatable or not, and retiring it. Each asks the API, which\n * checks the account's scopes; a refusal is said on the form.\n */\nimport { revalidatePath } from 'next/cache';\nimport { redirect } from 'next/navigation';\n\nimport { inFleet } from '../../lib/gateway-api/page-account';\nimport { refusalMessageOf, requestApi } from '../../lib/gateway-api/page-api';\nimport { FLEET_FIELD, fieldOf, fieldsOf, type FormState } from '../forms/form-state';\nimport { OUTSIDE_PARTIES_PATH, partyPath } from '../outside-parties/paths';\nimport { changesOf } from './scope-changes';\nimport { markedMessageOf } from './marked-message';\nimport { switchedMessageOf } from './switched-message';\n\n/** The field a party's form names it by. */\nconst NAME_FIELD = 'name';\n\nexport async function changeParty(_previous: FormState, form: FormData): Promise<FormState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const name = fieldOf(form, NAME_FIELD);\n const api = await requestApi(fleetId);\n try {\n const [party, account] = await Promise.all([api.parties.get.query({ name }), api.account.inView.query()]);\n const changes = changesOf(party, { form: fieldsOf(form), scopes: account.kind === 'signedIn' ? account.scopes : [] });\n if (changes.kind === 'refused') {\n return changes;\n }\n if (changes.ownerShipId !== undefined) {\n await api.parties.changeOwner.mutate({ name, ownerShipId: changes.ownerShipId });\n }\n if (changes.grant.length > 0 || changes.revoke.length > 0) {\n await api.parties.changeScopes.mutate({ name, grant: changes.grant, revoke: changes.revoke });\n }\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n redirect(inFleet(partyPath(name), fleetId));\n}\n\n/** How one tool's switch ended: as it stands now and what the fleet sees, or why the API refused it. */\nexport type ToolSwitchState = { kind: 'idle' } | { kind: 'switched'; isOn: boolean; message: string } | { kind: 'refused'; message: string };\n\nexport async function switchPartyTool(_previous: ToolSwitchState, form: FormData): Promise<ToolSwitchState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const name = fieldOf(form, NAME_FIELD);\n const api = await requestApi(fleetId);\n try {\n const { tool, isOn, statementRefusal } = await api.parties.switchTool.mutate({ name, tool: fieldOf(form, 'tool'), isOn: fieldOf(form, 'isOn') === 'true' });\n revalidatePath(partyPath(name));\n return { kind: 'switched', isOn, message: switchedMessageOf({ tool, isOn, statementRefusal }) };\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n}\n\n/** How an A2A agent's repeatable mark ended: as it stands now and what it means, or why the API refused it. */\nexport type MarkState = { kind: 'idle' } | { kind: 'marked'; isRepeatable: boolean; message: string } | { kind: 'refused'; message: string };\n\nexport async function markA2aAgent(_previous: MarkState, form: FormData): Promise<MarkState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const name = fieldOf(form, NAME_FIELD);\n const api = await requestApi(fleetId);\n try {\n const { isRepeatable, statementRefusal } = await api.parties.markA2aAgent.mutate({ name, isRepeatable: fieldOf(form, 'isRepeatable') === 'true' });\n revalidatePath(partyPath(name));\n return { kind: 'marked', isRepeatable, message: markedMessageOf({ name, isRepeatable, statementRefusal }) };\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n}\n\nexport async function retireParty(_previous: FormState, form: FormData): Promise<FormState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const api = await requestApi(fleetId);\n try {\n await api.parties.retire.mutate({ name: fieldOf(form, NAME_FIELD) });\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n redirect(inFleet(OUTSIDE_PARTIES_PATH, fleetId));\n}\n","/** What an A2A agent's repeatable mark says once the API kept it (A9): what a message that died unconfirmed comes to, or that the proxy ship shows it at its next statement, and why. */\nexport function markedMessageOf({ name, isRepeatable, statementRefusal }: { name: string; isRepeatable: boolean; statementRefusal: string | null }): string {\n const state = `${name} is ${isRepeatable ? 'repeatable' : 'not repeatable'}`;\n if (statementRefusal !== null) {\n return `${state}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n }\n return isRepeatable ? `${state}: a message that died before it confirmed it is handed again.` : `${state}: a message that died before it confirmed it is not handed again, as it may have run.`;\n}\n","/** What a tool's switch says once the API kept it: what the fleet sees now, or that the proxy ship shows it at its next statement, and why. */\nexport function switchedMessageOf({ tool, isOn, statementRefusal }: { tool: string; isOn: boolean; statementRefusal: string | null }): string {\n const state = `${tool} is ${isOn ? 'on' : 'off'}`;\n if (statementRefusal !== null) {\n return `${state}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n }\n return isOn ? `${state}: the fleet may call it.` : `${state}: the fleet sees it no more, and a call to it is refused.`;\n}\n"],"names":["markedMessageOf","name","isRepeatable","statementRefusal","state"],"mappings":"wDAQA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,oBAKA,IAAM,EAAa,OAEZ,eAAe,EAAY,CAAoB,CAAE,CAAc,EACpE,IAAM,EAAU,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAM,EAAA,CAAW,EACnC,EAAO,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAM,GACrB,EAAM,MAAM,CAAA,EAAA,EAAA,CAAA,AAAU,EAAC,GAC7B,GAAI,CACF,GAAM,CAAC,EAAO,EAAQ,CAAG,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAE,CAAK,GAAI,EAAI,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,EAClG,EAAU,CAAA,EAAA,EAAA,CAAA,AAAS,EAAC,EAAO,CAAE,KAAM,CAAA,EAAA,EAAA,CAAA,AAAQ,EAAC,GAAO,OAAyB,aAAjB,EAAQ,IAAI,CAAkB,EAAQ,MAAM,CAAG,EAAE,AAAC,GACnH,GAAqB,WAAW,CAA5B,EAAQ,IAAI,CACd,OAAO,CAEmB,UAAxB,CAAmC,CAA3B,WAAW,EACrB,MAAM,EAAI,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,MAAE,EAAM,YAAa,EAAQ,WAAW,AAAC,GAE5E,GAAQ,KAAK,CAAC,MAAM,CAAG,GAAK,EAAQ,MAAM,CAAC,MAAM,EAAG,GAAG,AACzD,M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,EACpE,IAAM,EAAU,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAM,EAAA,CAAW,EACnC,EAAM,MAAM,CAAA,EAAA,EAAA,CAAA,AAAU,EAAC,GAC7B,GAAI,CACF,MAAM,EAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAE,KAAM,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAM,EAAY,EACpE,CAAE,MAAO,EAAO,CACd,MAAO,CAAE,KAAM,UAAW,QAAS,CAAA,EAAA,EAAA,CAAA,AAAgB,EAAC,EAAO,CAC7D,CACA,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAA,CAAoB,CAAE,GACzC,iCA/DsB,EAyBA,EAgBA,EAaA,IAtDA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAyBA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAgBA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA"}
1
+ {"version":3,"sources":["../../../../../web/features/outside-party/actions.ts","../../../../../web/features/outside-party/marked-message.ts"],"sourcesContent":["'use server';\n\n/**\n * One outside party's forms, as the account signed in (decision 0056):\n * changing its owner and scopes, switching a server's tools and setting the\n * scopes a party needs, marking an A2A agent repeatable or not, and retiring it. Each asks the API, which\n * checks the account's scopes; a refusal is said on the form.\n */\nimport { revalidatePath } from 'next/cache';\nimport { redirect } from 'next/navigation';\n\nimport { inFleet } from '../../lib/gateway-api/page-account';\nimport { refusalCodeOf, refusalMessageOf, requestApi } from '../../lib/gateway-api/page-api';\nimport { FLEET_FIELD, fieldOf, fieldsOf, type FormState } from '../forms/form-state';\nimport { OUTSIDE_PARTIES_PATH, partyPath } from '../outside-parties/paths';\nimport { changesOf } from './scope-changes';\nimport { markedMessageOf } from './marked-message';\n\n/** The field a party's form names it by. */\nconst NAME_FIELD = 'name';\n\nexport async function changeParty(_previous: FormState, form: FormData): Promise<FormState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const name = fieldOf(form, NAME_FIELD);\n const api = await requestApi(fleetId);\n try {\n const [party, account] = await Promise.all([api.parties.get.query({ name }), api.account.inView.query()]);\n const changes = changesOf(party, { form: fieldsOf(form), scopes: account.kind === 'signedIn' ? account.scopes : [] });\n if (changes.kind === 'refused') {\n return changes;\n }\n if (changes.ownerShipId !== undefined) {\n await api.parties.changeOwner.mutate({ name, ownerShipId: changes.ownerShipId });\n }\n if (changes.grant.length > 0 || changes.revoke.length > 0) {\n await api.parties.changeScopes.mutate({ name, grant: changes.grant, revoke: changes.revoke });\n }\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n redirect(inFleet(partyPath(name), fleetId));\n}\n\n/** How a change on a party's page ended (gateway scopes 4.3): kept, at the requirements' new version when it changed them, or refused with why, CONFLICT told apart for its Reload. */\nexport type TableOutcome = { isOk: true; version: number | null; statementRefusal: string | null } | { isOk: false; message: string; isConflict: boolean };\n\nfunction refusedOutcome(error: unknown): TableOutcome {\n return { isOk: false, message: refusalMessageOf(error), isConflict: refusalCodeOf(error) === 'CONFLICT' };\n}\n\n/** Sets the scopes a party needs, its own set when sent and each tool's sent, all at once on the version the page read. */\nexport async function setPartyScopes(change: { fleetId: string; name: string; version: number; party?: string[]; tools: { tool: string; scopes: string[] }[] }): Promise<TableOutcome> {\n const { fleetId, ...input } = change;\n const api = await requestApi(fleetId);\n try {\n const { version, statementRefusal } = await api.parties.setScopeRequirements.mutate(input);\n revalidatePath(partyPath(input.name));\n return { isOk: true, version, statementRefusal };\n } catch (error) {\n return refusedOutcome(error);\n }\n}\n\n/** Switches the tools selected on a server's page on or off, in one change. */\nexport async function switchPartyTools(change: { fleetId: string; name: string; tools: string[]; isOn: boolean }): Promise<TableOutcome> {\n const { fleetId, ...input } = change;\n const api = await requestApi(fleetId);\n try {\n const { statementRefusal } = await api.parties.switchTools.mutate(input);\n revalidatePath(partyPath(input.name));\n return { isOk: true, version: null, statementRefusal };\n } catch (error) {\n return refusedOutcome(error);\n }\n}\n\n/** How an A2A agent's repeatable mark ended: as it stands now and what it means, or why the API refused it. */\nexport type MarkState = { kind: 'idle' } | { kind: 'marked'; isRepeatable: boolean; message: string } | { kind: 'refused'; message: string };\n\nexport async function markA2aAgent(_previous: MarkState, form: FormData): Promise<MarkState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const name = fieldOf(form, NAME_FIELD);\n const api = await requestApi(fleetId);\n try {\n const { isRepeatable, statementRefusal } = await api.parties.markA2aAgent.mutate({ name, isRepeatable: fieldOf(form, 'isRepeatable') === 'true' });\n revalidatePath(partyPath(name));\n return { kind: 'marked', isRepeatable, message: markedMessageOf({ name, isRepeatable, statementRefusal }) };\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n}\n\nexport async function retireParty(_previous: FormState, form: FormData): Promise<FormState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const api = await requestApi(fleetId);\n try {\n await api.parties.retire.mutate({ name: fieldOf(form, NAME_FIELD) });\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error) };\n }\n redirect(inFleet(OUTSIDE_PARTIES_PATH, fleetId));\n}\n","/** What an A2A agent's repeatable mark says once the API kept it (A9): what a message that died unconfirmed comes to, or that the proxy ship shows it at its next statement, and why. */\nexport function markedMessageOf({ name, isRepeatable, statementRefusal }: { name: string; isRepeatable: boolean; statementRefusal: string | null }): string {\n const state = `${name} is ${isRepeatable ? 'repeatable' : 'not repeatable'}`;\n if (statementRefusal !== null) {\n return `${state}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n }\n return isRepeatable ? `${state}: a message that died before it confirmed it is handed again.` : `${state}: a message that died before it confirmed it is not handed again, as it may have run.`;\n}\n"],"names":["state","markedMessageOf","name","isRepeatable","statementRefusal"],"mappings":"wDAQA,EAAA,EAAA,CAAA,CAAA,OAC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,KAAM,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAM,EAAY,EACpE,CAAE,MAAO,EAAO,CACd,MAAO,CAAE,KAAM,UAAW,QAAS,CAAA,EAAA,EAAA,CAAA,AAAgB,EAAC,EAAO,CAC7D,CACA,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,EAAA,CAAoB,CAAE,GACzC,iCAhFsB,EA8BA,EAaA,EAeA,EAaA,IAvEA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MA8BA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAeA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA"}
@@ -0,0 +1,3 @@
1
+ (()=>{"use strict";module.exports=[25964,a=>{var b=a.i(72131),c=a.i(50944);a.s(["LiveRefresh",0,function({fleetId:a}){let d;return d=(0,c.useRouter)(),(0,b.useEffect)(()=>{let b=new EventSource(`/overview/changes?fleet=${encodeURIComponent(a)}`);return b.onmessage=()=>{d.refresh()},()=>{b.close()}},[a,d]),(0,b.useEffect)(()=>{let b,c=()=>{let c="visible"===document.visibilityState&&document.hasFocus();c&&void 0===b?b=new EventSource(`/overview/focus?fleet=${encodeURIComponent(a)}`):c||void 0===b||(b.close(),b=void 0)};return c(),window.addEventListener("focus",c),window.addEventListener("blur",c),document.addEventListener("visibilitychange",c),()=>{window.removeEventListener("focus",c),window.removeEventListener("blur",c),document.removeEventListener("visibilitychange",c),b?.close()}},[a]),null}],25964)},1542,a=>{var b=a.i(87924);let c={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};a.s(["f",0,function({isPending:a,pendingLabel:d,variant:e="secondary",children:f,className:g="",disabled:h,...i}){return(0,b.jsx)("button",{...i,disabled:!0===h||a,"aria-busy":a,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${c[e]} ${g}`,children:a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),d]}):f})}])},24229,a=>{var b=a.i(87924);a.s(["f",0,function({message:a,isFailure:c}){return c?(0,b.jsx)("p",{role:"alert","data-testid":"overview-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:a}):(0,b.jsx)("p",{role:"status","data-testid":"overview-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:a})}])}]})();
2
+
3
+ //# sourceMappingURL=web_features_overview_0udx5lm8igils._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/overview/hooks/use-focus-report.ts","../../../../../web/features/overview/hooks/use-live-refresh.ts","../../../../../web/features/overview/state/live-refresh.tsx","../../../../../web/features/overview/ui/action-button.tsx","../../../../../web/features/overview/ui/notice.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\n\n/** The stream the page holds while in focus, which the web app's server follows on the gateway's API for the browser. */\nexport const FOCUS_PATH = '/overview/focus';\n\n/**\n * Tells the gateway while the page is in focus (wake a person, W6): it holds\n * the focus stream open while the window has focus and the page shows, and\n * closes it when either ends. While a page of the person is in focus, what\n * arrives is shown there and no wake goes out; an open page not in focus\n * changes nothing. A lost connection no longer counts as in focus.\n */\nexport function useFocusReport(fleetId: string): void {\n useEffect(() => {\n let focus: EventSource | undefined;\n const report = () => {\n const isInFocus = document.visibilityState === 'visible' && document.hasFocus();\n if (isInFocus && focus === undefined) {\n focus = new EventSource(`${FOCUS_PATH}?fleet=${encodeURIComponent(fleetId)}`);\n } else if (!isInFocus && focus !== undefined) {\n focus.close();\n focus = undefined;\n }\n };\n report();\n window.addEventListener('focus', report);\n window.addEventListener('blur', report);\n document.addEventListener('visibilitychange', report);\n return () => {\n window.removeEventListener('focus', report);\n window.removeEventListener('blur', report);\n document.removeEventListener('visibilitychange', report);\n focus?.close();\n };\n }, [fleetId]);\n}\n","'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useEffect } from 'react';\n\n/** The page's live updates, which the web app's server follows on the gateway's API for the browser. */\nexport const CHANGES_PATH = '/overview/changes';\n\n/**\n * Keeps the page in step with its fleet's requests: whenever one changes,\n * the page reads itself again on the server, as its own caller. The browser\n * opens the stream again by itself when it drops.\n */\nexport function useLiveRefresh(fleetId: string): void {\n const router = useRouter();\n useEffect(() => {\n const changes = new EventSource(`${CHANGES_PATH}?fleet=${encodeURIComponent(fleetId)}`);\n changes.onmessage = () => {\n router.refresh();\n };\n return () => {\n changes.close();\n };\n }, [fleetId, router]);\n}\n","'use client';\n\nimport { useFocusReport } from '../hooks/use-focus-report';\nimport { useLiveRefresh } from '../hooks/use-live-refresh';\n\n/** Keeps the page it sits in live, and tells the gateway while it is in focus (wake a person, W6): it shows nothing itself. */\nexport function LiveRefresh({ fleetId }: { fleetId: string }) {\n useLiveRefresh(fleetId);\n useFocusReport(fleetId);\n return null;\n}\n","import type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nconst VARIANTS = {\n primary: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'border border-border bg-card text-card-foreground hover:bg-accent',\n} as const;\n\n/**\n * A button for an action: the moment it is pressed and until the answer\n * comes, it shows a spinner and its working label, and cannot run twice.\n */\nexport function ActionButton({\n isPending,\n pendingLabel,\n variant = 'secondary',\n children,\n className = '',\n disabled,\n ...button\n}: ButtonHTMLAttributes<HTMLButtonElement> & { isPending: boolean; pendingLabel: string; variant?: keyof typeof VARIANTS; children: ReactNode }) {\n return (\n <button\n {...button}\n disabled={disabled === true || isPending}\n aria-busy={isPending}\n className={`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${VARIANTS[variant]} ${className}`}\n >\n {isPending ? (\n <>\n <span aria-hidden=\"true\" className=\"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n {pendingLabel}\n </>\n ) : (\n children\n )}\n </button>\n );\n}\n","/** What an action came to, said in place: a success as a status, a failure as an alert by the control. */\nexport function Notice({ message, isFailure }: { message: string; isFailure: boolean }) {\n return isFailure ? (\n <p role=\"alert\" data-testid=\"overview-failure\" className=\"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\">\n {message}\n </p>\n ) : (\n <p role=\"status\" data-testid=\"overview-success\" className=\"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg\">\n {message}\n </p>\n );\n}\n"],"names":["FOCUS_PATH","useFocusReport","fleetId","focus","report","isInFocus","document","visibilityState","hasFocus","undefined","EventSource","encodeURIComponent","close","window","addEventListener","removeEventListener","VARIANTS","primary","secondary","ActionButton","isPending","pendingLabel","variant","children","className","disabled","button"],"mappings":"6CAEA,IAAA,EAAA,EAAA,CAAA,CAAA,OCAA,EAAA,EAAA,CAAA,CAAA,4BCIO,SAAS,AAAY,SAAE,CAAO,CAAuB,QAG1D,ODKM,EAAS,CAAA,EAAA,EAAA,SAAA,AAAS,IACxB,CAAA,EAAA,EAAA,SAAA,AAAS,EAAC,KACR,IAAM,EAAU,IAAI,YAAY,GAAG,aAAa,OAAO,IAAE,mBAAmB,ACT/D,IDSyE,EAItF,OAHA,EAAQ,SAAS,CAAG,KAClB,EAAO,OAAO,EAChB,EACO,KACL,EAAQ,KAAK,EACf,CACFO,EAAG,GAAU,EAAO,EDRpB,CAAA,EAAA,EAAA,SAAA,AAAS,EAAC,KAER,IADIJ,EACEC,EAAS,KACb,IAAMC,EAAyC,YAA7BC,SAASC,eAAe,EAAkBD,SAASE,QAAQ,EACzEH,SAAuBI,IAAVN,EACfA,EAAQ,GAD4B,CACxBO,YAAY,GAAGV,WAAW,OAAO,IAAEW,mBAAmBT,IAAU,EAClEG,QAAuBI,IAAVN,IACvBA,EAAMS,CADsC,IACjC,GACXT,OAAQM,EAEZ,EAKA,OAJAL,IACAS,OAAOC,gBAAgB,CAAC,QAASV,GACjCS,OAAOC,gBAAgB,CAAC,OAAQV,GAChCE,SAASQ,gBAAgB,CAAC,mBAAoBV,GACvC,KACLS,OAAOE,mBAAmB,CAAC,QAASX,GACpCS,OAAOE,mBAAmB,CAAC,OAAQX,GACnCE,SAASS,mBAAmB,CAAC,mBAAoBX,GACjDD,GAAOS,OACT,CACF,EAAG,CE5BY,EF4BH,EE3BL,IACT,2CCRA,IAAMI,EAAW,CACfC,QAAS,4DACTC,UAAW,mEACb,aAMO,SAASC,AAAa,WAC3BC,CAAS,cACTC,CAAY,SACZC,EAAU,WAAW,UACrBC,CAAQ,WACRC,EAAY,EAAE,UACdC,CAAQ,CACR,GAAGC,EAC0I,EAC7I,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACE,GAAGA,CAAM,CACVD,UAAuB,IAAbA,GAAqBL,EAC/B,YAAWA,EACXI,UAAW,CAAC,mGAAmG,EAAER,CAAQ,CAACM,EAAQ,CAAC,CAAC,EAAEE,EAAAA,CAAW,UAEhJJ,EACC,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,QAAA,CAAA,WACE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,cAAY,OAAOI,UAAU,oFAClCH,KAGHE,GAIR,oBCpCO,SAAS,AAAO,SAAE,CAAO,WAAE,CAAS,CAA2C,EACpF,OAAO,EACL,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,KAAK,QAAQ,cAAY,mBAAmB,UAAU,gHACtD,IAGH,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,KAAK,SAAS,cAAY,mBAAmB,UAAU,2FACvD,GAGP"}
1
+ {"version":3,"sources":["../../../../../web/features/overview/hooks/use-focus-report.ts","../../../../../web/features/overview/hooks/use-live-refresh.ts","../../../../../web/features/overview/state/live-refresh.tsx","../../../../../web/features/overview/ui/action-button.tsx","../../../../../web/features/overview/ui/notice.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\n\n/** The stream the page holds while in focus, which the web app's server follows on the gateway's API for the browser. */\nexport const FOCUS_PATH = '/overview/focus';\n\n/**\n * Tells the gateway while the page is in focus (wake a person, W6): it holds\n * the focus stream open while the window has focus and the page shows, and\n * closes it when either ends. While a page of the person is in focus, what\n * arrives is shown there and no wake goes out; an open page not in focus\n * changes nothing. A lost connection no longer counts as in focus.\n */\nexport function useFocusReport(fleetId: string): void {\n useEffect(() => {\n let focus: EventSource | undefined;\n const report = () => {\n const isInFocus = document.visibilityState === 'visible' && document.hasFocus();\n if (isInFocus && focus === undefined) {\n focus = new EventSource(`${FOCUS_PATH}?fleet=${encodeURIComponent(fleetId)}`);\n } else if (!isInFocus && focus !== undefined) {\n focus.close();\n focus = undefined;\n }\n };\n report();\n window.addEventListener('focus', report);\n window.addEventListener('blur', report);\n document.addEventListener('visibilitychange', report);\n return () => {\n window.removeEventListener('focus', report);\n window.removeEventListener('blur', report);\n document.removeEventListener('visibilitychange', report);\n focus?.close();\n };\n }, [fleetId]);\n}\n","'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useEffect } from 'react';\n\n/** The page's live updates, which the web app's server follows on the gateway's API for the browser. */\nexport const CHANGES_PATH = '/overview/changes';\n\n/**\n * Keeps the page in step with its fleet's requests: whenever one changes,\n * the page reads itself again on the server, as its own caller. The browser\n * opens the stream again by itself when it drops.\n */\nexport function useLiveRefresh(fleetId: string): void {\n const router = useRouter();\n useEffect(() => {\n const changes = new EventSource(`${CHANGES_PATH}?fleet=${encodeURIComponent(fleetId)}`);\n changes.onmessage = () => {\n router.refresh();\n };\n return () => {\n changes.close();\n };\n }, [fleetId, router]);\n}\n","'use client';\n\nimport { useFocusReport } from '../hooks/use-focus-report';\nimport { useLiveRefresh } from '../hooks/use-live-refresh';\n\n/** Keeps the page it sits in live, and tells the gateway while it is in focus (wake a person, W6): it shows nothing itself. */\nexport function LiveRefresh({ fleetId }: { fleetId: string }) {\n useLiveRefresh(fleetId);\n useFocusReport(fleetId);\n return null;\n}\n","import type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nconst VARIANTS = {\n primary: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'border border-border bg-card text-card-foreground hover:bg-accent',\n} as const;\n\n/**\n * A button for an action: the moment it is pressed and until the answer\n * comes, it shows a spinner and its working label, and cannot run twice.\n */\nexport function ActionButton({\n isPending,\n pendingLabel,\n variant = 'secondary',\n children,\n className = '',\n disabled,\n ...button\n}: ButtonHTMLAttributes<HTMLButtonElement> & { isPending: boolean; pendingLabel: string; variant?: keyof typeof VARIANTS; children: ReactNode }) {\n return (\n <button\n {...button}\n disabled={disabled === true || isPending}\n aria-busy={isPending}\n className={`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${VARIANTS[variant]} ${className}`}\n >\n {isPending ? (\n <>\n <span aria-hidden=\"true\" className=\"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n {pendingLabel}\n </>\n ) : (\n children\n )}\n </button>\n );\n}\n","/** What an action came to, said in place: a success as a status, a failure as an alert by the control. */\nexport function Notice({ message, isFailure }: { message: string; isFailure: boolean }) {\n return isFailure ? (\n <p role=\"alert\" data-testid=\"overview-failure\" className=\"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\">\n {message}\n </p>\n ) : (\n <p role=\"status\" data-testid=\"overview-success\" className=\"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg\">\n {message}\n </p>\n );\n}\n"],"names":["FOCUS_PATH","useFocusReport","fleetId","focus","report","isInFocus","document","visibilityState","hasFocus","undefined","EventSource","encodeURIComponent","close","window","addEventListener","removeEventListener","VARIANTS","primary","secondary","ActionButton","isPending","pendingLabel","variant","children","className","disabled","button","Notice","message","isF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D,UAAuB,IAAbA,GAAqBL,EAC/B,YAAWA,EACXI,UAAW,CAAC,mGAAmG,EAAER,CAAQ,CAACM,EAAQ,CAAC,CAAC,EAAEE,EAAAA,CAAW,UAEhJJ,EACC,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,QAAA,CAAA,WACE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,cAAY,OAAOI,UAAU,oFAClCH,KAGHE,GAIR,eCrCwG,IAAA,EAAA,EAAA,CAAA,CAAA,kBACjG,SAASI,AAAO,SAAEC,CAAO,WAAEC,CAAS,CAA2C,EACpF,OAAOA,EACL,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAEC,KAAK,QAAQ,cAAY,mBAAmBN,UAAU,gHACtDI,IAGH,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAEE,KAAK,SAAS,cAAY,mBAAmBN,UAAU,2FACvDI,GAGP"}
@@ -1,3 +1,3 @@
1
- module.exports=[4757,a=>{"use strict";var b=a.i(37936),c=a.i(29517),d=a.i(18558);a.i(70396);var e=a.i(73727),f=a.i(55476),g=a.i(66283),h=a.i(29493),i=a.i(54757),i=i,j=a.i(27221),k=a.i(26972),l=i,m=a.i(89963),n=i,o=i;let p=i.int().min(1),q=j.z.string().min(1),r=k.z.object({key:p,label:q,detail:j.z.string().default("")}),s=k.z.object({id:l.uuid(),title:q,context:j.z.string(),options:m.z.array(r).min(1),pick:k.z.object({option:p,why:q})}).refine(({options:a})=>new Set(a.map(({key:a})=>a)).size===a.length,{message:"Every option has its own number",path:["options"]}).refine(({options:a,pick:b})=>a.some(({key:a})=>a===b.option),{message:"The pick names one of the options",path:["pick","option"]});k.z.object({questionId:l.uuid()}),k.z.object({questionId:l.uuid(),question:s}).refine(({questionId:a,question:b})=>b.id!==a,{message:"The new question has a uuid of its own",path:["question","id"]}),n.union([k.z.object({option:p,note:q.optional()}),k.z.object({note:q})]);let t=n.union([k.z.object({questionId:l.uuid(),option:p,note:q.optional()}),k.z.object({questionId:l.uuid(),note:q})]),u=k.z.object({messageId:(0,c.f)("message"),sentAt:o.iso.datetime(),option:p.nullable(),note:j.z.string().nullable()});k.z.object({id:l.uuid(),title:j.z.string(),context:j.z.string(),options:m.z.array(r),pick:k.z.object({option:p,why:j.z.string()}),answer:u.nullable()});var v=a.i(11393),w=a.i(10351);async function x(a,b){let c;try{c={isOk:!0,value:await b(await (0,g.z)(a))}}catch(c){let b=(0,g.T)(c);if("UNAUTHORIZED"===b)return(0,e.redirect)(`/sign-in/start?${new URLSearchParams({return_to:`${w.K}?${new URLSearchParams({[f.n]:a}).toString()}`}).toString()}`);return{isOk:!1,message:void 0===b?"The gateway did not answer: try again in a moment":(0,g.s)(c)}}return(0,d.revalidatePath)(w.K),c}async function y(a,b){return x(a,async a=>{let{contentType:c,payload:d,meetingId:e,...f}=await a.people.open.mutate({deliveryId:b});return{...f,payload:d,question:function(a){if("application/vnd.aeolus.question+json"===function(a){let[b=""]=a.split(";");return b.trim().toLowerCase()}(a.contentType))try{let b=s.safeParse(JSON.parse(a.payload));return b.success?b.data:void 0}catch{return}}({contentType:c,payload:d}),meetingId:e??void 0}})}async function z({fleet:a,deliveryId:b,input:c}){let d=function(a){let b=a.note.trim();if(void 0===a.questionId)return""===b?{isOk:!1,message:"Write your answer first"}:{isOk:!0,value:{contentType:"text/plain",payload:b}};let c=t.safeParse({questionId:a.questionId,...void 0===a.option?{}:{option:a.option},...""===b?{}:{note:b}});return c.success?{isOk:!0,value:{contentType:"application/vnd.aeolus.answer+json",payload:JSON.stringify(c.data)}}:{isOk:!1,message:"Tap an option, or write a note"}}(c);return d.isOk?x(a,async a=>{await a.people.answer.mutate({deliveryId:b,...d.value})}):d}async function A(a,b){return x(a,async a=>{await a.people.done.mutate({deliveryId:b})})}async function B(a,b){return x(a,async a=>{await a.people.turnEmail.mutate({isOn:b})})}async function C(a,b){return x(a,async a=>{await a.people.turnOnWebPush.mutate({endpoint:b.endpoint,keys:{p256dh:b.keys.p256dh,auth:b.keys.auth},browser:b.browser})})}async function D(a,b){return x(a,async a=>{await a.people.turnOffWebPush.mutate({endpoint:b})})}async function E({fleet:a,requestId:b,input:d}){if("deny"===d.kind)return x(a,async a=>{await a.requests.decide.mutate({requestId:b,decision:{kind:"deny"}})});let e=(0,c.f)("ship").safeParse(d.ownerShipId.trim());if(!e.success)return{isOk:!1,message:"The owner's ship id is not a ship id (shp_...)"};let f={name:d.name,ownerShipId:e.data,scopes:[...new Set([...v._,...d.scopes])]},{server:g}=d,i=void 0===g?void 0:(0,h.y)(g);return x(a,async a=>{await a.requests.decide.mutate({requestId:b,decision:{kind:"approve",party:f,...void 0===g||void 0===i?{}:{server:{credential:i,concurrencyLimit:g.concurrencyLimit}}}})})}(0,a.i(13095).ensureServerEntryExports)([y,z,A,B,C,D,E]),(0,b.registerServerReference)(y,"60a1d4db2f5e19c856961568d7818645538e3ec885",null),(0,b.registerServerReference)(z,"407fdc71225279b1910d205bebdac4e340715563d2",null),(0,b.registerServerReference)(A,"60825ab6dd0d39e2a51185640737b7d2c96099f55a",null),(0,b.registerServerReference)(B,"60044f517f385c5cea4390b7fef22814a4be1fe011",null),(0,b.registerServerReference)(C,"6066cfab8d8daf935202beccf9cb766d7c8ee16ce6",null),(0,b.registerServerReference)(D,"607aaf9ebfa222296e1881b5bd5e6486bb57c04254",null),(0,b.registerServerReference)(E,"407f2bb44dc528c867e668f0f1036ef471fb3f867e",null),a.s(["q",0,z,"Q",0,E,"G",0,A,"v",0,y,"_",0,B,"W",0,D,"y",0,C],4757)}];
1
+ module.exports=[4757,a=>{"use strict";var b=a.i(37936),c=a.i(29517),d=a.i(18558);a.i(70396);var e=a.i(73727),f=a.i(55476),g=a.i(66283),h=a.i(29493),i=a.i(54757),i=i,j=a.i(27221),k=a.i(26972),l=i,m=a.i(89963),n=i,o=i;let p=i.int().min(1),q=j.z.string().min(1),r=k.z.object({key:p,label:q,detail:j.z.string().default("")}),s=k.z.object({id:l.uuid(),title:q,context:j.z.string(),options:m.z.array(r).min(1),pick:k.z.object({option:p,why:q})}).refine(({options:a})=>new Set(a.map(({key:a})=>a)).size===a.length,{message:"Every option has its own number",path:["options"]}).refine(({options:a,pick:b})=>a.some(({key:a})=>a===b.option),{message:"The pick names one of the options",path:["pick","option"]});k.z.object({questionId:l.uuid()}),k.z.object({questionId:l.uuid(),question:s}).refine(({questionId:a,question:b})=>b.id!==a,{message:"The new question has a uuid of its own",path:["question","id"]}),n.union([k.z.object({option:p,note:q.optional()}),k.z.object({note:q})]);let t=n.union([k.z.object({questionId:l.uuid(),option:p,note:q.optional()}),k.z.object({questionId:l.uuid(),note:q})]),u=k.z.object({messageId:(0,c.f)("message"),sentAt:o.iso.datetime(),option:p.nullable(),note:j.z.string().nullable()});k.z.object({id:l.uuid(),title:j.z.string(),context:j.z.string(),options:m.z.array(r),pick:k.z.object({option:p,why:j.z.string()}),answer:u.nullable()});var v=a.i(11393),w=a.i(10351);async function x(a,b){let c;try{c={isOk:!0,value:await b(await (0,g.z)(a))}}catch(c){let b=(0,g.U)(c);if("UNAUTHORIZED"===b)return(0,e.redirect)(`/sign-in/start?${new URLSearchParams({return_to:`${w.K}?${new URLSearchParams({[f.n]:a}).toString()}`}).toString()}`);return{isOk:!1,message:void 0===b?"The gateway did not answer: try again in a moment":(0,g.s)(c)}}return(0,d.revalidatePath)(w.K),c}async function y(a,b){return x(a,async a=>{let{contentType:c,payload:d,meetingId:e,...f}=await a.people.open.mutate({deliveryId:b});return{...f,payload:d,question:function(a){if("application/vnd.aeolus.question+json"===function(a){let[b=""]=a.split(";");return b.trim().toLowerCase()}(a.contentType))try{let b=s.safeParse(JSON.parse(a.payload));return b.success?b.data:void 0}catch{return}}({contentType:c,payload:d}),meetingId:e??void 0}})}async function z({fleet:a,deliveryId:b,input:c}){let d=function(a){let b=a.note.trim();if(void 0===a.questionId)return""===b?{isOk:!1,message:"Write your answer first"}:{isOk:!0,value:{contentType:"text/plain",payload:b}};let c=t.safeParse({questionId:a.questionId,...void 0===a.option?{}:{option:a.option},...""===b?{}:{note:b}});return c.success?{isOk:!0,value:{contentType:"application/vnd.aeolus.answer+json",payload:JSON.stringify(c.data)}}:{isOk:!1,message:"Tap an option, or write a note"}}(c);return d.isOk?x(a,async a=>{await a.people.answer.mutate({deliveryId:b,...d.value})}):d}async function A(a,b){return x(a,async a=>{await a.people.done.mutate({deliveryId:b})})}async function B(a,b){return x(a,async a=>{await a.people.turnEmail.mutate({isOn:b})})}async function C(a,b){return x(a,async a=>{await a.people.turnOnWebPush.mutate({endpoint:b.endpoint,keys:{p256dh:b.keys.p256dh,auth:b.keys.auth},browser:b.browser})})}async function D(a,b){return x(a,async a=>{await a.people.turnOffWebPush.mutate({endpoint:b})})}async function E({fleet:a,requestId:b,input:d}){if("deny"===d.kind)return x(a,async a=>{await a.requests.decide.mutate({requestId:b,decision:{kind:"deny"}})});let e=(0,c.f)("ship").safeParse(d.ownerShipId.trim());if(!e.success)return{isOk:!1,message:"The owner's ship id is not a ship id (shp_...)"};let f={name:d.name,ownerShipId:e.data,scopes:[...new Set([...v._,...d.scopes])]},{server:g}=d,i=void 0===g?void 0:(0,h.y)(g);return x(a,async a=>{await a.requests.decide.mutate({requestId:b,decision:{kind:"approve",party:f,...void 0===g||void 0===i?{}:{server:{credential:i,concurrencyLimit:g.concurrencyLimit}}}})})}(0,a.i(13095).ensureServerEntryExports)([y,z,A,B,C,D,E]),(0,b.registerServerReference)(y,"60b0e24f763eae8da17acbb522c69b2a378f23c2e5",null),(0,b.registerServerReference)(z,"405f8667841fa6e8aa9dc4e14864bf70904e4f5d6d",null),(0,b.registerServerReference)(A,"60244266b9259a9692e97c506b5ce52ec2c7a1a150",null),(0,b.registerServerReference)(B,"60c364555acc9bbeb1195760a7ed0f489c8e011bfa",null),(0,b.registerServerReference)(C,"60f69b430b53da4474309ff0cbd403823a67b2af4f",null),(0,b.registerServerReference)(D,"6067fb456daee8172103838ce816e90819f17e5337",null),(0,b.registerServerReference)(E,"402b3765d265462ba53377de2f004c76f87c5e586e",null),a.s(["q",0,z,"Q",0,E,"G",0,A,"v",0,y,"_",0,B,"W",0,D,"y",0,C],4757)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_overview_hooks_overview-actions_ts_0-wrat07d1y5g._.js.map
@@ -1,3 +1,3 @@
1
- (()=>{"use strict";module.exports=[72839,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("407fdc71225279b1910d205bebdac4e340715563d2",d.callServer,void 0,d.findSourceMapURL,"answerDelivery"),f=(0,d.createServerReference)("60825ab6dd0d39e2a51185640737b7d2c96099f55a",d.callServer,void 0,d.findSourceMapURL,"doneDelivery"),g=(0,d.createServerReference)("60a1d4db2f5e19c856961568d7818645538e3ec885",d.callServer,void 0,d.findSourceMapURL,"openDelivery");var h=a.i(1542),i=a.i(24229);function j({delivery:a,meetingHref:c,note:d,working:e,failure:f,onNoteChange:g,onAnswer:k,onDone:l,onBack:m}){let{question:n}=a,o=void 0!==e,p=n?.options.find(a=>a.key===n.pick.option);return(0,b.jsxs)("section",{"data-testid":"overview-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:[a.from," · ",new Date(a.sentAt).toUTCString()]}),(0,b.jsx)("h2",{className:"text-heading font-semibold",children:n?.title??a.title}),void 0===c?null:(0,b.jsx)("a",{"data-testid":"overview-meeting",href:c,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0===n?(0,b.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:a.payload}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"whitespace-pre-wrap",children:n.context}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:n.options.map(a=>(0,b.jsx)(h.f,{title:a.detail,variant:a.key===n.pick.option?"primary":"secondary",className:a.key===n.pick.option?"outline-2 outline-offset-2 outline-dashed outline-ring":"",isPending:e?.kind==="option"&&e.option===a.key,pendingLabel:"Sending...",disabled:o,onClick:()=>{k(a.key)},children:a.label},a.key))}),void 0===p?null:(0,b.jsxs)("p",{className:"text-muted-foreground",children:[p.label," is the pick of ",a.from,": ",n.pick.why]})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:void 0===n?"Your answer":"Note"}),(0,b.jsx)("textarea",{"data-testid":"overview-note",rows:2,value:d,onChange:a=>{g(a.target.value)},placeholder:void 0===n?"":"Optional, sent with your answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===f?null:(0,b.jsx)(i.f,{message:f,isFailure:!0}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(h.f,{"data-testid":"overview-answer",variant:void 0===n?"primary":"secondary",isPending:e?.kind==="note",pendingLabel:"Sending...",disabled:o,onClick:()=>{k(void 0)},children:void 0===n?"Answer":"Send the note alone"}),void 0===n?(0,b.jsx)(h.f,{"data-testid":"overview-done",isPending:e?.kind==="done",pendingLabel:"Marking done...",disabled:o,onClick:l,children:"Done"}):null,(0,b.jsx)("button",{type:"button",onClick:m,disabled:o,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back to the inbox"})]})]})}function k({entry:a}){return(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[(0,b.jsx)("span",{className:"truncate",children:a.title}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:["from ",a.from]})]})}function l({waitingCount:a,waiting:c,opened:d,openingId:e,failure:f,onOpen:g}){return(0,b.jsxs)("div",{className:"grid gap-6",children:[0===c.length?null:(0,b.jsxs)("section",{className:"grid gap-2",children:[(0,b.jsxs)("h2",{className:"text-section font-semibold",children:["Next · ",a]}),c.map(a=>(0,b.jsxs)("div",{className:"grid gap-2 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(k,{entry:a}),(0,b.jsx)(h.f,{"data-testid":"overview-open",isPending:e===a.deliveryId,pendingLabel:"Opening...",disabled:void 0!==e,onClick:()=>{g(a)},children:"Open"})]}),f?.deliveryId===a.deliveryId?(0,b.jsx)(i.f,{message:f.message,isFailure:!0}):null]},a.deliveryId))]}),0===d.length?null:(0,b.jsxs)("section",{className:"grid gap-2",children:[(0,b.jsxs)("h2",{className:"text-section font-semibold",children:["Opened, not yet dealt with · ",d.length]}),d.map(a=>(0,b.jsxs)("div",{className:"grid gap-2 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(k,{entry:a}),(0,b.jsx)(h.f,{"data-testid":"overview-deal",isPending:e===a.deliveryId,pendingLabel:"Opening...",disabled:void 0!==e,onClick:()=>{g(a)},children:"Answer or be done"})]}),f?.deliveryId===a.deliveryId?(0,b.jsx)(i.f,{message:f.message,isFailure:!0}):null]},a.deliveryId))]})]})}a.s(["InboxPanel",0,function({fleetId:a,inbox:d}){let[h,k]=(0,c.useState)(),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(),[q,r]=(0,c.useState)(),[s,t]=(0,c.useState)(),[u,v]=(0,c.useState)(),[w,x]=(0,c.useState)(),[,y]=(0,c.useTransition)(),z=({control:a,action:b,said:c})=>{r(a),v(void 0),y(async()=>{let a=await b();r(void 0),a.isOk?(k(void 0),x(c)):v(a.message)})};if(void 0!==h){var A;let c;return(0,b.jsx)(j,{delivery:h,meetingHref:void 0===h.meetingId?void 0:(c=new URLSearchParams({fleet:(A={fleetId:a,meetingId:h.meetingId}).fleetId,...void 0===A.cursor?{}:{cursor:A.cursor}}),`/meetings/${encodeURIComponent(A.meetingId)}?${c.toString()}`),note:m,working:q,failure:u,onNoteChange:n,onAnswer:b=>{z({control:void 0===b?{kind:"note"}:{kind:"option",option:b},action:()=>e({fleet:a,deliveryId:h.deliveryId,input:{questionId:h.question?.id,option:b,note:m}}),said:`Your answer went to ${h.from}.`})},onDone:()=>{z({control:{kind:"done"},action:()=>f(a,h.deliveryId),said:`Done with “${h.title}”.`})},onBack:()=>{k(void 0)}})}return(0,b.jsxs)("div",{className:"grid gap-4",children:[void 0===w?null:(0,b.jsx)(i.f,{message:w,isFailure:!1}),(0,b.jsx)(l,{waitingCount:d.waiting,waiting:d.deliveries,opened:d.opened,openingId:o,failure:s,onOpen:b=>{p(b.deliveryId),t(void 0),x(void 0),y(async()=>{let c=await g(a,b.deliveryId);(p(void 0),c.isOk)?(k(c.value),n(""),v(void 0),x(void 0)):t({deliveryId:b.deliveryId,message:c.message})})}})]})}],72839)},50850,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("60044f517f385c5cea4390b7fef22814a4be1fe011",d.callServer,void 0,d.findSourceMapURL,"turnEmail");var f=a.i(1542),g=a.i(24229);let h=(0,d.createServerReference)("607aaf9ebfa222296e1881b5bd5e6486bb57c04254",d.callServer,void 0,d.findSourceMapURL,"turnOffWebPush"),i=(0,d.createServerReference)("6066cfab8d8daf935202beccf9cb766d7c8ee16ce6",d.callServer,void 0,d.findSourceMapURL,"turnOnWebPush"),j=[[/Edg\//,"Edge"],[/Firefox\//,"Firefox"],[/Chrome\//,"Chrome"],[/Safari\//,"Safari"]],k=[[/iPhone|iPad/,"iOS"],[/Android/,"Android"],[/Mac OS X/,"macOS"],[/Windows/,"Windows"],[/Linux/,"Linux"]],l=(a,b)=>b.find(([b])=>b.test(a))?.[1],m="/wake-worker.js";async function n(){let a=await navigator.serviceWorker.getRegistration(m);return await a?.pushManager.getSubscription()??null}async function o(a){let b;if(await Notification.requestPermission()!=="granted")return{isOk:!1,message:"Your browser did not allow notifications from this site: allow them, then turn web push on again"};let c=await navigator.serviceWorker.register(m);return await navigator.serviceWorker.ready,{isOk:!0,value:await c.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:(b=atob(a.replaceAll("-","+").replaceAll("_","/")),Uint8Array.from(b,a=>a.charCodeAt(0)))})}}function p({fleetId:a,webPushKey:d,browsers:e}){let[m,q]=(0,c.useState)(!0),[r,s]=(0,c.useState)(),[t,u]=(0,c.useState)(),[v,w]=(0,c.useState)(),[,x]=(0,c.useTransition)();(0,c.useEffect)(()=>{"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window?n().then(a=>{s(a?.endpoint)}):q(!1)},[]);let y=void 0!==r&&e.some(({endpoint:a,isGone:b})=>a===r&&!b);return(0,b.jsxs)("div",{className:"grid gap-2","data-testid":"overview-wake-web-push",children:[e.map(({endpoint:c,browser:d,addedAt:e,isGone:g})=>(0,b.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsxs)("span",{className:"truncate",children:["Web push in ",d,c===r?" · this browser":""]}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:g?"No longer takes wakes: its push service ended them. Turn web push on again in that browser, or remove it.":`On since ${new Date(e).toLocaleDateString()}: it tells you when something waits in this fleet, with a link here. Never what waits.`})]}),(0,b.jsx)(f.f,{"data-testid":"overview-web-push-remove",isPending:t===c,pendingLabel:"Removing...",disabled:void 0!==t,onClick:()=>{u(c),w(void 0),x(async()=>{c===r&&(await (await n())?.unsubscribe(),s(void 0));let b=await h(a,c);u(void 0),b.isOk||w(b.message)})},children:"Remove"})]},c)),m?y?null:(0,b.jsx)("div",{children:(0,b.jsx)(f.f,{"data-testid":"overview-web-push-on",variant:"primary",isPending:"on"===t,pendingLabel:"Turning on...",disabled:void 0!==t,onClick:()=>{u("on"),w(void 0),x(async()=>{try{var b;let c,e,f=await o(d);if(!f.isOk)return void w(f.message);let g=function(a,b){let{endpoint:c,keys:d}=a,e=d?.p256dh,f=d?.auth;return void 0===c||void 0===e||void 0===f?void 0:{endpoint:c,keys:{p256dh:e,auth:f},browser:b}}(f.value.toJSON(),(b=navigator.userAgent,c=l(b,j),e=l(b,k),void 0===c?"A browser":void 0===e?c:`${c} on ${e}`));if(void 0===g)return void w("Your browser gave no push subscription: try again");let h=await i(a,g);h.isOk?s(g.endpoint):w(h.message)}catch{w("Your browser could not turn web push on: try again")}finally{u(void 0)}})},children:"Turn on web push in this browser"})}):(0,b.jsx)("p",{className:"text-caption text-muted-foreground",children:"This browser takes no web push."}),void 0===v?null:(0,b.jsx)(g.f,{message:v,isFailure:!0})]})}a.s(["WakePanel",0,function({fleetId:a,channels:d}){let[h,i]=(0,c.useTransition)(),[j,k]=(0,c.useState)(),{email:l,webPush:m}=d;return l.isOffered||null!==m.publicKey?(0,b.jsxs)("section",{className:"grid gap-2","aria-labelledby":"overview-wake-heading",children:[(0,b.jsx)("h2",{id:"overview-wake-heading",className:"text-section font-semibold",children:"When something waits"}),l.isOffered?(0,b.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{children:"Email"}),(0,b.jsx)("span",{"data-testid":"overview-wake-email-state",className:"text-caption text-muted-foreground",children:l.isOn?"On: you get an email when something waits for you in this fleet, with a link here. Never what waits.":"Off: nothing tells you when something waits while you are away."})]}),(0,b.jsx)(f.f,{"data-testid":"overview-wake-email",isPending:h,pendingLabel:l.isOn?"Turning off...":"Turning on...",onClick:()=>{var b;b=!l.isOn,k(void 0),i(async()=>{let c=await e(a,b);c.isOk||k(c.message)})},children:l.isOn?"Turn off":"Turn on"})]}):null,void 0===j?null:(0,b.jsx)(g.f,{message:j,isFailure:!0}),null===m.publicKey?null:(0,b.jsx)(p,{fleetId:a,webPushKey:m.publicKey,browsers:m.browsers})]}):null}],50850)}]})();
1
+ (()=>{"use strict";module.exports=[72839,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("405f8667841fa6e8aa9dc4e14864bf70904e4f5d6d",d.callServer,void 0,d.findSourceMapURL,"answerDelivery"),f=(0,d.createServerReference)("60244266b9259a9692e97c506b5ce52ec2c7a1a150",d.callServer,void 0,d.findSourceMapURL,"doneDelivery"),g=(0,d.createServerReference)("60b0e24f763eae8da17acbb522c69b2a378f23c2e5",d.callServer,void 0,d.findSourceMapURL,"openDelivery");var h=a.i(1542),i=a.i(24229);function j({delivery:a,meetingHref:c,note:d,working:e,failure:f,onNoteChange:g,onAnswer:k,onDone:l,onBack:m}){let{question:n}=a,o=void 0!==e,p=n?.options.find(a=>a.key===n.pick.option);return(0,b.jsxs)("section",{"data-testid":"overview-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:[a.from," · ",new Date(a.sentAt).toUTCString()]}),(0,b.jsx)("h2",{className:"text-heading font-semibold",children:n?.title??a.title}),void 0===c?null:(0,b.jsx)("a",{"data-testid":"overview-meeting",href:c,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0===n?(0,b.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:a.payload}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"whitespace-pre-wrap",children:n.context}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:n.options.map(a=>(0,b.jsx)(h.f,{title:a.detail,variant:a.key===n.pick.option?"primary":"secondary",className:a.key===n.pick.option?"outline-2 outline-offset-2 outline-dashed outline-ring":"",isPending:e?.kind==="option"&&e.option===a.key,pendingLabel:"Sending...",disabled:o,onClick:()=>{k(a.key)},children:a.label},a.key))}),void 0===p?null:(0,b.jsxs)("p",{className:"text-muted-foreground",children:[p.label," is the pick of ",a.from,": ",n.pick.why]})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:void 0===n?"Your answer":"Note"}),(0,b.jsx)("textarea",{"data-testid":"overview-note",rows:2,value:d,onChange:a=>{g(a.target.value)},placeholder:void 0===n?"":"Optional, sent with your answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===f?null:(0,b.jsx)(i.f,{message:f,isFailure:!0}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)(h.f,{"data-testid":"overview-answer",variant:void 0===n?"primary":"secondary",isPending:e?.kind==="note",pendingLabel:"Sending...",disabled:o,onClick:()=>{k(void 0)},children:void 0===n?"Answer":"Send the note alone"}),void 0===n?(0,b.jsx)(h.f,{"data-testid":"overview-done",isPending:e?.kind==="done",pendingLabel:"Marking done...",disabled:o,onClick:l,children:"Done"}):null,(0,b.jsx)("button",{type:"button",onClick:m,disabled:o,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back to the inbox"})]})]})}function k({entry:a}){return(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[(0,b.jsx)("span",{className:"truncate",children:a.title}),(0,b.jsxs)("span",{className:"text-caption text-muted-foreground",children:["from ",a.from]})]})}function l({waitingCount:a,waiting:c,opened:d,openingId:e,failure:f,onOpen:g}){return(0,b.jsxs)("div",{className:"grid gap-6",children:[0===c.length?null:(0,b.jsxs)("section",{className:"grid gap-2",children:[(0,b.jsxs)("h2",{className:"text-section font-semibold",children:["Next · ",a]}),c.map(a=>(0,b.jsxs)("div",{className:"grid min-w-0 gap-2 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(k,{entry:a}),(0,b.jsx)(h.f,{"data-testid":"overview-open",isPending:e===a.deliveryId,pendingLabel:"Opening...",disabled:void 0!==e,onClick:()=>{g(a)},children:"Open"})]}),f?.deliveryId===a.deliveryId?(0,b.jsx)(i.f,{message:f.message,isFailure:!0}):null]},a.deliveryId))]}),0===d.length?null:(0,b.jsxs)("section",{className:"grid gap-2",children:[(0,b.jsxs)("h2",{className:"text-section font-semibold",children:["Opened, not yet dealt with · ",d.length]}),d.map(a=>(0,b.jsxs)("div",{className:"grid gap-2 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(k,{entry:a}),(0,b.jsx)(h.f,{"data-testid":"overview-deal",isPending:e===a.deliveryId,pendingLabel:"Opening...",disabled:void 0!==e,onClick:()=>{g(a)},children:"Answer or be done"})]}),f?.deliveryId===a.deliveryId?(0,b.jsx)(i.f,{message:f.message,isFailure:!0}):null]},a.deliveryId))]})]})}a.s(["InboxPanel",0,function({fleetId:a,inbox:d}){let[h,k]=(0,c.useState)(),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(),[q,r]=(0,c.useState)(),[s,t]=(0,c.useState)(),[u,v]=(0,c.useState)(),[w,x]=(0,c.useState)(),[,y]=(0,c.useTransition)(),z=({control:a,action:b,said:c})=>{r(a),v(void 0),y(async()=>{let a=await b();r(void 0),a.isOk?(k(void 0),x(c)):v(a.message)})};if(void 0!==h){var A;let c;return(0,b.jsx)(j,{delivery:h,meetingHref:void 0===h.meetingId?void 0:(c=new URLSearchParams({fleet:(A={fleetId:a,meetingId:h.meetingId}).fleetId,...void 0===A.cursor?{}:{cursor:A.cursor}}),`/meetings/${encodeURIComponent(A.meetingId)}?${c.toString()}`),note:m,working:q,failure:u,onNoteChange:n,onAnswer:b=>{z({control:void 0===b?{kind:"note"}:{kind:"option",option:b},action:()=>e({fleet:a,deliveryId:h.deliveryId,input:{questionId:h.question?.id,option:b,note:m}}),said:`Your answer went to ${h.from}.`})},onDone:()=>{z({control:{kind:"done"},action:()=>f(a,h.deliveryId),said:`Done with “${h.title}”.`})},onBack:()=>{k(void 0)}})}return(0,b.jsxs)("div",{className:"grid gap-4",children:[void 0===w?null:(0,b.jsx)(i.f,{message:w,isFailure:!1}),(0,b.jsx)(l,{waitingCount:d.waiting,waiting:d.deliveries,opened:d.opened,openingId:o,failure:s,onOpen:b=>{p(b.deliveryId),t(void 0),x(void 0),y(async()=>{let c=await g(a,b.deliveryId);(p(void 0),c.isOk)?(k(c.value),n(""),v(void 0),x(void 0)):t({deliveryId:b.deliveryId,message:c.message})})}})]})}],72839)},50850,a=>{var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("60c364555acc9bbeb1195760a7ed0f489c8e011bfa",d.callServer,void 0,d.findSourceMapURL,"turnEmail");var f=a.i(1542),g=a.i(24229);let h=(0,d.createServerReference)("6067fb456daee8172103838ce816e90819f17e5337",d.callServer,void 0,d.findSourceMapURL,"turnOffWebPush"),i=(0,d.createServerReference)("60f69b430b53da4474309ff0cbd403823a67b2af4f",d.callServer,void 0,d.findSourceMapURL,"turnOnWebPush"),j=[[/Edg\//,"Edge"],[/Firefox\//,"Firefox"],[/Chrome\//,"Chrome"],[/Safari\//,"Safari"]],k=[[/iPhone|iPad/,"iOS"],[/Android/,"Android"],[/Mac OS X/,"macOS"],[/Windows/,"Windows"],[/Linux/,"Linux"]],l=(a,b)=>b.find(([b])=>b.test(a))?.[1],m="/wake-worker.js";async function n(){let a=await navigator.serviceWorker.getRegistration(m);return await a?.pushManager.getSubscription()??null}async function o(a){let b;if(await Notification.requestPermission()!=="granted")return{isOk:!1,message:"Your browser did not allow notifications from this site: allow them, then turn web push on again"};let c=await navigator.serviceWorker.register(m);return await navigator.serviceWorker.ready,{isOk:!0,value:await c.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:(b=atob(a.replaceAll("-","+").replaceAll("_","/")),Uint8Array.from(b,a=>a.charCodeAt(0)))})}}function p({fleetId:a,webPushKey:d,browsers:e}){let[m,q]=(0,c.useState)(!0),[r,s]=(0,c.useState)(),[t,u]=(0,c.useState)(),[v,w]=(0,c.useState)(),[,x]=(0,c.useTransition)();(0,c.useEffect)(()=>{"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window?n().then(a=>{s(a?.endpoint)}):q(!1)},[]);let y=void 0!==r&&e.some(({endpoint:a,isGone:b})=>a===r&&!b);return(0,b.jsxs)("div",{className:"grid gap-2","data-testid":"overview-wake-web-push",children:[e.map(({endpoint:c,browser:d,addedAt:e,isGone:g})=>(0,b.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsxs)("span",{className:"truncate",children:["Web push in ",d,c===r?" · this browser":""]}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:g?"No longer takes wakes: its push service ended them. Turn web push on again in that browser, or remove it.":`On since ${new Date(e).toLocaleDateString()}: it tells you when something waits in this fleet, with a link here. Never what waits.`})]}),(0,b.jsx)(f.f,{"data-testid":"overview-web-push-remove",isPending:t===c,pendingLabel:"Removing...",disabled:void 0!==t,onClick:()=>{u(c),w(void 0),x(async()=>{c===r&&(await (await n())?.unsubscribe(),s(void 0));let b=await h(a,c);u(void 0),b.isOk||w(b.message)})},children:"Remove"})]},c)),m?y?null:(0,b.jsx)("div",{children:(0,b.jsx)(f.f,{"data-testid":"overview-web-push-on",variant:"primary",isPending:"on"===t,pendingLabel:"Turning on...",disabled:void 0!==t,onClick:()=>{u("on"),w(void 0),x(async()=>{try{var b;let c,e,f=await o(d);if(!f.isOk)return void w(f.message);let g=function(a,b){let{endpoint:c,keys:d}=a,e=d?.p256dh,f=d?.auth;return void 0===c||void 0===e||void 0===f?void 0:{endpoint:c,keys:{p256dh:e,auth:f},browser:b}}(f.value.toJSON(),(b=navigator.userAgent,c=l(b,j),e=l(b,k),void 0===c?"A browser":void 0===e?c:`${c} on ${e}`));if(void 0===g)return void w("Your browser gave no push subscription: try again");let h=await i(a,g);h.isOk?s(g.endpoint):w(h.message)}catch{w("Your browser could not turn web push on: try again")}finally{u(void 0)}})},children:"Turn on web push in this browser"})}):(0,b.jsx)("p",{className:"text-caption text-muted-foreground",children:"This browser takes no web push."}),void 0===v?null:(0,b.jsx)(g.f,{message:v,isFailure:!0})]})}a.s(["WakePanel",0,function({fleetId:a,channels:d}){let[h,i]=(0,c.useTransition)(),[j,k]=(0,c.useState)(),{email:l,webPush:m}=d;return l.isOffered||null!==m.publicKey?(0,b.jsxs)("section",{className:"grid gap-2","aria-labelledby":"overview-wake-heading",children:[(0,b.jsx)("h2",{id:"overview-wake-heading",className:"text-section font-semibold",children:"When something waits"}),l.isOffered?(0,b.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{children:"Email"}),(0,b.jsx)("span",{"data-testid":"overview-wake-email-state",className:"text-caption text-muted-foreground",children:l.isOn?"On: you get an email when something waits for you in this fleet, with a link here. Never what waits.":"Off: nothing tells you when something waits while you are away."})]}),(0,b.jsx)(f.f,{"data-testid":"overview-wake-email",isPending:h,pendingLabel:l.isOn?"Turning off...":"Turning on...",onClick:()=>{var b;b=!l.isOn,k(void 0),i(async()=>{let c=await e(a,b);c.isOk||k(c.message)})},children:l.isOn?"Turn off":"Turn on"})]}):null,void 0===j?null:(0,b.jsx)(g.f,{message:j,isFailure:!0}),null===m.publicKey?null:(0,b.jsx)(p,{fleetId:a,webPushKey:m.publicKey,browsers:m.browsers})]}):null}],50850)}]})();
2
2
 
3
3
  //# sourceMappingURL=web_features_overview_state_1wuk95dw2_whp._.js.map