@aeolus-fleet/gateway 0.32.1 → 0.32.2

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 (147) hide show
  1. package/package.json +1 -1
  2. package/web/.next/BUILD_ID +1 -1
  3. package/web/.next/build-manifest.json +3 -3
  4. package/web/.next/diagnostics/route-bundle-stats.json +29 -29
  5. package/web/.next/fallback-build-manifest.json +3 -3
  6. package/web/.next/prerender-manifest.json +3 -3
  7. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  8. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  9. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  10. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  11. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  12. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  13. package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +8 -8
  14. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +4 -4
  17. package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +8 -8
  20. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  21. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +6 -6
  23. package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
  26. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
  29. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
  32. package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(console)/overview/page/server-reference-manifest.json +7 -7
  35. package/web/.next/server/app/(console)/overview/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(console)/overview/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(console)/overview/requests/[requestId]/page/server-reference-manifest.json +2 -2
  38. package/web/.next/server/app/(console)/overview/requests/[requestId]/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(console)/overview/requests/[requestId]/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +9 -9
  41. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  44. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/_global-error.html +1 -1
  47. package/web/.next/server/app/_global-error.rsc +1 -1
  48. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  49. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  50. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  51. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  52. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  53. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  55. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  56. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  58. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  59. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  61. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  62. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
  64. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
  65. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
  66. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
  67. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
  68. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
  69. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
  70. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
  71. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
  72. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
  73. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js +1 -1
  74. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js.map +1 -1
  75. package/web/.next/server/chunks/ssr/[root-of-the-server]__0-og0bl8lr2xq._.js +1 -1
  76. package/web/.next/server/chunks/ssr/[root-of-the-server]__0-og0bl8lr2xq._.js.map +1 -1
  77. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n2us07jk-78w._.js +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__1-c9wugbbwsp3._.js +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  83. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dtyycvqa6uht._.js +1 -1
  84. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  85. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/_0_kakdt7lb6z-._.js +1 -1
  87. package/web/.next/server/chunks/ssr/_0_kakdt7lb6z-._.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/_0bhvvyz0q_0ja._.js +1 -1
  89. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  90. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  91. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  92. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  93. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  94. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  95. package/web/.next/server/chunks/ssr/_12fsn_33ga-n0._.js +1 -1
  96. package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
  97. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  98. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  100. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/_1y1ovmdhl9_ml._.js +1 -1
  102. package/web/.next/server/chunks/ssr/_1y1ovmdhl9_ml._.js.map +1 -1
  103. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
  104. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js +1 -1
  106. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js.map +1 -1
  107. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  108. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  110. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  112. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
  114. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  116. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  117. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  118. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  120. package/web/.next/server/chunks/ssr/web_features_overview_hooks_overview-actions_ts_0-wrat07d1y5g._.js +1 -1
  121. package/web/.next/server/chunks/ssr/web_features_overview_state_1wuk95dw2_whp._.js +1 -1
  122. package/web/.next/server/chunks/ssr/web_features_overview_state_1wuk95dw2_whp._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js +1 -1
  124. package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  126. package/web/.next/server/middleware-build-manifest.js +3 -3
  127. package/web/.next/server/pages/500.html +1 -1
  128. package/web/.next/server/preview-props.json +3 -3
  129. package/web/.next/server/server-reference-manifest.js +1 -1
  130. package/web/.next/server/server-reference-manifest.json +29 -29
  131. package/web/.next/static/chunks/{0coxy5zad812a.js → 0ke_2_la1glwa.js} +1 -1
  132. package/web/.next/static/chunks/0ul9rtulfiph6.js +1 -0
  133. package/web/.next/static/chunks/{0v9r_hyyubykq.js → 19wvmglfgof0u.js} +1 -1
  134. package/web/.next/static/chunks/{0u_4xjk1j74g3.js → 1tgs1j0j-1qlh.js} +1 -1
  135. package/web/.next/static/chunks/1yj875esaesyh.css +3 -0
  136. package/web/.next/static/chunks/{20n2z_lok8v0f.js → 2d283cu3en9cy.js} +1 -1
  137. package/web/.next/static/chunks/{2ew9kpu2kohk4.js → 2hj3-kl1ggnu_.js} +1 -1
  138. package/web/.next/static/chunks/{1xrn7oqwd48vi.js → 2n4bf_2r9lysd.js} +1 -1
  139. package/web/.next/static/chunks/{1ahn4kx4ld-rc.js → 2ngyis59r3qta.js} +1 -1
  140. package/web/.next/static/chunks/{12c3qjvto3m0f.js → 3bl-e3zhidrrz.js} +1 -1
  141. package/web/.next/trace +1 -1
  142. package/web/.next/trace-build +1 -1
  143. package/web/.next/static/chunks/0zesq1ng-v3s6.js +0 -1
  144. package/web/.next/static/chunks/10wzmy096av_5.css +0 -3
  145. /package/web/.next/static/{wnr2MrrQvcto8MOm16D8r → tQFXrUWi6vEZq4Cp-U5tk}/_buildManifest.js +0 -0
  146. /package/web/.next/static/{wnr2MrrQvcto8MOm16D8r → tQFXrUWi6vEZq4Cp-U5tk}/_clientMiddlewareManifest.js +0 -0
  147. /package/web/.next/static/{wnr2MrrQvcto8MOm16D8r → tQFXrUWi6vEZq4Cp-U5tk}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- (()=>{"use strict";module.exports=[50088,a=>{var b=a.i(70043),c=a.i(37936),d=a.i(29517);a.i(70396);var e=a.i(73727),f=a.i(55476),g=a.i(66283),h=a.i(81140),i=a.i(1324),j=a.i(29493),k=a.i(72913),l=a.i(13095);let m=new Set(["token","clientSecret"]);async function n(a,b){let c,l=(0,i.v)(b,i.H),n=Object.fromEntries(Object.entries((0,i.O)(b)).filter(([a])=>!m.has(a))),o=(0,d.f)("ship").safeParse((0,i.v)(b,"ownerShipId"));if(!o.success)return{kind:"refused",message:"Pick its owner",fields:n};let p=await (0,g.z)(l);try{c=(await p.parties.addA2aAgent.mutate({requestId:(0,i.v)(b,"requestId"),name:(0,i.v)(b,"name"),cardUrl:(0,i.v)(b,"cardUrl"),credential:(0,j.y)({credentialKind:(0,i.v)(b,"credentialKind"),token:(0,i.v)(b,"token"),clientId:(0,i.v)(b,"clientId"),clientSecret:(0,i.v)(b,"clientSecret"),issuer:(0,i.v)(b,"issuer"),scope:(0,i.v)(b,"scope")}),concurrencyLimit:Number((0,i.v)(b,"concurrencyLimit")),ownerShipId:o.data,scopes:(0,h.f)((0,i.O)(b))})).name}catch(a){return{kind:"refused",message:(0,g.s)(a),fields:n}}(0,e.redirect)((0,f.i)((0,k.N)(c),l))}(0,l.ensureServerEntryExports)([n]),(0,c.registerServerReference)(n,"60152c0945a891c9afc01146ee42d7764b007672bb",null),a.s(["4014cabd1a393a5ea041c3f3ba58bfec7066ad4931",()=>b.f,"60152c0945a891c9afc01146ee42d7764b007672bb",0,n],50088)},81140,a=>{var b=a.i(18379);a.s(["f",0,function(a){return Object.keys(a).flatMap(a=>a.startsWith(b.u)?[a.slice(b.u.length)]:[])}])},29493,a=>{let b=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}];a.s(["x",0,b,"y",0,function(a){var c;let d=(c=a.credentialKind,b.find(({kind:a})=>a===c)?.kind??"bearer");switch(d){case"none":return{kind:d};case"bearer":return{kind:d,token:a.token};case"clientCredentials":return{kind:d,clientId:a.clientId,clientSecret:a.clientSecret,issuer:a.issuer,...""===a.scope?{}:{scope:a.scope}}}}])}]})();
1
+ (()=>{"use strict";module.exports=[50088,a=>{var b=a.i(70043),c=a.i(37936),d=a.i(29517);a.i(70396);var e=a.i(73727),f=a.i(55476),g=a.i(66283),h=a.i(81140),i=a.i(1324),j=a.i(29493),k=a.i(72913),l=a.i(13095);let m=new Set(["token","clientSecret"]);async function n(a,b){let c,l=(0,i.v)(b,i.H),n=Object.fromEntries(Object.entries((0,i.O)(b)).filter(([a])=>!m.has(a))),o=(0,d.f)("ship").safeParse((0,i.v)(b,"ownerShipId"));if(!o.success)return{kind:"refused",message:"Pick its owner",fields:n};let p=await (0,g.z)(l);try{c=(await p.parties.addA2aAgent.mutate({requestId:(0,i.v)(b,"requestId"),name:(0,i.v)(b,"name"),cardUrl:(0,i.v)(b,"cardUrl"),credential:(0,j.y)({credentialKind:(0,i.v)(b,"credentialKind"),token:(0,i.v)(b,"token"),clientId:(0,i.v)(b,"clientId"),clientSecret:(0,i.v)(b,"clientSecret"),issuer:(0,i.v)(b,"issuer"),scope:(0,i.v)(b,"scope")}),concurrencyLimit:Number((0,i.v)(b,"concurrencyLimit")),ownerShipId:o.data,scopes:(0,h.f)((0,i.O)(b))})).name}catch(a){return{kind:"refused",message:(0,g.s)(a),fields:n}}(0,e.redirect)((0,f.i)((0,k.N)(c),l))}(0,l.ensureServerEntryExports)([n]),(0,c.registerServerReference)(n,"60085c6e7b7c0bfc028c33ee4ff6ce087eb0592373",null),a.s(["400e6ee91aede8cbbee59174183b1c251fd5c04c2f",()=>b.f,"60085c6e7b7c0bfc028c33ee4ff6ce087eb0592373",0,n],50088)},81140,a=>{var b=a.i(18379);a.s(["f",0,function(a){return Object.keys(a).flatMap(a=>a.startsWith(b.u)?[a.slice(b.u.length)]:[])}])},29493,a=>{let b=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}];a.s(["x",0,b,"y",0,function(a){var c;let d=(c=a.credentialKind,b.find(({kind:a})=>a===c)?.kind??"bearer");switch(d){case"none":return{kind:d};case"bearer":return{kind:d,token:a.token};case"clientCredentials":return{kind:d,clientId:a.clientId,clientSecret:a.clientSecret,issuer:a.issuer,...""===a.scope?{}:{scope:a.scope}}}}])}]})();
2
2
 
