@aeolus-fleet/gateway 0.34.0 → 0.35.0
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.
- package/dist/adapters/http/person-tools.js +5 -3
- package/dist/adapters/http/person-tools.js.map +1 -1
- package/dist/adapters/pagasae/email-channel.js +4 -3
- package/dist/adapters/pagasae/email-channel.js.map +1 -1
- package/dist/adapters/prisma/party-store.js +2 -1
- package/dist/adapters/prisma/party-store.js.map +1 -1
- package/dist/adapters/trpc/router.js +3 -5
- package/dist/adapters/trpc/router.js.map +1 -1
- package/dist/core/a2a-in/send-a2a-message.d.ts +0 -2
- package/dist/core/a2a-in/send-a2a-message.js +17 -4
- package/dist/core/a2a-in/send-a2a-message.js.map +1 -1
- package/dist/core/people/ports.d.ts +9 -2
- package/dist/core/people/wake-person.js +3 -1
- package/dist/core/people/wake-person.js.map +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +3 -3
- package/web/.next/diagnostics/route-bundle-stats.json +32 -32
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/overview/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/(console)/overview/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/overview/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/overview/requests/[requestId]/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/overview/requests/[requestId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/overview/requests/[requestId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
- package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
- package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
- package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/web/.next/server/app/icon.svg.body +1 -1
- package/web/.next/server/chunks/_0xw0b7avhvg75._.js +1 -1
- package/web/.next/server/chunks/_0xw0b7avhvg75._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__03w-pkh4_8jv_._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__048-rfvdrnoze._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07ba2bfe20c_p._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0a6a1yc_ac-qt._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0f732g7ojc5-a._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0fz0817_b9ljl._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0i_m5r9lyffk8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0icm7kndx480o._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0k6a9o0872_0x._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0pj38h6qumggc._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1kynqd8xcwg2b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1nxy_j9eswr3i._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1q14l5_4hp9h3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1qnls-4cj-7oh._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1r1t1q3fzoqey._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1xmvo3lr1_qyo._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1zlq3zji9v53h._.js +1 -1
- package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
- package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
- package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
- package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
- package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
- package/web/.next/server/chunks/ssr/_1e2o809f0ekry._.js +1 -1
- package/web/.next/server/chunks/ssr/{_0eu-76mbv16oa._.js → _1oy13966tft2_._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0eu-76mbv16oa._.js.map → _1oy13966tft2_._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_1cnvrfjlqx00k._.js → _1pf8x2exvfl1z._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_1cnvrfjlqx00k._.js.map → _1pf8x2exvfl1z._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
- package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
- package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
- package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_overview_hooks_overview-actions_ts_0-wrat07d1y5g._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_overview_state_00l0wkgvv9y6j._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_overview_state_00l0wkgvv9y6j._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
- package/web/.next/server/middleware-build-manifest.js +3 -3
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/preview-props.json +3 -3
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +46 -46
- package/web/.next/static/chunks/{0psup8zn8e6k5.js → 03239gtej3tj0.js} +1 -1
- package/web/.next/static/chunks/0tmvd_zw45u96.js +1 -0
- package/web/.next/static/chunks/{20t1nmdiq805b.js → 1se0j0htjyep6.js} +1 -1
- package/web/.next/static/chunks/{31-hltzmw_9fi.js → 287ofedoj_6xl.js} +1 -1
- package/web/.next/static/chunks/{015ume9uk4hla.js → 2_e-puldye2do.js} +1 -1
- package/web/.next/static/chunks/{35bmc8wm29tr6.js → 34kulpk3a-cka.js} +1 -1
- package/web/.next/static/chunks/{0ji7rkz0ll9gh.js → 3ceatffqhpgpu.js} +1 -1
- package/web/.next/static/chunks/{2s_dov6h7kus5.js → 3fd167c0-ot3u.js} +1 -1
- package/web/.next/static/chunks/{42cpzi5s1o44m.js → 3l5jtag3-fukc.js} +1 -1
- package/web/.next/static/media/{icon.0h5hy2etdmq_n.svg → icon.1o2ogor9e8-fc.svg} +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/.next/static/chunks/1s8b8jpg4jai9.js +0 -1
- /package/web/.next/static/{yf1Q3fTAV4eQiroxoYbih → R_nPUtDcDp1BPV3QHhaMZ}/_buildManifest.js +0 -0
- /package/web/.next/static/{yf1Q3fTAV4eQiroxoYbih → R_nPUtDcDp1BPV3QHhaMZ}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{yf1Q3fTAV4eQiroxoYbih → R_nPUtDcDp1BPV3QHhaMZ}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(()=>{"use strict";module.exports=[13095,(a,b,c)=>{function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},73290,a=>{var b=a.i(70043);a.S([b,"
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},73290,a=>{var b=a.i(70043);a.S([b,"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2,f"],73290)},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2",null),a.s(["f",0,e])}]})();
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=_1pjtire7rqla0._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '
|
|
1
|
+
{"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/_not-found/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2'} from 'ACTIONS_MODULE0'\n","'use server';\n\n/** The header's theme choice, kept for this browser for a year. */\nimport { cookies } from 'next/headers';\n\nimport { isTheme, THEME_COOKIE } from './theme';\n\nconst YEAR_SECONDS = 365 * 24 * 60 * 60;\n\nexport async function setTheme(theme: unknown): Promise<void> {\n if (!isTheme(theme)) {\n return;\n }\n (await cookies()).set(THEME_COOKIE, theme, { path: '/', sameSite: 'lax', maxAge: YEAR_SECONDS });\n}\n"],"names":["ensureServerEntryExports","actions","i","length","action","Error","registerServerReference","YEAR_SECONDS","setTheme","theme","set","path","sameSite","maxAge"],"mappings":"mDAGO,SAASA,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAUC,AAAJ,MACJ,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,CAG1J,CACF,0EATgBJ,2BAAAA,qCAAAA,sBCHoC,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CM,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,cCDxC,IAAA,EAAA,EAAA,CAAA,CAAA,iGCGA,EAAA,EAAA,CAAA,CAAA,MAEA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeE,EAASC,CAAc,EACtC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACA,IAGb,CAAC,GAHoB,GAGd,CAAA,EAAA,EAAA,OAAA,AAAO,GAAA,CAAE,CAAEC,GAAG,CAAC,EAAA,CAAY,CAAED,EAAO,CAAEE,KAAM,IAAKC,SAAU,MAAOC,OANtD,CAM8DN,KANxD,CAMqE,EAChG,EAPgC,KAAK,mCAEfC,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA","ignoreList":[0,1]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(()=>{"use strict";module.exports=[13095,(a,b,c)=>{function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},33170,a=>{var b=a.i(70043);a.S([b,"
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`)}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},37936,(a,b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},33170,a=>{var b=a.i(70043);a.S([b,"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2,f"],33170)},70043,a=>{var b=a.i(37936),c=a.i(5246),d=a.i(67591);async function e(a){(0,d.x)(a)&&(await (0,c.cookies)()).set(d.g,a,{path:"/",sameSite:"lax",maxAge:31536e3})}(0,a.i(13095).ensureServerEntryExports)([e]),(0,b.registerServerReference)(e,"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2",null),a.s(["f",0,e])}]})();
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=_1qbsmlji34yph._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/authorize/pick/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '
|
|
1
|
+
{"version":3,"sources":["../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../web/.next-internal/server/app/authorize/pick/page/actions.js%20%28server%20actions%20loader%29","../../../../../web/features/frame/actions.ts"],"sourcesContent":["// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","export {setTheme as '40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2'} from 'ACTIONS_MODULE0'\n","'use server';\n\n/** The header's theme choice, kept for this browser for a year. */\nimport { cookies } from 'next/headers';\n\nimport { isTheme, THEME_COOKIE } from './theme';\n\nconst YEAR_SECONDS = 365 * 24 * 60 * 60;\n\nexport async function setTheme(theme: unknown): Promise<void> {\n if (!isTheme(theme)) {\n return;\n }\n (await cookies()).set(THEME_COOKIE, theme, { path: '/', sameSite: 'lax', maxAge: YEAR_SECONDS });\n}\n"],"names":["ensureServerEntryExports","actions","i","length","action","Error","registerServerReference","YEAR_SECONDS","setTheme","theme","set","path","sameSite","maxAge"],"mappings":"mDAGO,SAASA,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAUC,AAAJ,MACJ,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,CAG1J,CACF,0EATgBJ,2BAAAA,qCAAAA,sBCHoC,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CM,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,cCDxC,IAAA,EAAA,EAAA,CAAA,CAAA,iGCGA,EAAA,EAAA,CAAA,CAAA,MAEA,EAAA,EAAA,CAAA,CAAA,OAIO,eAAeE,EAASC,CAAc,EACtC,CAAA,EAAA,EAAA,CAAA,AAAO,EAACA,IAGb,CAAC,GAHoB,GAGd,CAAA,EAAA,EAAA,OAAA,AAAO,GAAA,CAAE,CAAEC,GAAG,CAAC,EAAA,CAAY,CAAED,EAAO,CAAEE,KAAM,IAAKC,SAAU,MAAOC,OANtD,CAM8DN,KANxD,CAMqE,EAChG,EAPgC,KAAK,mCAEfC,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA","ignoreList":[0,1]}
|
|
@@ -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,"
|
|
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,"608ad0d36a0cdd886e103d2759009ddc4187ee8568",null),a.s(["40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2",()=>b.f,"608ad0d36a0cdd886e103d2759009ddc4187ee8568",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"}],c={kind:"personSignIn",label:"Each person signs in"},d=[...b,c];function e(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}}}}a.s(["a",0,d,"x",0,b,"m",0,c,"G",0,function(a){var b;return(b=a.credentialKind,(d.find(({kind:a})=>a===b)?.kind??"bearer")===c.kind)?{kind:c.kind}:e(a)},"y",0,e])}]})();
|
|
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 '
|
|
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 '40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2'} from 'ACTIONS_MODULE0'\nexport {addA2aAgent as '608ad0d36a0cdd886e103d2759009ddc4187ee8568'} 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. A server being added may instead\n * have each person sign in to it for themselves (decision 0067).\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 only adding a server offers: the gateway registers the party's client, and each person signs in (decision 0067). */\nexport const SIGN_IN_CREDENTIAL = { kind: 'personSignIn', label: 'Each person signs in' } as const;\n\n/** The credential kinds the add page offers, with the words it shows. */\nexport const ADDED_CREDENTIAL_KINDS = [...CREDENTIAL_KINDS, SIGN_IN_CREDENTIAL] as const;\n\nexport type AddedCredentialKind = (typeof ADDED_CREDENTIAL_KINDS)[number]['kind'];\n\nexport type AddedServerCredential = ServerCredential | { kind: typeof SIGN_IN_CREDENTIAL.kind };\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\n/** The kind the add page sent, a bearer when it sent none it knows. */\nexport function addedCredentialKindOf(sent: string): AddedCredentialKind {\n return ADDED_CREDENTIAL_KINDS.find(({ kind }) => kind === sent)?.kind ?? 'bearer';\n}\n\n/** The credential the add page's fields name: each person signing in takes no field. */\nexport function addedServerCredentialOf(fields: Parameters<typeof serverCredentialOf>[0]): AddedServerCredential {\n return addedCredentialKindOf(fields.credentialKind) === SIGN_IN_CREDENTIAL.kind ? { kind: SIGN_IN_CREDENTIAL.kind } : serverCredentialOf(fields);\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","SIGN_IN_CREDENTIAL","ADDED_CREDENTIAL_KINDS","credentialKindOf","sent","find","serverCredentialOf","addedCredentialKindOf","addedServerCredentialOf"],"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,CAAA,AAAQ,EAACL,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,EAAM,gBAC7D,GAAI,CAACS,EAAYE,OAAO,CACtB,CADwB,KACjB,CAAEC,KAAM,UAAWC,QAAS,iBAAkBX,QAAO,EAE9D,IAAMY,EAAM,MAAM,CAAA,EAAA,EAAA,CAAA,AAAU,EAACb,GAE7B,GAAI,CAiBF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7B,IAAI,AAAC,EAAIkC,EAAmB5C,EAC3I"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[43928,a=>{"use strict";var b=a.i(70043),c=a.i(4757);a.S([b,"
|
|
1
|
+
module.exports=[43928,a=>{"use strict";var b=a.i(70043),c=a.i(4757);a.S([b,"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2,f",0,c,"40bda0ff816df122642777c895d7e4a5c52172f56a,Z,40db6d8e8bf7bc28f18e2b6e6b883909a3fd918ba7,q,601910062a5e0864a2917cd809b6f8accb362b46d1,k,601b65024ccb7fc33018510433a7610daeebdbdb3d,_,6076a2215296656c4d1a1b5812e97c6a902490be89,v,607887cbdee422db6a9cda69ee2c54629879fb2510,W,6099ca5bb6c962ad51b5b316d713691acae0b2e746,y,60e7ce47eb2d23df456a542903519b389ce1ca3d37,G"],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 '
|
|
1
|
+
{"version":3,"sources":["../../../../../web/.next-internal/server/app/%28console%29/overview/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {setTheme as '40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2'} from 'ACTIONS_MODULE0'\nexport {answerDelivery as '40db6d8e8bf7bc28f18e2b6e6b883909a3fd918ba7'} from 'ACTIONS_MODULE1'\nexport {doneDelivery as '60e7ce47eb2d23df456a542903519b389ce1ca3d37'} from 'ACTIONS_MODULE1'\nexport {openDelivery as '6076a2215296656c4d1a1b5812e97c6a902490be89'} from 'ACTIONS_MODULE1'\nexport {showAllInSlack as '601910062a5e0864a2917cd809b6f8accb362b46d1'} from 'ACTIONS_MODULE1'\nexport {unlinkSlack as '40bda0ff816df122642777c895d7e4a5c52172f56a'} from 'ACTIONS_MODULE1'\nexport {turnEmail as '601b65024ccb7fc33018510433a7610daeebdbdb3d'} from 'ACTIONS_MODULE1'\nexport {turnOffWebPush as '607887cbdee422db6a9cda69ee2c54629879fb2510'} from 'ACTIONS_MODULE1'\nexport {turnOnWebPush as '6099ca5bb6c962ad51b5b316d713691acae0b2e746'} 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)("
|
|
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)("608ad0d36a0cdd886e103d2759009ddc4187ee8568",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%
|
|
1
|
+
{"version":3,"sources":["../../../../../web/features/add-a2a-agent/ui/a2a-agent-form.tsx","../../../../../web/features/add-a2a-agent/data%3Ad97b5e%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'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__ [{\"608ad0d36a0cdd886e103d2759009ddc4187ee8568\":{\"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(\"608ad0d36a0cdd886e103d2759009ddc4187ee8568\",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,eDal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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(48242),k=a.i(64943),l=a.i(5050);let m=(0,l.createServerReference)("
|
|
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(48242),k=a.i(64943),l=a.i(5050);let m=(0,l.createServerReference)("60c7eca121dbae1c124f74472d6836045817fe9b27",l.callServer,void 0,l.findSourceMapURL,"addA2aClient"),n={kind:"idle"};function o({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)((0,j.f)(a),e),className:"text-primary hover:underline",children:"Its card addresses"})})]})}a.s(["A2aClientForm",0,function({fleetId:a,requestId:d,owners:j,scopes:l}){let[p,q]=(0,c.useActionState)(m,n);return"added"===p.kind?(0,b.jsx)(o,{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:j.isOk?j.value:[],current:null,help:"A person ship or argo. It answers for this client.",refusal:j.isOk?void 0:j.refusal}),0===l.length?null:(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),l.map(a=>(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",name:`${k.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/add-a2a-client/data%
|
|
1
|
+
{"version":3,"sources":["../../../../../web/features/add-a2a-client/ui/a2a-client-form.tsx","../../../../../web/features/add-a2a-client/data%3A36b682%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'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","/* __next_internal_action_entry_do_not_use__ [{\"60c7eca121dbae1c124f74472d6836045817fe9b27\":{\"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(\"60c7eca121dbae1c124f74472d6836045817fe9b27\",callServer,void 0,findSourceMapURL,\"addA2aClient\");export{$$RSC_SERVER_ACTION_0 as addA2aClient};"],"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,OACA,EAAA,EAAA,CAAA,CAAA,OCXqM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,gBDcpb,EAA0B,CAAE,KAAM,MAAO,EAG/C,SAAS,EAAM,MAAE,CAAI,QAAE,CAAM,CAAE,SAAO,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,GAA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AC7J,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,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,MAAO,AAAe,cAAT,IAAI,CAAiB,EAAQ,CAAE,KAAM,MAAO,MAGxE"}
|
package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[29372,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("
|
|
1
|
+
module.exports=[29372,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("60677bc3f550873a6ee6a663c347d21258f73956e9",d.callServer,void 0,d.findSourceMapURL,"approveServer"),f=(0,d.createServerReference)("602aff8b5de3a8c13f117e6954eceef8b610d28ed1",d.callServer,void 0,d.findSourceMapURL,"checkServer");var g=a.i(30587),h=a.i(51636),i=a.i(60224),j=a.i(88412),k=a.i(77237);let l=["Address","Check","Owner"],m=["Address","Owner","Sign in"];var n=a.i(36855);function o({refusal:a}){return void 0===a?null:(0,b.jsx)(n.f,{state:{kind:"refused",message:a}})}function p({names:a,at:c}){return(0,b.jsx)("ol",{className:"flex gap-4",children:a.map((a,d)=>(0,b.jsxs)("li",{"aria-current":d===c?"step":void 0,className:d<=c?"font-medium":"text-muted-foreground",children:[d+1," ",a]},a))})}function q({state:a,action:d,fleetId:e}){let[f,n]=(0,c.useState)((0,h.G)(a.fields.credentialKind??"")),r=f===h.m.kind;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p,{names:f===h.m.kind?m:l,at:0}),(0,b.jsxs)("form",{action:d,className:`${j.r} grid gap-3`,"data-testid":"add-server-address",children:[(0,b.jsx)("input",{type:"hidden",name:g.H,value:e}),(0,b.jsx)(o,{refusal:a.refusal}),(0,b.jsxs)("label",{className:j.z,children:[(0,b.jsx)("span",{children:"Streamable HTTP address"}),(0,b.jsx)("input",{className:j.w,type:"url",name:"url",defaultValue:a.fields.url??"",placeholder:"https://mcp.example.com/mcp",required:!0})]}),(0,b.jsx)(i.f,{legend:"The server's credential",fields:a.fields,noneHelp:"The gateway sends no credential: for a server reached only on a private network.",canEachPersonSignIn:!0,onKindChange:n}),(0,b.jsx)("div",{children:(0,b.jsx)(k.f,{pending:r?"Next…":"Checking the server…",testId:"add-server-check",children:r?"Next":"Check the server"})})]})]})}var r=a.i(35149),s=a.i(10020),t=a.i(47763);function u({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)(t.E,{children:"reads only"}):null,h?(0,b.jsx)(t.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})]})}function v({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)(u,{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)(s.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)})})]})}let w=["url","credentialKind","token","clientId","clientSecret","issuer","scope"];function x({state:a,refused:d,action:e,onBack:f,fleetId:h,canSwitchTools:i}){let n,q="refused"===d.kind&&d.requestId===a.requestId,s=q?d.fields:a.fields,t=s.url??"",[u,y]=(0,c.useState)(s.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,"")}(t)),z=a.tools;return(0,b.jsxs)(b.Fragment,{children:[null===z?(0,b.jsx)(p,{names:m,at:1}):(0,b.jsx)(p,{names:l,at:2}),(0,b.jsxs)("form",{action:e,className:`${j.r} grid gap-3`,"data-testid":"add-server-owner",children:[null===z?null:(0,b.jsx)(v,{tools:z,canSwitch:i}),(0,b.jsx)("h2",{className:"text-section font-semibold",children:"Its owner"}),(0,b.jsx)(o,{refusal:q?d.message:void 0}),(0,b.jsx)("input",{type:"hidden",name:g.H,value:h}),(0,b.jsx)("input",{type:"hidden",name:"requestId",value:a.requestId}),w.map(a=>(0,b.jsx)("input",{type:"hidden",name:a,value:s[a]??""},a)),(0,b.jsx)("p",{className:"font-mono text-muted-foreground",children:t}),(0,b.jsxs)("label",{className:j.z,children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{className:j.w,type:"text",name:"name",value:u,onChange:a=>{y(a.target.value)},required:!0})]}),(0,b.jsx)(r.f,{choices:a.owners,current:a.owners.find(a=>a.shipId===s.ownerShipId)??null,help:"A person ship or argo. It answers for this server."}),(0,b.jsxs)("label",{className:j.z,children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{className:j.w,type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:s.concurrencyLimit??"4"})]}),null===z?(0,b.jsx)("p",{className:"text-muted-foreground",children:"Its tools show once someone signs in."}):null,(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(k.f,{pending:null===z?"Checking the sign-in…":"Adding…",testId:"add-server-approve",children:""===(n=u.trim())?"Add as outside party":n.length>20?`Add ${n.slice(0,20)}…`:`Add ${n}`}),(0,b.jsx)("button",{type:"button",className:j.x.secondary,onClick:f,children:"Back to the address"})]})]})]})}var y=a.i(25959),z=a.i(48242),A=a.i(60247);function B({fleetId:a,name:d}){let[e,f]=(0,c.useActionState)(A.f,g.Q);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p,{names:m,at:2}),(0,b.jsxs)("form",{action:f,className:`${j.r} grid gap-3`,"data-testid":"add-server-sign-in",children:[(0,b.jsx)(n.f,{state:{kind:"done",message:`${d} is added.`}}),(0,b.jsx)(n.f,{state:e}),(0,b.jsx)("input",{type:"hidden",name:g.H,value:a}),(0,b.jsx)("input",{type:"hidden",name:"name",value:d}),(0,b.jsxs)("p",{children:["Sign in to ",d," for yourself. Its tools show after the first sign-in."]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(k.f,{pending:`Opening ${d}…`,testId:"add-server-sign-in-start",children:["Sign in to ",d]}),(0,b.jsx)("a",{href:(0,y.f)((0,z.f)(d),a),className:j.x.secondary,children:"Later"})]})]})]})}a.s(["AddServer",0,function({fleetId:a,canSwitchTools:d}){let[g,h]=(0,c.useActionState)(f,{step:"address",fields:{}}),[i,j]=(0,c.useActionState)(e,{kind:"idle"}),[k,l]=(0,c.useState)(void 0),m="owner"===g.step&&k!==g.requestId?g: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"}),"added"===i.kind?(0,b.jsx)(B,{fleetId:a,name:i.name}):void 0===m?(0,b.jsx)(q,{state:g,action:h,fleetId:a}):(0,b.jsx)(x,{state:m,refused:i,action:j,onBack:()=>{l(m.requestId)},fleetId:a,canSwitchTools:d})]})}],29372)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map
|
package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../web/features/add-server/ui/add-server.tsx","../../../../../web/features/add-server/data%3A5eb7f7%20%3Ctext/javascript%3E","../../../../../web/features/add-server/data%3A51c923%20%3Ctext/javascript%3E","../../../../../web/features/add-server/ui/address-step.tsx","../../../../../web/features/add-server/steps.ts","../../../../../web/features/add-server/ui/refused.tsx","../../../../../web/features/add-server/ui/steps.tsx","../../../../../web/features/add-server/ui/owner-step.tsx","../../../../../web/features/add-server/suggested-name.ts","../../../../../web/features/add-server/ui/tools-section.tsx","../../../../../web/features/add-server/tool-choice.ts","../../../../../web/features/outside-parties/ui/tool-row.tsx","../../../../../web/features/add-server/ui/sign-in-step.tsx"],"sourcesContent":["'use client';\n\nimport { useActionState, useState } from 'react';\n\nimport { approveServer, checkServer } from '../actions';\nimport { AddressStep } from './address-step';\nimport { OwnerStep } from './owner-step';\nimport { SignInStep } from './sign-in-step';\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. A server\n * where each person signs in is added unchecked, then the approver signs in\n * to it for themselves (M1, decision 0067). Each button says at once that its\n * 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 [approved, 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 {approved.kind === 'added' ? (\n <SignInStep fleetId={fleetId} name={approved.name} />\n ) : owner === undefined ? (\n <AddressStep state={checked} action={check} fleetId={fleetId} />\n ) : (\n <OwnerStep state={owner} refused={approved} action={approve} onBack={() => { setBackFrom(owner.requestId); }} fleetId={fleetId} canSwitchTools={canSwitchTools} />\n )}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"6016f937a1369b6859c9c0fd2f9becfa3697def235\":{\"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(\"6016f937a1369b6859c9c0fd2f9becfa3697def235\",callServer,void 0,findSourceMapURL,\"approveServer\");export{$$RSC_SERVER_ACTION_1 as approveServer};","/* __next_internal_action_entry_do_not_use__ [{\"605ccee1941cfb893bf04e87e68a064ea6aafbe3eb\":{\"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(\"605ccee1941cfb893bf04e87e68a064ea6aafbe3eb\",callServer,void 0,findSourceMapURL,\"checkServer\");export{$$RSC_SERVER_ACTION_0 as checkServer};","'use client';\n\nimport { useState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { addedCredentialKindOf, SIGN_IN_CREDENTIAL } from '../../forms/server-credential';\nimport { CredentialFields } from '../../forms/ui/credential-fields';\nimport { CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { stepsOf } from '../steps';\nimport { Refused } from './refused';\nimport { Steps } from './steps';\n\n/**\n * The first step: the server's address and its credential, with the check's\n * refusal where it was refused. A server where each person signs in goes on\n * to its owner with Next, unchecked; any other is checked first.\n */\nexport function AddressStep({ state, action, fleetId }: { state: { fields: Readonly<Record<string, string>>; refusal?: string | undefined }; action: (form: FormData) => void; fleetId: string }) {\n const [kind, setKind] = useState(addedCredentialKindOf(state.fields.credentialKind ?? ''));\n const isSignIn = kind === SIGN_IN_CREDENTIAL.kind;\n return (\n <>\n <Steps names={stepsOf(kind)} at={0} />\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.\" canEachPersonSignIn onKindChange={setKind} />\n <div>\n <SubmitButton pending={isSignIn ? 'Next…' : 'Checking the server…'} testId=\"add-server-check\">\n {isSignIn ? 'Next' : 'Check the server'}\n </SubmitButton>\n </div>\n </form>\n </>\n );\n}\n","/**\n * The steps of adding a server, as M1 numbers them. A server where each\n * person signs in has no tools to check before someone signs in, so the\n * gateway checks its sign-in when it is added, and the approver's own sign-in\n * comes last (decision 0067, Q15).\n */\nimport { SIGN_IN_CREDENTIAL, type AddedCredentialKind } from '../forms/server-credential';\n\nexport const CHECKED_STEPS = ['Address', 'Check', 'Owner'] as const;\n\nexport const SIGN_IN_STEPS = ['Address', 'Owner', 'Sign in'] as const;\n\n/** The steps for a server with this credential. */\nexport function stepsOf(kind: AddedCredentialKind): typeof CHECKED_STEPS | typeof SIGN_IN_STEPS {\n return kind === SIGN_IN_CREDENTIAL.kind ? SIGN_IN_STEPS : CHECKED_STEPS;\n}\n","import { Outcome } from '../../forms/ui/outcome';\n\n/** Why the API refused a step, said on that step; nothing while it was not refused. */\nexport function Refused({ refusal }: { refusal: string | undefined }) {\n return refusal === undefined ? null : <Outcome state={{ kind: 'refused', message: refusal }} />;\n}\n","/** The steps of adding a server, as the design numbers them, the one at marked current. */\nexport function Steps({ names, at }: { names: readonly string[]; at: number }) {\n return (\n <ol className=\"flex gap-4\">\n {names.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","'use client';\n\nimport { useState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { BUTTONS, CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { OwnerField } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport type { AddServerState, ApproveState } from '../actions';\nimport { CHECKED_STEPS, SIGN_IN_STEPS } from '../steps';\nimport { addButtonLabel, suggestedName } from '../suggested-name';\nimport { Refused } from './refused';\nimport { Steps } from './steps';\nimport { ToolsSection } from './tools-section';\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\n/**\n * The step that names the server's proxy ship and its owner, below the tools\n * the check answered. A server where each person signs in has no tools to\n * show yet: Add checks its sign-in, and says a refusal in place.\n */\nexport function 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 const tools = state.tools;\n return (\n <>\n {tools === null ? <Steps names={SIGN_IN_STEPS} at={1} /> : <Steps names={CHECKED_STEPS} at={2} />}\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-server-owner\">\n {tools === null ? null : <ToolsSection tools={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'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 {tools === null ? <p className=\"text-muted-foreground\">Its tools show once someone signs in.</p> : null}\n <div className=\"flex gap-2\">\n <SubmitButton pending={tools === null ? 'Checking the sign-in…' : '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","/** 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","'use client';\n\nimport { useState } from 'react';\n\nimport { Switch } from '../../forms/ui/switch';\nimport { ToolRow } from '../../outside-parties/ui/tool-row';\nimport type { CheckedTool } from '../actions';\nimport { TOOL_ON_FIELD, TOOL_SHOWN_FIELD } from '../tool-choice';\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 */\nexport function 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","/**\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","'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 { inFleet } from '../../../lib/gateway-api/page-account';\nimport { partyPath } from '../../outside-parties/paths';\nimport { signInToParty } from '../../outside-party/actions';\nimport { SIGN_IN_STEPS } from '../steps';\nimport { Steps } from './steps';\n\n/**\n * The last step of adding a server where each person signs in: the\n * approver signs in to it for themselves, and their sign-in reads its tools\n * (Q15). Later goes to its page, where they sign in when they choose.\n */\nexport function SignInStep({ fleetId, name }: { fleetId: string; name: string }) {\n const [refused, signIn] = useActionState(signInToParty, IDLE);\n return (\n <>\n <Steps names={SIGN_IN_STEPS} at={2} />\n <form action={signIn} className={`${CARD} grid gap-3`} data-testid=\"add-server-sign-in\">\n <Outcome state={{ kind: 'done', message: `${name} is added.` }} />\n <Outcome state={refused} />\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"name\" value={name} />\n <p>Sign in to {name} for yourself. Its tools show after the first sign-in.</p>\n <div className=\"flex gap-2\">\n <SubmitButton pending={`Opening ${name}…`} testId=\"add-server-sign-in-start\">\n Sign in to {name}\n </SubmitButton>\n <a href={inFleet(partyPath(name), fleetId)} className={BUTTONS.secondary}>\n Later\n </a>\n </div>\n </form>\n </>\n );\n}\n"],"names":["$$RSC_SERVER_ACTION_1"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OCFkM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,iBCA3I,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,eCIrb,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,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,EAAE,EAAK,CAAC,CAAC,CAAE,OAAO,qCAA2B,cAC/D,KAEd,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,KAAM,CAAA,EAAA,EAAA,CAAA,AAAO,EAAC,CAAA,EAAA,EAAA,CAAA,AAAS,EAAC,GAAO,GAAU,UAAW,EAAA,CAAO,CAAC,SAAS,UAAE,kBAOpF,oBZzBO,SAAS,AAAU,SAAE,CAAO,gBAAE,CAAc,CAAgD,EACjG,GAAM,CAAC,EAAS,EAAM,CAAG,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAa,CAAE,KAAM,UAAW,OAAQ,CAAC,CAAE,GAC7E,CAAC,EAAU,EAAQ,CAAG,CAAA,EAAA,EAAA,cAAA,AAAc,EAAC,EAAe,CAAE,KAAM,MAAO,GAEnE,CAAC,EAAU,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,OAAqB,GACvD,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,mBACtB,UAAlB,EAAS,IAAI,CACZ,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAW,QAAS,EAAS,KAAM,EAAS,IAAI,QACrC,IAAV,EACF,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,MAAO,EAAS,OAAQ,EAAO,QAAS,IAErD,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAU,MAAO,EAAO,QAAS,EAAU,OAAQ,EAAS,OAAQ,KAAQ,EAAY,EAAM,SAAS,CAAG,EAAG,QAAS,EAAS,eAAgB,MAIxJ"}
|
|
1
|
+
{"version":3,"sources":["../../../../../web/features/add-server/ui/add-server.tsx","../../../../../web/features/add-server/data%3Ab9a31b%20%3Ctext/javascript%3E","../../../../../web/features/add-server/data%3A042dd3%20%3Ctext/javascript%3E","../../../../../web/features/add-server/ui/address-step.tsx","../../../../../web/features/add-server/steps.ts","../../../../../web/features/add-server/ui/refused.tsx","../../../../../web/features/add-server/ui/steps.tsx","../../../../../web/features/add-server/ui/owner-step.tsx","../../../../../web/features/add-server/suggested-name.ts","../../../../../web/features/add-server/ui/tools-section.tsx","../../../../../web/features/add-server/tool-choice.ts","../../../../../web/features/outside-parties/ui/tool-row.tsx","../../../../../web/features/add-server/ui/sign-in-step.tsx"],"sourcesContent":["'use client';\n\nimport { useActionState, useState } from 'react';\n\nimport { approveServer, checkServer } from '../actions';\nimport { AddressStep } from './address-step';\nimport { OwnerStep } from './owner-step';\nimport { SignInStep } from './sign-in-step';\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. A server\n * where each person signs in is added unchecked, then the approver signs in\n * to it for themselves (M1, decision 0067). Each button says at once that its\n * 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 [approved, 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 {approved.kind === 'added' ? (\n <SignInStep fleetId={fleetId} name={approved.name} />\n ) : owner === undefined ? (\n <AddressStep state={checked} action={check} fleetId={fleetId} />\n ) : (\n <OwnerStep state={owner} refused={approved} action={approve} onBack={() => { setBackFrom(owner.requestId); }} fleetId={fleetId} canSwitchTools={canSwitchTools} />\n )}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60677bc3f550873a6ee6a663c347d21258f73956e9\":{\"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(\"60677bc3f550873a6ee6a663c347d21258f73956e9\",callServer,void 0,findSourceMapURL,\"approveServer\");export{$$RSC_SERVER_ACTION_1 as approveServer};","/* __next_internal_action_entry_do_not_use__ [{\"602aff8b5de3a8c13f117e6954eceef8b610d28ed1\":{\"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(\"602aff8b5de3a8c13f117e6954eceef8b610d28ed1\",callServer,void 0,findSourceMapURL,\"checkServer\");export{$$RSC_SERVER_ACTION_0 as checkServer};","'use client';\n\nimport { useState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { addedCredentialKindOf, SIGN_IN_CREDENTIAL } from '../../forms/server-credential';\nimport { CredentialFields } from '../../forms/ui/credential-fields';\nimport { CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { stepsOf } from '../steps';\nimport { Refused } from './refused';\nimport { Steps } from './steps';\n\n/**\n * The first step: the server's address and its credential, with the check's\n * refusal where it was refused. A server where each person signs in goes on\n * to its owner with Next, unchecked; any other is checked first.\n */\nexport function AddressStep({ state, action, fleetId }: { state: { fields: Readonly<Record<string, string>>; refusal?: string | undefined }; action: (form: FormData) => void; fleetId: string }) {\n const [kind, setKind] = useState(addedCredentialKindOf(state.fields.credentialKind ?? ''));\n const isSignIn = kind === SIGN_IN_CREDENTIAL.kind;\n return (\n <>\n <Steps names={stepsOf(kind)} at={0} />\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.\" canEachPersonSignIn onKindChange={setKind} />\n <div>\n <SubmitButton pending={isSignIn ? 'Next…' : 'Checking the server…'} testId=\"add-server-check\">\n {isSignIn ? 'Next' : 'Check the server'}\n </SubmitButton>\n </div>\n </form>\n </>\n );\n}\n","/**\n * The steps of adding a server, as M1 numbers them. A server where each\n * person signs in has no tools to check before someone signs in, so the\n * gateway checks its sign-in when it is added, and the approver's own sign-in\n * comes last (decision 0067, Q15).\n */\nimport { SIGN_IN_CREDENTIAL, type AddedCredentialKind } from '../forms/server-credential';\n\nexport const CHECKED_STEPS = ['Address', 'Check', 'Owner'] as const;\n\nexport const SIGN_IN_STEPS = ['Address', 'Owner', 'Sign in'] as const;\n\n/** The steps for a server with this credential. */\nexport function stepsOf(kind: AddedCredentialKind): typeof CHECKED_STEPS | typeof SIGN_IN_STEPS {\n return kind === SIGN_IN_CREDENTIAL.kind ? SIGN_IN_STEPS : CHECKED_STEPS;\n}\n","import { Outcome } from '../../forms/ui/outcome';\n\n/** Why the API refused a step, said on that step; nothing while it was not refused. */\nexport function Refused({ refusal }: { refusal: string | undefined }) {\n return refusal === undefined ? null : <Outcome state={{ kind: 'refused', message: refusal }} />;\n}\n","/** The steps of adding a server, as the design numbers them, the one at marked current. */\nexport function Steps({ names, at }: { names: readonly string[]; at: number }) {\n return (\n <ol className=\"flex gap-4\">\n {names.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","'use client';\n\nimport { useState } from 'react';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { BUTTONS, CARD, INPUT, LABEL } from '../../forms/ui/look';\nimport { OwnerField } from '../../forms/ui/owner-field';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport type { AddServerState, ApproveState } from '../actions';\nimport { CHECKED_STEPS, SIGN_IN_STEPS } from '../steps';\nimport { addButtonLabel, suggestedName } from '../suggested-name';\nimport { Refused } from './refused';\nimport { Steps } from './steps';\nimport { ToolsSection } from './tools-section';\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\n/**\n * The step that names the server's proxy ship and its owner, below the tools\n * the check answered. A server where each person signs in has no tools to\n * show yet: Add checks its sign-in, and says a refusal in place.\n */\nexport function 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 const tools = state.tools;\n return (\n <>\n {tools === null ? <Steps names={SIGN_IN_STEPS} at={1} /> : <Steps names={CHECKED_STEPS} at={2} />}\n <form action={action} className={`${CARD} grid gap-3`} data-testid=\"add-server-owner\">\n {tools === null ? null : <ToolsSection tools={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'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 {tools === null ? <p className=\"text-muted-foreground\">Its tools show once someone signs in.</p> : null}\n <div className=\"flex gap-2\">\n <SubmitButton pending={tools === null ? 'Checking the sign-in…' : '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","/** 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","'use client';\n\nimport { useState } from 'react';\n\nimport { Switch } from '../../forms/ui/switch';\nimport { ToolRow } from '../../outside-parties/ui/tool-row';\nimport type { CheckedTool } from '../actions';\nimport { TOOL_ON_FIELD, TOOL_SHOWN_FIELD } from '../tool-choice';\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 */\nexport function 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","/**\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","'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 { inFleet } from '../../../lib/gateway-api/page-account';\nimport { partyPath } from '../../outside-parties/paths';\nimport { signInToParty } from '../../outside-party/actions';\nimport { SIGN_IN_STEPS } from '../steps';\nimport { Steps } from './steps';\n\n/**\n * The last step of adding a server where each person signs in: the\n * approver signs in to it for themselves, and their sign-in reads its tools\n * (Q15). Later goes to its page, where they sign in when they choose.\n */\nexport function SignInStep({ fleetId, name }: { fleetId: string; name: string }) {\n const [refused, signIn] = useActionState(signInToParty, IDLE);\n return (\n <>\n <Steps names={SIGN_IN_STEPS} at={2} />\n <form action={signIn} className={`${CARD} grid gap-3`} data-testid=\"add-server-sign-in\">\n <Outcome state={{ kind: 'done', message: `${name} is added.` }} />\n <Outcome state={refused} />\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"name\" value={name} />\n <p>Sign in to {name} for yourself. Its tools show after the first sign-in.</p>\n <div className=\"flex gap-2\">\n <SubmitButton pending={`Opening ${name}…`} testId=\"add-server-sign-in-start\">\n Sign in to {name}\n </SubmitButton>\n <a href={inFleet(partyPath(name), fleetId)} className={BUTTONS.secondary}>\n Later\n </a>\n </div>\n </form>\n </>\n );\n}\n"],"names":["$$RSC_SERVER_ACTION_1"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OCFkM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,iBCA3I,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCA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AAG,QAAS,EAAS,eAAgB,MAIxJ"}
|
package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js
CHANGED
|
@@ -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)("
|
|
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)("40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2",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"},{key:"slack",label:"Slack",path:"/slack"}];function s({fleetId:a}){let c=(0,l.usePathname)();return(0,b.jsx)("nav",{"aria-label":"Gateway",className:"flex min-w-0 items-center gap-1 overflow-x-auto",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
|
package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../web/features/frame/data%3A98cbf6%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__ [{\"40b0e21d7f8b4005429ff4b05df18463f1064fb7f0\":{\"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(\"40b0e21d7f8b4005429ff4b05df18463f1064fb7f0\",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 { key: 'slack', label: 'Slack', path: '/slack' },\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, the parties and Slack of the fleet in view, the page shown current; on a phone they scroll within the bar rather than widen the page. */\nexport function GatewayTabs({ fleetId }: { fleetId: string }) {\n const pathname = usePathname();\n return (\n <nav aria-label=\"Gateway\" className=\"flex min-w-0 items-center gap-1 overflow-x-auto\">\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  - 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,cACA,GACN,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,CAAE,CAAA,CAAA,CAAA,AAAI,IAAA,AFyBI,CEzBE,GAAI,CAAA,CAAA,CAAA,CAAA,CAAM,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,CAA9B,CAA8B,CAA5B,AAA4B,CAAA,AADd,EACX,EAAE,MAAM,SADsB,CAAC,MACP,CAAC,cA2BrB,EAAU,CAAA,SAAA,CAAU,SAAE,CEzBD,AFyBQ,CEzBA,SFyBE,CEzBF,AFyBU,CEzBV,YFyBY,CEzBP,CAAA,mBFyBwC,UAAE,CAAQ,SAAE,CAAO,WAAE,CAAS,CAAkB,EACxI,MAAA,CAAA,EACE,EAAA,IAAA,EAAA,SAAA,CAAA,YACY,aACV,SAA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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%3A6ec0a8%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__ [{\"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2\":{\"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(\"40c2ebc7d82ce92803e9e2046541ec9e3aaa9d6ca2\",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 { key: 'slack', label: 'Slack', path: '/slack' },\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, the parties and Slack of the fleet in view, the page shown current; on a phone they scroll within the bar rather than widen the page. */\nexport function GatewayTabs({ fleetId }: { fleetId: string }) {\n const pathname = usePathname();\n return (\n <nav aria-label=\"Gateway\" className=\"flex min-w-0 items-center gap-1 overflow-x-auto\">\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  - 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,cACA,GACN,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,CAAE,CAAA,CAAA,CAAA,AAAI,IAAA,AFyBI,CEzBE,GAAI,CAAA,CAAA,CAAA,CAAA,CAAM,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,CAA9B,CAA8B,CAA5B,AAA4B,CAAA,AADd,EACX,EAAE,MAAM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AAA,EAAA,EAAA,IAAA,EAAC,SAAA,CAAO,UAAU,wHACf,KAAa,MAAY,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)("
|
|
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)("40280d908ca33fb0cfafc559b986139267743c737f",g.callServer,void 0,g.findSourceMapURL,"changeMic"),i=(0,g.createServerReference)("40741faa851c4e53de3359cd0685cd83bb3fd630eb",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
|