3
3
  //# sourceMappingURL=web_0wys4l6za8umr._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/outside-parties/add-a2a-agent/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/add-a2a-agent/actions.ts","../../../../../web/features/add-a2a-client/ticked-scopes.ts","../../../../../web/features/forms/server-credential.ts"],"sourcesContent":["export {setTheme as '4014cabd1a393a5ea041c3f3ba58bfec7066ad4931'} from 'ACTIONS_MODULE0'\nexport {addA2aAgent as '60152c0945a891c9afc01146ee42d7764b007672bb'} from 'ACTIONS_MODULE1'\n","'use server';\n\n/**\n * Adding an outside A2A agent by its card address (slice 5), as the account\n * signed in: the API checks it holds gateway:approve and grants only scopes\n * it holds, and the gateway reads the card before it commissions anything.\n * Added, the page goes to the agent's own page.\n */\nimport { idSchema } from '@aeolus-fleet/common';\nimport { redirect } from 'next/navigation';\n\nimport { inFleet } from '../../lib/gateway-api/page-account';\nimport { refusalMessageOf, requestApi } from '../../lib/gateway-api/page-api';\nimport { tickedScopes } from '../add-a2a-client/ticked-scopes';\nimport { FLEET_FIELD, fieldOf, fieldsOf } from '../forms/form-state';\nimport { serverCredentialOf } from '../forms/server-credential';\nimport { partyPath } from '../outside-parties/paths';\n\n/** The fields that never travel back to the browser: the credential's secrets. */\nconst SECRET_FIELDS: ReadonlySet<string> = new Set(['token', 'clientSecret']);\n\n/** Where adding stands: not sent, or refused with why and what the browser sent, its secrets aside. */\nexport type AddA2aAgentState = { kind: 'idle' } | { kind: 'refused'; message: string; fields: Record<string, string> };\n\nexport async function addA2aAgent(_previous: AddA2aAgentState, form: FormData): Promise<AddA2aAgentState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const fields = Object.fromEntries(Object.entries(fieldsOf(form)).filter(([field]) => !SECRET_FIELDS.has(field)));\n const ownerShipId = idSchema('ship').safeParse(fieldOf(form, 'ownerShipId'));\n if (!ownerShipId.success) {\n return { kind: 'refused', message: 'Pick its owner', fields };\n }\n const api = await requestApi(fleetId);\n let name: string;\n try {\n const added = await api.parties.addA2aAgent.mutate({\n requestId: fieldOf(form, 'requestId'),\n name: fieldOf(form, 'name'),\n cardUrl: fieldOf(form, 'cardUrl'),\n credential: serverCredentialOf({\n credentialKind: fieldOf(form, 'credentialKind'),\n token: fieldOf(form, 'token'),\n clientId: fieldOf(form, 'clientId'),\n clientSecret: fieldOf(form, 'clientSecret'),\n issuer: fieldOf(form, 'issuer'),\n scope: fieldOf(form, 'scope'),\n }),\n concurrencyLimit: Number(fieldOf(form, 'concurrencyLimit')),\n ownerShipId: ownerShipId.data,\n scopes: tickedScopes(fieldsOf(form)),\n });\n name = added.name;\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error), fields };\n }\n redirect(inFleet(partyPath(name), fleetId));\n}\n","import { SCOPE_FIELD_PREFIX } from '../outside-party/scope-changes';\n\n/** The scopes a form ticks, one `scope:<scope>` field each. */\nexport function tickedScopes(fields: Readonly<Record<string, string>>): string[] {\n return Object.keys(fields).flatMap((field) => (field.startsWith(SCOPE_FIELD_PREFIX) ? [field.slice(SCOPE_FIELD_PREFIX.length)] : []));\n}\n","/**\n * An outside MCP server's credential, as the add, Parties and decision forms\n * take it: none for a server reached only on a private network, a static\n * bearer, or OAuth client credentials.\n */\n\n/** The credential kinds a form offers, with the words it shows. */\nexport const CREDENTIAL_KINDS = [\n { kind: 'none', label: 'No credential' },\n { kind: 'bearer', label: 'Bearer token' },\n { kind: 'clientCredentials', label: 'OAuth client credentials' },\n] as const;\n\nexport type CredentialKind = (typeof CREDENTIAL_KINDS)[number]['kind'];\n\nexport type ServerCredential =\n | { kind: 'none' }\n | { kind: 'bearer'; token: string }\n | { kind: 'clientCredentials'; clientId: string; clientSecret: string; issuer: string; scope?: string };\n\n/** The kind a form sent, a bearer when it sent none it knows. */\nexport function credentialKindOf(sent: string): CredentialKind {\n return CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the fields name: only the fields of its kind are read. */\nexport function serverCredentialOf(fields: { credentialKind: string; token: string; clientId: string; clientSecret: string; issuer: string; scope: string }): ServerCredential {\n const kind = credentialKindOf(fields.credentialKind);\n switch (kind) {\n case 'none':\n return { kind };\n case 'bearer':\n return { kind, token: fields.token };\n case 'clientCredentials':\n return { kind, clientId: fields.clientId, clientSecret: fields.clientSecret, issuer: fields.issuer, ...(fields.scope === '' ? {} : { scope: fields.scope }) };\n }\n}\n"],"names":["SECRET_FIELDS","Set","addA2aAgent","_previous","form","fleetId","fields","Object","fromEntries","entries","filter","field","has","ownerShipId","safeParse","success","kind","message","api","name","added","parties","mutate","requestId","cardUrl","credential","credentialKind","token","clientId","clientSecret","issuer","scope","concurrencyLimit","Number","data","scopes","error","tickedScopes","keys","flatMap","startsWith","slice","length","CREDENTIAL_KINDS","label","credentialKindOf","sent","find","serverCredentialOf"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,oBCQA,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,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,oBAGA,IAAMA,EAAqC,IAAIC,IAAI,CAAC,QAAS,eAAe,EAKrE,eAAeC,EAAYC,CAA2B,CAAEC,CAAc,EAC3E,IAOIe,EAPEd,EAAU,CAAA,EAAA,EAAA,CAAA,AAAO,EAACD,EAAM,EAAA,CAAW,EACnCE,EAASC,OAAOC,WAAW,CAACD,OAAOE,OAAO,CAAC,CAAA,EAAA,EAAA,CAAQ,AAAR,EAASL,IAAOM,MAAM,CAAC,CAAC,CAACC,EAAM,GAAK,C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":["../../../../../web/.next-internal/server/app/%28console%29/outside-parties/add-a2a-agent/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/add-a2a-agent/actions.ts","../../../../../web/features/add-a2a-client/ticked-scopes.ts","../../../../../web/features/forms/server-credential.ts"],"sourcesContent":["export {setTheme as '400e6ee91aede8cbbee59174183b1c251fd5c04c2f'} from 'ACTIONS_MODULE0'\nexport {addA2aAgent as '60085c6e7b7c0bfc028c33ee4ff6ce087eb0592373'} from 'ACTIONS_MODULE1'\n","'use server';\n\n/**\n * Adding an outside A2A agent by its card address (slice 5), as the account\n * signed in: the API checks it holds gateway:approve and grants only scopes\n * it holds, and the gateway reads the card before it commissions anything.\n * Added, the page goes to the agent's own page.\n */\nimport { idSchema } from '@aeolus-fleet/common';\nimport { redirect } from 'next/navigation';\n\nimport { inFleet } from '../../lib/gateway-api/page-account';\nimport { refusalMessageOf, requestApi } from '../../lib/gateway-api/page-api';\nimport { tickedScopes } from '../add-a2a-client/ticked-scopes';\nimport { FLEET_FIELD, fieldOf, fieldsOf } from '../forms/form-state';\nimport { serverCredentialOf } from '../forms/server-credential';\nimport { partyPath } from '../outside-parties/paths';\n\n/** The fields that never travel back to the browser: the credential's secrets. */\nconst SECRET_FIELDS: ReadonlySet<string> = new Set(['token', 'clientSecret']);\n\n/** Where adding stands: not sent, or refused with why and what the browser sent, its secrets aside. */\nexport type AddA2aAgentState = { kind: 'idle' } | { kind: 'refused'; message: string; fields: Record<string, string> };\n\nexport async function addA2aAgent(_previous: AddA2aAgentState, form: FormData): Promise<AddA2aAgentState> {\n const fleetId = fieldOf(form, FLEET_FIELD);\n const fields = Object.fromEntries(Object.entries(fieldsOf(form)).filter(([field]) => !SECRET_FIELDS.has(field)));\n const ownerShipId = idSchema('ship').safeParse(fieldOf(form, 'ownerShipId'));\n if (!ownerShipId.success) {\n return { kind: 'refused', message: 'Pick its owner', fields };\n }\n const api = await requestApi(fleetId);\n let name: string;\n try {\n const added = await api.parties.addA2aAgent.mutate({\n requestId: fieldOf(form, 'requestId'),\n name: fieldOf(form, 'name'),\n cardUrl: fieldOf(form, 'cardUrl'),\n credential: serverCredentialOf({\n credentialKind: fieldOf(form, 'credentialKind'),\n token: fieldOf(form, 'token'),\n clientId: fieldOf(form, 'clientId'),\n clientSecret: fieldOf(form, 'clientSecret'),\n issuer: fieldOf(form, 'issuer'),\n scope: fieldOf(form, 'scope'),\n }),\n concurrencyLimit: Number(fieldOf(form, 'concurrencyLimit')),\n ownerShipId: ownerShipId.data,\n scopes: tickedScopes(fieldsOf(form)),\n });\n name = added.name;\n } catch (error) {\n return { kind: 'refused', message: refusalMessageOf(error), fields };\n }\n redirect(inFleet(partyPath(name), fleetId));\n}\n","import { SCOPE_FIELD_PREFIX } from '../outside-party/scope-changes';\n\n/** The scopes a form ticks, one `scope:<scope>` field each. */\nexport function tickedScopes(fields: Readonly<Record<string, string>>): string[] {\n return Object.keys(fields).flatMap((field) => (field.startsWith(SCOPE_FIELD_PREFIX) ? [field.slice(SCOPE_FIELD_PREFIX.length)] : []));\n}\n","/**\n * An outside MCP server's credential, as the add, Parties and decision forms\n * take it: none for a server reached only on a private network, a static\n * bearer, or OAuth client credentials.\n */\n\n/** The credential kinds a form offers, with the words it shows. */\nexport const CREDENTIAL_KINDS = [\n { kind: 'none', label: 'No credential' },\n { kind: 'bearer', label: 'Bearer token' },\n { kind: 'clientCredentials', label: 'OAuth client credentials' },\n] as const;\n\nexport type CredentialKind = (typeof CREDENTIAL_KINDS)[number]['kind'];\n\nexport type ServerCredential =\n | { kind: 'none' }\n | { kind: 'bearer'; token: string }\n | { kind: 'clientCredentials'; clientId: string; clientSecret: string; issuer: string; scope?: string };\n\n/** The kind a form sent, a bearer when it sent none it knows. */\nexport function credentialKindOf(sent: string): CredentialKind {\n return CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the fields name: only the fields of its kind are read. */\nexport function serverCredentialOf(fields: { credentialKind: string; token: string; clientId: string; clientSecret: string; issuer: string; scope: string }): ServerCredential {\n const kind = credentialKindOf(fields.credentialKind);\n switch (kind) {\n case 'none':\n return { kind };\n case 'bearer':\n return { kind, token: fields.token };\n case 'clientCredentials':\n return { kind, clientId: fields.clientId, clientSecret: fields.clientSecret, issuer: fields.issuer, ...(fields.scope === '' ? {} : { scope: fields.scope }) };\n }\n}\n"],"names":["SECRET_FIELDS","Set","addA2aAgent","_previous","form","fleetId","fields","Object","fromEntries","entries","filter","field","has","ownerShipId","safeParse","success","kind","message","api","name","added","parties","mutate","requestId","cardUrl","credential","credentialKind","token","clientId","clientSecret","issuer","scope","concurrencyLimit","Number","data","scopes","error","tickedScopes","keys","flatMap","startsWith","slice","length","CREDENTIAL_KINDS","label","credentialKindOf","sent","find","serverCredentialOf"],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,oBCQA,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,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,oBAGA,IAAMA,EAAqC,IAAIC,IAAI,CAAC,QAAS,eAAe,EAKrE,eAAeC,EAAYC,CAA2B,CAAEC,CAAc,EAC3E,IAOIe,EAPEd,EAAU,CAAA,EAAA,EAAA,CAAA,AAAO,EAACD,EAAM,EAAA,CAAW,EACnCE,EAASC,OAAOC,WAAW,CAACD,OAAOE,OAAO,CAAC,CAAA,EAAA,EAAA,CAAQ,AAAR,EAASL,IAAOM,MAAM,CAAC,CAAC,CAACC,EAAM,GAAK,CAACX,EAAcY,GAAG,CAACD,KAClGE,EAAc,CAAA,EAAA,EAAA,CAAA,AAAQ,EAAC,QAAQC,SAAS,CAAC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACV,EA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e4f5d6d,q,60244266b9259a9692e97c506b5ce52ec2c7a1a150,G,6067fb456daee8172103838ce816e90819f17e5337,W,60b0e24f763eae8da17acbb522c69b2a378f23c2e5,v,60c364555acc9bbeb1195760a7ed0f489c8e011bfa,_,60f69b430b53da4474309ff0cbd403823a67b2af4f,y"],43928)}];
1
+ module.exports=[43928,a=>{"use strict";var b=a.i(70043),c=a.i(4757);a.S([b,"400e6ee91aede8cbbee59174183b1c251fd5c04c2f,f",0,c,"4014aa056bb50c82c4c5d043ea43cf93b62d271403,q,6017c749753af49b1a92ac65eefd34fb3013277ed0,_,60879627fcb3859acdcedd271cee07b8efe6779f22,G,60c5ea0de7f3955f10be5a2689cc88f9c20e116d9d,W,60c83e83c134744a861bfcd84946e8939c2b708f6d,v,60e774ea1bc22f071020621a68eaa0f19648488f7e,y"],43928)}];
2
2
 
3
3
  //# sourceMappingURL=web__next-internal_server_app_%28console%29_overview_page_actions_18on1ziyg1nzy.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/overview/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '4014cabd1a393a5ea041c3f3ba58bfec7066ad4931'} from 'ACTIONS_MODULE0'\nexport {answerDelivery as '405f8667841fa6e8aa9dc4e14864bf70904e4f5d6d'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '60244266b9259a9692e97c506b5ce52ec2c7a1a150'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '60b0e24f763eae8da17acbb522c69b2a378f23c2e5'} from 'ACTIONS_MODULE1'\nexport {turnEmail as '60c364555acc9bbeb1195760a7ed0f489c8e011bfa'} from 'ACTIONS_MODULE1'\nexport {turnOffWebPush as '6067fb456daee8172103838ce816e90819f17e5337'} from 'ACTIONS_MODULE1'\nexport {turnOnWebPush as '60f69b430b53da4474309ff0cbd403823a67b2af4f'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/overview/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '400e6ee91aede8cbbee59174183b1c251fd5c04c2f'} from 'ACTIONS_MODULE0'\nexport {answerDelivery as '4014aa056bb50c82c4c5d043ea43cf93b62d271403'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '60879627fcb3859acdcedd271cee07b8efe6779f22'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '60c83e83c134744a861bfcd84946e8939c2b708f6d'} from 'ACTIONS_MODULE1'\nexport {turnEmail as '6017c749753af49b1a92ac65eefd34fb3013277ed0'} from 'ACTIONS_MODULE1'\nexport {turnOffWebPush as '60c5ea0de7f3955f10be5a2689cc88f9c20e116d9d'} from 'ACTIONS_MODULE1'\nexport {turnOnWebPush as '60e774ea1bc22f071020621a68eaa0f19648488f7e'} from 'ACTIONS_MODULE1'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -1,3 +1,3 @@
1
- module.exports=[96001,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(30587),e=a.i(60224),f=a.i(88412),g=a.i(36855),h=a.i(35149),i=a.i(77237),j=a.i(64943),k=a.i(5050);let l=(0,k.createServerReference)("60152c0945a891c9afc01146ee42d7764b007672bb",k.callServer,void 0,k.findSourceMapURL,"addA2aAgent"),m={kind:"idle"};a.s(["A2aAgentForm",0,function({fleetId:a,requestId:k,owners:n,scopes:o}){let[p,q]=(0,c.useActionState)(l,m),r="refused"===p.kind?p.fields:{};return(0,b.jsxs)("form",{action:q,className:`${f.r} grid gap-3`,"data-testid":"add-a2a-agent-form",children:[(0,b.jsx)("input",{type:"hidden",name:d.H,value:a}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:k}),(0,b.jsx)("h1",{className:"text-title font-semibold",children:"Add an A2A agent"}),(0,b.jsx)(g.f,{state:"refused"===p.kind?p:{kind:"idle"}}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Name, the proxy ship's"}),(0,b.jsx)("input",{className:f.w,name:"name",defaultValue:r.name??"",required:!0})]}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Card address"}),(0,b.jsx)("input",{className:f.w,type:"url",name:"cardUrl",defaultValue:r.cardUrl??"",placeholder:"https://agent.example.com/.well-known/agent-card.json",required:!0}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"The gateway reads the card first: an agent whose card it cannot state is not added."})]}),(0,b.jsx)(e.f,{legend:"The agent's credential",fields:r,noneHelp:"The gateway sends no credential: for an agent that asks for none."}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Messages in flight at once"}),(0,b.jsx)("input",{className:f.w,type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:r.concurrencyLimit??"4"})]}),(0,b.jsx)(h.f,{choices:n.isOk?n.value:[],current:null,help:"A person ship or argo. It answers for this agent.",refusal:n.isOk?void 0:n.refusal}),0===o.length?null:(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),o.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",name:`${j.f}${a}`,defaultChecked:void 0!==r[`${j.f}${a}`]}),(0,b.jsx)("span",{className:"font-mono text-code",children:a})]},a))]}),(0,b.jsx)("div",{children:(0,b.jsx)(i.f,{pending:"Reading the card…",children:"Add"})})]})}],96001)}];
1
+ module.exports=[96001,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(30587),e=a.i(60224),f=a.i(88412),g=a.i(36855),h=a.i(35149),i=a.i(77237),j=a.i(64943),k=a.i(5050);let l=(0,k.createServerReference)("60085c6e7b7c0bfc028c33ee4ff6ce087eb0592373",k.callServer,void 0,k.findSourceMapURL,"addA2aAgent"),m={kind:"idle"};a.s(["A2aAgentForm",0,function({fleetId:a,requestId:k,owners:n,scopes:o}){let[p,q]=(0,c.useActionState)(l,m),r="refused"===p.kind?p.fields:{};return(0,b.jsxs)("form",{action:q,className:`${f.r} grid gap-3`,"data-testid":"add-a2a-agent-form",children:[(0,b.jsx)("input",{type:"hidden",name:d.H,value:a}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:k}),(0,b.jsx)("h1",{className:"text-title font-semibold",children:"Add an A2A agent"}),(0,b.jsx)(g.f,{state:"refused"===p.kind?p:{kind:"idle"}}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Name, the proxy ship's"}),(0,b.jsx)("input",{className:f.w,name:"name",defaultValue:r.name??"",required:!0})]}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Card address"}),(0,b.jsx)("input",{className:f.w,type:"url",name:"cardUrl",defaultValue:r.cardUrl??"",placeholder:"https://agent.example.com/.well-known/agent-card.json",required:!0}),(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"The gateway reads the card first: an agent whose card it cannot state is not added."})]}),(0,b.jsx)(e.f,{legend:"The agent's credential",fields:r,noneHelp:"The gateway sends no credential: for an agent that asks for none."}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Messages in flight at once"}),(0,b.jsx)("input",{className:f.w,type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:r.concurrencyLimit??"4"})]}),(0,b.jsx)(h.f,{choices:n.isOk?n.value:[],current:null,help:"A person ship or argo. It answers for this agent.",refusal:n.isOk?void 0:n.refusal}),0===o.length?null:(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),o.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",name:`${j.f}${a}`,defaultChecked:void 0!==r[`${j.f}${a}`]}),(0,b.jsx)("span",{className:"font-mono text-code",children:a})]},a))]}),(0,b.jsx)("div",{children:(0,b.jsx)(i.f,{pending:"Reading the card…",children:"Add"})})]})}],96001)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/add-a2a-agent/ui/a2a-agent-form.tsx","../../../../../web/features/add-a2a-agent/data%3A28f502%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useActionState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { CredentialFields } from '../../forms/ui/credential-fields';\nimport { CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { OwnerField, type OwnerChoices } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { SCOPE_FIELD_PREFIX } from '../../outside-party/scope-changes';\nimport { addA2aAgent, type AddA2aAgentState } from '../actions';\n\nconst IDLE: AddA2aAgentState = { kind: 'idle' };\n\nconst CONCURRENCY_LIMIT_DEFAULT = '4';\n\n/** The form that adds an A2A agent: its name, card address, credential and calls at once, its owner and the approver's own scopes to tick. */\nexport function A2aAgentForm({ fleetId, requestId, owners, scopes }: { fleetId: string; requestId: string; owners: OwnerChoices; scopes: readonly string[] }) {\n const [state, action] = useActionState(addA2aAgent, IDLE);\n const fields = state.kind === 'refused' ? state.fields : {};\n return (\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-a2a-agent-form\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"requestId\" value={requestId} />\n <h1 className=\"text-title font-semibold\">Add an A2A agent</h1>\n <Outcome state={state.kind === 'refused' ? state : { kind: 'idle' }} />\n <label className={LABEL}>\n <span>Name, the proxy ship&apos;s</span>\n <input className={INPUT} name=\"name\" defaultValue={fields.name ?? ''} required />\n </label>\n <label className={LABEL}>\n <span>Card address</span>\n <input className={INPUT} type=\"url\" name=\"cardUrl\" defaultValue={fields.cardUrl ?? ''} placeholder=\"https://agent.example.com/.well-known/agent-card.json\" required />\n <span className=\"text-caption text-muted-foreground\">The gateway reads the card first: an agent whose card it cannot state is not added.</span>\n </label>\n <CredentialFields legend=\"The agent's credential\" fields={fields} noneHelp=\"The gateway sends no credential: for an agent that asks for none.\" />\n <label className={LABEL}>\n <span>Messages in flight at once</span>\n <input className={INPUT} type=\"number\" name=\"concurrencyLimit\" min={1} max={10} defaultValue={fields.concurrencyLimit ?? CONCURRENCY_LIMIT_DEFAULT} />\n </label>\n <OwnerField choices={owners.isOk ? owners.value : []} current={null} help=\"A person ship or argo. It answers for this agent.\" refusal={owners.isOk ? undefined : owners.refusal} />\n {scopes.length === 0 ? null : (\n <fieldset className=\"grid gap-2\">\n <legend className=\"font-medium\">Scopes, beside sending and receiving</legend>\n {scopes.map((scope) => (\n <label key={scope} className=\"flex items-center gap-2\">\n <input type=\"checkbox\" name={`${SCOPE_FIELD_PREFIX}${scope}`} defaultChecked={fields[`${SCOPE_FIELD_PREFIX}${scope}`] !== undefined} />\n <span className=\"font-mono text-code\">{scope}</span>\n </label>\n ))}\n </fieldset>\n )}\n <div>\n <SubmitButton pending=\"Reading the card…\">Add</SubmitButton>\n </div>\n </form>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60152c0945a891c9afc01146ee42d7764b007672bb\":{\"name\":\"addA2aAgent\"}},\"web/features/add-a2a-agent/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(\"60152c0945a891c9afc01146ee42d7764b007672bb\",callServer,void 0,findSourceMapURL,\"addA2aAgent\");export{$$RSC_SERVER_ACTION_0 as addA2aAgent};"],"names":["$$RSC_SERVER_ACTION_0"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAA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QAAA,CAAkB,UAAU,oCAC3B,CAAA,EAAA,EAAA,GAAA,EAAC,QAAA,CAAM,KAAK,WAAW,KAAM,CAAA,EAAG,EAAA,CAAkB,CAAA,EAAG,EAAA,CAAO,CAAE,eAA4D,SAA5C,CAAM,CAAC,CAAA,EAAG,EAAA,CAAkB,CAAA,EAAG,EAAA,CAAO,CAAC,GACrH,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,+BAAuB,MAF7B,OAOlB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,UACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,QAAQ,6BAAoB,YAIlD"}
1
+ {"version":3,"sources":["../../../../../web/features/add-a2a-agent/ui/a2a-agent-form.tsx","../../../../../web/features/add-a2a-agent/data%3Ac78b3a%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useActionState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { CredentialFields } from '../../forms/ui/credential-fields';\nimport { CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { OwnerField, type OwnerChoices } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { SCOPE_FIELD_PREFIX } from '../../outside-party/scope-changes';\nimport { addA2aAgent, type AddA2aAgentState } from '../actions';\n\nconst IDLE: AddA2aAgentState = { kind: 'idle' };\n\nconst CONCURRENCY_LIMIT_DEFAULT = '4';\n\n/** The form that adds an A2A agent: its name, card address, credential and calls at once, its owner and the approver's own scopes to tick. */\nexport function A2aAgentForm({ fleetId, requestId, owners, scopes }: { fleetId: string; requestId: string; owners: OwnerChoices; scopes: readonly string[] }) {\n const [state, action] = useActionState(addA2aAgent, IDLE);\n const fields = state.kind === 'refused' ? state.fields : {};\n return (\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-a2a-agent-form\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"requestId\" value={requestId} />\n <h1 className=\"text-title font-semibold\">Add an A2A agent</h1>\n <Outcome state={state.kind === 'refused' ? state : { kind: 'idle' }} />\n <label className={LABEL}>\n <span>Name, the proxy ship&apos;s</span>\n <input className={INPUT} name=\"name\" defaultValue={fields.name ?? ''} required />\n </label>\n <label className={LABEL}>\n <span>Card address</span>\n <input className={INPUT} type=\"url\" name=\"cardUrl\" defaultValue={fields.cardUrl ?? ''} placeholder=\"https://agent.example.com/.well-known/agent-card.json\" required />\n <span className=\"text-caption text-muted-foreground\">The gateway reads the card first: an agent whose card it cannot state is not added.</span>\n </label>\n <CredentialFields legend=\"The agent's credential\" fields={fields} noneHelp=\"The gateway sends no credential: for an agent that asks for none.\" />\n <label className={LABEL}>\n <span>Messages in flight at once</span>\n <input className={INPUT} type=\"number\" name=\"concurrencyLimit\" min={1} max={10} defaultValue={fields.concurrencyLimit ?? CONCURRENCY_LIMIT_DEFAULT} />\n </label>\n <OwnerField choices={owners.isOk ? owners.value : []} current={null} help=\"A person ship or argo. It answers for this agent.\" refusal={owners.isOk ? undefined : owners.refusal} />\n {scopes.length === 0 ? null : (\n <fieldset className=\"grid gap-2\">\n <legend className=\"font-medium\">Scopes, beside sending and receiving</legend>\n {scopes.map((scope) => (\n <label key={scope} className=\"flex items-center gap-2\">\n <input type=\"checkbox\" name={`${SCOPE_FIELD_PREFIX}${scope}`} defaultChecked={fields[`${SCOPE_FIELD_PREFIX}${scope}`] !== undefined} />\n <span className=\"font-mono text-code\">{scope}</span>\n </label>\n ))}\n </fieldset>\n )}\n <div>\n <SubmitButton pending=\"Reading the card…\">Add</SubmitButton>\n </div>\n </form>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60085c6e7b7c0bfc028c33ee4ff6ce087eb0592373\":{\"name\":\"addA2aAgent\"}},\"web/features/add-a2a-agent/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(\"60085c6e7b7c0bfc028c33ee4ff6ce087eb0592373\",callServer,void 0,findSourceMapURL,\"addA2aAgent\");export{$$RSC_SERVER_ACTION_0 as addA2aAgent};"],"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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCVmM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,eDalb,EAAyB,CAAE,KAAM,MAAO,wBAKvC,SAAS,AAAa,SAAE,CAAO,WAAE,CAAS,QAAE,CAAM,QAAE,CAAM,CAA2F,EAC1J,GAAM,CAAC,EAAO,EAAO,CAAG,CAAA,EAAA,EAAA,cAAc,AAAd,EAAe,EAAa,GAC9C,EAAwB,YAAf,EAAM,IAAI,CAAiB,EAAM,MAAM,CAAG,CAAC,EAC1D,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,OAAA,CAAK,OAAQ,EAAQ,UAAW,CAAA,EAAG,EAAA,CAAI,CAAC,WAAW,CAAC,CAAE,cAAY,+BACjE,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,YAAY,MAAO,IAC7C,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,oCAA2B,qBACzC,CAAA,EAAA,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,EAAO,OAAO,GAC5J,IAAlB,EAAO,MAAM,CAAS,KACrB,CAAA,EAAA,EAAA,IAAA,EAAC,WAAA,CAAS,UAAU,uBAClB,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CAAO,UAAU,uBAAc,yCAC/B,EAAO,GAAG,CAAC,AAAC,GACX,CAAA,EAAA,EAAA,IAAA,EAAC,QAAA,CAAkB,UAAU,oCAC3B,CAAA,EAAA,EAAA,GAAA,EAAC,QAAA,CAAM,KAAK,WAAW,KAAM,CAAA,EAAG,EAAA,CAAkB,CAAA,EAAG,EAAA,CAAO,CAAE,eAA4D,SAA5C,CAAM,CAAC,CAAA,EAAG,EAAA,CAAkB,CAAA,EAAG,EAAA,CAAO,CAAC,GACrH,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,+BAAuB,MAF7B,OAOlB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,UACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,QAAQ,6BAAoB,YAIlD"}
@@ -1,3 +1,3 @@
1
- module.exports=[90344,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(25959),e=a.i(30587),f=a.i(88412),g=a.i(36855),h=a.i(35149),i=a.i(77237),j=a.i(64943),k=a.i(5050);let l=(0,k.createServerReference)("60b57eca1e0f69eb80ba9513020f68bc56ce52970c",k.callServer,void 0,k.findSourceMapURL,"addA2aClient"),m={kind:"idle"};function n({name:a,bearer:c,fleetId:e}){return(0,b.jsxs)("section",{className:`${f.r} grid gap-3`,"data-testid":"add-a2a-client-added",children:[(0,b.jsxs)("h2",{className:"text-section font-semibold",children:[a," is added"]}),(0,b.jsx)("p",{children:"Hand its client this bearer now. It is shown only once: the gateway keeps no copy it can show again."}),(0,b.jsx)("code",{className:"break-all rounded-md border border-border bg-background px-3 py-2 font-mono text-code","data-testid":"add-a2a-client-bearer",children:c}),(0,b.jsx)("p",{children:(0,b.jsx)("a",{href:(0,d.f)(`/outside-parties/${encodeURIComponent(a)}`,e),className:"text-primary hover:underline",children:"Its card addresses"})})]})}a.s(["A2aClientForm",0,function({fleetId:a,requestId:d,owners:k,scopes:o}){let[p,q]=(0,c.useActionState)(l,m);return"added"===p.kind?(0,b.jsx)(n,{name:p.name,bearer:p.bearer,fleetId:a}):(0,b.jsxs)("form",{action:q,className:`${f.r} grid gap-3`,"data-testid":"add-a2a-client-form",children:[(0,b.jsx)("input",{type:"hidden",name:e.H,value:a}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:d}),(0,b.jsx)("h1",{className:"text-title font-semibold",children:"Add an A2A client"}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Name, the proxy ship's"}),(0,b.jsx)("input",{className:f.w,name:"name",required:!0})]}),(0,b.jsx)(h.f,{choices:k.isOk?k.value:[],current:null,help:"A person ship or argo. It answers for this client.",refusal:k.isOk?void 0:k.refusal}),0===o.length?null:(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),o.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",name:`${j.f}${a}`}),(0,b.jsx)("span",{className:"font-mono text-code",children:a})]},a))]}),(0,b.jsx)("div",{children:(0,b.jsx)(i.f,{pending:"Adding…",children:"Add"})}),(0,b.jsx)(g.f,{state:"refused"===p.kind?p:{kind:"idle"}})]})}],90344)}];
1
+ module.exports=[90344,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(25959),e=a.i(30587),f=a.i(88412),g=a.i(36855),h=a.i(35149),i=a.i(77237),j=a.i(64943),k=a.i(5050);let l=(0,k.createServerReference)("60508bb3094441c88475ec484f81a0c6c47c0812a1",k.callServer,void 0,k.findSourceMapURL,"addA2aClient"),m={kind:"idle"};function n({name:a,bearer:c,fleetId:e}){return(0,b.jsxs)("section",{className:`${f.r} grid gap-3`,"data-testid":"add-a2a-client-added",children:[(0,b.jsxs)("h2",{className:"text-section font-semibold",children:[a," is added"]}),(0,b.jsx)("p",{children:"Hand its client this bearer now. It is shown only once: the gateway keeps no copy it can show again."}),(0,b.jsx)("code",{className:"break-all rounded-md border border-border bg-background px-3 py-2 font-mono text-code","data-testid":"add-a2a-client-bearer",children:c}),(0,b.jsx)("p",{children:(0,b.jsx)("a",{href:(0,d.f)(`/outside-parties/${encodeURIComponent(a)}`,e),className:"text-primary hover:underline",children:"Its card addresses"})})]})}a.s(["A2aClientForm",0,function({fleetId:a,requestId:d,owners:k,scopes:o}){let[p,q]=(0,c.useActionState)(l,m);return"added"===p.kind?(0,b.jsx)(n,{name:p.name,bearer:p.bearer,fleetId:a}):(0,b.jsxs)("form",{action:q,className:`${f.r} grid gap-3`,"data-testid":"add-a2a-client-form",children:[(0,b.jsx)("input",{type:"hidden",name:e.H,value:a}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:d}),(0,b.jsx)("h1",{className:"text-title font-semibold",children:"Add an A2A client"}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Name, the proxy ship's"}),(0,b.jsx)("input",{className:f.w,name:"name",required:!0})]}),(0,b.jsx)(h.f,{choices:k.isOk?k.value:[],current:null,help:"A person ship or argo. It answers for this client.",refusal:k.isOk?void 0:k.refusal}),0===o.length?null:(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),o.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",name:`${j.f}${a}`}),(0,b.jsx)("span",{className:"font-mono text-code",children:a})]},a))]}),(0,b.jsx)("div",{children:(0,b.jsx)(i.f,{pending:"Adding…",children:"Add"})}),(0,b.jsx)(g.f,{state:"refused"===p.kind?p:{kind:"idle"}})]})}],90344)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/add-a2a-client/ui/a2a-client-form.tsx","../../../../../web/features/outside-parties/paths.ts","../../../../../web/features/add-a2a-client/data%3A9f58b7%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useActionState } from 'react';\n\nimport { inFleet } from '../../../lib/gateway-api/page-account';\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { OwnerField, type OwnerChoices } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { partyPath } from '../../outside-parties/paths';\nimport { SCOPE_FIELD_PREFIX } from '../../outside-party/scope-changes';\nimport { addA2aClient, type AddA2aClientState } from '../actions';\n\nconst IDLE: AddA2aClientState = { kind: 'idle' };\n\n/** The bearer, shown this once: the gateway keeps only its hash. */\nfunction Added({ name, bearer, fleetId }: { name: string; bearer: string; fleetId: string }) {\n return (\n <section className={`${CARD} grid gap-3`} data-testid=\"add-a2a-client-added\">\n <h2 className=\"text-section font-semibold\">{name} is added</h2>\n <p>Hand its client this bearer now. It is shown only once: the gateway keeps no copy it can show again.</p>\n <code className=\"break-all rounded-md border border-border bg-background px-3 py-2 font-mono text-code\" data-testid=\"add-a2a-client-bearer\">\n {bearer}\n </code>\n <p>\n <a href={inFleet(partyPath(name), fleetId)} className=\"text-primary hover:underline\">\n Its card addresses\n </a>\n </p>\n </section>\n );\n}\n\n/** The form that adds an A2A client: its name, owner and the approver's own scopes to tick; then its bearer. */\nexport function A2aClientForm({ fleetId, requestId, owners, scopes }: { fleetId: string; requestId: string; owners: OwnerChoices; scopes: readonly string[] }) {\n const [state, action] = useActionState(addA2aClient, IDLE);\n if (state.kind === 'added') {\n return <Added name={state.name} bearer={state.bearer} fleetId={fleetId} />;\n }\n return (\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-a2a-client-form\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"requestId\" value={requestId} />\n <h1 className=\"text-title font-semibold\">Add an A2A client</h1>\n <label className={LABEL}>\n <span>Name, the proxy ship&apos;s</span>\n <input className={INPUT} name=\"name\" required />\n </label>\n <OwnerField choices={owners.isOk ? owners.value : []} current={null} help=\"A person ship or argo. It answers for this client.\" refusal={owners.isOk ? undefined : owners.refusal} />\n {scopes.length === 0 ? null : (\n <fieldset className=\"grid gap-2\">\n <legend className=\"font-medium\">Scopes, beside sending and receiving</legend>\n {scopes.map((scope) => (\n <label key={scope} className=\"flex items-center gap-2\">\n <input type=\"checkbox\" name={`${SCOPE_FIELD_PREFIX}${scope}`} />\n <span className=\"font-mono text-code\">{scope}</span>\n </label>\n ))}\n </fieldset>\n )}\n <div>\n <SubmitButton pending=\"Adding…\">Add</SubmitButton>\n </div>\n <Outcome state={state.kind === 'refused' ? state : { kind: 'idle' }} />\n </form>\n );\n}\n","/** The outside parties' pages. */\nexport const OUTSIDE_PARTIES_PATH = '/outside-parties';\n\nexport const ADD_SERVER_PATH = `${OUTSIDE_PARTIES_PATH}/add`;\n\nexport const ADD_A2A_CLIENT_PATH = `${OUTSIDE_PARTIES_PATH}/add-a2a-client`;\n\nexport const ADD_A2A_AGENT_PATH = `${OUTSIDE_PARTIES_PATH}/add-a2a-agent`;\n\n/** One outside party's page, or one of its own: changing it, retiring it. */\nexport function partyPath(name: string, action?: 'change' | 'retire'): string {\n return `${OUTSIDE_PARTIES_PATH}/${encodeURIComponent(name)}${action === undefined ? '' : `/${action}`}`;\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60b57eca1e0f69eb80ba9513020f68bc56ce52970c\":{\"name\":\"addA2aClient\"}},\"web/features/add-a2a-client/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(\"60b57eca1e0f69eb80ba9513020f68bc56ce52970c\",callServer,void 0,findSourceMapURL,\"addA2aClient\");export{$$RSC_SERVER_ACTION_0 as addA2aClient};"],"names":["OUTSIDE_PARTIES_PATH","ADD_SERVER_PATH","ADD_A2A_CLIENT_PATH","ADD_A2A_AGENT_PATH","partyPath","name","action","encodeURIComponent","undefined"],"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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OEXqM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,gBFcpb,EAA0B,CAAE,KAAM,MAAO,EAG/C,SAAS,EAAM,MAAE,CAAI,QAAE,CAAM,SAAE,CAAO,CAAqD,EACzF,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,UAAA,CAAQ,UAAW,CAAA,EAAG,EAAA,CAAI,CAAC,WAAW,CAAC,CAAE,cAAY,iCACpD,CAAA,EAAA,EAAA,IAAA,EAAC,KAAA,CAAG,UAAU,uCAA8B,EAAK,eACjD,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,UAAE,yGACH,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,wFAAwF,cAAY,iCACjH,IAEH,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,UACC,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,KAAM,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,ACfhB,GAAGA,iBAAwBO,IAAH,CAAC,cAAqBF,ADepB,ICfsE,CDe/D,GCfqBC,ADeX,UAAU,CCfYE,YAAY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A,CAAO,UAAU,uBAAc,yCAC/B,EAAO,GAAG,CAAC,AAAC,GACX,CAAA,EAAA,EAAA,IAAA,EAAC,QAAA,CAAkB,UAAU,oCAC3B,CAAA,EAAA,EAAA,GAAA,EAAC,QAAA,CAAM,KAAK,WAAW,KAAM,CAAA,EAAG,EAAA,CAAkB,CAAA,EAAG,EAAA,CAAO,GAC5D,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,+BAAuB,MAF7B,OAOlB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,UACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,QAAQ,mBAAU,UAElC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAO,CAAA,CAAC,MAAsB,YAAf,EAAM,IAAI,CAAiB,EAAQ,CAAE,KAAM,MAAO,MAGxE"}
1
+ {"version":3,"sources":["../../../../../web/features/add-a2a-client/ui/a2a-client-form.tsx","../../../../../web/features/outside-parties/paths.ts","../../../../../web/features/add-a2a-client/data%3A353f22%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useActionState } from 'react';\n\nimport { inFleet } from '../../../lib/gateway-api/page-account';\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { OwnerField, type OwnerChoices } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { partyPath } from '../../outside-parties/paths';\nimport { SCOPE_FIELD_PREFIX } from '../../outside-party/scope-changes';\nimport { addA2aClient, type AddA2aClientState } from '../actions';\n\nconst IDLE: AddA2aClientState = { kind: 'idle' };\n\n/** The bearer, shown this once: the gateway keeps only its hash. */\nfunction Added({ name, bearer, fleetId }: { name: string; bearer: string; fleetId: string }) {\n return (\n <section className={`${CARD} grid gap-3`} data-testid=\"add-a2a-client-added\">\n <h2 className=\"text-section font-semibold\">{name} is added</h2>\n <p>Hand its client this bearer now. It is shown only once: the gateway keeps no copy it can show again.</p>\n <code className=\"break-all rounded-md border border-border bg-background px-3 py-2 font-mono text-code\" data-testid=\"add-a2a-client-bearer\">\n {bearer}\n </code>\n <p>\n <a href={inFleet(partyPath(name), fleetId)} className=\"text-primary hover:underline\">\n Its card addresses\n </a>\n </p>\n </section>\n );\n}\n\n/** The form that adds an A2A client: its name, owner and the approver's own scopes to tick; then its bearer. */\nexport function A2aClientForm({ fleetId, requestId, owners, scopes }: { fleetId: string; requestId: string; owners: OwnerChoices; scopes: readonly string[] }) {\n const [state, action] = useActionState(addA2aClient, IDLE);\n if (state.kind === 'added') {\n return <Added name={state.name} bearer={state.bearer} fleetId={fleetId} />;\n }\n return (\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-a2a-client-form\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"requestId\" value={requestId} />\n <h1 className=\"text-title font-semibold\">Add an A2A client</h1>\n <label className={LABEL}>\n <span>Name, the proxy ship&apos;s</span>\n <input className={INPUT} name=\"name\" required />\n </label>\n <OwnerField choices={owners.isOk ? owners.value : []} current={null} help=\"A person ship or argo. It answers for this client.\" refusal={owners.isOk ? undefined : owners.refusal} />\n {scopes.length === 0 ? null : (\n <fieldset className=\"grid gap-2\">\n <legend className=\"font-medium\">Scopes, beside sending and receiving</legend>\n {scopes.map((scope) => (\n <label key={scope} className=\"flex items-center gap-2\">\n <input type=\"checkbox\" name={`${SCOPE_FIELD_PREFIX}${scope}`} />\n <span className=\"font-mono text-code\">{scope}</span>\n </label>\n ))}\n </fieldset>\n )}\n <div>\n <SubmitButton pending=\"Adding…\">Add</SubmitButton>\n </div>\n <Outcome state={state.kind === 'refused' ? state : { kind: 'idle' }} />\n </form>\n );\n}\n","/** The outside parties' pages. */\nexport const OUTSIDE_PARTIES_PATH = '/outside-parties';\n\nexport const ADD_SERVER_PATH = `${OUTSIDE_PARTIES_PATH}/add`;\n\nexport const ADD_A2A_CLIENT_PATH = `${OUTSIDE_PARTIES_PATH}/add-a2a-client`;\n\nexport const ADD_A2A_AGENT_PATH = `${OUTSIDE_PARTIES_PATH}/add-a2a-agent`;\n\n/** One outside party's page, or one of its own: changing it, retiring it. */\nexport function partyPath(name: string, action?: 'change' | 'retire'): string {\n return `${OUTSIDE_PARTIES_PATH}/${encodeURIComponent(name)}${action === undefined ? '' : `/${action}`}`;\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60508bb3094441c88475ec484f81a0c6c47c0812a1\":{\"name\":\"addA2aClient\"}},\"web/features/add-a2a-client/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(\"60508bb3094441c88475ec484f81a0c6c47c0812a1\",callServer,void 0,findSourceMapURL,\"addA2aClient\");export{$$RSC_SERVER_ACTION_0 as addA2aClient};"],"names":["OUTSIDE_PARTIES_PATH","ADD_SERVER_PATH","ADD_A2A_CLIENT_PATH","ADD_A2A_AGENT_PATH","partyPath","name","action","encodeURIComponent","undefined"],"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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OEXqM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,gBFcpb,EAA0B,CAAE,KAAM,MAAO,EAG/C,SAAS,EAAM,MAAE,CAAI,QAAE,CAAM,SAAE,CAAO,CAAqD,EACzF,MACE,CAAA,EA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}){let{name:e,description:f,isReadOnly:g,isNew:h=!1}=a,i=void 0===f?"":f.split("\n").map(a=>a.trim()).find(a=>""!==a)??"",j=void 0!==f&&f.trim()!==i;return(0,b.jsxs)("li",{className:"grid gap-1 border-b border-border py-2 last:border-b-0","data-testid":d,children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,(0,b.jsx)("span",{className:"font-mono",children:e}),g?(0,b.jsx)(k.E,{children:"reads only"}):null,h?(0,b.jsx)(k.T,{tone:"attention",label:"New"}):null]}),""===i?null:j?(0,b.jsxs)("details",{className:"text-muted-foreground",children:[(0,b.jsx)("summary",{className:"cursor-pointer",children:i}),(0,b.jsx)("p",{className:"mt-1 whitespace-pre-line",children:f})]}):(0,b.jsx)("p",{className:"text-muted-foreground",children:i})]})}var m=a.i(5050);let n=(0,m.createServerReference)("6022028d1a3d86ce48701f3606d2372e8023556089",m.callServer,void 0,m.findSourceMapURL,"approveServer"),o=(0,m.createServerReference)("60ba25b8b8f5760a68cbec88a1caa4003a6807ad97",m.callServer,void 0,m.findSourceMapURL,"checkServer"),p=["Address","Check","Owner"],q=["url","credentialKind","token","clientId","clientSecret","issuer","scope"];function r({at:a}){return(0,b.jsx)("ol",{className:"flex gap-4",children:p.map((c,d)=>(0,b.jsxs)("li",{"aria-current":d===a?"step":void 0,className:d<=a?"font-medium":"text-muted-foreground",children:[d+1," ",c]},c))})}function s({refusal:a}){return void 0===a?null:(0,b.jsx)(g.f,{state:{kind:"refused",message:a}})}function t({state:a,action:c,fleetId:g}){return(0,b.jsxs)("form",{action:c,className:`${f.r} grid gap-3`,"data-testid":"add-server-address",children:[(0,b.jsx)("input",{type:"hidden",name:d.H,value:g}),(0,b.jsx)(s,{refusal:a.refusal}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Streamable HTTP address"}),(0,b.jsx)("input",{className:f.w,type:"url",name:"url",defaultValue:a.fields.url??"",placeholder:"https://mcp.example.com/mcp",required:!0})]}),(0,b.jsx)(e.f,{legend:"The server's credential",fields:a.fields,noneHelp:"The gateway sends no credential: for a server reached only on a private network."}),(0,b.jsx)("div",{children:(0,b.jsx)(i.f,{pending:"Checking the server…",testId:"add-server-check",children:"Check the server"})})]})}function u({tools:a,canSwitch:d}){let[e,f]=(0,c.useState)(new Set),g=a.length-e.size;return(0,b.jsxs)("section",{className:"grid gap-2","data-testid":"add-server-tools",children:[(0,b.jsxs)("h2",{className:"flex flex-wrap justify-between gap-2 text-section font-semibold",children:[(0,b.jsxs)("span",{children:["The server answers: ",a.length," ",1===a.length?"tool":"tools"]}),d?(0,b.jsxs)("span",{role:"status",className:"font-normal text-muted-foreground","data-testid":"add-server-tools-on",children:[g," of ",a.length," on"]}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground",children:d?"The fleet may call only the tools switched on. A tool the server adds later starts off.":"Switching tools needs gateway:approve: every tool starts on, and an approver switches them on its page."}),(0,b.jsx)("ul",{className:"grid",children:a.map(a=>{let c=!e.has(a.name);return(0,b.jsx)(l,{tool:a,testId:"add-server-tool",control:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{type:"hidden",name:"toolShown",value:a.name}),c?(0,b.jsx)("input",{type:"hidden",name:"toolOn",value:a.name}):null,(0,b.jsx)(j.f,{isOn:c,label:a.name,onClick:()=>{var b;b=a.name,f(a=>{let c=new Set(a);return c.delete(b)||c.add(b),c})}})]}):null},a.name)})})]})}function v({state:a,refused:e,action:g,onBack:j,fleetId:k,canSwitchTools:l}){let m,n="refused"===e.kind&&e.requestId===a.requestId,o=n?e.fields:a.fields,p=o.url??"",[r,t]=(0,c.useState)(o.name??function(a){if(!URL.canParse(a))return"";let{hostname:b}=new URL(a);return/^\d+(\.\d+){3}$/.test(b)||b.startsWith("[")?"":(b.split(".").filter(a=>"mcp"!==a&&"www"!==a)[0]??"").toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"")}(p));return(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("form",{action:g,className:`${f.r} grid gap-3`,"data-testid":"add-server-owner",children:[(0,b.jsx)(u,{tools:a.tools,canSwitch:l}),(0,b.jsx)("h2",{className:"text-section font-semibold",children:"Its owner"}),(0,b.jsx)(s,{refusal:n?e.message:void 0}),(0,b.jsx)("input",{type:"hidden",name:d.H,value:k}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:a.requestId}),q.map(a=>(0,b.jsx)("input",{type:"hidden",name:a,value:o[a]??""},a)),(0,b.jsx)("p",{className:"font-mono text-muted-foreground",children:p}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{className:f.w,type:"text",name:"name",value:r,onChange:a=>{t(a.target.value)},required:!0})]}),(0,b.jsx)(h.f,{choices:a.owners,current:a.owners.find(a=>a.shipId===o.ownerShipId)??null,help:"A person ship or argo. It answers for this server."}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{className:f.w,type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:o.concurrencyLimit??"4"})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(i.f,{pending:"Adding…",testId:"add-server-approve",children:""===(m=r.trim())?"Add as outside party":m.length>20?`Add ${m.slice(0,20)}…`:`Add ${m}`}),(0,b.jsx)("button",{type:"button",className:f.x.secondary,onClick:j,children:"Back to the address"})]})]})})}a.s(["AddServer",0,function({fleetId:a,canSwitchTools:d}){let[e,f]=(0,c.useActionState)(o,{step:"address",fields:{}}),[g,h]=(0,c.useActionState)(n,{kind:"idle"}),[i,j]=(0,c.useState)(void 0),k="owner"===e.step&&i!==e.requestId?e:void 0;return(0,b.jsxs)("div",{className:"grid gap-4",children:[(0,b.jsx)("h1",{className:"text-title font-semibold",children:"Add MCP server"}),(0,b.jsx)(r,{at:2*(void 0!==k)}),void 0===k?(0,b.jsx)(t,{state:e,action:f,fleetId:a}):(0,b.jsx)(v,{state:k,refused:g,action:h,onBack:()=>{j(k.requestId)},fleetId:a,canSwitchTools:d})]})}],29372)}];
1
+ module.exports=[29372,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(30587),e=a.i(60224),f=a.i(88412),g=a.i(36855),h=a.i(35149),i=a.i(77237),j=a.i(10020),k=a.i(47763);function l({tool:a,control:c,testId:d}){let{name:e,description:f,isReadOnly:g,isNew:h=!1}=a,i=void 0===f?"":f.split("\n").map(a=>a.trim()).find(a=>""!==a)??"",j=void 0!==f&&f.trim()!==i;return(0,b.jsxs)("li",{className:"grid gap-1 border-b border-border py-2 last:border-b-0","data-testid":d,children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,(0,b.jsx)("span",{className:"font-mono",children:e}),g?(0,b.jsx)(k.E,{children:"reads only"}):null,h?(0,b.jsx)(k.T,{tone:"attention",label:"New"}):null]}),""===i?null:j?(0,b.jsxs)("details",{className:"text-muted-foreground",children:[(0,b.jsx)("summary",{className:"cursor-pointer",children:i}),(0,b.jsx)("p",{className:"mt-1 whitespace-pre-line",children:f})]}):(0,b.jsx)("p",{className:"text-muted-foreground",children:i})]})}var m=a.i(5050);let n=(0,m.createServerReference)("60393d4a3f1c34cc08eecf43779c328ad1fb18e7c7",m.callServer,void 0,m.findSourceMapURL,"approveServer"),o=(0,m.createServerReference)("60af6631f33744be859489a17cadd5ebe9823d4309",m.callServer,void 0,m.findSourceMapURL,"checkServer"),p=["Address","Check","Owner"],q=["url","credentialKind","token","clientId","clientSecret","issuer","scope"];function r({at:a}){return(0,b.jsx)("ol",{className:"flex gap-4",children:p.map((c,d)=>(0,b.jsxs)("li",{"aria-current":d===a?"step":void 0,className:d<=a?"font-medium":"text-muted-foreground",children:[d+1," ",c]},c))})}function s({refusal:a}){return void 0===a?null:(0,b.jsx)(g.f,{state:{kind:"refused",message:a}})}function t({state:a,action:c,fleetId:g}){return(0,b.jsxs)("form",{action:c,className:`${f.r} grid gap-3`,"data-testid":"add-server-address",children:[(0,b.jsx)("input",{type:"hidden",name:d.H,value:g}),(0,b.jsx)(s,{refusal:a.refusal}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Streamable HTTP address"}),(0,b.jsx)("input",{className:f.w,type:"url",name:"url",defaultValue:a.fields.url??"",placeholder:"https://mcp.example.com/mcp",required:!0})]}),(0,b.jsx)(e.f,{legend:"The server's credential",fields:a.fields,noneHelp:"The gateway sends no credential: for a server reached only on a private network."}),(0,b.jsx)("div",{children:(0,b.jsx)(i.f,{pending:"Checking the server…",testId:"add-server-check",children:"Check the server"})})]})}function u({tools:a,canSwitch:d}){let[e,f]=(0,c.useState)(new Set),g=a.length-e.size;return(0,b.jsxs)("section",{className:"grid gap-2","data-testid":"add-server-tools",children:[(0,b.jsxs)("h2",{className:"flex flex-wrap justify-between gap-2 text-section font-semibold",children:[(0,b.jsxs)("span",{children:["The server answers: ",a.length," ",1===a.length?"tool":"tools"]}),d?(0,b.jsxs)("span",{role:"status",className:"font-normal text-muted-foreground","data-testid":"add-server-tools-on",children:[g," of ",a.length," on"]}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground",children:d?"The fleet may call only the tools switched on. A tool the server adds later starts off.":"Switching tools needs gateway:approve: every tool starts on, and an approver switches them on its page."}),(0,b.jsx)("ul",{className:"grid",children:a.map(a=>{let c=!e.has(a.name);return(0,b.jsx)(l,{tool:a,testId:"add-server-tool",control:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{type:"hidden",name:"toolShown",value:a.name}),c?(0,b.jsx)("input",{type:"hidden",name:"toolOn",value:a.name}):null,(0,b.jsx)(j.f,{isOn:c,label:a.name,onClick:()=>{var b;b=a.name,f(a=>{let c=new Set(a);return c.delete(b)||c.add(b),c})}})]}):null},a.name)})})]})}function v({state:a,refused:e,action:g,onBack:j,fleetId:k,canSwitchTools:l}){let m,n="refused"===e.kind&&e.requestId===a.requestId,o=n?e.fields:a.fields,p=o.url??"",[r,t]=(0,c.useState)(o.name??function(a){if(!URL.canParse(a))return"";let{hostname:b}=new URL(a);return/^\d+(\.\d+){3}$/.test(b)||b.startsWith("[")?"":(b.split(".").filter(a=>"mcp"!==a&&"www"!==a)[0]??"").toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"")}(p));return(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)("form",{action:g,className:`${f.r} grid gap-3`,"data-testid":"add-server-owner",children:[(0,b.jsx)(u,{tools:a.tools,canSwitch:l}),(0,b.jsx)("h2",{className:"text-section font-semibold",children:"Its owner"}),(0,b.jsx)(s,{refusal:n?e.message:void 0}),(0,b.jsx)("input",{type:"hidden",name:d.H,value:k}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:a.requestId}),q.map(a=>(0,b.jsx)("input",{type:"hidden",name:a,value:o[a]??""},a)),(0,b.jsx)("p",{className:"font-mono text-muted-foreground",children:p}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{className:f.w,type:"text",name:"name",value:r,onChange:a=>{t(a.target.value)},required:!0})]}),(0,b.jsx)(h.f,{choices:a.owners,current:a.owners.find(a=>a.shipId===o.ownerShipId)??null,help:"A person ship or argo. It answers for this server."}),(0,b.jsxs)("label",{className:f.z,children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{className:f.w,type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:o.concurrencyLimit??"4"})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(i.f,{pending:"Adding…",testId:"add-server-approve",children:""===(m=r.trim())?"Add as outside party":m.length>20?`Add ${m.slice(0,20)}…`:`Add ${m}`}),(0,b.jsx)("button",{type:"button",className:f.x.secondary,onClick:j,children:"Back to the address"})]})]})})}a.s(["AddServer",0,function({fleetId:a,canSwitchTools:d}){let[e,f]=(0,c.useActionState)(o,{step:"address",fields:{}}),[g,h]=(0,c.useActionState)(n,{kind:"idle"}),[i,j]=(0,c.useState)(void 0),k="owner"===e.step&&i!==e.requestId?e:void 0;return(0,b.jsxs)("div",{className:"grid gap-4",children:[(0,b.jsx)("h1",{className:"text-title font-semibold",children:"Add MCP server"}),(0,b.jsx)(r,{at:2*(void 0!==k)}),void 0===k?(0,b.jsx)(t,{state:e,action:f,fleetId:a}):(0,b.jsx)(v,{state:k,refused:g,action:h,onBack:()=>{j(k.requestId)},fleetId:a,canSwitchTools:d})]})}],29372)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/add-server/ui/add-server.tsx","../../../../../web/features/add-server/tool-choice.ts","../../../../../web/features/outside-parties/ui/tool-row.tsx","../../../../../web/features/add-server/data%3A6651a3%20%3Ctext/javascript%3E","../../../../../web/features/add-server/data%3Af7bc68%20%3Ctext/javascript%3E","../../../../../web/features/add-server/suggested-name.ts"],"sourcesContent":["'use client';\n\nimport { useActionState, useState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { CredentialFields } from '../../forms/ui/credential-fields';\nimport { BUTTONS, CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { OwnerField } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { Switch } from '../../forms/ui/switch';\nimport { ToolRow } from '../../outside-parties/ui/tool-row';\nimport { approveServer, checkServer, type AddServerState, type ApproveState, type CheckedTool } from '../actions';\nimport { addButtonLabel, suggestedName } from '../suggested-name';\nimport { TOOL_ON_FIELD, TOOL_SHOWN_FIELD } from '../tool-choice';\n\n/** The steps of adding a server, as the design numbers them. */\nconst STEPS = ['Address', 'Check', 'Owner'] as const;\n\nconst CONCURRENCY_LIMIT_DEFAULT = '4';\n\n/** The credential fields, carried on from the address step to the owner step. */\nconst CARRIED_FIELDS = ['url', 'credentialKind', 'token', 'clientId', 'clientSecret', 'issuer', 'scope'] as const;\n\nfunction Steps({ at }: { at: number }) {\n return (\n <ol className=\"flex gap-4\">\n {STEPS.map((step, index) => (\n <li key={step} aria-current={index === at ? 'step' : undefined} className={index <= at ? 'font-medium' : 'text-muted-foreground'}>\n {index + 1} {step}\n </li>\n ))}\n </ol>\n );\n}\n\nfunction Refused({ refusal }: { refusal: string | undefined }) {\n return refusal === undefined ? null : <Outcome state={{ kind: 'refused', message: refusal }} />;\n}\n\nfunction AddressStep({ state, action, fleetId }: { state: Extract<AddServerState, { step: 'address' }> | { fields: Record<string, string>; refusal?: string }; action: (form: FormData) => void; fleetId: string }) {\n return (\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-server-address\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <Refused refusal={state.refusal} />\n <label className={LABEL}>\n <span>Streamable HTTP address</span>\n <input className={INPUT} type=\"url\" name=\"url\" defaultValue={state.fields.url ?? ''} placeholder=\"https://mcp.example.com/mcp\" required />\n </label>\n <CredentialFields legend=\"The server's credential\" fields={state.fields} noneHelp=\"The gateway sends no credential: for a server reached only on a private network.\" />\n <div>\n <SubmitButton pending=\"Checking the server…\" testId=\"add-server-check\">\n Check the server\n </SubmitButton>\n </div>\n </form>\n );\n}\n\n/**\n * The tools the check answered, one row each. An approver switches each on\n * or off, all on to start; the fleet may call only those on (aeolus-fleet#1151).\n * Without gateway:approve they show without switches, and every tool starts on.\n */\nfunction ToolsSection({ tools, canSwitch }: { tools: CheckedTool[]; canSwitch: boolean }) {\n const [off, setOff] = useState<ReadonlySet<string>>(new Set());\n const onCount = tools.length - off.size;\n const flip = (name: string) => {\n setOff((current) => {\n const next = new Set(current);\n if (!next.delete(name)) {\n next.add(name);\n }\n return next;\n });\n };\n return (\n <section className=\"grid gap-2\" data-testid=\"add-server-tools\">\n <h2 className=\"flex flex-wrap justify-between gap-2 text-section font-semibold\">\n <span>\n The server answers: {tools.length} {tools.length === 1 ? 'tool' : 'tools'}\n </span>\n {canSwitch ? (\n <span role=\"status\" className=\"font-normal text-muted-foreground\" data-testid=\"add-server-tools-on\">\n {onCount} of {tools.length} on\n </span>\n ) : null}\n </h2>\n <p className=\"text-muted-foreground\">{canSwitch ? 'The fleet may call only the tools switched on. A tool the server adds later starts off.' : 'Switching tools needs gateway:approve: every tool starts on, and an approver switches them on its page.'}</p>\n <ul className=\"grid\">\n {tools.map((tool) => {\n const isOn = !off.has(tool.name);\n return (\n <ToolRow\n key={tool.name}\n tool={tool}\n testId=\"add-server-tool\"\n control={\n canSwitch ? (\n <>\n <input type=\"hidden\" name={TOOL_SHOWN_FIELD} value={tool.name} />\n {isOn ? <input type=\"hidden\" name={TOOL_ON_FIELD} value={tool.name} /> : null}\n <Switch isOn={isOn} label={tool.name} onClick={() => { flip(tool.name); }} />\n </>\n ) : null\n }\n />\n );\n })}\n </ul>\n </section>\n );\n}\n\nfunction OwnerStep({ state, refused, action, onBack, fleetId, canSwitchTools }: { state: Extract<AddServerState, { step: 'owner' }>; refused: ApproveState; action: (form: FormData) => void; onBack: () => void; fleetId: string; canSwitchTools: boolean }) {\n // A refused approval of this check shows what the browser sent, and why.\n const isRefused = refused.kind === 'refused' && refused.requestId === state.requestId;\n const fields = isRefused ? refused.fields : state.fields;\n const url = fields.url ?? '';\n const [name, setName] = useState(fields.name ?? suggestedName(url));\n return (\n <>\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-server-owner\">\n <ToolsSection tools={state.tools} canSwitch={canSwitchTools} />\n <h2 className=\"text-section font-semibold\">Its owner</h2>\n <Refused refusal={isRefused ? refused.message : undefined} />\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"requestId\" value={state.requestId} />\n {CARRIED_FIELDS.map((field) => (\n <input key={field} type=\"hidden\" name={field} value={fields[field] ?? ''} />\n ))}\n <p className=\"font-mono text-muted-foreground\">{url}</p>\n <label className={LABEL}>\n <span>Proxy ship&apos;s name</span>\n <input className={INPUT} type=\"text\" name=\"name\" value={name} onChange={(event) => { setName(event.target.value); }} required />\n </label>\n <OwnerField choices={state.owners} current={state.owners.find((owner) => owner.shipId === fields.ownerShipId) ?? null} help=\"A person ship or argo. It answers for this server.\" />\n <label className={LABEL}>\n <span>Calls at once</span>\n <input className={INPUT} type=\"number\" name=\"concurrencyLimit\" min={1} max={10} defaultValue={fields.concurrencyLimit ?? CONCURRENCY_LIMIT_DEFAULT} />\n </label>\n <div className=\"flex gap-2\">\n <SubmitButton pending=\"Adding…\" testId=\"add-server-approve\">\n {addButtonLabel(name)}\n </SubmitButton>\n <button type=\"button\" className={BUTTONS.secondary} onClick={onBack}>\n Back to the address\n </button>\n </div>\n </form>\n </>\n );\n}\n\n/**\n * Adding an outside MCP server in three steps: its address and credential,\n * the gateway's check of the tools it answers with, then its owner. Each\n * button says at once that its step is on its way.\n */\nexport function AddServer({ fleetId, canSwitchTools }: { fleetId: string; canSwitchTools: boolean }) {\n const [checked, check] = useActionState(checkServer, { step: 'address', fields: {} });\n const [refused, approve] = useActionState(approveServer, { kind: 'idle' });\n // Going back shows the address step again, with what was sent, until the next check answers.\n const [backFrom, setBackFrom] = useState<string | undefined>(undefined);\n const owner = checked.step === 'owner' && backFrom !== checked.requestId ? checked : undefined;\n return (\n <div className=\"grid gap-4\">\n <h1 className=\"text-title font-semibold\">Add MCP server</h1>\n <Steps at={owner === undefined ? 0 : 2} />\n {owner === undefined ? (\n <AddressStep state={checked} action={check} fleetId={fleetId} />\n ) : (\n <OwnerStep state={owner} refused={refused} action={approve} onBack={() => { setBackFrom(owner.requestId); }} fleetId={fleetId} canSwitchTools={canSwitchTools} />\n )}\n </div>\n );\n}\n","/**\n * The tools an approver switched when adding a server (aeolus-fleet#1151):\n * each tool the check answered is sent as shown, and the ticked ones as on.\n */\n\n/** The field naming each tool whose switch the form showed. */\nexport const TOOL_SHOWN_FIELD = 'toolShown';\n\n/** The field naming each tool ticked on. */\nexport const TOOL_ON_FIELD = 'toolOn';\n\nfunction namesIn(form: FormData, field: string): string[] {\n return form.getAll(field).filter((value) => typeof value === 'string');\n}\n\n/** Each tool shown, on or off; none when the form showed no switch, so the server keeps every tool on. */\nexport function toolChoiceOf(form: FormData): { name: string; isOn: boolean }[] | undefined {\n const shown = namesIn(form, TOOL_SHOWN_FIELD);\n if (shown.length === 0) {\n return undefined;\n }\n const on = new Set(namesIn(form, TOOL_ON_FIELD));\n return shown.map((name) => ({ name, isOn: on.has(name) }));\n}\n\n/** A description's first line with words, as a tool's row shows it before it is opened. */\nexport function firstLineOf(description: string): string {\n return description.split('\\n').map((line) => line.trim()).find((line) => line !== '') ?? '';\n}\n","import type { ReactNode } from 'react';\n\nimport { firstLineOf } from '../../add-server/tool-choice';\nimport { StatusBadge, Tag } from './status-badge';\n\n/** A tool of an outside MCP server, as its row shows it. */\nexport interface ShownTool {\n name: string;\n description?: string | undefined;\n isReadOnly: boolean;\n isNew?: boolean;\n}\n\n/**\n * One tool in a list an approver scans (aeolus-fleet#1151): its switch, its\n * name, whether the server says it reads only, whether it is new, and its\n * description's first line, the whole description folded open on a click.\n */\nexport function ToolRow({ tool, control, testId }: { tool: ShownTool; control: ReactNode; testId?: string }) {\n const { name, description, isReadOnly, isNew = false } = tool;\n const firstLine = description === undefined ? '' : firstLineOf(description);\n const isFolded = description !== undefined && description.trim() !== firstLine;\n return (\n <li className=\"grid gap-1 border-b border-border py-2 last:border-b-0\" data-testid={testId}>\n <div className=\"flex flex-wrap items-center gap-2\">\n {control}\n <span className=\"font-mono\">{name}</span>\n {isReadOnly ? <Tag>reads only</Tag> : null}\n {isNew ? <StatusBadge tone=\"attention\" label=\"New\" /> : null}\n </div>\n {firstLine === '' ? null : isFolded ? (\n <details className=\"text-muted-foreground\">\n <summary className=\"cursor-pointer\">{firstLine}</summary>\n <p className=\"mt-1 whitespace-pre-line\">{description}</p>\n </details>\n ) : (\n <p className=\"text-muted-foreground\">{firstLine}</p>\n )}\n </li>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"6022028d1a3d86ce48701f3606d2372e8023556089\":{\"name\":\"approveServer\"}},\"web/features/add-server/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(\"6022028d1a3d86ce48701f3606d2372e8023556089\",callServer,void 0,findSourceMapURL,\"approveServer\");export{$$RSC_SERVER_ACTION_1 as approveServer};","/* __next_internal_action_entry_do_not_use__ [{\"60ba25b8b8f5760a68cbec88a1caa4003a6807ad97\":{\"name\":\"checkServer\"}},\"web/features/add-server/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(\"60ba25b8b8f5760a68cbec88a1caa4003a6807ad97\",callServer,void 0,findSourceMapURL,\"checkServer\");export{$$RSC_SERVER_ACTION_0 as checkServer};","/** The most characters of the proxy ship's name the add button shows. */\nconst BUTTON_NAME_MAX_LENGTH = 20;\n\n/** A proxy ship's name offered from a server's address: its host's first name that says whose it is; none for an IP address, whose numbers say nothing of it. */\nexport function suggestedName(url: string): string {\n if (!URL.canParse(url)) {\n return '';\n }\n const { hostname } = new URL(url);\n // URL writes every IPv4 host as four numbers, and keeps an IPv6 host in its brackets; the browser runs this too, so no node:net.\n if (/^\\d+(\\.\\d+){3}$/.test(hostname) || hostname.startsWith('[')) {\n return '';\n }\n const labels = hostname.split('.').filter((label) => label !== 'mcp' && label !== 'www');\n return (labels[0] ?? '').toLowerCase().replaceAll(/[^a-z0-9]+/g, '-').replaceAll(/^-+|-+$/g, '');\n}\n\n/** The add button's words: the proxy ship's name as typed, cut at 20 characters, or the plain words while none is typed. */\nexport function addButtonLabel(name: string): string {\n const typed = name.trim();\n if (typed === '') {\n return 'Add as outside party';\n }\n return typed.length > BUTTON_NAME_MAX_LENGTH ? `Add ${typed.slice(0, BUTTON_NAME_MAX_LENGTH)}…` : `Add ${typed}`;\n}\n"],"names":["TOOL_SHOWN_FIELD","TOOL_ON_FIELD","namesIn","form","field","getAll","filter","value","toolChoiceOf","shown","length","undefined","on","Set","map","name","isOn","has","firstLineOf","description","split","line","trim","find"],"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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OEPA,EAAA,EAAA,CAAA,CAAA,OAeO,SAAS,EAAQ,MAAE,CAAI,SAAE,CAAO,QAAE,CAAM,CAA4D,EACzG,GAAM,MAAE,CAAI,CAAE,aAAW,YAAE,CAAUA,OAAE,GAAQ,CAAK,CAAE,CAAG,EACnD,EAAY,KAAgB,MAAY,GAAiB,ADOxDmB,EAAYC,ACPgC,KDO3B,CAAC,MAAMN,GAAG,CAAC,AAACO,GAASA,EAAKC,IAAI,IAAIC,IAAI,CAAC,AAACF,GAAkB,KAATA,IAAgB,GCNnF,OAA2BP,IAAhB,GAA6B,EAAY,IAAIF,KAAOG,EACrE,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,KAAA,CAAG,UAAU,yDAAyD,cAAa,YAClF,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,8CACZK,EACDC,CAAAA,EAAAA,EAAAA,GAAAA,EAAC,OAAA,CAAK,UAAU,qBAAa,IAC5B,EAAa,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAG,CAAA,UAAC,eAAmB,KACrC,EAAQ,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAW,CAAA,CAAC,KAAK,YAAY,MAAM,QAAW,QAE3C,KAAd,EAAmB,KAAO,EACzB,CAAA,EAAA,EAAA,IAAA,EAAC,UAAA,CAAQ,UAAU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AAE,CAAc,CAAgD,EACjG,GAAM,CAAC,EAAS,EAAM,CAAG,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAa,CAAE,KAAM,UAAW,OAAQ,CAAC,CAAE,GAC7E,CAAC,EAAS,EAAQ,CAAG,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAe,CAAE,KAAM,MAAO,GAElE,CAAC,EAAU,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAqB,QACvD,EAAyB,UAAjB,EAAQ,IAAI,EAAgB,IAAa,EAAQ,SAAS,CAAG,OAAU,EACrF,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,uBACb,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,oCAA2B,mBACzC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,GAA8B,QAAhB,IAAV,CAAU,IAAY,KACtB,IAAV,EACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,MAAO,EAAS,OAAQ,EAAO,QAAS,IAErD,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAU,MAAO,EAAO,QAAS,EAAS,OAAQ,EAAS,OAAQ,KAAQ,EAAY,EAAM,SAAS,CAAG,EAAG,QAAS,EAAS,eAAgB,MAIvJ"}
1
+ {"version":3,"sources":["../../../../../web/features/add-server/ui/add-server.tsx","../../../../../web/features/add-server/tool-choice.ts","../../../../../web/features/outside-parties/ui/tool-row.tsx","../../../../../web/features/add-server/data%3Aea63b8%20%3Ctext/javascript%3E","../../../../../web/features/add-server/data%3A418cac%20%3Ctext/javascript%3E","../../../../../web/features/add-server/suggested-name.ts"],"sourcesContent":["'use client';\n\nimport { useActionState, useState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { CredentialFields } from '../../forms/ui/credential-fields';\nimport { BUTTONS, CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { OwnerField } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { Switch } from '../../forms/ui/switch';\nimport { ToolRow } from '../../outside-parties/ui/tool-row';\nimport { approveServer, checkServer, type AddServerState, type ApproveState, type CheckedTool } from '../actions';\nimport { addButtonLabel, suggestedName } from '../suggested-name';\nimport { TOOL_ON_FIELD, TOOL_SHOWN_FIELD } from '../tool-choice';\n\n/** The steps of adding a server, as the design numbers them. */\nconst STEPS = ['Address', 'Check', 'Owner'] as const;\n\nconst CONCURRENCY_LIMIT_DEFAULT = '4';\n\n/** The credential fields, carried on from the address step to the owner step. */\nconst CARRIED_FIELDS = ['url', 'credentialKind', 'token', 'clientId', 'clientSecret', 'issuer', 'scope'] as const;\n\nfunction Steps({ at }: { at: number }) {\n return (\n <ol className=\"flex gap-4\">\n {STEPS.map((step, index) => (\n <li key={step} aria-current={index === at ? 'step' : undefined} className={index <= at ? 'font-medium' : 'text-muted-foreground'}>\n {index + 1} {step}\n </li>\n ))}\n </ol>\n );\n}\n\nfunction Refused({ refusal }: { refusal: string | undefined }) {\n return refusal === undefined ? null : <Outcome state={{ kind: 'refused', message: refusal }} />;\n}\n\nfunction AddressStep({ state, action, fleetId }: { state: Extract<AddServerState, { step: 'address' }> | { fields: Record<string, string>; refusal?: string }; action: (form: FormData) => void; fleetId: string }) {\n return (\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-server-address\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <Refused refusal={state.refusal} />\n <label className={LABEL}>\n <span>Streamable HTTP address</span>\n <input className={INPUT} type=\"url\" name=\"url\" defaultValue={state.fields.url ?? ''} placeholder=\"https://mcp.example.com/mcp\" required />\n </label>\n <CredentialFields legend=\"The server's credential\" fields={state.fields} noneHelp=\"The gateway sends no credential: for a server reached only on a private network.\" />\n <div>\n <SubmitButton pending=\"Checking the server…\" testId=\"add-server-check\">\n Check the server\n </SubmitButton>\n </div>\n </form>\n );\n}\n\n/**\n * The tools the check answered, one row each. An approver switches each on\n * or off, all on to start; the fleet may call only those on (aeolus-fleet#1151).\n * Without gateway:approve they show without switches, and every tool starts on.\n */\nfunction ToolsSection({ tools, canSwitch }: { tools: CheckedTool[]; canSwitch: boolean }) {\n const [off, setOff] = useState<ReadonlySet<string>>(new Set());\n const onCount = tools.length - off.size;\n const flip = (name: string) => {\n setOff((current) => {\n const next = new Set(current);\n if (!next.delete(name)) {\n next.add(name);\n }\n return next;\n });\n };\n return (\n <section className=\"grid gap-2\" data-testid=\"add-server-tools\">\n <h2 className=\"flex flex-wrap justify-between gap-2 text-section font-semibold\">\n <span>\n The server answers: {tools.length} {tools.length === 1 ? 'tool' : 'tools'}\n </span>\n {canSwitch ? (\n <span role=\"status\" className=\"font-normal text-muted-foreground\" data-testid=\"add-server-tools-on\">\n {onCount} of {tools.length} on\n </span>\n ) : null}\n </h2>\n <p className=\"text-muted-foreground\">{canSwitch ? 'The fleet may call only the tools switched on. A tool the server adds later starts off.' : 'Switching tools needs gateway:approve: every tool starts on, and an approver switches them on its page.'}</p>\n <ul className=\"grid\">\n {tools.map((tool) => {\n const isOn = !off.has(tool.name);\n return (\n <ToolRow\n key={tool.name}\n tool={tool}\n testId=\"add-server-tool\"\n control={\n canSwitch ? (\n <>\n <input type=\"hidden\" name={TOOL_SHOWN_FIELD} value={tool.name} />\n {isOn ? <input type=\"hidden\" name={TOOL_ON_FIELD} value={tool.name} /> : null}\n <Switch isOn={isOn} label={tool.name} onClick={() => { flip(tool.name); }} />\n </>\n ) : null\n }\n />\n );\n })}\n </ul>\n </section>\n );\n}\n\nfunction OwnerStep({ state, refused, action, onBack, fleetId, canSwitchTools }: { state: Extract<AddServerState, { step: 'owner' }>; refused: ApproveState; action: (form: FormData) => void; onBack: () => void; fleetId: string; canSwitchTools: boolean }) {\n // A refused approval of this check shows what the browser sent, and why.\n const isRefused = refused.kind === 'refused' && refused.requestId === state.requestId;\n const fields = isRefused ? refused.fields : state.fields;\n const url = fields.url ?? '';\n const [name, setName] = useState(fields.name ?? suggestedName(url));\n return (\n <>\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-server-owner\">\n <ToolsSection tools={state.tools} canSwitch={canSwitchTools} />\n <h2 className=\"text-section font-semibold\">Its owner</h2>\n <Refused refusal={isRefused ? refused.message : undefined} />\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"requestId\" value={state.requestId} />\n {CARRIED_FIELDS.map((field) => (\n <input key={field} type=\"hidden\" name={field} value={fields[field] ?? ''} />\n ))}\n <p className=\"font-mono text-muted-foreground\">{url}</p>\n <label className={LABEL}>\n <span>Proxy ship&apos;s name</span>\n <input className={INPUT} type=\"text\" name=\"name\" value={name} onChange={(event) => { setName(event.target.value); }} required />\n </label>\n <OwnerField choices={state.owners} current={state.owners.find((owner) => owner.shipId === fields.ownerShipId) ?? null} help=\"A person ship or argo. It answers for this server.\" />\n <label className={LABEL}>\n <span>Calls at once</span>\n <input className={INPUT} type=\"number\" name=\"concurrencyLimit\" min={1} max={10} defaultValue={fields.concurrencyLimit ?? CONCURRENCY_LIMIT_DEFAULT} />\n </label>\n <div className=\"flex gap-2\">\n <SubmitButton pending=\"Adding…\" testId=\"add-server-approve\">\n {addButtonLabel(name)}\n </SubmitButton>\n <button type=\"button\" className={BUTTONS.secondary} onClick={onBack}>\n Back to the address\n </button>\n </div>\n </form>\n </>\n );\n}\n\n/**\n * Adding an outside MCP server in three steps: its address and credential,\n * the gateway's check of the tools it answers with, then its owner. Each\n * button says at once that its step is on its way.\n */\nexport function AddServer({ fleetId, canSwitchTools }: { fleetId: string; canSwitchTools: boolean }) {\n const [checked, check] = useActionState(checkServer, { step: 'address', fields: {} });\n const [refused, approve] = useActionState(approveServer, { kind: 'idle' });\n // Going back shows the address step again, with what was sent, until the next check answers.\n const [backFrom, setBackFrom] = useState<string | undefined>(undefined);\n const owner = checked.step === 'owner' && backFrom !== checked.requestId ? checked : undefined;\n return (\n <div className=\"grid gap-4\">\n <h1 className=\"text-title font-semibold\">Add MCP server</h1>\n <Steps at={owner === undefined ? 0 : 2} />\n {owner === undefined ? (\n <AddressStep state={checked} action={check} fleetId={fleetId} />\n ) : (\n <OwnerStep state={owner} refused={refused} action={approve} onBack={() => { setBackFrom(owner.requestId); }} fleetId={fleetId} canSwitchTools={canSwitchTools} />\n )}\n </div>\n );\n}\n","/**\n * The tools an approver switched when adding a server (aeolus-fleet#1151):\n * each tool the check answered is sent as shown, and the ticked ones as on.\n */\n\n/** The field naming each tool whose switch the form showed. */\nexport const TOOL_SHOWN_FIELD = 'toolShown';\n\n/** The field naming each tool ticked on. */\nexport const TOOL_ON_FIELD = 'toolOn';\n\nfunction namesIn(form: FormData, field: string): string[] {\n return form.getAll(field).filter((value) => typeof value === 'string');\n}\n\n/** Each tool shown, on or off; none when the form showed no switch, so the server keeps every tool on. */\nexport function toolChoiceOf(form: FormData): { name: string; isOn: boolean }[] | undefined {\n const shown = namesIn(form, TOOL_SHOWN_FIELD);\n if (shown.length === 0) {\n return undefined;\n }\n const on = new Set(namesIn(form, TOOL_ON_FIELD));\n return shown.map((name) => ({ name, isOn: on.has(name) }));\n}\n\n/** A description's first line with words, as a tool's row shows it before it is opened. */\nexport function firstLineOf(description: string): string {\n return description.split('\\n').map((line) => line.trim()).find((line) => line !== '') ?? '';\n}\n","import type { ReactNode } from 'react';\n\nimport { firstLineOf } from '../../add-server/tool-choice';\nimport { StatusBadge, Tag } from './status-badge';\n\n/** A tool of an outside MCP server, as its row shows it. */\nexport interface ShownTool {\n name: string;\n description?: string | undefined;\n isReadOnly: boolean;\n isNew?: boolean;\n}\n\n/**\n * One tool in a list an approver scans (aeolus-fleet#1151): its switch, its\n * name, whether the server says it reads only, whether it is new, and its\n * description's first line, the whole description folded open on a click.\n */\nexport function ToolRow({ tool, control, testId }: { tool: ShownTool; control: ReactNode; testId?: string }) {\n const { name, description, isReadOnly, isNew = false } = tool;\n const firstLine = description === undefined ? '' : firstLineOf(description);\n const isFolded = description !== undefined && description.trim() !== firstLine;\n return (\n <li className=\"grid gap-1 border-b border-border py-2 last:border-b-0\" data-testid={testId}>\n <div className=\"flex flex-wrap items-center gap-2\">\n {control}\n <span className=\"font-mono\">{name}</span>\n {isReadOnly ? <Tag>reads only</Tag> : null}\n {isNew ? <StatusBadge tone=\"attention\" label=\"New\" /> : null}\n </div>\n {firstLine === '' ? null : isFolded ? (\n <details className=\"text-muted-foreground\">\n <summary className=\"cursor-pointer\">{firstLine}</summary>\n <p className=\"mt-1 whitespace-pre-line\">{description}</p>\n </details>\n ) : (\n <p className=\"text-muted-foreground\">{firstLine}</p>\n )}\n </li>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60393d4a3f1c34cc08eecf43779c328ad1fb18e7c7\":{\"name\":\"approveServer\"}},\"web/features/add-server/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(\"60393d4a3f1c34cc08eecf43779c328ad1fb18e7c7\",callServer,void 0,findSourceMapURL,\"approveServer\");export{$$RSC_SERVER_ACTION_1 as approveServer};","/* __next_internal_action_entry_do_not_use__ [{\"60af6631f33744be859489a17cadd5ebe9823d4309\":{\"name\":\"checkServer\"}},\"web/features/add-server/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(\"60af6631f33744be859489a17cadd5ebe9823d4309\",callServer,void 0,findSourceMapURL,\"checkServer\");export{$$RSC_SERVER_ACTION_0 as checkServer};","/** The most characters of the proxy ship's name the add button shows. */\nconst BUTTON_NAME_MAX_LENGTH = 20;\n\n/** A proxy ship's name offered from a server's address: its host's first name that says whose it is; none for an IP address, whose numbers say nothing of it. */\nexport function suggestedName(url: string): string {\n if (!URL.canParse(url)) {\n return '';\n }\n const { hostname } = new URL(url);\n // URL writes every IPv4 host as four numbers, and keeps an IPv6 host in its brackets; the browser runs this too, so no node:net.\n if (/^\\d+(\\.\\d+){3}$/.test(hostname) || hostname.startsWith('[')) {\n return '';\n }\n const labels = hostname.split('.').filter((label) => label !== 'mcp' && label !== 'www');\n return (labels[0] ?? '').toLowerCase().replaceAll(/[^a-z0-9]+/g, '-').replaceAll(/^-+|-+$/g, '');\n}\n\n/** The add button's words: the proxy ship's name as typed, cut at 20 characters, or the plain words while none is typed. */\nexport function addButtonLabel(name: string): string {\n const typed = name.trim();\n if (typed === '') {\n return 'Add as outside party';\n }\n return typed.length > BUTTON_NAME_MAX_LENGTH ? `Add ${typed.slice(0, BUTTON_NAME_MAX_LENGTH)}…` : `Add ${typed}`;\n}\n"],"names":["TOOL_SHOWN_FIELD","TOOL_ON_FIELD","namesIn","form","field","getAll","filter","value","toolChoiceOf","shown","length","undefined","on","Set","map","name","isOn","has","firstLineOf","description","split","line","trim","find"],"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,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OEPA,EAAA,EAAA,CAAA,CAAA,OAeO,SAAS,EAAQ,MAAE,CAAI,SAAE,CAAO,QAAE,CAAM,CAA4D,EACzG,GAAM,MAAE,CAAI,CAAE,aAAW,YAAE,CAAUA,OAAE,GAAQ,CAAK,CAAE,CAAG,EACnD,EAAY,KAAgB,MAAY,GAAiB,ADOxDmB,EAAYC,ACPgC,KDO3B,CAAC,MAAMN,GAAG,CAAC,AAACO,GAASA,EAAKC,IAAI,IAAIC,IAAI,CAAC,AAACF,GAAkB,KAATA,IAAgB,GCNnF,OAA2BP,IAAhB,GAA6B,EAAY,IAAIF,KAAOG,EACrE,MAC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AS,EAAS,eAAgB,MAIvJ"}
@@ -1,3 +1,3 @@
1
- module.exports=[45648,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};d.node;let e=(0,c.f)(d);var f=a.i(78400),g=a.i(21244),h=a.i(95725),i=a.i(6158),j=a.i(18486);function k({switcher:a,account:c,onSearch:d,searchLabel:l="Search or jump to",children:m,actions:n,className:o}){return(0,b.jsxs)("header",{"data-slot":"app-header",className:(0,j.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",o),children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===a?(0,b.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,b.jsx)(f.AppSwitcher,{switcher:a,layout:"full",className:"shrink-0"}),m]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[n,d?(0,b.jsxs)(g.f,{size:"sm",icon:(0,b.jsx)(e,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:d,children:[(0,b.jsx)("span",{className:"grow text-left max-lg:sr-only",children:l}),(0,b.jsx)(h.f,{children:"⌘K"})]}):null,(0,b.jsx)(i.AvatarMenu,{...c})]})]})}var l=a.i(50944),m=a.i(72131),n=a.i(5050);let o=(0,n.createServerReference)("4014cabd1a393a5ea041c3f3ba58bfec7066ad4931",n.callServer,void 0,n.findSourceMapURL,"setTheme"),p=["light","dark","system"];var q=a.i(25959);let r=[{key:"overview",label:"Overview",path:"/overview"},{key:"outside-parties",label:"Outside parties",path:"/outside-parties"},{key:"parties",label:"Parties",path:"/parties"}];function s({fleetId:a}){let c=(0,l.usePathname)();return(0,b.jsx)("nav",{"aria-label":"Gateway",className:"flex shrink-0 items-center gap-1",children:r.map(({key:d,label:e,path:f})=>{let g=c===f||c.startsWith(`${f}/`);return(0,b.jsx)("a",{href:(0,q.f)(f,a),"data-testid":`frame-tab-${d}`,"aria-current":g?"page":void 0,className:`whitespace-nowrap rounded-md px-2 py-1 text-sm ${g?"bg-accent font-semibold":"text-muted-foreground hover:bg-accent"}`,children:e},d)})})}a.s(["GatewayHeader",0,function({switchers:a,email:c,accountUrl:d,theme:e}){let g=(0,l.useSearchParams)().get("fleet"),h=a.find(({fleet:a})=>a.id===g)??a[0],[j,n]=(0,m.useState)(e),[q,r]=(0,m.useState)(!1),t=(0,m.useRef)(null),u={name:c,signedInAs:"account",accountUrl:d,theme:j,themes:p,hasTheme:!0,onThemeChange:a=>{let b;n(a),document.documentElement.dataset.theme=a,b="dark"===a||"system"===a&&window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.classList.toggle("dark",b),o(a)},shortcuts:[],helpUrl:"https://github.com/ThomasHendrickx/aeolus-fleet",onSignOut:()=>{r(!0),t.current?.requestSubmit()},isSigningOut:q};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("form",{ref:t,method:"post",action:"/sign-in/end",hidden:!0}),(0,b.jsx)(k,{switcher:h,account:u,className:"max-sm:hidden",children:void 0===h?null:(0,b.jsx)(s,{fleetId:h.fleet.id})}),(0,b.jsxs)("header",{className:"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-4 sm:hidden",children:[void 0===h?null:(0,b.jsx)(f.AppSwitcher,{switcher:h,layout:"compact",className:"min-w-0"}),void 0===h?null:(0,b.jsx)(s,{fleetId:h.fleet.id}),(0,b.jsx)("span",{className:"grow"}),(0,b.jsx)(i.AvatarMenuSheet,{...u})]})]})}],45648)}];
1
+ module.exports=[45648,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};d.node;let e=(0,c.f)(d);var f=a.i(78400),g=a.i(21244),h=a.i(95725),i=a.i(6158),j=a.i(18486);function k({switcher:a,account:c,onSearch:d,searchLabel:l="Search or jump to",children:m,actions:n,className:o}){return(0,b.jsxs)("header",{"data-slot":"app-header",className:(0,j.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",o),children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===a?(0,b.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,b.jsx)(f.AppSwitcher,{switcher:a,layout:"full",className:"shrink-0"}),m]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[n,d?(0,b.jsxs)(g.f,{size:"sm",icon:(0,b.jsx)(e,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:d,children:[(0,b.jsx)("span",{className:"grow text-left max-lg:sr-only",children:l}),(0,b.jsx)(h.f,{children:"⌘K"})]}):null,(0,b.jsx)(i.AvatarMenu,{...c})]})]})}var l=a.i(50944),m=a.i(72131),n=a.i(5050);let o=(0,n.createServerReference)("400e6ee91aede8cbbee59174183b1c251fd5c04c2f",n.callServer,void 0,n.findSourceMapURL,"setTheme"),p=["light","dark","system"];var q=a.i(25959);let r=[{key:"overview",label:"Overview",path:"/overview"},{key:"outside-parties",label:"Outside parties",path:"/outside-parties"},{key:"parties",label:"Parties",path:"/parties"}];function s({fleetId:a}){let c=(0,l.usePathname)();return(0,b.jsx)("nav",{"aria-label":"Gateway",className:"flex shrink-0 items-center gap-1",children:r.map(({key:d,label:e,path:f})=>{let g=c===f||c.startsWith(`${f}/`);return(0,b.jsx)("a",{href:(0,q.f)(f,a),"data-testid":`frame-tab-${d}`,"aria-current":g?"page":void 0,className:`whitespace-nowrap rounded-md px-2 py-1 text-sm ${g?"bg-accent font-semibold":"text-muted-foreground hover:bg-accent"}`,children:e},d)})})}a.s(["GatewayHeader",0,function({switchers:a,email:c,accountUrl:d,theme:e}){let g=(0,l.useSearchParams)().get("fleet"),h=a.find(({fleet:a})=>a.id===g)??a[0],[j,n]=(0,m.useState)(e),[q,r]=(0,m.useState)(!1),t=(0,m.useRef)(null),u={name:c,signedInAs:"account",accountUrl:d,theme:j,themes:p,hasTheme:!0,onThemeChange:a=>{let b;n(a),document.documentElement.dataset.theme=a,b="dark"===a||"system"===a&&window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.classList.toggle("dark",b),o(a)},shortcuts:[],helpUrl:"https://github.com/ThomasHendrickx/aeolus-fleet",onSignOut:()=>{r(!0),t.current?.requestSubmit()},isSigningOut:q};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("form",{ref:t,method:"post",action:"/sign-in/end",hidden:!0}),(0,b.jsx)(k,{switcher:h,account:u,className:"max-sm:hidden",children:void 0===h?null:(0,b.jsx)(s,{fleetId:h.fleet.id})}),(0,b.jsxs)("header",{className:"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-4 sm:hidden",children:[void 0===h?null:(0,b.jsx)(f.AppSwitcher,{switcher:h,layout:"compact",className:"min-w-0"}),void 0===h?null:(0,b.jsx)(s,{fleetId:h.fleet.id}),(0,b.jsx)("span",{className:"grow"}),(0,b.jsx)(i.AvatarMenuSheet,{...u})]})]})}],45648)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/frame/data%3Aa4458a%20%3Ctext/javascript%3E","../../../../../web/features/frame/ui/gateway-header.tsx","../../../../../web/features/frame/ui/gateway-tabs.tsx","../../../../../node_modules/%40aeolus-fleet/common/src/header/app-header.tsx","../../../../../web/features/frame/theme.ts","../../../../../node_modules/lucide-react/src/icons/search.ts"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"4014cabd1a393a5ea041c3f3ba58bfec7066ad4931\":{\"name\":\"setTheme\"}},\"web/features/frame/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(\"4014cabd1a393a5ea041c3f3ba58bfec7066ad4931\",callServer,void 0,findSourceMapURL,\"setTheme\");export{$$RSC_SERVER_ACTION_0 as setTheme};","'use client';\n\nimport type { Theme } from '@aeolus-fleet/common';\nimport { AppHeader, AppSwitcher, AvatarMenuSheet, type AppSwitcherModel, type AvatarMenuProps } from '@aeolus-fleet/common/header';\nimport { useSearchParams } from 'next/navigation';\nimport { useRef, useState } from 'react';\n\nimport { setTheme } from '../actions';\nimport { THEMES } from '../theme';\nimport { GatewayTabs } from './gateway-tabs';\n\n/** Where the avatar menu's Help leads, as in the console. */\nconst HELP_URL = 'https://github.com/ThomasHendrickx/aeolus-fleet';\n\n/** The gateway's server ends the shared sign-in here, in every app at once, for a form sent from its own pages. */\nconst SIGN_OUT_PATH = '/sign-in/end';\n\n/** Applies a theme at once, as the root layout's script does on the next load. */\nfunction applyTheme(theme: Theme): void {\n document.documentElement.dataset.theme = theme;\n const isDark = theme === 'dark' || (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);\n document.documentElement.classList.toggle('dark', isDark);\n}\n\ninterface GatewayHeaderProps {\n /** One per fleet the account may open, with it in view; the address picks one. */\n switchers: readonly AppSwitcherModel[];\n email: string;\n /** Account's address, for the avatar menu's Your account, Your rights and Email updates. */\n accountUrl: string | undefined;\n theme: Theme;\n}\n\n/**\n * The header every Aeolus app shows (aeolus-fleet, header design), on the\n * gateway's pages: from 640 px the shared AppHeader, with the switcher in\n * the title and the avatar menu; on phone a bar with the switcher compact\n * and the avatar's bottom Sheet (H6). After the title, the tabs to the\n * overview, the outside parties and the parties. The fleet in view is the one the\n * address names, else the account's first. Sign out ends the shared\n * sign-in in every app and shows \"Signing out\" until the page leaves.\n */\nexport function GatewayHeader({ switchers, email, accountUrl, theme }: GatewayHeaderProps) {\n const requested = useSearchParams().get('fleet');\n const switcher = switchers.find(({ fleet }) => fleet.id === requested) ?? switchers[0];\n const [shownTheme, setShownTheme] = useState(theme);\n const [isSigningOut, setIsSigningOut] = useState(false);\n const signOutForm = useRef<HTMLFormElement>(null);\n\n const account: AvatarMenuProps = {\n name: email,\n signedInAs: 'account',\n accountUrl,\n theme: shownTheme,\n themes: THEMES,\n hasTheme: true,\n onThemeChange: (next) => {\n setShownTheme(next);\n applyTheme(next);\n void setTheme(next);\n },\n shortcuts: [],\n helpUrl: HELP_URL,\n onSignOut: () => {\n setIsSigningOut(true);\n signOutForm.current?.requestSubmit();\n },\n isSigningOut,\n };\n return (\n <>\n <form ref={signOutForm} method=\"post\" action={SIGN_OUT_PATH} hidden />\n <AppHeader switcher={switcher} account={account} className=\"max-sm:hidden\">\n {switcher === undefined ? null : <GatewayTabs fleetId={switcher.fleet.id} />}\n </AppHeader>\n <header className=\"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-4 sm:hidden\">\n {switcher === undefined ? null : <AppSwitcher switcher={switcher} layout=\"compact\" className=\"min-w-0\" />}\n {switcher === undefined ? null : <GatewayTabs fleetId={switcher.fleet.id} />}\n <span className=\"grow\" />\n <AvatarMenuSheet {...account} />\n </header>\n </>\n );\n}\n","'use client';\n\nimport { usePathname } from 'next/navigation';\n\nimport { inFleet } from '../../../lib/gateway-api/page-account';\n\n/** The gateway's pages a person goes between. */\nconst TABS = [\n { key: 'overview', label: 'Overview', path: '/overview' },\n { key: 'outside-parties', label: 'Outside parties', path: '/outside-parties' },\n { key: 'parties', label: 'Parties', path: '/parties' },\n] as const;\n\n/** Whether the page at this path is the tab's page or one of its own. */\nfunction isTabOf(pathname: string, path: string): boolean {\n return pathname === path || pathname.startsWith(`${path}/`);\n}\n\n/** The header's tabs: the overview, the outside parties and the parties of the fleet in view, the page shown current. */\nexport function GatewayTabs({ fleetId }: { fleetId: string }) {\n const pathname = usePathname();\n return (\n <nav aria-label=\"Gateway\" className=\"flex shrink-0 items-center gap-1\">\n {TABS.map(({ key, label, path }) => {\n const isCurrent = isTabOf(pathname, path);\n return (\n <a\n key={key}\n href={inFleet(path, fleetId)}\n data-testid={`frame-tab-${key}`}\n aria-current={isCurrent ? 'page' : undefined}\n className={`whitespace-nowrap rounded-md px-2 py-1 text-sm ${isCurrent ? 'bg-accent font-semibold' : 'text-muted-foreground hover:bg-accent'}`}\n >\n {label}\n </a>\n );\n })}\n </nav>\n );\n}\n","unable to read source [project]/node_modules/@aeolus-fleet/common/src/header/app-header.tsx","/**\n * The theme this browser chose for the gateway's pages (header design H13:\n * each app keeps its own), System until chosen.\n */\nimport type { Theme } from '@aeolus-fleet/common';\n\n/** The themes, as common names them: written here so the header's browser code loads no schema (decision 0033). */\nexport const THEMES: readonly Theme[] = ['light', 'dark', 'system'];\n\n/** The cookie that keeps it. */\nexport const THEME_COOKIE = 'aeolus_gateway_theme';\n\nexport function isTheme(value: unknown): value is Theme {\n return THEMES.some((theme) => theme === value);\n}\n\n/** The theme a cookie names, or System. */\nexport function themeFrom(value: string | undefined): Theme {\n return isTheme(value) ? value : 'system';\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'search',\n size: 24,\n node: [\n ['path', { d: 'm21 21-4.34-4.34', key: '14j7rj' }],\n ['circle', { cx: '11', cy: '11', r: '8', key: '4ej97u' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Search\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjEgMjEtNC4zNC00LjM0IiAvPgogIDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/search\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Search = createLucideIcon(__iconData);\n\nexport default Search;\n"],"names":["node","cx","key"],"mappings":"qEKGO,CAAA,GAAM,EAA6B,MAClC,SACN,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CACN,KAAM,CACJ,CAAC,CAAA,CAAA,CAAA,IAAQ,CAAA,AAAE,EAAG,CAAA,kBAAoB,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CACjD,CAAC,CAAA,AFyBC,QEzBS,IAAM,IAAA,AFyBI,CEzBE,GAAI,CAAA,IAAM,EAAG,CAAA,CAAA,CAAA,KAAU,QAAA,CAAU,CAAA,CAAA,IAOL,CAAA,CFkBa,AElBb,CAAA,CAAA,KAajD,CAAA,CAAA,CAAA,EAAS,CAAA,CAAA,CAAA,EAAA,GFzBf,IAAA,EAA4B,CAArB,CAAyC,AAAD,CAAC,AAAvC,CAAuC,OAEhD,EAA2C,CAFvB,AAEb,CAAoC,CAAlC,AAAkC,AAFrB,CAEqB,KAA5B,AAFa,EAEX,AACjB,EAAqC,C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AE1E,CAAA,EAAA,EAAA,IAAA,EAAC,SAAA,CAAO,UAAU,6HACF,IAAb,EAAyB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,WAAW,CAAA,CAAC,SAAU,EAAU,OAAO,UAAU,UAAU,iBAC/E,IAAb,EAAyB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,QAAS,EAAS,KAAK,CAAC,EAAE,GACxE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,SAChB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,eAAe,CAAA,CAAE,GAAG,CAAO,QAIpC","ignoreList":[3,5]}
1
+ {"version":3,"sources":["../../../../../web/features/frame/data%3A783591%20%3Ctext/javascript%3E","../../../../../web/features/frame/ui/gateway-header.tsx","../../../../../web/features/frame/ui/gateway-tabs.tsx","../../../../../node_modules/%40aeolus-fleet/common/src/header/app-header.tsx","../../../../../web/features/frame/theme.ts","../../../../../node_modules/lucide-react/src/icons/search.ts"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"400e6ee91aede8cbbee59174183b1c251fd5c04c2f\":{\"name\":\"setTheme\"}},\"web/features/frame/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(\"400e6ee91aede8cbbee59174183b1c251fd5c04c2f\",callServer,void 0,findSourceMapURL,\"setTheme\");export{$$RSC_SERVER_ACTION_0 as setTheme};","'use client';\n\nimport type { Theme } from '@aeolus-fleet/common';\nimport { AppHeader, AppSwitcher, AvatarMenuSheet, type AppSwitcherModel, type AvatarMenuProps } from '@aeolus-fleet/common/header';\nimport { useSearchParams } from 'next/navigation';\nimport { useRef, useState } from 'react';\n\nimport { setTheme } from '../actions';\nimport { THEMES } from '../theme';\nimport { GatewayTabs } from './gateway-tabs';\n\n/** Where the avatar menu's Help leads, as in the console. */\nconst HELP_URL = 'https://github.com/ThomasHendrickx/aeolus-fleet';\n\n/** The gateway's server ends the shared sign-in here, in every app at once, for a form sent from its own pages. */\nconst SIGN_OUT_PATH = '/sign-in/end';\n\n/** Applies a theme at once, as the root layout's script does on the next load. */\nfunction applyTheme(theme: Theme): void {\n document.documentElement.dataset.theme = theme;\n const isDark = theme === 'dark' || (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);\n document.documentElement.classList.toggle('dark', isDark);\n}\n\ninterface GatewayHeaderProps {\n /** One per fleet the account may open, with it in view; the address picks one. */\n switchers: readonly AppSwitcherModel[];\n email: string;\n /** Account's address, for the avatar menu's Your account, Your rights and Email updates. */\n accountUrl: string | undefined;\n theme: Theme;\n}\n\n/**\n * The header every Aeolus app shows (aeolus-fleet, header design), on the\n * gateway's pages: from 640 px the shared AppHeader, with the switcher in\n * the title and the avatar menu; on phone a bar with the switcher compact\n * and the avatar's bottom Sheet (H6). After the title, the tabs to the\n * overview, the outside parties and the parties. The fleet in view is the one the\n * address names, else the account's first. Sign out ends the shared\n * sign-in in every app and shows \"Signing out\" until the page leaves.\n */\nexport function GatewayHeader({ switchers, email, accountUrl, theme }: GatewayHeaderProps) {\n const requested = useSearchParams().get('fleet');\n const switcher = switchers.find(({ fleet }) => fleet.id === requested) ?? switchers[0];\n const [shownTheme, setShownTheme] = useState(theme);\n const [isSigningOut, setIsSigningOut] = useState(false);\n const signOutForm = useRef<HTMLFormElement>(null);\n\n const account: AvatarMenuProps = {\n name: email,\n signedInAs: 'account',\n accountUrl,\n theme: shownTheme,\n themes: THEMES,\n hasTheme: true,\n onThemeChange: (next) => {\n setShownTheme(next);\n applyTheme(next);\n void setTheme(next);\n },\n shortcuts: [],\n helpUrl: HELP_URL,\n onSignOut: () => {\n setIsSigningOut(true);\n signOutForm.current?.requestSubmit();\n },\n isSigningOut,\n };\n return (\n <>\n <form ref={signOutForm} method=\"post\" action={SIGN_OUT_PATH} hidden />\n <AppHeader switcher={switcher} account={account} className=\"max-sm:hidden\">\n {switcher === undefined ? null : <GatewayTabs fleetId={switcher.fleet.id} />}\n </AppHeader>\n <header className=\"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-4 sm:hidden\">\n {switcher === undefined ? null : <AppSwitcher switcher={switcher} layout=\"compact\" className=\"min-w-0\" />}\n {switcher === undefined ? null : <GatewayTabs fleetId={switcher.fleet.id} />}\n <span className=\"grow\" />\n <AvatarMenuSheet {...account} />\n </header>\n </>\n );\n}\n","'use client';\n\nimport { usePathname } from 'next/navigation';\n\nimport { inFleet } from '../../../lib/gateway-api/page-account';\n\n/** The gateway's pages a person goes between. */\nconst TABS = [\n { key: 'overview', label: 'Overview', path: '/overview' },\n { key: 'outside-parties', label: 'Outside parties', path: '/outside-parties' },\n { key: 'parties', label: 'Parties', path: '/parties' },\n] as const;\n\n/** Whether the page at this path is the tab's page or one of its own. */\nfunction isTabOf(pathname: string, path: string): boolean {\n return pathname === path || pathname.startsWith(`${path}/`);\n}\n\n/** The header's tabs: the overview, the outside parties and the parties of the fleet in view, the page shown current. */\nexport function GatewayTabs({ fleetId }: { fleetId: string }) {\n const pathname = usePathname();\n return (\n <nav aria-label=\"Gateway\" className=\"flex shrink-0 items-center gap-1\">\n {TABS.map(({ key, label, path }) => {\n const isCurrent = isTabOf(pathname, path);\n return (\n <a\n key={key}\n href={inFleet(path, fleetId)}\n data-testid={`frame-tab-${key}`}\n aria-current={isCurrent ? 'page' : undefined}\n className={`whitespace-nowrap rounded-md px-2 py-1 text-sm ${isCurrent ? 'bg-accent font-semibold' : 'text-muted-foreground hover:bg-accent'}`}\n >\n {label}\n </a>\n );\n })}\n </nav>\n );\n}\n","unable to read source [project]/node_modules/@aeolus-fleet/common/src/header/app-header.tsx","/**\n * The theme this browser chose for the gateway's pages (header design H13:\n * each app keeps its own), System until chosen.\n */\nimport type { Theme } from '@aeolus-fleet/common';\n\n/** The themes, as common names them: written here so the header's browser code loads no schema (decision 0033). */\nexport const THEMES: readonly Theme[] = ['light', 'dark', 'system'];\n\n/** The cookie that keeps it. */\nexport const THEME_COOKIE = 'aeolus_gateway_theme';\n\nexport function isTheme(value: unknown): value is Theme {\n return THEMES.some((theme) => theme === value);\n}\n\n/** The theme a cookie names, or System. */\nexport function themeFrom(value: string | undefined): Theme {\n return isTheme(value) ? value : 'system';\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'search',\n size: 24,\n node: [\n ['path', { d: 'm21 21-4.34-4.34', key: '14j7rj' }],\n ['circle', { cx: '11', cy: '11', r: '8', key: '4ej97u' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Search\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjEgMjEtNC4zNC00LjM0IiAvPgogIDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/search\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Search = createLucideIcon(__iconData);\n\nexport default Search;\n"],"names":["node","cx","key"],"mappings":"qEK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CAAC,KAAK,CAuCvB,EAvC0B,AACnC,EAAS,AAAU,YAAW,AAAU,cAAY,OAAO,UAAU,CAAC,gCAAgC,OAAO,CACnH,SAAS,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,OAAQ,GAsCzC,EAAS,EAChB,EACA,UAAW,EAAE,CACb,QAlDa,CAkDJ,iDACT,UAAW,KACT,GAAgB,GAChB,EAAY,OAAO,EAAE,eACvB,eACA,CACF,EACA,MACE,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,QAAA,CAAA,WACE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,IAAK,EAAa,OAAO,OAAO,OAxDtB,CAwD8B,cAAe,MAAM,CAAA,CAAA,IACnE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAU,SAAU,EAAU,QAAS,EAAS,UAAU,yBACxD,KAAa,MAAY,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,QAAS,EAAS,KAAK,CAAC,EAAE,KAE1E,CAAA,EAAA,EAAA,IAAA,EAAC,SAAA,CAAO,UAAU,6HACF,IAAb,EAAyB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,WAAW,CAAA,CAAC,SAAU,EAAU,OAAO,UAAU,UAAU,iBAC/E,IAAb,EAAyB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,QAAS,EAAS,KAAK,CAAC,EAAE,GACxE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,SAChB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,eAAe,CAAA,CAAE,GAAG,CAAO,QAIpC","ignoreList":[3,5]}
@@ -1,3 +1,3 @@
1
- module.exports=[3045,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(1542),f=a.i(24229),g=a.i(5050);let h=(0,g.createServerReference)("407538588eafa59277711f2487cd440212bef1526d",g.callServer,void 0,g.findSourceMapURL,"changeMic"),i=(0,g.createServerReference)("40070e1d29da0530feb5bb31e48e3f1ee981236d5a",g.callServer,void 0,g.findSourceMapURL,"contribute"),j={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};a.s(["MeetingControls",0,function({fleetId:a,meetingId:g,controls:k}){let l=(0,c.useRouter)(),[m,n]=(0,d.useState)(""),[o,p]=(0,d.useState)(()=>crypto.randomUUID()),[q,r]=(0,d.useState)(),[s,t]=(0,d.useState)(),[,u]=(0,d.useTransition)(),v=({control:a,action:b,onDone:c})=>{r(a),t(void 0),u(async()=>{let a=await b();r(void 0),a.isOk?(c?.(),l.refresh()):t(a.message)})},w=void 0!==q,x=k.filter(a=>"contribute"!==a);return(0,b.jsxs)("div",{className:"grid gap-3",children:[k.includes("contribute")?(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Your contribution"}),(0,b.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:m,onChange:a=>{n(a.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,b.jsx)(e.f,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===q,pendingLabel:"Sending...",disabled:w,onClick:()=>{v({control:"contribute",action:()=>i({fleet:a,meetingId:g,text:m,idempotencyKey:o}),onDone:()=>{n(""),p(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===x.length?null:(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(c=>(0,b.jsx)(e.f,{"data-testid":`meeting-${c}`,variant:"request"===c?"primary":"secondary",isPending:q===c,pendingLabel:j[c].pending,disabled:w,onClick:()=>{v({control:c,action:()=>h({fleet:a,meetingId:g,change:c})})},children:j[c].label},c))}),void 0===s?null:(0,b.jsx)(f.f,{message:s,isFailure:!0})]})}],3045)}];
1
+ module.exports=[3045,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(1542),f=a.i(24229),g=a.i(5050);let h=(0,g.createServerReference)("409df7216b8b34eb9ada3ee94ce345f189b57aebca",g.callServer,void 0,g.findSourceMapURL,"changeMic"),i=(0,g.createServerReference)("4085e1ff69d4ee5a066a227137d8eb1b17ea78fde8",g.callServer,void 0,g.findSourceMapURL,"contribute"),j={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};a.s(["MeetingControls",0,function({fleetId:a,meetingId:g,controls:k}){let l=(0,c.useRouter)(),[m,n]=(0,d.useState)(""),[o,p]=(0,d.useState)(()=>crypto.randomUUID()),[q,r]=(0,d.useState)(),[s,t]=(0,d.useState)(),[,u]=(0,d.useTransition)(),v=({control:a,action:b,onDone:c})=>{r(a),t(void 0),u(async()=>{let a=await b();r(void 0),a.isOk?(c?.(),l.refresh()):t(a.message)})},w=void 0!==q,x=k.filter(a=>"contribute"!==a);return(0,b.jsxs)("div",{className:"grid gap-3",children:[k.includes("contribute")?(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Your contribution"}),(0,b.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:m,onChange:a=>{n(a.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,b.jsx)(e.f,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===q,pendingLabel:"Sending...",disabled:w,onClick:()=>{v({control:"contribute",action:()=>i({fleet:a,meetingId:g,text:m,idempotencyKey:o}),onDone:()=>{n(""),p(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===x.length?null:(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(c=>(0,b.jsx)(e.f,{"data-testid":`meeting-${c}`,variant:"request"===c?"primary":"secondary",isPending:q===c,pendingLabel:j[c].pending,disabled:w,onClick:()=>{v({control:c,action:()=>h({fleet:a,meetingId:g,change:c})})},children:j[c].label},c))}),void 0===s?null:(0,b.jsx)(f.f,{message:s,isFailure:!0})]})}],3045)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map
@@ -1 +1 @@
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,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,EAAQ,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,IAC3B,CAAC,EAAU,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,IAAM,OAAO,UAAU,IAC1D,CAAC,EAAS,EAAW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ACZ,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%3A602ef6%20%3Ctext/javascript%3E","../../../../../web/features/meeting/hooks/data%3A35932d%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__ [{\"409df7216b8b34eb9ada3ee94ce345f189b57aebca\":{\"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(\"409df7216b8b34eb9ada3ee94ce345f189b57aebca\",callServer,void 0,findSourceMapURL,\"changeMic\");export{$$RSC_SERVER_ACTION_1 as changeMic};","/* __next_internal_action_entry_do_not_use__ [{\"4085e1ff69d4ee5a066a227137d8eb1b17ea78fde8\":{\"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(\"4085e1ff69d4ee5a066a227137d8eb1b17ea78fde8\",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,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AAA,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)("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)}];
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)("60ce8075c06f2e8ae3ef74d3b6e062d8e1f53f024c",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%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,WAA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AA,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%3Aca3c04%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__ [{\"60ce8075c06f2e8ae3ef74d3b6e062d8e1f53f024c\":{\"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(\"60ce8075c06f2e8ae3ef74d3b6e062d8e1f53f024c\",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,MAAM,WAE3H,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,iCACV,EAAO,wFAA0F,+FAEpF,gBAAf,EAAM,IAAI,CACT,CAAA,EAAA,EAAA,IAAA,EA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