@stigmer/server-slim 0.1.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/README.md +3 -0
- package/console/404.html +1 -0
- package/console/__next.__PAGE__.txt +54 -0
- package/console/__next._full.txt +71 -0
- package/console/__next._index.txt +62 -0
- package/console/__next._tree.txt +6 -0
- package/console/_next/static/GjBokeF86FffwftazOhh6/_buildManifest.js +11 -0
- package/console/_next/static/GjBokeF86FffwftazOhh6/_clientMiddlewareManifest.js +1 -0
- package/console/_next/static/GjBokeF86FffwftazOhh6/_ssgManifest.js +1 -0
- package/console/_next/static/chunks/0376wi8qbsw94.js +1 -0
- package/console/_next/static/chunks/04cglffeuwumk.js +1 -0
- package/console/_next/static/chunks/04d276dp3qb52.js +1 -0
- package/console/_next/static/chunks/05526ws9tzwim.js +1 -0
- package/console/_next/static/chunks/05t5235u7o-c4.js +25 -0
- package/console/_next/static/chunks/06fz-g9t73bd6.js +4 -0
- package/console/_next/static/chunks/0789xt7opwvm-.js +24 -0
- package/console/_next/static/chunks/07twy5plc911w.js +1 -0
- package/console/_next/static/chunks/08-p5zefc1rea.js +1 -0
- package/console/_next/static/chunks/085db4op75mf5.js +1 -0
- package/console/_next/static/chunks/0923388wak11-.js +1 -0
- package/console/_next/static/chunks/0_7s7fzux7kiv.js +1 -0
- package/console/_next/static/chunks/0_bjj6hug8d9a.js +1 -0
- package/console/_next/static/chunks/0_zscrk6o0d0-.js +1 -0
- package/console/_next/static/chunks/0a4x97q7frgj3.js +1 -0
- package/console/_next/static/chunks/0ab5jlm8l0aud.js +1 -0
- package/console/_next/static/chunks/0c_c2b4z1yc02.js +1 -0
- package/console/_next/static/chunks/0cuyycns49hl4.js +1 -0
- package/console/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/console/_next/static/chunks/0d8f3-znyc_to.js +1 -0
- package/console/_next/static/chunks/0e-f1rkyz_u2k.js +1 -0
- package/console/_next/static/chunks/0ffx83gbnwq09.js +28 -0
- package/console/_next/static/chunks/0fyno0jk61txk.js +115 -0
- package/console/_next/static/chunks/0ggwoicp90w_s.js +1 -0
- package/console/_next/static/chunks/0h_7_i44vofe3.js +1 -0
- package/console/_next/static/chunks/0hagmppwo8s-f.js +1 -0
- package/console/_next/static/chunks/0hfvbn6c9k3pf.js +1 -0
- package/console/_next/static/chunks/0hw7vilkfpzlc.js +1 -0
- package/console/_next/static/chunks/0kb63xcvghh_3.js +1 -0
- package/console/_next/static/chunks/0ko5wsi6kukgd.js +1 -0
- package/console/_next/static/chunks/0kq99qin4db-q.js +1 -0
- package/console/_next/static/chunks/0kqg4u5n17gje.js +1 -0
- package/console/_next/static/chunks/0ky9qppyx1n57.js +62 -0
- package/console/_next/static/chunks/0og4_5pph-mhm.js +1 -0
- package/console/_next/static/chunks/0p7p-bpdrqx75.js +1 -0
- package/console/_next/static/chunks/0q2bnr94vvuc2.js +1 -0
- package/console/_next/static/chunks/0q3sxhnylk_gn.js +1 -0
- package/console/_next/static/chunks/0qg6l3tattq3j.js +1 -0
- package/console/_next/static/chunks/0qwyk_70quvjh.js +1 -0
- package/console/_next/static/chunks/0qzyqii8_m5r2.js +1 -0
- package/console/_next/static/chunks/0rlfx91598uvc.js +1 -0
- package/console/_next/static/chunks/0s9njms3lumhx.js +1 -0
- package/console/_next/static/chunks/0srualwd948m1.js +29 -0
- package/console/_next/static/chunks/0u4m2805tgi7x.js +1 -0
- package/console/_next/static/chunks/0udcs-1vq74rp.js +1 -0
- package/console/_next/static/chunks/0vno04lmwdchj.js +1 -0
- package/console/_next/static/chunks/0vt1_fu_q116n.js +1 -0
- package/console/_next/static/chunks/0vuq85gcb9zcl.js +1 -0
- package/console/_next/static/chunks/0wxazby0i4xu3.js +5 -0
- package/console/_next/static/chunks/0yeh2zqwmmec0.js +22 -0
- package/console/_next/static/chunks/0zvl88sijsrqk.js +1 -0
- package/console/_next/static/chunks/110bgpy30m6m6.js +1 -0
- package/console/_next/static/chunks/14ipylvs6qyyw.js +1 -0
- package/console/_next/static/chunks/1745jt9onokna.js +1 -0
- package/console/_next/static/chunks/177rfq0tsoku9.js +4 -0
- package/console/_next/static/chunks/17mfsiiquey1d.js +1 -0
- package/console/_next/static/chunks/197iuvi8udifl.js +1 -0
- package/console/_next/static/chunks/1_2-z0tjk0xio.js +1 -0
- package/console/_next/static/chunks/1_gh5a14dqnji.js +1 -0
- package/console/_next/static/chunks/1ame8n7x9g3xc.js +1 -0
- package/console/_next/static/chunks/1apepr-7dz16b.js +1 -0
- package/console/_next/static/chunks/1dtukwrl8nulc.js +1 -0
- package/console/_next/static/chunks/1e0br64ibniud.js +24 -0
- package/console/_next/static/chunks/1fm-45g777ifx.js +1 -0
- package/console/_next/static/chunks/1g_iha5barqef.js +1 -0
- package/console/_next/static/chunks/1glr_lki18csr.js +2 -0
- package/console/_next/static/chunks/1hl355w6m5bp5.js +1 -0
- package/console/_next/static/chunks/1id3p9v9v5knn.js +1 -0
- package/console/_next/static/chunks/1j6kp4gg0_ylt.js +80 -0
- package/console/_next/static/chunks/1jssq3ch7qgd6.js +60 -0
- package/console/_next/static/chunks/1jzfyfh-3gqlb.js +1 -0
- package/console/_next/static/chunks/1k3d5c49mpp-2.js +1 -0
- package/console/_next/static/chunks/1kte_bxw9m-ie.js +1 -0
- package/console/_next/static/chunks/1lw52jm27gon2.js +1 -0
- package/console/_next/static/chunks/1m9e28v8syzxx.js +34 -0
- package/console/_next/static/chunks/1mrmq_pigo_yb.js +1 -0
- package/console/_next/static/chunks/1muf1a96cgbv5.js +1 -0
- package/console/_next/static/chunks/1n1x0ykt8by6w.js +1 -0
- package/console/_next/static/chunks/1qu0tqybdtj0_.js +1 -0
- package/console/_next/static/chunks/1r8itpdfffwxa.js +1 -0
- package/console/_next/static/chunks/1r_opkrpbuykx.js +1 -0
- package/console/_next/static/chunks/1tl0h3c_bp62t.js +1 -0
- package/console/_next/static/chunks/1v1m1fr8f0yle.js +1 -0
- package/console/_next/static/chunks/1v34vj52v7q0g.js +1 -0
- package/console/_next/static/chunks/1wztfxoxnu5_9.js +1 -0
- package/console/_next/static/chunks/1x7exm5d_hhb8.js +153 -0
- package/console/_next/static/chunks/1xwdphzrhi9cn.js +1 -0
- package/console/_next/static/chunks/1yc4gdqzxa5ie.js +1 -0
- package/console/_next/static/chunks/1zunrzvni97zi.js +1 -0
- package/console/_next/static/chunks/1zv6mtmekep40.js +36 -0
- package/console/_next/static/chunks/2-jaie5wchnsy.js +1 -0
- package/console/_next/static/chunks/20aa5hen470pm.js +1 -0
- package/console/_next/static/chunks/2116ko93nwgx8.js +1 -0
- package/console/_next/static/chunks/23vk0ig36j0he.js +1 -0
- package/console/_next/static/chunks/245vlws7l85dk.js +1 -0
- package/console/_next/static/chunks/24__o4dkdytc8.js +1 -0
- package/console/_next/static/chunks/24iwqo9ejhxl8.js +127 -0
- package/console/_next/static/chunks/24o9ia1be2cze.js +1 -0
- package/console/_next/static/chunks/25aea0bgjydel.css +1 -0
- package/console/_next/static/chunks/26-p2jxr4f20d.js +1 -0
- package/console/_next/static/chunks/28c--yt2jaxxf.js +1 -0
- package/console/_next/static/chunks/28vym848oh1ng.js +1 -0
- package/console/_next/static/chunks/29ou6qb6p1lni.js +1 -0
- package/console/_next/static/chunks/2aalpmeu_tni-.js +3 -0
- package/console/_next/static/chunks/2c4ifddi2dal0.js +20 -0
- package/console/_next/static/chunks/2ckm4edha_gkb.js +43 -0
- package/console/_next/static/chunks/2d5ods6a8n6yd.js +1 -0
- package/console/_next/static/chunks/2dm5g7ylrulvb.js +15 -0
- package/console/_next/static/chunks/2dtosus35_o5k.js +1 -0
- package/console/_next/static/chunks/2e0_cm1_wv-b4.js +1 -0
- package/console/_next/static/chunks/2fh_0n31hibdi.js +226 -0
- package/console/_next/static/chunks/2fjsaw5pgjcqb.js +1 -0
- package/console/_next/static/chunks/2h5pk3yu15nwr.js +1 -0
- package/console/_next/static/chunks/2i7w4yyf77gzw.js +1 -0
- package/console/_next/static/chunks/2jo3q7mfk65kd.js +1 -0
- package/console/_next/static/chunks/2jutbapb-t64n.js +31 -0
- package/console/_next/static/chunks/2k6tx8-w1creu.js +148 -0
- package/console/_next/static/chunks/2kh_m5onqedc5.js +1 -0
- package/console/_next/static/chunks/2ltzdgpjq3v6a.js +1 -0
- package/console/_next/static/chunks/2o2ftjhtb8od3.js +2 -0
- package/console/_next/static/chunks/2pyn841-jq-oo.js +10 -0
- package/console/_next/static/chunks/2rn289343m-y_.js +139 -0
- package/console/_next/static/chunks/2t2l3h2w_04bb.js +1 -0
- package/console/_next/static/chunks/2v11hooq3xd5t.js +15 -0
- package/console/_next/static/chunks/2vsg5t3fnqmfn.js +1 -0
- package/console/_next/static/chunks/2wayafjfoiq7q.css +6 -0
- package/console/_next/static/chunks/2xsvteosdtsb-.js +1 -0
- package/console/_next/static/chunks/2y-x8nhnufxzb.js +1 -0
- package/console/_next/static/chunks/2za4b-si894xj.js +1 -0
- package/console/_next/static/chunks/3-igvp1-n4pxs.js +104 -0
- package/console/_next/static/chunks/3-k25f-adpe5f.js +1 -0
- package/console/_next/static/chunks/3-pzmot7dbrfa.js +1 -0
- package/console/_next/static/chunks/3-x5lrgs3wcpl.js +80 -0
- package/console/_next/static/chunks/30nrkrr9518_z.js +1 -0
- package/console/_next/static/chunks/316lh1-hzgnod.js +1 -0
- package/console/_next/static/chunks/31wj1au8smjge.js +1 -0
- package/console/_next/static/chunks/329o6uup9qmb3.js +1 -0
- package/console/_next/static/chunks/34_1w929-5o6r.js +287 -0
- package/console/_next/static/chunks/35szx1ga574xu.js +1 -0
- package/console/_next/static/chunks/36tg522pkl8hm.js +1 -0
- package/console/_next/static/chunks/37-y9fgnir35a.js +1 -0
- package/console/_next/static/chunks/39wss1g0ffaqt.js +1 -0
- package/console/_next/static/chunks/3_cv0gj1bm3l6.js +1 -0
- package/console/_next/static/chunks/3_f8gd_6816re.js +101 -0
- package/console/_next/static/chunks/3a4qfuhsxefh2.js +12 -0
- package/console/_next/static/chunks/3asb3ztrvogwl.js +1 -0
- package/console/_next/static/chunks/3bsxbw10qhvqo.js +1 -0
- package/console/_next/static/chunks/3by94g38ljxl1.js +1 -0
- package/console/_next/static/chunks/3c_6owv8m4rta.js +90 -0
- package/console/_next/static/chunks/3ea2eo8b5gmju.js +2 -0
- package/console/_next/static/chunks/3ercnb2rksl_a.js +1 -0
- package/console/_next/static/chunks/3esxfmmm0ypxb.js +2 -0
- package/console/_next/static/chunks/3exiw74xbmika.js +1 -0
- package/console/_next/static/chunks/3f88-tc5u2heg.js +1 -0
- package/console/_next/static/chunks/3f_axahrombdp.js +1 -0
- package/console/_next/static/chunks/3gz91kn_v2lfa.js +1 -0
- package/console/_next/static/chunks/3i9z3x7tka5x2.js +1 -0
- package/console/_next/static/chunks/3ih4kfufd47st.js +1 -0
- package/console/_next/static/chunks/3itfi41ayfopd.js +15 -0
- package/console/_next/static/chunks/3iwgig-fgcscf.js +15 -0
- package/console/_next/static/chunks/3jf8qh1ev3gb4.js +2 -0
- package/console/_next/static/chunks/3l6svfyqdsq6o.js +1 -0
- package/console/_next/static/chunks/3lj0i-qlb4ah2.js +64 -0
- package/console/_next/static/chunks/3lmx6tkunfd3u.js +1 -0
- package/console/_next/static/chunks/3lp4d64he__am.js +152 -0
- package/console/_next/static/chunks/3m_jz3b2j38nn.js +1 -0
- package/console/_next/static/chunks/3oe9w1b39nzmn.js +3 -0
- package/console/_next/static/chunks/3on7r_d8o-kna.js +1 -0
- package/console/_next/static/chunks/3pbpowf3kdu5z.js +119 -0
- package/console/_next/static/chunks/3pwwv0u29nk8c.js +23 -0
- package/console/_next/static/chunks/3rweyye6o1z6b.js +79 -0
- package/console/_next/static/chunks/3sdqgrmvxm_u4.js +201 -0
- package/console/_next/static/chunks/3t3vbs-x5hixj.js +1 -0
- package/console/_next/static/chunks/3thqnz0a5zy-h.js +9 -0
- package/console/_next/static/chunks/3udubdawo7583.js +1 -0
- package/console/_next/static/chunks/3uz4lg6e199sb.js +1 -0
- package/console/_next/static/chunks/3v2mkz_46uei2.js +1 -0
- package/console/_next/static/chunks/3w5crjmhb-3um.js +1 -0
- package/console/_next/static/chunks/3waxhrmr_82j5.js +93 -0
- package/console/_next/static/chunks/3zmlzef_jxopu.js +1 -0
- package/console/_next/static/chunks/3zqvalj8nr-1y.js +1 -0
- package/console/_next/static/chunks/40igag4gq4k0a.js +77 -0
- package/console/_next/static/chunks/40wq034qcdji_.js +1 -0
- package/console/_next/static/chunks/44crhetqymq_e.js +34 -0
- package/console/_next/static/chunks/44q2pv6a3w19q.js +1 -0
- package/console/_next/static/chunks/turbopack-2u1d16houkiyo.js +1 -0
- package/console/_next/static/media/GeistMono_Variable-s.p.21mfa-4xv0w3g.woff2 +0 -0
- package/console/_next/static/media/Geist_Variable-s.p.217kyf1h_p0cg.woff2 +0 -0
- package/console/_next/static/media/IBMPlexMono_Medium-s.2v25u5rd2tsaf.woff2 +0 -0
- package/console/_next/static/media/IBMPlexMono_Regular-s.09u63wo58kris.woff2 +0 -0
- package/console/_next/static/media/IBMPlexSans_Bold-s.3iicodgz0epim.woff2 +0 -0
- package/console/_next/static/media/IBMPlexSans_Light-s.3ntejfdcyftfg.woff2 +0 -0
- package/console/_next/static/media/IBMPlexSans_Medium-s.3n25cgfiu6qss.woff2 +0 -0
- package/console/_next/static/media/IBMPlexSans_Regular-s.2e_-c_m03txvi.woff2 +0 -0
- package/console/_next/static/media/IBMPlexSans_SemiBold-s.2sutjpuns2xc5.woff2 +0 -0
- package/console/_next/static/media/Inter_Variable-s.2-lfiv6s83kzn.woff2 +0 -0
- package/console/_next/static/media/Nunito_Variable-s.3r4_r9s3kxd_-.woff2 +0 -0
- package/console/_not-found/__next._full.txt +73 -0
- package/console/_not-found/__next._index.txt +62 -0
- package/console/_not-found/__next._not-found.__PAGE__.txt +61 -0
- package/console/_not-found/__next._tree.txt +5 -0
- package/console/_not-found.html +1 -0
- package/console/_not-found.txt +73 -0
- package/console/apple-touch-icon-dark.png +0 -0
- package/console/apple-touch-icon-light.png +0 -0
- package/console/auth/callback/__next._full.txt +82 -0
- package/console/auth/callback/__next._index.txt +62 -0
- package/console/auth/callback/__next._tree.txt +8 -0
- package/console/auth/callback/__next.auth.callback.__PAGE__.txt +67 -0
- package/console/auth/callback.html +1 -0
- package/console/auth/callback.txt +82 -0
- package/console/auth/oauth/callback/__next._full.txt +84 -0
- package/console/auth/oauth/callback/__next._index.txt +62 -0
- package/console/auth/oauth/callback/__next._tree.txt +9 -0
- package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +69 -0
- package/console/auth/oauth/callback.html +1 -0
- package/console/auth/oauth/callback.txt +84 -0
- package/console/brand-avatar.png +0 -0
- package/console/chat/__placeholder__/__next._full.txt +80 -0
- package/console/chat/__placeholder__/__next._index.txt +62 -0
- package/console/chat/__placeholder__/__next._tree.txt +8 -0
- package/console/chat/__placeholder__/__next.chat.$d$channel.__PAGE__.txt +65 -0
- package/console/chat/__placeholder__.html +1 -0
- package/console/chat/__placeholder__.txt +80 -0
- package/console/connect/__placeholder__/__next._full.txt +79 -0
- package/console/connect/__placeholder__/__next._index.txt +62 -0
- package/console/connect/__placeholder__/__next._tree.txt +8 -0
- package/console/connect/__placeholder__/__next.connect.$d$token.__PAGE__.txt +64 -0
- package/console/connect/__placeholder__.html +1 -0
- package/console/connect/__placeholder__.txt +79 -0
- package/console/conversations/__next._full.txt +79 -0
- package/console/conversations/__next._index.txt +62 -0
- package/console/conversations/__next._tree.txt +7 -0
- package/console/conversations/__next.conversations.__PAGE__.txt +64 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +83 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +62 -0
- package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +9 -0
- package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +68 -0
- package/console/conversations/__placeholder__/__placeholder__.html +1 -0
- package/console/conversations/__placeholder__/__placeholder__.txt +83 -0
- package/console/conversations.html +1 -0
- package/console/conversations.txt +79 -0
- package/console/dashboard/__next._full.txt +77 -0
- package/console/dashboard/__next._index.txt +62 -0
- package/console/dashboard/__next._tree.txt +7 -0
- package/console/dashboard/__next.dashboard.__PAGE__.txt +62 -0
- package/console/dashboard.html +1 -0
- package/console/dashboard.txt +77 -0
- package/console/desktop/billing/__next._full.txt +82 -0
- package/console/desktop/billing/__next._index.txt +62 -0
- package/console/desktop/billing/__next._tree.txt +8 -0
- package/console/desktop/billing/__next.desktop.billing.__PAGE__.txt +67 -0
- package/console/desktop/billing.html +1 -0
- package/console/desktop/billing.txt +82 -0
- package/console/embed.js +1 -0
- package/console/favicon-dark-16x16.png +0 -0
- package/console/favicon-dark-32x32.png +0 -0
- package/console/favicon-dark.ico +0 -0
- package/console/favicon-dark.svg +1 -0
- package/console/favicon-light-16x16.png +0 -0
- package/console/favicon-light-32x32.png +0 -0
- package/console/favicon-light.ico +0 -0
- package/console/favicon-light.svg +1 -0
- package/console/index.html +1 -0
- package/console/index.txt +71 -0
- package/console/invite/__placeholder__/__next._full.txt +80 -0
- package/console/invite/__placeholder__/__next._index.txt +62 -0
- package/console/invite/__placeholder__/__next._tree.txt +8 -0
- package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +65 -0
- package/console/invite/__placeholder__.html +1 -0
- package/console/invite/__placeholder__.txt +80 -0
- package/console/library/__next._full.txt +89 -0
- package/console/library/__next._index.txt +62 -0
- package/console/library/__next._tree.txt +7 -0
- package/console/library/__next.library.__PAGE__.txt +74 -0
- package/console/library/agents/__next._full.txt +94 -0
- package/console/library/agents/__next._index.txt +62 -0
- package/console/library/agents/__next._tree.txt +8 -0
- package/console/library/agents/__next.library.agents.__PAGE__.txt +79 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +96 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +62 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +10 -0
- package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +81 -0
- package/console/library/agents/__placeholder__/__placeholder__.html +1 -0
- package/console/library/agents/__placeholder__/__placeholder__.txt +96 -0
- package/console/library/agents/new/__next._full.txt +99 -0
- package/console/library/agents/new/__next._index.txt +62 -0
- package/console/library/agents/new/__next._tree.txt +9 -0
- package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +84 -0
- package/console/library/agents/new.html +1 -0
- package/console/library/agents/new.txt +99 -0
- package/console/library/agents.html +1 -0
- package/console/library/agents.txt +94 -0
- package/console/library/environments/__next._full.txt +95 -0
- package/console/library/environments/__next._index.txt +62 -0
- package/console/library/environments/__next._tree.txt +8 -0
- package/console/library/environments/__next.library.environments.__PAGE__.txt +80 -0
- package/console/library/environments/__placeholder__/__placeholder__/__next._full.txt +97 -0
- package/console/library/environments/__placeholder__/__placeholder__/__next._index.txt +62 -0
- package/console/library/environments/__placeholder__/__placeholder__/__next._tree.txt +10 -0
- package/console/library/environments/__placeholder__/__placeholder__/__next.library.environments.$d$org.$d$slug.__PAGE__.txt +82 -0
- package/console/library/environments/__placeholder__/__placeholder__.html +1 -0
- package/console/library/environments/__placeholder__/__placeholder__.txt +97 -0
- package/console/library/environments/new/__next._full.txt +99 -0
- package/console/library/environments/new/__next._index.txt +62 -0
- package/console/library/environments/new/__next._tree.txt +9 -0
- package/console/library/environments/new/__next.library.environments.new.__PAGE__.txt +84 -0
- package/console/library/environments/new.html +1 -0
- package/console/library/environments/new.txt +99 -0
- package/console/library/environments.html +1 -0
- package/console/library/environments.txt +95 -0
- package/console/library/files/__next._full.txt +94 -0
- package/console/library/files/__next._index.txt +62 -0
- package/console/library/files/__next._tree.txt +8 -0
- package/console/library/files/__next.library.files.__PAGE__.txt +79 -0
- package/console/library/files.html +1 -0
- package/console/library/files.txt +94 -0
- package/console/library/plugins/__next._full.txt +94 -0
- package/console/library/plugins/__next._index.txt +62 -0
- package/console/library/plugins/__next._tree.txt +8 -0
- package/console/library/plugins/__next.library.plugins.__PAGE__.txt +79 -0
- package/console/library/plugins/__placeholder__/__placeholder__/__next._full.txt +97 -0
- package/console/library/plugins/__placeholder__/__placeholder__/__next._index.txt +62 -0
- package/console/library/plugins/__placeholder__/__placeholder__/__next._tree.txt +10 -0
- package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.__PAGE__.txt +82 -0
- package/console/library/plugins/__placeholder__/__placeholder__.html +1 -0
- package/console/library/plugins/__placeholder__/__placeholder__.txt +97 -0
- package/console/library/plugins/upload/__next._full.txt +99 -0
- package/console/library/plugins/upload/__next._index.txt +62 -0
- package/console/library/plugins/upload/__next._tree.txt +9 -0
- package/console/library/plugins/upload/__next.library.plugins.upload.__PAGE__.txt +84 -0
- package/console/library/plugins/upload.html +1 -0
- package/console/library/plugins/upload.txt +99 -0
- package/console/library/plugins.html +1 -0
- package/console/library/plugins.txt +94 -0
- package/console/library/routines/__next._full.txt +94 -0
- package/console/library/routines/__next._index.txt +62 -0
- package/console/library/routines/__next._tree.txt +8 -0
- package/console/library/routines/__next.library.routines.__PAGE__.txt +79 -0
- package/console/library/routines/__placeholder__/__placeholder__/__next._full.txt +97 -0
- package/console/library/routines/__placeholder__/__placeholder__/__next._index.txt +62 -0
- package/console/library/routines/__placeholder__/__placeholder__/__next._tree.txt +10 -0
- package/console/library/routines/__placeholder__/__placeholder__/__next.library.routines.$d$org.$d$slug.__PAGE__.txt +82 -0
- package/console/library/routines/__placeholder__/__placeholder__.html +1 -0
- package/console/library/routines/__placeholder__/__placeholder__.txt +97 -0
- package/console/library/routines/new/__next._full.txt +98 -0
- package/console/library/routines/new/__next._index.txt +62 -0
- package/console/library/routines/new/__next._tree.txt +9 -0
- package/console/library/routines/new/__next.library.routines.new.__PAGE__.txt +83 -0
- package/console/library/routines/new.html +1 -0
- package/console/library/routines/new.txt +98 -0
- package/console/library/routines.html +1 -0
- package/console/library/routines.txt +94 -0
- package/console/library/skills/__next._full.txt +94 -0
- package/console/library/skills/__next._index.txt +62 -0
- package/console/library/skills/__next._tree.txt +8 -0
- package/console/library/skills/__next.library.skills.__PAGE__.txt +79 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +96 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +62 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +10 -0
- package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +81 -0
- package/console/library/skills/__placeholder__/__placeholder__.html +1 -0
- package/console/library/skills/__placeholder__/__placeholder__.txt +96 -0
- package/console/library/skills/new/__next._full.txt +98 -0
- package/console/library/skills/new/__next._index.txt +62 -0
- package/console/library/skills/new/__next._tree.txt +9 -0
- package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +83 -0
- package/console/library/skills/new.html +1 -0
- package/console/library/skills/new.txt +98 -0
- package/console/library/skills.html +1 -0
- package/console/library/skills.txt +94 -0
- package/console/library.html +1 -0
- package/console/library.txt +89 -0
- package/console/login/__next._full.txt +81 -0
- package/console/login/__next._index.txt +62 -0
- package/console/login/__next._tree.txt +7 -0
- package/console/login/__next.login.__PAGE__.txt +66 -0
- package/console/login.html +1 -0
- package/console/login.txt +81 -0
- package/console/marketplace/__next._full.txt +81 -0
- package/console/marketplace/__next._index.txt +62 -0
- package/console/marketplace/__next._tree.txt +7 -0
- package/console/marketplace/__next.marketplace.__PAGE__.txt +66 -0
- package/console/marketplace.html +1 -0
- package/console/marketplace.txt +81 -0
- package/console/models/__next._full.txt +77 -0
- package/console/models/__next._index.txt +62 -0
- package/console/models/__next._tree.txt +7 -0
- package/console/models/__next.models.__PAGE__.txt +62 -0
- package/console/models.html +1 -0
- package/console/models.txt +77 -0
- package/console/oauth/slack/callback/__next._full.txt +84 -0
- package/console/oauth/slack/callback/__next._index.txt +62 -0
- package/console/oauth/slack/callback/__next._tree.txt +9 -0
- package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +69 -0
- package/console/oauth/slack/callback.html +1 -0
- package/console/oauth/slack/callback.txt +84 -0
- package/console/runs/__placeholder__/__next._full.txt +77 -0
- package/console/runs/__placeholder__/__next._index.txt +62 -0
- package/console/runs/__placeholder__/__next._tree.txt +8 -0
- package/console/runs/__placeholder__/__next.runs.$d$id.__PAGE__.txt +62 -0
- package/console/runs/__placeholder__.html +1 -0
- package/console/runs/__placeholder__.txt +77 -0
- package/console/sessions/__placeholder__/__next._full.txt +77 -0
- package/console/sessions/__placeholder__/__next._index.txt +62 -0
- package/console/sessions/__placeholder__/__next._tree.txt +8 -0
- package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +62 -0
- package/console/sessions/__placeholder__.html +1 -0
- package/console/sessions/__placeholder__.txt +77 -0
- package/console/settings/__next._full.txt +85 -0
- package/console/settings/__next._index.txt +62 -0
- package/console/settings/__next._tree.txt +7 -0
- package/console/settings/__next.settings.__PAGE__.txt +70 -0
- package/console/settings/access-history/__next._full.txt +87 -0
- package/console/settings/access-history/__next._index.txt +62 -0
- package/console/settings/access-history/__next._tree.txt +8 -0
- package/console/settings/access-history/__next.settings.access-history.__PAGE__.txt +72 -0
- package/console/settings/access-history.html +1 -0
- package/console/settings/access-history.txt +87 -0
- package/console/settings/account-preferences/__next._full.txt +87 -0
- package/console/settings/account-preferences/__next._index.txt +62 -0
- package/console/settings/account-preferences/__next._tree.txt +8 -0
- package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +72 -0
- package/console/settings/account-preferences.html +1 -0
- package/console/settings/account-preferences.txt +87 -0
- package/console/settings/api-keys/__next._full.txt +86 -0
- package/console/settings/api-keys/__next._index.txt +62 -0
- package/console/settings/api-keys/__next._tree.txt +8 -0
- package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +71 -0
- package/console/settings/api-keys.html +1 -0
- package/console/settings/api-keys.txt +86 -0
- package/console/settings/billing/__next._full.txt +89 -0
- package/console/settings/billing/__next._index.txt +62 -0
- package/console/settings/billing/__next._tree.txt +8 -0
- package/console/settings/billing/__next.settings.billing.__PAGE__.txt +74 -0
- package/console/settings/billing.html +1 -0
- package/console/settings/billing.txt +89 -0
- package/console/settings/channel-apps/__next._full.txt +87 -0
- package/console/settings/channel-apps/__next._index.txt +62 -0
- package/console/settings/channel-apps/__next._tree.txt +8 -0
- package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +72 -0
- package/console/settings/channel-apps.html +1 -0
- package/console/settings/channel-apps.txt +87 -0
- package/console/settings/federation-issuers/__next._full.txt +88 -0
- package/console/settings/federation-issuers/__next._index.txt +62 -0
- package/console/settings/federation-issuers/__next._tree.txt +8 -0
- package/console/settings/federation-issuers/__next.settings.federation-issuers.__PAGE__.txt +73 -0
- package/console/settings/federation-issuers.html +1 -0
- package/console/settings/federation-issuers.txt +88 -0
- package/console/settings/invitations/__next._full.txt +87 -0
- package/console/settings/invitations/__next._index.txt +62 -0
- package/console/settings/invitations/__next._tree.txt +8 -0
- package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +72 -0
- package/console/settings/invitations.html +1 -0
- package/console/settings/invitations.txt +87 -0
- package/console/settings/licenses/__next._full.txt +90 -0
- package/console/settings/licenses/__next._index.txt +62 -0
- package/console/settings/licenses/__next._tree.txt +8 -0
- package/console/settings/licenses/__next.settings.licenses.__PAGE__.txt +75 -0
- package/console/settings/licenses.html +1 -0
- package/console/settings/licenses.txt +90 -0
- package/console/settings/members/__next._full.txt +86 -0
- package/console/settings/members/__next._index.txt +62 -0
- package/console/settings/members/__next._tree.txt +8 -0
- package/console/settings/members/__next.settings.members.__PAGE__.txt +71 -0
- package/console/settings/members.html +1 -0
- package/console/settings/members.txt +86 -0
- package/console/settings/memory/__next._full.txt +86 -0
- package/console/settings/memory/__next._index.txt +62 -0
- package/console/settings/memory/__next._tree.txt +8 -0
- package/console/settings/memory/__next.settings.memory.__PAGE__.txt +71 -0
- package/console/settings/memory.html +1 -0
- package/console/settings/memory.txt +86 -0
- package/console/settings/model-catalog/__next._full.txt +89 -0
- package/console/settings/model-catalog/__next._index.txt +62 -0
- package/console/settings/model-catalog/__next._tree.txt +8 -0
- package/console/settings/model-catalog/__next.settings.model-catalog.__PAGE__.txt +74 -0
- package/console/settings/model-catalog.html +1 -0
- package/console/settings/model-catalog.txt +89 -0
- package/console/settings/notifications/__next._full.txt +89 -0
- package/console/settings/notifications/__next._index.txt +62 -0
- package/console/settings/notifications/__next._tree.txt +8 -0
- package/console/settings/notifications/__next.settings.notifications.__PAGE__.txt +74 -0
- package/console/settings/notifications.html +1 -0
- package/console/settings/notifications.txt +89 -0
- package/console/settings/oauth-apps/__next._full.txt +87 -0
- package/console/settings/oauth-apps/__next._index.txt +62 -0
- package/console/settings/oauth-apps/__next._tree.txt +8 -0
- package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +72 -0
- package/console/settings/oauth-apps.html +1 -0
- package/console/settings/oauth-apps.txt +87 -0
- package/console/settings/org-embedding/__next._full.txt +87 -0
- package/console/settings/org-embedding/__next._index.txt +62 -0
- package/console/settings/org-embedding/__next._tree.txt +8 -0
- package/console/settings/org-embedding/__next.settings.org-embedding.__PAGE__.txt +72 -0
- package/console/settings/org-embedding.html +1 -0
- package/console/settings/org-embedding.txt +87 -0
- package/console/settings/org-policies/__next._full.txt +87 -0
- package/console/settings/org-policies/__next._index.txt +62 -0
- package/console/settings/org-policies/__next._tree.txt +8 -0
- package/console/settings/org-policies/__next.settings.org-policies.__PAGE__.txt +72 -0
- package/console/settings/org-policies.html +1 -0
- package/console/settings/org-policies.txt +87 -0
- package/console/settings/org-preferences/__next._full.txt +87 -0
- package/console/settings/org-preferences/__next._index.txt +62 -0
- package/console/settings/org-preferences/__next._tree.txt +8 -0
- package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +72 -0
- package/console/settings/org-preferences.html +1 -0
- package/console/settings/org-preferences.txt +87 -0
- package/console/settings/org-profile/__next._full.txt +89 -0
- package/console/settings/org-profile/__next._index.txt +62 -0
- package/console/settings/org-profile/__next._tree.txt +8 -0
- package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +74 -0
- package/console/settings/org-profile.html +1 -0
- package/console/settings/org-profile.txt +89 -0
- package/console/settings/plans/__next._full.txt +89 -0
- package/console/settings/plans/__next._index.txt +62 -0
- package/console/settings/plans/__next._tree.txt +8 -0
- package/console/settings/plans/__next.settings.plans.__PAGE__.txt +74 -0
- package/console/settings/plans.html +1 -0
- package/console/settings/plans.txt +89 -0
- package/console/settings/service-accounts/__next._full.txt +87 -0
- package/console/settings/service-accounts/__next._index.txt +62 -0
- package/console/settings/service-accounts/__next._tree.txt +8 -0
- package/console/settings/service-accounts/__next.settings.service-accounts.__PAGE__.txt +72 -0
- package/console/settings/service-accounts.html +1 -0
- package/console/settings/service-accounts.txt +87 -0
- package/console/settings/teams/__next._full.txt +86 -0
- package/console/settings/teams/__next._index.txt +62 -0
- package/console/settings/teams/__next._tree.txt +8 -0
- package/console/settings/teams/__next.settings.teams.__PAGE__.txt +71 -0
- package/console/settings/teams.html +1 -0
- package/console/settings/teams.txt +86 -0
- package/console/settings/usage/__next._full.txt +86 -0
- package/console/settings/usage/__next._index.txt +62 -0
- package/console/settings/usage/__next._tree.txt +8 -0
- package/console/settings/usage/__next.settings.usage.__PAGE__.txt +71 -0
- package/console/settings/usage.html +1 -0
- package/console/settings/usage.txt +86 -0
- package/console/settings/vaults/__next._full.txt +86 -0
- package/console/settings/vaults/__next._index.txt +62 -0
- package/console/settings/vaults/__next._tree.txt +8 -0
- package/console/settings/vaults/__next.settings.vaults.__PAGE__.txt +71 -0
- package/console/settings/vaults.html +1 -0
- package/console/settings/vaults.txt +86 -0
- package/console/settings.html +1 -0
- package/console/settings.txt +85 -0
- package/main.js +1656 -0
- package/mappings.wasm +0 -0
- package/package.json +25 -0
- package/workflow-bundle-agent-execution.js +29297 -0
- package/workflow-bundle-evals.js +11997 -0
- package/workflow-bundle-grading.js +11155 -0
- package/workflow-bundle-routine.js +11300 -0
- package/workflow-worker-thread.cjs +111 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,732969,486511,492318,e=>{"use strict";var t=e.i(651023),s=e.i(155917),n=e.i(255817),r=e.i(781836),i=e.i(394327);function a(e){return"plan"===e?i.H.PLAN:i.H.AGENT}e.s(["t",0,function(e){switch(e){case i.H.AGENT:return"agent";case i.H.PLAN:return"plan";default:return}},"z",0,a],486511);var l=e.i(729728),o=e.i(752277),d=e.i(210731),u=e.i(972992);function g(e){switch(e){case"local":return u.p.LOCAL;case"cloud":return u.p.CLOUD}}function c(e){return e.modelName||e.serviceTier||e.thinkingMode?{...e.modelName?{modelName:e.modelName}:{},...e.serviceTier?{serviceTier:(0,l.Y)(e.serviceTier)}:{},...e.thinkingMode?{thinkingMode:(0,o.T)(e.thinkingMode)}:{}}:void 0}e.s(["V",0,function(e){switch(e){case u.p.LOCAL:return"local";case u.p.CLOUD:return"cloud";case u.p.UNSPECIFIED:default:return}},"$",0,g],492318),e.s(["f",0,function(){let e=(0,n.f)(),[i,l]=(0,t.useState)(!1),[o,u]=(0,t.useState)(null),f=(0,t.useCallback)(()=>u(null),[]);return{create:(0,t.useCallback)(async t=>{l(!0),u(null);try{let n=c(t),r=t.sessionSpec?{agentRef:t.sessionSpec.agentRef,subject:t.sessionSpec.subject,resources:t.sessionSpec.resources,plugins:t.sessionSpec.plugins,skillRefs:t.sessionSpec.skillRefs,vaults:t.sessionSpec.vaults,includeMyVault:t.sessionSpec.includeMyVault,environmentRef:t.sessionSpec.environmentRef,fileReview:t.sessionSpec.fileReview,metadata:(0,s.L)(t.sessionSpec.metadata,t.sessionSpec.sessionContext),harness:t.sessionSpec.harness?(0,d._)(t.sessionSpec.harness):void 0,executionTarget:t.sessionSpec.executionTarget?g(t.sessionSpec.executionTarget):void 0}:void 0,i=await e.run.create({name:`run-${Date.now()}`,org:t.org,sessionId:t.sessionId,sessionSpec:r,message:t.message,runConfig:n,interactionMode:t.interactionMode?a(t.interactionMode):void 0,buildFromPlan:t.buildFromPlan||void 0,structuredOutputSchema:t.structuredOutputSchema,autoApproveAll:t.autoApproveAll,fileIds:t.fileIds?.length?t.fileIds:void 0,workspaceFileRefs:t.workspaceFileRefs,supersedesRunId:t.supersedesRunId}),l=i.spec?.target;return{runId:i.metadata.id,sessionId:l?.case==="sessionId"?l.value:t.sessionId??""}}catch(e){throw u((0,r.f)(e)),e}finally{l(!1)}},[e]),send:(0,t.useCallback)(async t=>{l(!0),u(null);try{let s=await e.run.sendMessage({name:`run-${Date.now()}`,org:t.org,sessionId:t.sessionId,message:t.message,runConfig:c(t),interactionMode:t.interactionMode?a(t.interactionMode):void 0,buildFromPlan:t.buildFromPlan||void 0,structuredOutputSchema:t.structuredOutputSchema,autoApproveAll:t.autoApproveAll,fileIds:t.fileIds?.length?t.fileIds:void 0,workspaceFileRefs:t.workspaceFileRefs,supersedesRunId:t.supersedesRunId}),n=s.message?.event;return{messageId:n?.case==="userMessage"?n.value.id:"",runId:s.run?.metadata?.id||null}}catch(e){throw u((0,r.f)(e)),e}finally{l(!1)}},[e]),isCreating:i,error:o,clearError:f}}],732969)},839987,e=>{"use strict";let t=(0,e.i(651023).createContext)(null);e.s(["f",0,t])},663035,e=>{"use strict";var t=e.i(974265),s=e.i(893976),n=e.i(610595),r=e.i(247112);function i(e){let t=(0,n.k)(e);return t?.reason!=="AGENT_HOURS_USED_UP"?null:{org:t.metadata.org??"",plan:t.metadata.plan??"",includedHours:t.metadata.included_hours??"",resetsAt:t.metadata.resets_at??""}}e.s(["t",0,function({error:e,billingHref:a=r.Q,className:l}){let o=i(e)?.plan??"";return(0,t.jsxs)("div",{className:(0,s.f)("stg:rounded-md stg:border stg:border-border stg:bg-muted-subtle stg:px-3 stg:py-2 stg:text-xs",l),role:"alert",children:[(0,t.jsx)("p",{className:"stg:text-foreground",children:(0,n.g)(e)}),""!==o&&(0,t.jsx)("a",{href:a,className:"stg:mt-1 stg:inline-block stg:font-medium stg:text-primary stg:hover:underline",children:"View plans"})]})},"Z",0,i])},460253,452637,705852,665142,453796,628444,128027,371770,323492,951273,881316,e=>{"use strict";var t=e.i(974265),s=e.i(651023),n=e.i(893976),r=e.i(188482),i=e.i(781736),a=e.i(168362),l=e.i(488589),o=e.i(624041),d=e.i(808037),u=e.i(364354);function g({icon:e,label:s,count:c,children:f,disabled:h,open:p,onOpenChange:m}){let x=(0,u.P)();return(0,t.jsxs)(i.f.Root,{open:p,onOpenChange:m,children:[(0,t.jsxs)(r.W,{children:[(0,t.jsx)(r.y,{render:(0,t.jsx)("span",{className:"stg:inline-flex"}),children:(0,t.jsx)(a.f.Trigger,{disabled:h,"aria-label":s,className:(0,n.f)("stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,t.jsxs)("span",{className:"stg:relative",children:[e,c>0&&(0,t.jsx)("span",{className:"stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-2xs stg:font-medium stg:leading-none stg:text-primary-foreground",children:c})]})})}),(0,t.jsx)(r.Y,{side:"top",children:s})]}),(0,t.jsx)(l.f.Portal,{container:x,children:(0,t.jsx)(o.f.Positioner,{sideOffset:8,align:"start",children:(0,t.jsx)(d.f.Popup,{className:"stg:z-popover stg:overflow-x-hidden stg:overflow-y-auto stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:p-3 stg:shadow-md stg:text-popover-foreground stg:max-h-[80vh]",children:f})})})]})}function c(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 12V4M4 7l4-4 4 4"})})}function f(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("rect",{x:"3",y:"3",width:"10",height:"10",rx:"2.5"})})}function h(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M12.5 7L7 12.5a3.536 3.536 0 0 1-5-5L7.5 2a2.357 2.357 0 0 1 3.333 3.333L5.5 10.667a1.179 1.179 0 0 1-1.667-1.667L9 3.833"})})}function p(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"3",y:"5",width:"10",height:"8",rx:"2"}),(0,t.jsx)("circle",{cx:"6",cy:"9",r:"1",fill:"currentColor",stroke:"none"}),(0,t.jsx)("circle",{cx:"10",cy:"9",r:"1",fill:"currentColor",stroke:"none"}),(0,t.jsx)("path",{d:"M8 1v4"}),(0,t.jsx)("circle",{cx:"8",cy:"1",r:"1"})]})}function m(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M1.5 3.5V11a1 1 0 001 1h9a1 1 0 001-1V5.5a1 1 0 00-1-1H7L5.5 3H2.5a1 1 0 00-1 .5z"})})}function x(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M2 4h4m4 0h4M2 8h8m4 0h0M2 12h2m4 0h6"}),(0,t.jsx)("circle",{cx:"8",cy:"4",r:"2"}),(0,t.jsx)("circle",{cx:"12",cy:"8",r:"2"}),(0,t.jsx)("circle",{cx:"6",cy:"12",r:"2"})]})}function v({open:e,onOpenChange:s,activePanel:g,onActivePanelChange:c,items:f,renderPanel:h,disabled:p,trigger:m}){let y=f.reduce((e,t)=>e+t.count,0),k=f.some(e=>e.hasWarning),w=e=>{s(e),e||c(null)},N=(0,u.P)();if(0===f.length)return null;let C=g?f.find(e=>e.id===g):null;return(0,t.jsxs)(i.f.Root,{open:e,onOpenChange:w,children:[(0,t.jsxs)(r.W,{children:[(0,t.jsx)(r.y,{render:(0,t.jsx)("span",{className:"stg:inline-flex"}),children:(0,t.jsx)(a.f.Trigger,{disabled:p,className:m?.className??(0,n.f)("stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),"aria-label":m?.label??"Configure agent, tools, and skills",children:(0,t.jsxs)("span",{className:"stg:relative",children:[m?.icon??(0,t.jsx)(x,{}),y>0&&(0,t.jsx)("span",{className:"stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-2xs stg:font-medium stg:leading-none stg:text-primary-foreground",children:y}),k&&0===y&&(0,t.jsx)("span",{className:"stg:absolute stg:-right-0.5 stg:-top-0.5 stg:inline-block stg:h-2 stg:w-2 stg:rounded-full stg:bg-warning","aria-label":"Configuration needed"})]})})}),(0,t.jsx)(r.Y,{side:"top",children:m?.tooltip??"Configure"})]}),(0,t.jsx)(l.f.Portal,{container:N,children:(0,t.jsx)(o.f.Positioner,{sideOffset:8,align:"start",children:(0,t.jsx)(d.f.Popup,{className:(0,n.f)("stg:z-popover stg:overflow-x-hidden stg:overflow-y-auto stg:rounded-lg stg:border stg:border-border","stg:bg-popover stg:shadow-md stg:text-popover-foreground","stg:max-h-[80vh]"),children:C?(0,t.jsx)(j,{item:C,onBack:()=>c(null),children:h(g)}):(0,t.jsx)(b,{items:f,onSelect:c,onAct:e=>{w(!1),e.onSelect?.()}})})})})]})}function b({items:e,onSelect:s,onAct:r}){return(0,t.jsx)("div",{className:"stg:py-1",role:"menu",children:e.map(e=>(0,t.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>e.onSelect?r(e):s(e.id),className:(0,n.f)("stg:flex stg:w-full stg:items-center stg:gap-2.5 stg:px-3 stg:py-2 stg:text-sm stg:transition-colors","stg:text-foreground stg:hover:bg-accent-hover"),children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground",children:e.icon}),(0,t.jsxs)("span",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:flex-col stg:text-left",children:[(0,t.jsx)("span",{children:e.label}),e.detail&&(0,t.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-muted-foreground",children:e.detail})]}),e.hasWarning&&(0,t.jsx)("span",{className:"stg:inline-block stg:h-1.5 stg:w-1.5 stg:shrink-0 stg:rounded-full stg:bg-warning","aria-label":"Needs configuration"}),e.count>0&&(0,t.jsx)("span",{className:"stg:rounded-full stg:bg-primary-subtle stg:px-1.5 stg:text-2xs stg:font-medium stg:text-primary",children:e.count}),!e.onSelect&&(0,t.jsx)(y,{})]},e.id))})}function j({item:e,onBack:s,children:n}){return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:border-b stg:border-border-muted stg:px-3 stg:py-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"stg:shrink-0 stg:rounded stg:p-0.5 stg:text-muted-foreground stg:transition-colors stg:hover:bg-accent-hover stg:hover:text-foreground","aria-label":"Back to configuration menu",children:(0,t.jsx)(k,{})}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground",children:e.icon}),(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.label})]}),(0,t.jsx)("div",{className:"stg:p-3",children:n})]})}function y(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M6 4l4 4-4 4"})})}function k(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M10 4l-4 4 4 4"})})}e.s(["g",0,p,"n",0,function(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1.5 1.5 13.5h13L8 1.5z"}),(0,t.jsx)("path",{d:"M8 6v3"}),(0,t.jsx)("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor",stroke:"none"})]})},"X",0,c,"N",0,function(){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"stg:shrink-0 stg:animate-spin stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})},"i",0,x,"E",0,function(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M2.5 5.5 8 2.5l5.5 3v5L8 13.5l-5.5-3z"}),(0,t.jsx)("path",{d:"M2.5 5.5 8 8.5l5.5-3"}),(0,t.jsx)("path",{d:"M8 8.5v5"})]})},"w",0,h,"h",0,function(){return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:items-center stg:gap-1.5",children:[(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})}),(0,t.jsx)("span",{className:"stg:text-2xs stg:text-muted-foreground",children:"Checking agent requirements..."})]})},"S",0,function(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,t.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33h.01a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51h.01a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82v.01a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})},"u",0,function(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"3",y:"8",width:"10",height:"6",rx:"1.5"}),(0,t.jsx)("path",{d:"M5 8V5.5a3 3 0 0 1 6 0V8"}),(0,t.jsx)("circle",{cx:"8",cy:"11.5",r:"1",fill:"currentColor",stroke:"none"})]})},"R",0,function(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 3h12M2 7h8M2 11h10M2 15h6"})})},"d",0,f,"y",0,m,"_",0,function(){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4L10 10M10 4L4 10"})})}],452637);var w=e.i(216386),N=e.i(501785);let C=["agent","plan"],S={agent:{label:"Agent",description:"Full tool access — read, write, and execute"},plan:{label:"Plan",description:"Read-only analysis — search and reason only"}},R=C.map(e=>({value:e,...S[e]}));function M({value:e,onValueChange:r,className:g,disabled:c}){let f=(0,u.P)(),[h,p]=(0,s.useState)(!1),m=(0,s.useCallback)(e=>{r(e),p(!1)},[r]),x=(0,s.useCallback)(t=>{let s,n=C.indexOf(e);switch(t.key){case"ArrowDown":t.preventDefault(),s=n<C.length-1?n+1:0;break;case"ArrowUp":t.preventDefault(),s=n>0?n-1:C.length-1;break;case"Escape":t.preventDefault(),p(!1);return}void 0!==s&&m(C[s])},[e,m]);return(0,t.jsxs)(i.f.Root,{open:h,onOpenChange:p,children:[(0,t.jsxs)(a.f.Trigger,{disabled:c,className:(0,n.f)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2 stg:py-1.5 stg:text-xs stg:transition-colors","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",g),children:[(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:S[e].label}),(0,t.jsx)(I,{})]}),(0,t.jsx)(l.f.Portal,{container:f,children:(0,t.jsx)(o.f.Positioner,{sideOffset:4,children:(0,t.jsx)(d.f.Popup,{role:"listbox","aria-label":"Interaction mode",onKeyDown:x,className:(0,n.f)("stg:z-50 stg:w-56 stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:p-1 stg:shadow-md","stg:animate-in stg:fade-in-0 stg:zoom-in-95"),children:C.map(s=>{let r=S[s],i=e===s;return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":i,onClick:()=>m(s),className:(0,n.f)("stg:flex stg:w-full stg:flex-col stg:gap-0.5 stg:rounded-md stg:px-2.5 stg:py-2 stg:text-left stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",i?"stg:bg-accent stg:text-foreground":"stg:text-foreground stg:hover:bg-accent-hover"),children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium",children:r.label}),(0,t.jsx)("span",{className:"stg:text-2xs stg:leading-snug stg:text-muted-foreground",children:r.description})]},s)})})})})]})}function I(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var E=e.i(379410);let A={icon:(0,t.jsx)(function(){return(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M12 5v14M5 12h14"})})},{}),label:"Add files or a folder",tooltip:"Add",className:"stg:inline-flex stg:h-9 stg:w-9 stg:items-center stg:justify-center stg:rounded-full stg:border stg:border-border stg:text-foreground stg:transition-colors stg:hover:bg-accent-hover stg:disabled:pointer-events-none stg:disabled:opacity-50"},$="interaction-mode";function L({containerRef:e,disabled:n,showAttach:i,fileCount:a,onAttachClick:l,showWorkspace:o,workspaceCount:d,workspaceContent:u,onWorkspaceDirectAction:g,configureItems:c,configOpen:f,onConfigOpenChange:x,configActivePanel:b,onConfigActivePanelChange:j,renderConfigPanel:y,interactionMode:k,onInteractionModeChange:w,harnessSelector:N,modelSelector:C,sendOrStop:S}){let[M,I]=(0,s.useState)(!1),[E,O]=(0,s.useState)(null),T=[...i?[{id:"attach",icon:(0,t.jsx)(h,{}),label:"Attach files",count:a,onSelect:l}]:[],...o?[{id:"workspace",icon:(0,t.jsx)(m,{}),label:"Workspace",count:d,onSelect:g}]:[]],P=R.find(e=>e.value===k),V=void 0===P?c:[{id:$,icon:(0,t.jsx)(p,{}),label:"Mode",detail:P.label,count:0},...c];return(0,t.jsx)("div",{ref:e,className:"stg:@container/composer-toolbar stg:flex stg:items-center stg:justify-between stg:gap-2 stg:px-2.5 stg:pt-1 stg:pb-2.5",children:(0,t.jsxs)(r.g,{children:[(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-1",children:[(0,t.jsx)(v,{open:M,onOpenChange:I,activePanel:E,onActivePanelChange:O,items:T,renderPanel:()=>u,disabled:n,trigger:A}),(0,t.jsx)(v,{open:f,onOpenChange:x,activePanel:b,onActivePanelChange:j,items:V,renderPanel:e=>e===$&&void 0!==k?(0,t.jsx)(_,{value:k,onChange:e=>{w(e),j(null)}}):y(e),disabled:n}),N]}),(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-1",children:[C,S]})]})})}function _({value:e,onChange:s}){return(0,t.jsx)("div",{role:"radiogroup","aria-label":"Mode",className:"stg:flex stg:w-64 stg:flex-col stg:gap-1",children:R.map(r=>(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":r.value===e,onClick:()=>s(r.value),className:(0,n.f)("stg:flex stg:flex-col stg:items-start stg:rounded-md stg:px-2.5 stg:py-2 stg:text-left stg:transition-colors stg:hover:bg-accent-hover",r.value===e&&"stg:bg-accent"),children:[(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:r.label}),(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:r.description})]},r.value))})}e.s(["f",0,function({disabled:e,isSubmitting:i,canSend:a,sendBlockedReason:l,onSend:o,onStop:d,isStopping:u=!1,showAttach:p,fileCount:x,onAttachClick:b,showWorkspace:j,workspaceCount:y,workspaceContent:k,onWorkspaceDirectAction:C,configureItems:S,configOpen:R,onConfigOpenChange:I,configActivePanel:A,onConfigActivePanelChange:$,renderConfigPanel:_,showHarnessSelector:O,harness:T,onHarnessChange:P,showInteractionModePicker:V,interactionMode:z,onInteractionModeChange:B,showModelSelector:D,modelId:W,inheritedModel:F,onInheritedModelSelect:H,onModelChange:U,modelReadinessOf:K,serviceTier:Y,onServiceTierChange:q,thinkingMode:G,onThinkingModeChange:J}){let X=(0,s.useId)(),Z=O&&!D,Q=(0,s.useRef)(null),ee=function(e){let[t,n]=(0,s.useState)(!1);return(0,s.useLayoutEffect)(()=>{let t=e.current;if(null===t||"u"<typeof ResizeObserver)return;let s=()=>{let e=t.getBoundingClientRect().width;n(e>0&&e<448)};s();let r=new ResizeObserver(s);return r.observe(t),()=>r.disconnect()}),t}(Q),et=D?(0,t.jsx)(w.f,{value:W,inheritedModel:F,onInheritedModelSelect:H,onValueChange:U,harness:O?void 0:T,initialHarness:O?T:void 0,onHarnessChange:O?P:void 0,serviceTier:Y,onServiceTierChange:q,thinkingMode:G,onThinkingModeChange:J,readinessOf:K,disabled:e,className:ee?"stg:border-transparent stg:bg-transparent stg:px-2 stg:text-sm stg:font-medium":void 0}):null,es=d&&!a?(0,t.jsxs)(r.W,{children:[(0,t.jsx)(r.y,{render:(0,t.jsx)("button",{type:"button",onClick:d,className:"stg:flex stg:h-8 stg:w-8 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:text-primary-foreground stg:transition-colors stg:hover:bg-primary-hover","aria-label":"Stop generating"}),children:u?(0,t.jsx)(E.f,{}):(0,t.jsx)(f,{})}),(0,t.jsx)(r.Y,{side:"top",children:"Stop"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",disabled:!a,onClick:o,className:"stg:flex stg:h-8 stg:w-8 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-lg stg:bg-primary stg:text-primary-foreground stg:transition-colors stg:hover:bg-primary-hover stg:disabled:pointer-events-none stg:disabled:opacity-40","aria-label":"Send message","aria-describedby":void 0===l?void 0:X,children:i?(0,t.jsx)(E.f,{}):(0,t.jsx)(c,{})}),void 0!==l&&(0,t.jsx)("span",{id:X,className:"stg:sr-only",children:l})]}),en=j&&(C?(0,t.jsxs)(r.W,{children:[(0,t.jsx)(r.y,{render:(0,t.jsx)("span",{className:"stg:inline-flex"}),children:(0,t.jsx)("button",{type:"button",disabled:e,onClick:C,className:(0,n.f)("stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),"aria-label":"Workspace",children:(0,t.jsxs)("span",{className:"stg:relative",children:[(0,t.jsx)(m,{}),y>0&&(0,t.jsx)("span",{className:"stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-2xs stg:font-medium stg:leading-none stg:text-primary-foreground",children:y})]})})}),(0,t.jsx)(r.Y,{side:"top",children:"Workspace"})]}):(0,t.jsx)(g,{icon:(0,t.jsx)(m,{}),label:"Workspace",count:y,disabled:e,children:k})),er=p&&(0,t.jsxs)(r.W,{children:[(0,t.jsx)(r.y,{render:(0,t.jsx)("span",{className:"stg:inline-flex"}),children:(0,t.jsx)("button",{type:"button",disabled:e,onClick:b,className:(0,n.f)("stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),"aria-label":"Attach files",children:(0,t.jsxs)("span",{className:"stg:relative",children:[(0,t.jsx)(h,{}),x>0&&(0,t.jsx)("span",{className:"stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-2xs stg:font-medium stg:leading-none stg:text-primary-foreground",children:x})]})})}),(0,t.jsx)(r.Y,{side:"top",children:"Attach files"})]});return ee?(0,t.jsx)(L,{containerRef:Q,disabled:e,showAttach:p,fileCount:x,onAttachClick:b,showWorkspace:j,workspaceCount:y,workspaceContent:k,onWorkspaceDirectAction:C,configureItems:S,configOpen:R,onConfigOpenChange:I,configActivePanel:A,onConfigActivePanelChange:$,renderConfigPanel:_,interactionMode:V?z??"agent":void 0,onInteractionModeChange:B,harnessSelector:Z?(0,t.jsx)(N.f,{value:T??"stigmer",onValueChange:P,disabled:e}):null,modelSelector:et,sendOrStop:es}):(0,t.jsxs)("div",{ref:Q,className:"stg:@container/composer-toolbar stg:flex stg:items-center stg:justify-between stg:gap-2 stg:border-t stg:border-border-muted stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-1.5",children:[V&&(0,t.jsx)(M,{value:z??"agent",onValueChange:B,disabled:e}),Z&&(0,t.jsx)(N.f,{value:T??"stigmer",onValueChange:P,disabled:e}),et]}),(0,t.jsx)(r.g,{children:(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-1",children:[en,er,(0,t.jsx)(v,{open:R,onOpenChange:I,activePanel:A,onActivePanelChange:$,items:S,renderPanel:_,disabled:e}),es]})})]})}],460253);var O=e.i(14480);let T=new Set(["image/png","image/jpeg","image/webp","image/gif"]),P={warnings:[],modelCannotSeeImages:!1};e.s(["W",0,function(e,t){let s=e.filter(e=>T.has(e.contentType.toLowerCase()));if(0===s.length)return P;if(t?.model?.visionCapability===!1)return{warnings:s.map(e=>({name:e.name,sizeBytes:e.sizeBytes,reason:"model_no_vision"})),modelCannotSeeImages:!0};let n=t?.limits;if(!n)return P;let r=[],i=0,a=0;for(let e of s){if(e.sizeBytes>n.maxImageBytes){r.push({name:e.name,sizeBytes:e.sizeBytes,reason:"too_large"});continue}if(i>=n.maxImages||a+e.sizeBytes>n.maxTotalBytes){r.push({name:e.name,sizeBytes:e.sizeBytes,reason:"budget_exhausted"});continue}i+=1,a+=e.sizeBytes}return 0===r.length?P:{warnings:r,modelCannotSeeImages:!1}},"h",0,function(e,t){if(0===e.warnings.length)return null;if(e.modelCannotSeeImages){let e=t?.modelDisplayName??"The selected model";return`${e} can't view images — attached images will reach the agent as files only.`}let s=e.warnings.filter(e=>"too_large"===e.reason),n=e.warnings.filter(e=>"budget_exhausted"===e.reason),r=[];if(s.length>0){let e=t?.limits?`the ${(0,O.f)(t.limits.maxImageBytes)} inline-image limit`:"the inline-image size limit";if(1===s.length){let t=s[0];r.push(`${t.name} (${(0,O.f)(t.sizeBytes)}) exceeds ${e} and will reach the agent as a file, not an image`)}else 2===s.length?r.push(`${s[0].name} and ${s[1].name} exceed ${e} and will reach the agent as files, not images`):r.push(`${s.length} images exceed ${e} and will reach the agent as files, not images`)}if(n.length>0){let e=t?.limits?`this turn's inline-image budget (${t.limits.maxImages} images, ${(0,O.f)(t.limits.maxTotalBytes)} total)`:"this turn's inline-image budget";r.push(1===n.length?`${n[0].name} is over ${e} and will reach the agent as a file`:`${n.length} images are over ${e} and will reach the agent as files`)}return 0===r.length?null:`${r.join("; ")}.`}],705852);var V=e.i(230849),z=e.i(4144);function B({variables:e,onSubmit:r,onCancel:i,isSubmitting:a,disabled:l,title:o,description:d,submitLabel:u="Save",cancelLabel:g="Back",poolValues:c,className:f,ariaLabel:h}){let[p,m]=(0,s.useState)(()=>Object.fromEntries(e.map(e=>{let t=c?.(e.key);return[e.key,t?.value??""]}))),[x]=(0,s.useState)(()=>{if(!c)return new Set;let t=new Set;for(let s of e)c(s.key)&&t.add(s.key);return t}),[v,b]=(0,s.useState)(new Set),j=(0,s.useRef)(null),y=(0,V.f)(),k=(0,s.useId)(),w=l||a,N=e.every(e=>p[e.key]?.trim()!==""),C=(0,s.useCallback)((e,t)=>{m(s=>({...s,[e]:t}))},[]),S=(0,s.useCallback)(e=>{b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),R=(0,s.useCallback)(t=>{if(t.preventDefault(),!N||w)return;let s={};for(let t of e)s[t.key]={value:p[t.key],isSecret:t.isSecret,...t.description&&{description:t.description}};r(s)},[N,w,p,e,r]),M=h??(o?`Configure ${o}`:"Configure environment variables");return(0,t.jsxs)("form",{onSubmit:R,className:(0,n.f)("stg:w-72 stg:space-y-3",f),"aria-label":M,children:[o&&(0,t.jsxs)("div",{className:"stg:space-y-0.5",children:[(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:o}),d&&(0,t.jsx)("p",{className:"stg:text-2xs stg:text-muted-foreground",children:d})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[y.canScrollUp&&(0,t.jsx)(z.f,{position:"top"}),(0,t.jsx)("div",{ref:y.scrollRef,className:"stg:max-h-64 stg:space-y-2.5 stg:overflow-y-auto",children:e.map((e,s)=>{let r=`${k}-env-${e.key}`,i=e.description?`${r}-desc`:void 0,a=v.has(e.key);return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsxs)("label",{htmlFor:r,className:"stg:flex stg:items-baseline stg:gap-1.5 stg:text-2xs stg:font-medium stg:text-muted-foreground",children:[(0,t.jsx)("span",{className:"stg:font-mono",children:e.key}),e.isSecret&&(0,t.jsx)("span",{className:"stg:text-2xs stg:uppercase stg:tracking-wider stg:text-muted-foreground-subtle",children:"secret"})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{ref:0===s?j:void 0,id:r,type:e.isSecret&&!a?"password":"text",value:p[e.key],onChange:t=>C(e.key,t.target.value),disabled:w,required:!0,"aria-required":!0,"aria-describedby":i,autoComplete:"off",autoFocus:0===s,className:(0,n.f)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",e.isSecret&&"stg:pr-8")}),e.isSecret&&(0,t.jsx)("button",{type:"button",onClick:()=>S(e.key),disabled:w,className:(0,n.f)("stg:absolute stg:right-2 stg:top-1/2 stg:-translate-y-1/2","stg:text-muted-foreground stg:hover:text-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50"),"aria-label":a?`Hide ${e.key}`:`Show ${e.key}`,tabIndex:-1,children:a?(0,t.jsx)(W,{}):(0,t.jsx)(D,{})})]}),e.description&&(0,t.jsx)("p",{id:i,className:"stg:text-2xs stg:leading-relaxed stg:text-muted-foreground-subtle",children:e.description}),x.has(e.key)&&(0,t.jsx)("p",{className:"stg:text-2xs stg:text-primary-muted",children:"Pre-filled"})]},e.key)})}),y.canScrollDown&&(0,t.jsx)(z.f,{position:"bottom"})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-end stg:gap-2 stg:pt-1",children:[i&&(0,t.jsx)("button",{type:"button",onClick:i,disabled:w,className:(0,n.f)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:g}),(0,t.jsxs)("button",{type:"submit",disabled:!N||w,"data-cursor-target":"env-form-submit",className:(0,n.f)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground","stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-40"),children:[a&&(0,t.jsx)(E.f,{size:12}),u]})]})]})}function D(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8s-2.5 4.5-6.5 4.5S1.5 8 1.5 8z"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"2"})]})}function W(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6.59 6.59a2 2 0 0 0 2.82 2.82"}),(0,t.jsx)("path",{d:"M10.73 10.73A6.5 6.5 0 0 1 8 12.5c-4 0-6.5-4.5-6.5-4.5a11.5 11.5 0 0 1 3.77-3.73"}),(0,t.jsx)("path",{d:"M5.71 3.56A6.3 6.3 0 0 1 8 3.5c4 0 6.5 4.5 6.5 4.5a11.5 11.5 0 0 1-1.28 1.73"}),(0,t.jsx)("path",{d:"M2 2l12 12"})]})}e.s(["f",0,function({agentName:e,...s}){return(0,t.jsx)(B,{title:e,description:"Enter required credentials to use this agent. They are saved in My vault.",ariaLabel:`Configure ${e}`,...s})}],665142);var F=e.i(869803),H=e.i(603951),U=e.i(855158);function K({pluginOrg:e,slug:s,org:n,onSignedIn:r}){let{plugin:i,isLoading:a,error:l}=(0,U.f)(e,s);if(a)return null;if(l)return(0,t.jsxs)("li",{role:"note",className:"stg:text-xs stg:text-muted-foreground",children:["The plugin ",s," could not be read."]});if(null===i)return(0,t.jsxs)("li",{role:"note",className:"stg:text-xs stg:text-destructive",children:["The plugin ",s," is not installed; a conversation that lists it is refused."]});let o=i.metadata?.name||s,d=(i.status?.mcpServers??[]).filter(e=>"http"===e.transport.case&&void 0!==e.signIn);return(0,t.jsx)(t.Fragment,{children:d.map(e=>(0,t.jsxs)("li",{className:"stg:flex stg:flex-wrap stg:items-center stg:justify-between stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:o===e.name?o:`${o} \xb7 ${e.name}`}),(0,t.jsx)(H.f,{org:n,server:e,onSignedIn:r})]},e.name))})}e.s(["f",0,function({org:e,plugins:s,onSignedIn:r,className:i}){return 0===s.length?null:(0,t.jsx)("ul",{className:(0,n.f)(F.J,"stg:flex stg:flex-col stg:gap-1",i),"aria-label":"Plugin sign-ins",children:s.map(s=>(0,t.jsx)(K,{pluginOrg:s.org||e,slug:s.slug,org:e,onSignedIn:r},`${s.org}/${s.slug}`))})}],453796);var Y=e.i(891287),q=e.i(4212),G=e.i(255817),J=e.i(781836),X=e.i(459058),Z=e.i(320320);let Q={includeMyVault:!0,vaults:[]};function ee(e){let t=e.vaults.map(e=>`${e.org}/${e.slug}`).join(",");return`${e.includeMyVault?"mine":"-"}|${t}`}e.s(["d",0,Q,"$",0,ee],628444);var et=e.i(526584),es=e.i(616701),en=e.i(297629);function er(e){let t=(0,en.l)();return(0,s.useMemo)(()=>(t?(0,en.I)(t,e)?.metadata?.id:void 0)||e,[t,e])}function ei(e,t,n){let r=(0,G.f)(),i=er(n),a=e?.metadata?.org??"",l=null!==e&&""!==i&&a===i&&(0,et.t)(t??void 0,a).every(e=>e===i),{data:o,isLoading:d}=(0,es.f)(l&&t?async()=>{let e=await (0,et.c)(r,t,a,{plugins:"skip"});return{declared:Object.keys((0,et.F)(e)),signIn:(0,et.d)(e)}}:null,[l,t,a,r],null);return(0,s.useMemo)(()=>null===e||null==t?{keys:[],isReady:!1}:l?d||null===o?{keys:[],isReady:!1}:{keys:o.declared.filter(e=>!o.signIn.has(e)).sort(),isReady:!0}:{keys:[],isReady:!0},[e,t,l,d,o])}function ea(e,t,s){let n=[];for(let[r,i]of Object.entries(e))!t.has(r)&&(i.isSecret||(i.value??"")==="")&&(s?.has(r)||n.push({key:r,isSecret:i.isSecret,...i.description&&{description:i.description},...i.optional&&{optional:!0}}));return n}e.s(["g",0,er,"$",0,ei],128027);let el={status:"idle",error:null};function eo(e,t){switch(t.type){case"RESOLVE_START":return{status:"resolving",agentRef:t.agentRef,error:null};case"RESOLVE_NEEDS_ENV":return{status:"needsEnvVars",agentRef:t.agentRef,agentId:t.agentId,agentName:t.agentName,missingVariables:t.missingVariables,pendingSignIns:t.pendingSignIns,error:null};case"SIGN_IN_COMPLETED":{if("needsEnvVars"!==e.status)return e;let s=e.pendingSignIns.filter(e=>e.address!==t.address);if(s.length===e.pendingSignIns.length)return e;return{...e,pendingSignIns:s}}case"RESOLVE_READY":case"SUBMIT_READY":return{status:"ready",agentRef:t.agentRef,agentName:t.agentName,resolution:t.resolution,error:null};case"POOL_RESOLVE":if("needsEnvVars"!==e.status)return e;if(0===t.missingVariables.length&&0===e.pendingSignIns.length)return{status:"ready",agentRef:e.agentRef,agentName:e.agentName,resolution:{mode:"direct"},error:null};return{...e,missingVariables:t.missingVariables};case"SUBMIT_START":if("needsEnvVars"!==e.status)return e;return{status:"submitting",agentRef:e.agentRef,agentId:e.agentId,agentName:e.agentName,missingVariables:e.missingVariables,pendingSignIns:e.pendingSignIns,error:null};case"ERROR":if("submitting"===e.status)return{status:"needsEnvVars",agentRef:e.agentRef,agentId:e.agentId,agentName:e.agentName,missingVariables:e.missingVariables,pendingSignIns:e.pendingSignIns,error:t.error};return{...e,error:t.error};case"CLEAR_ERROR":return{...e,error:null};case"RESET":return el;default:return e}}async function ed(e,t,s){let n=t.spec?await (0,et.c)(e,t.spec,t.metadata?.org??"",{plugins:"throw"}):{servers:[],hooks:[],agents:[]},r=(0,et.e)(n).filter(({server:e})=>!s.some(t=>(0,Z.t)(t.spec?.connections??{},e))).map(({plugin:e,pluginName:t,server:s,address:n})=>({plugin:e,pluginName:t,server:s,address:n,name:t===s.name?t:`${t} \xb7 ${s.name}`}));return{servers:(0,et.s)(n),pendingSignIns:r,declarations:(0,et.F)(n),signInVariables:(0,et.d)(n)}}async function eu(e,t){let s=[];for(let n of t)try{s.push(await e.vault.getByReference(n))}catch{}return s}function eg(e,t){let s=new Set;for(let n of e){for(let e of Object.keys(n.spec?.secrets??{}))s.add(e);for(let e of t){let t=(0,Z.h)(e);t&&(0,Z.t)(n.spec?.connections??{},e)&&s.add(t)}}return s}e.s(["f",0,function(e,t,n=Q){let r=(0,G.f)(),i=(0,X.f)(e),a=er(e??""),l=ee(n),o=(0,s.useMemo)(()=>n,[l]),[d,u]=(0,s.useReducer)(eo,el),g=(0,s.useRef)({read:i.vault,current:i.vault});g.current.read!==i.vault&&(g.current={read:i.vault,current:i.vault});let c=(0,s.useRef)(0),f=(0,s.useCallback)(()=>u({type:"CLEAR_ERROR"}),[]),h=(0,s.useCallback)(()=>{c.current+=1,u({type:"RESET"})},[]),p=(0,s.useCallback)(async s=>{if(!e)throw Error("useAgentSetup: cannot resolve agent when org is null.");u({type:"RESOLVE_START",agentRef:s});let n=++c.current,i=e=>{n===c.current&&u(e)},l=new Set(t??[]);try{let t=await r.agent.getByReference(s),n=t.metadata?.name??s.slug,d=t.metadata?.org??"",u=d!==a||(0,et.t)(t.spec,d).some(e=>e!==a),c=o.includeMyVault&&!u,f=await eu(r,o.vaults.map(t=>({org:t.org||e,slug:t.slug}))),h=g.current.current,p=c&&null!==h?[h,...f]:f,{servers:m,pendingSignIns:x,declarations:v,signInVariables:b}=await ed(r,t,p),j=Object.keys(v).length>0?0===b.size?v:Object.fromEntries(Object.entries(v).filter(([e])=>!b.has(e))):void 0;if(x.length>0){let e=eg(p,m),r=j?ea(j,e,l):[];return i({type:"RESOLVE_NEEDS_ENV",agentRef:s,agentId:t.metadata.id,agentName:n,missingVariables:r,pendingSignIns:x}),{status:"needsEnvVars",agentRef:s,agentName:n,missingVariables:r,pendingSignIns:x}}if(!j||0===Object.keys(j).length||u){let e={mode:"direct"};return i({type:"RESOLVE_READY",agentRef:s,agentName:n,resolution:e}),{status:"ready",agentRef:s,agentName:n,resolution:e}}let y=eg(p,m),k=ea(j,y),w=ea(j,y,l);if(0===k.length){let e={mode:"saved"};return i({type:"RESOLVE_READY",agentRef:s,agentName:n,resolution:e}),{status:"ready",agentRef:s,agentName:n,resolution:e}}if(0===w.length){let e={mode:"direct"};return i({type:"RESOLVE_READY",agentRef:s,agentName:n,resolution:e}),{status:"ready",agentRef:s,agentName:n,resolution:e}}return i({type:"RESOLVE_NEEDS_ENV",agentRef:s,agentId:t.metadata.id,agentName:n,missingVariables:w,pendingSignIns:[]}),{status:"needsEnvVars",agentRef:s,agentName:n,missingVariables:w,pendingSignIns:[]}}catch(e){throw i({type:"ERROR",error:(0,J.f)(e)}),e}},[e,a,r,t,o]),m=(0,s.useRef)(d);m.current=d;let x=(0,s.useRef)(l);(0,s.useEffect)(()=>{if(x.current===l)return;x.current=l;let e=m.current;"idle"!==e.status&&"submitting"!==e.status&&p(e.agentRef).catch(()=>{})},[l,p]);let v=(0,s.useRef)(i.vault);(0,s.useEffect)(()=>{if(v.current===i.vault||(v.current=i.vault,!o.includeMyVault))return;let e=m.current;"idle"!==e.status&&"submitting"!==e.status&&p(e.agentRef).catch(()=>{})},[i.vault,o.includeMyVault,p]);let b="needsEnvVars"===d.status?d.missingVariables:null;(0,s.useEffect)(()=>{if(!t||0===t.size||!b)return;let e=b.filter(e=>!t.has(e.key));e.length!==b.length&&u({type:"POOL_RESOLVE",missingVariables:e})},[t,b]);let j=(0,s.useCallback)(async t=>{let s;if("needsEnvVars"!==d.status)throw Error(`useAgentSetup: submitEnvVars requires state.status === 'needsEnvVars'. Current status is '${d.status}'. Call resolveAgent() first and ensure it returned status 'needsEnvVars'.`);if(!e)throw Error("useAgentSetup: cannot submit env vars when org is null.");if(d.pendingSignIns.length>0)throw Error(`useAgentSetup: submitEnvVars requires every pending sign-in to have completed. Still pending: ${d.pendingSignIns.map(e=>e.name).join(", ")}. Call signInCompleted(address) as each lands; the agent is resolved again when the last one does.`);let{agentRef:n}=d;u({type:"SUBMIT_START"});try{s=await i.setSecrets(Object.fromEntries(Object.entries(t).filter(([,e])=>""!==e.value).map(([e,t])=>[e,t.value])))}catch(e){throw u({type:"ERROR",error:(0,J.f)(e)}),e}return g.current={read:g.current.read,current:s},p(n)},[e,i,d,p]),y=i.refetch,k=(0,s.useCallback)(async()=>{if(e){try{let t=await r.vault.getMine((0,Y.f)(q.q,{org:e}));g.current={read:g.current.read,current:t}}catch{}y()}},[e,r,y]),w=(0,s.useCallback)(async e=>{if("needsEnvVars"!==d.status)return;let t=d.pendingSignIns.filter(t=>t.address!==e);if(t.length!==d.pendingSignIns.length&&(u({type:"SIGN_IN_COMPLETED",address:e}),0===t.length)){await k();try{await p(d.agentRef)}catch{}}},[d,p,k]);return{state:d,resolveAgent:p,submitEnvVars:j,signInCompleted:w,clearError:f,reset:h}}],371770);var ec=e.i(780412);e.s(["f",0,function({agentRef:e,runOrg:s,versionHash:r="",className:i}){let{agent:a,spec:l}=(0,ec.f)(e,r),{keys:o}=ei(a??null,l,s);return 0===o.length?null:(0,t.jsxs)("p",{"data-testid":"personal-key-disclosure",className:(0,n.f)("stg:text-xs stg:text-muted-foreground",i),children:["This agent can read these keys from your My vault:"," ",(0,t.jsx)("span",{className:"stg:font-mono",children:o.join(", ")})]})}],323492);var ef=e.i(910304);let eh=" needs ",ep=/^([A-Za-z_][A-Za-z0-9_]*): ([\s\S]+)$/;function em(e){let t=[];for(let s of e.split(";")){let e=s.indexOf(eh);if(e<0)continue;let n=s.slice(0,e),r=n.slice(Math.max(n.lastIndexOf(":"),n.lastIndexOf("]"))+1).trim(),i=ep.exec(s.slice(e+eh.length));if(""===r||null===i)continue;let a=i[2].trim();""!==a&&t.push({declarer:r,variableName:i[1],action:a})}return t}function ex(e){return e instanceof ef.p&&"failed-precondition"===e.code}function ev({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"10.5",cy:"5.5",r:"3"}),(0,t.jsx)("path",{d:"M8.5 7.5L3 13l1.5 1.5"}),(0,t.jsx)("path",{d:"M5.5 11l1.5 1.5"})]})}e.s(["D",0,function({error:e,className:r}){let i=(0,s.useMemo)(()=>{if(!e||!ex(e))return null;let t=em(e.message);return 0===t.length?null:t},[e]);if(!i)return null;let a=(0,s.useMemo)(()=>{let e=new Map;for(let t of i){let s=e.get(t.declarer)??[];s.push(t),e.set(t.declarer,s)}return e},[i]);return(0,t.jsx)("div",{role:"alert",className:(0,n.f)("stg:rounded-lg stg:bg-status-degraded-subtle stg:p-4",r),children:(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:[(0,t.jsx)(ev,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0 stg:text-status-degraded"}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1 stg:space-y-2",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:"Missing logins and secrets"}),(0,t.jsx)("div",{className:"stg:space-y-1.5",children:Array.from(a).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"stg:text-xs stg:text-status-degraded",children:[(0,t.jsx)("span",{className:"stg:font-medium",children:e})," needs:"]}),(0,t.jsx)("ul",{className:(0,n.f)(F.J,"stg:mt-0.5 stg:space-y-0.5"),children:s.map(e=>(0,t.jsxs)("li",{className:"stg:pl-3 stg:text-xs stg:text-status-degraded",children:[(0,t.jsx)("span",{className:"stg:font-mono",children:e.variableName})," — ",e.action]},e.variableName))})]},e))})]})]})})},"A",0,function(e){return!!e&&!!ex(e)&&em(e.message).length>0}],951273);let eb={".md":"text/markdown",".markdown":"text/markdown",".yaml":"application/x-yaml",".yml":"application/x-yaml",".json":"application/json",".csv":"text/csv",".tsv":"text/tab-separated-values",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".ts":"application/typescript",".py":"text/x-python",".go":"text/x-go",".rs":"text/x-rust",".java":"text/x-java",".rb":"text/x-ruby",".sh":"application/x-sh",".bash":"application/x-sh",".sql":"application/sql",".toml":"application/toml",".ini":"text/plain",".cfg":"text/plain",".conf":"text/plain",".env":"text/plain",".txt":"text/plain",".log":"text/plain",".pdf":"application/pdf",".zip":"application/zip",".gz":"application/gzip",".tar":"application/x-tar",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".webp":"image/webp"};function ej(e){if(e.type&&"application/octet-stream"!==e.type)return e.type;let t=e.name.lastIndexOf(".");if(-1!==t){let s=eb[e.name.slice(t).toLowerCase()];if(s)return s}return"application/octet-stream"}function ey(e){return e.size>524288e3?`${e.name} exceeds the 500 MB file limit (${(0,O.f)(e.size)})`:null}function ek(e,t){if(!t.has(e))return e;let s=e.lastIndexOf("."),n=s>0?e.slice(0,s):e,r=s>0?e.slice(s):"";for(let e=2;;e++){let s=`${n}-${e}${r}`;if(!t.has(s))return s}}function ew(e,t){return e*t>115e4||Math.max(e,t)>1568}let eN=new Set(["image/png","image/jpeg"]);function eC(e,t,s){return new Promise(n=>{try{e.toBlob(n,t,s)}catch{n(null)}})}async function eS(e){let t,s=e.type.toLowerCase();if(!s.startsWith("image/")||"function"!=typeof createImageBitmap||"u"<typeof document)return e;try{t=await createImageBitmap(e,{imageOrientation:"from-image"})}catch{return e}try{var n;let r,i,a,l,o=ew(t.width,t.height),d="image/gif"===s;if(!o&&(eN.has(s)||d))return e;let u=o?function(e,t){if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0||!ew(e,t))return{width:e,height:t};let s=e/t,n=Math.sqrt(115e4/s),r=n*s;return Math.max(r,n)>1568&&(r>=n?n=(r=1568)/s:r=(n=1568)*s),{width:Math.max(1,Math.floor(Math.min(r,e))),height:Math.max(1,Math.floor(Math.min(n,t)))}}(t.width,t.height):{width:t.width,height:t.height},g=document.createElement("canvas");g.width=u.width,g.height=u.height;let c=g.getContext("2d");if(!c)return e;if(c.drawImage(t,0,0,u.width,u.height),"image/jpeg"===s)i="image/jpeg",r=await eC(g,i,.9);else{let e=await eC(g,"image/png"),t=e?e.size/(u.width*u.height):1/0;if(e&&t<=1)i="image/png",r=e;else{c.globalCompositeOperation="destination-over",c.fillStyle="#ffffff",c.fillRect(0,0,u.width,u.height);let t=await eC(g,"image/jpeg",.9);r=t??e,i=t?"image/jpeg":"image/png"}}if(!r||i===s&&r.size>=e.size)return e;let f="image/jpeg"===i?"jpg":"png",h=i===s?e.name:(n=e.name,l=(a=n.lastIndexOf("."))>0?n.slice(0,a):n,`${l}.${f}`);return new File([r],h,{type:i,lastModified:e.lastModified})}finally{t.close()}}let eR=0;function eM(){return`file-upload-${++eR}-${Date.now()}`}function eI(e){return{fileId:e.fileId??void 0,filename:e.file.name,kind:e.contentType.startsWith("image/")?"image":"document"}}e.s(["f",0,function(e){let t=(0,G.f)(),n=e?.org,r=e?.sessionId,i=e?.onValidationError,[a,l]=(0,s.useState)([]),o=(0,s.useRef)(new Map),d=(0,s.useRef)(a);d.current=a;let u=(0,s.useCallback)(e=>{t.file.delete(e).catch(()=>void 0)},[t]),g=(0,s.useRef)(!1),c=(0,s.useRef)(u);c.current=u,(0,s.useEffect)(()=>(g.current=!1,()=>{g.current=!0,setTimeout(()=>{if(g.current)for(let e of d.current)e.fileId&&c.current(e.fileId)},0)}),[]);let f=(0,s.useCallback)(async(e,s,i)=>{let a=new AbortController;o.current.set(e,a);try{if(!n)throw Error("Choose an organization before attaching files.");let o=await t.file.uploadFile({org:n,sessionId:r,filename:s.name,mimeType:i||void 0,content:s}),d=o.metadata?.id??"";if(a.signal.aborted||g.current){d&&u(d);return}l(t=>t.map(t=>t.id===e?{...t,phase:"ready",fileId:d,inConversation:(o.status?.sessionId??"")!=="",error:null}:t))}catch(s){if(a.signal.aborted)return;let t=(0,J.f)(s).message;l(s=>s.map(s=>s.id===e?{...s,phase:"error",error:t}:s))}finally{o.current.get(e)===a&&o.current.delete(e)}},[t,n,r,u]),h=(0,s.useCallback)(async(e,t)=>{let s=new AbortController;o.current.set(e,s);let n=await eS(t);if(s.signal.aborted)return;o.current.delete(e);let r=ey(n);if(r){l(t=>t.filter(t=>t.id!==e)),i?.(r);return}let a=new Set(d.current.filter(t=>t.id!==e).map(e=>e.file.name)),u=ek(n.name,a),g=u===n.name?n:new File([n],u,{type:n.type,lastModified:n.lastModified}),c=ej(g);l(t=>t.map(t=>t.id===e?{...t,file:g,contentType:c,phase:"uploading"}:t)),f(e,g,c)},[i,f]),p=(0,s.useCallback)((e,t)=>{let s=[],n=[],r=new Set(d.current.map(e=>e.file.name)),a=20-d.current.length,o=0;for(let l of Array.from(e)){if(a<=0){o++;continue}if(t?.prepareImages){let e=eM();s.push({id:e,file:l,phase:"preparing",contentType:ej(l),fileId:null,inConversation:!1,error:null}),n.push(()=>void h(e,l)),a--;continue}let e=ey(l);if(e){i?.(e);continue}let d=ek(l.name,r);r.add(d);let u=d===l.name?l:new File([l],d,{type:l.type,lastModified:l.lastModified}),g=eM(),c=ej(u);s.push({id:g,file:u,phase:"uploading",contentType:c,fileId:null,inConversation:!1,error:null}),n.push(()=>void f(g,u,c)),a--}for(let e of(o>0&&i?.(`A message carries at most 20 files; ${1===o?"1 file was":`${o} files were`} not added.`),s.length>0&&(d.current=[...d.current,...s],l(e=>[...e,...s])),n))e()},[i,f,h]),m=(0,s.useCallback)(e=>{let t=o.current.get(e);t&&(t.abort(),o.current.delete(e))},[]),x=(0,s.useCallback)(e=>{m(e);let t=d.current.find(t=>t.id===e);t?.fileId&&u(t.fileId),d.current=d.current.filter(t=>t.id!==e),l(t=>t.filter(t=>t.id!==e))},[m,u]),v=(0,s.useCallback)(e=>{let t=d.current.find(t=>t.id===e);t&&"error"===t.phase&&(l(t=>t.map(t=>t.id===e?{...t,phase:"uploading",error:null}:t)),f(e,t.file,t.contentType))},[f]),b=(0,s.useCallback)(()=>{for(let e of d.current)m(e.id),e.fileId&&u(e.fileId);d.current=[],l([])},[m,u]),j=(0,s.useCallback)(()=>a.flatMap(e=>"ready"===e.phase&&e.fileId?[e.fileId]:[]),[a]),y=(0,s.useCallback)(()=>{let e=d.current.filter(e=>"ready"===e.phase&&null!==e.fileId);for(let e of d.current)m(e.id);d.current=[],l([]);let s=e.filter(e=>!e.inConversation).map(e=>e.fileId),n=null;return{fileIds:e.map(e=>e.fileId),files:e.map(eI),release:()=>n??=Promise.all(s.map(e=>t.file.delete(e).catch(()=>void 0))).then(()=>void 0)}},[m,t]),k=a.some(e=>"preparing"===e.phase),w=a.some(e=>"preparing"===e.phase||"uploading"===e.phase),N=a.filter(e=>"ready"===e.phase).length,C=a.length>0,S=C&&N===a.length;return(0,s.useMemo)(()=>({entries:a,isUploading:w,isPreparing:k,readyCount:N,allReady:S,hasEntries:C,addFiles:p,removeEntry:x,retryEntry:v,clear:b,toFileIds:j,handOff:y}),[a,w,k,N,S,C,p,x,v,b,j,y])}],881316)},570850,e=>{"use strict";var t=e.i(974265),s=e.i(651023),n=e.i(893976),r=e.i(610595),i=e.i(973621),a=e.i(460253),l=e.i(729728),o=e.i(752277),d=e.i(667954),u=e.i(557702),g=e.i(705852),c=e.i(356965),f=e.i(954884),h=e.i(665142),p=e.i(603951),m=e.i(453796),x=e.i(513642),v=e.i(141249),b=e.i(869803),j=e.i(371770),y=e.i(323492),k=e.i(951273),w=e.i(841358),N=e.i(881316),C=e.i(615132),S=e.i(309826),R=e.i(933221),M=e.i(188482),I=e.i(14480);function E({entries:e,onRemove:r,onRetry:i,onPreview:a,disabled:l,className:o}){let[d,u]=(0,s.useState)(null),g=null!==d?e.find(e=>e.id===d)??null:null;return 0===e.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,n.f)("stg:flex stg:flex-wrap stg:items-center stg:gap-1.5",o),role:"list","aria-label":"Attached files",children:e.map(e=>(0,t.jsx)(A,{entry:e,onRemove:()=>r(e.id),onRetry:()=>i(e.id),onPreview:a?()=>a(e):()=>u(e.id),disabled:l},e.id))}),g&&(0,t.jsx)(V,{entry:g,onClose:()=>u(null)})]})}function A({entry:e,onRemove:s,onRetry:n,onPreview:r,disabled:i}){return e.contentType.startsWith("image/")?(0,t.jsx)(_,{entry:e,onRemove:s,onRetry:n,onPreview:r,disabled:i}):(0,t.jsx)(O,{entry:e,onRemove:s,onRetry:n,disabled:i})}function $(e){let t="preparing"===e.phase,s="uploading"===e.phase,n="error"===e.phase;return`${e.file.name}, ${(0,I.f)(e.file.size)}${t?", preparing":""}${s?", uploading":""}${n?", upload failed":""}`}function L(e){return"preparing"===e.phase||"uploading"===e.phase}function _({entry:e,onRemove:r,onRetry:i,onPreview:a,disabled:l}){let o=(0,C.f)(e.file),[d,u]=(0,s.useState)(!1);if(d)return(0,t.jsx)(O,{entry:e,onRemove:r,onRetry:i,disabled:l});let g="error"===e.phase,c=L(e);return(0,t.jsxs)(M.W,{children:[(0,t.jsxs)(M.y,{render:(0,t.jsx)("span",{role:"listitem","aria-label":$(e),className:"stg:relative stg:inline-flex"}),children:[(0,t.jsxs)("button",{type:"button",onClick:a,"aria-label":`Preview ${e.file.name}`,className:(0,n.f)(R.s,"stg:relative stg:block stg:h-14 stg:w-14 stg:overflow-hidden stg:rounded-md stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",g&&"stg:ring-1 stg:ring-destructive"),children:[o?(0,t.jsx)("img",{src:o,alt:"","aria-hidden":"true",onError:()=>u(!0),className:(0,n.f)("stg:h-full stg:w-full stg:object-cover",(c||g)&&"stg:opacity-50")}):(0,t.jsx)("span",{className:"stg:block stg:h-full stg:w-full stg:animate-pulse stg:bg-muted","aria-hidden":"true"}),c&&(0,t.jsx)("span",{className:"stg:absolute stg:inset-0 stg:flex stg:items-center stg:justify-center",children:(0,t.jsx)(z,{size:16})})]}),g&&(0,t.jsx)("button",{type:"button",onClick:i,disabled:l,"aria-label":`Retry uploading ${e.file.name}`,className:(0,n.f)(R.s,"stg:absolute stg:left-1/2 stg:top-1/2 stg:-translate-x-1/2 stg:-translate-y-1/2 stg:rounded-full stg:bg-destructive stg:px-1.5 stg:py-0.5 stg:text-2xs stg:font-medium stg:leading-none stg:text-destructive-foreground stg:shadow-sm stg:hover:bg-destructive-hover stg:disabled:pointer-events-none"),children:"Retry"}),(0,t.jsx)("button",{type:"button",onClick:r,disabled:l,"aria-label":`Remove ${e.file.name}`,className:(0,n.f)(R.s,"stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-4 stg:w-4 stg:items-center stg:justify-center stg:rounded-full stg:border stg:border-border stg:bg-background stg:text-muted-foreground stg:shadow-sm stg:hover:text-destructive stg:disabled:pointer-events-none"),children:(0,t.jsx)(W,{})})]}),(0,t.jsx)(M.Y,{side:"top",className:"stg:break-all",children:e.file.name})]})}function O({entry:e,onRemove:s,onRetry:r,disabled:i}){let a="error"===e.phase,l=L(e);return(0,t.jsxs)("span",{role:"listitem","aria-label":$(e),className:(0,n.f)("stg:inline-flex stg:max-w-[200px] stg:items-center stg:gap-1 stg:rounded-md stg:px-2 stg:py-0.5 stg:text-xs",a?"stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:text-destructive":"stg:bg-muted-subtle stg:text-foreground",l&&"stg:opacity-70"),children:[l&&(0,t.jsx)(z,{}),a&&(0,t.jsx)(B,{}),!l&&!a&&(0,t.jsx)(D,{}),(0,t.jsx)("span",{className:"stg:truncate",children:e.file.name}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-2xs stg:tabular-nums stg:text-muted-foreground",children:(0,I.f)(e.file.size)}),a&&(0,t.jsx)(T,{filename:e.file.name,onRetry:r,disabled:i}),(0,t.jsx)(P,{filename:e.file.name,onRemove:s,disabled:i})]})}function T({filename:e,onRetry:s,disabled:r}){return(0,t.jsx)("button",{type:"button",onClick:s,disabled:r,className:(0,n.f)(R.s,"stg:shrink-0 stg:text-2xs stg:font-medium stg:text-destructive stg:underline stg:hover:text-destructive-muted stg:disabled:pointer-events-none"),"aria-label":`Retry uploading ${e}`,children:"Retry"})}function P({filename:e,onRemove:s,disabled:r}){return(0,t.jsx)("button",{type:"button",onClick:s,disabled:r,className:(0,n.f)(R.s,"stg:ml-0.5 stg:shrink-0 stg:text-muted-foreground stg:hover:text-destructive stg:disabled:pointer-events-none"),"aria-label":`Remove ${e}`,children:(0,t.jsx)(W,{})})}function V({entry:e,onClose:s}){let n=(0,C.f)(e.file);return(0,t.jsx)(S.f,{src:n,filename:e.file.name,open:!0,onClose:s})}function z({size:e=10}){return(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",className:"stg:shrink-0 stg:animate-spin stg:text-muted-foreground","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}function B(){return(0,t.jsx)("span",{className:"stg:inline-block stg:h-1.5 stg:w-1.5 stg:shrink-0 stg:rounded-full stg:bg-destructive","aria-hidden":"true"})}function D(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-muted-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1H4C3.45 1 3 1.45 3 2V12C3 12.55 3.45 13 4 13H10C10.55 13 11 12.55 11 12V4L8 1Z"}),(0,t.jsx)("path",{d:"M8 1V4H11"})]})}function W(){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4L10 10M10 4L4 10"})})}let F=/^image\.(png|jpe?g|gif|webp|tiff?|bmp|avif)$/i,H={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/tiff":"tiff","image/bmp":"bmp","image/avif":"avif","image/svg+xml":"svg"},U=0;function K({refs:e,onRemove:s,disabled:r,className:i}){return 0===e.length?null:(0,t.jsx)("div",{className:(0,n.f)("stg:flex stg:flex-wrap stg:gap-1.5",i),role:"list","aria-label":"Referenced workspace files",children:e.map(e=>(0,t.jsx)(Y,{path:e,onRemove:()=>s(e),disabled:r},e))})}function Y({path:e,onRemove:s,disabled:n}){let r=e.split("/").pop()??e;return(0,t.jsxs)(M.W,{children:[(0,t.jsxs)(M.y,{render:(0,t.jsx)("span",{role:"listitem","aria-label":`Referenced file: ${e}`,className:"stg:inline-flex stg:max-w-[200px] stg:items-center stg:gap-1 stg:rounded-md stg:bg-muted-subtle stg:px-2 stg:py-0.5 stg:text-xs stg:text-foreground"}),children:[(0,t.jsx)(q,{}),(0,t.jsx)("span",{className:"stg:truncate",children:r}),(0,t.jsx)("button",{type:"button",onClick:s,disabled:n,className:"stg:ml-0.5 stg:shrink-0 stg:text-muted-foreground stg:hover:text-destructive stg:disabled:pointer-events-none","aria-label":`Remove reference to ${e}`,children:(0,t.jsx)(G,{})})]}),(0,t.jsx)(M.Y,{side:"top",className:"stg:break-all",children:e})]})}function q(){return(0,t.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-accent-foreground","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1H4C3.45 1 3 1.45 3 2V12C3 12.55 3.45 13 4 13H10C10.55 13 11 12.55 11 12V4L8 1Z"}),(0,t.jsx)("path",{d:"M8 1V4H11"}),(0,t.jsx)("path",{d:"M5 8H9M5 10H8"})]})}function G(){return(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4L10 10M10 4L4 10"})})}var J=e.i(536907),X=e.i(937719),Z=e.i(628444);let Q=new Set(["STIGMER_SERVER_ADDRESS"]);var ee=e.i(51427),et=e.i(373351),es=e.i(653650),en=e.i(836959),er=e.i(348990),ei=e.i(282838),ea=e.i(452637);let el=(0,s.forwardRef)(function({onSubmit:e,isSubmitting:r=!1,disabled:k=!1,sendBlockedReason:C,modelReadinessOf:S,onStop:R,isStopping:I=!1,isEditing:A=!1,onCancelEdit:$,harness:L,onHarnessChange:_,showHarnessSelector:O=!1,interactionMode:T,onInteractionModeChange:P,showInteractionModePicker:V=!1,defaultModelId:z,agentRunDefaults:B,onModelChange:D,onModelPickCleared:W,showModelSelector:Y=!0,workspace:q,gitHubConnection:G,enableGitHub:el=!0,enableLocal:eo=!1,onBrowseLocalFolder:eg,org:ec,agentRef:ef,onAgentRefChange:eh,onAgentResolutionChange:ep,onAgentSetupErrorChange:em,initialAgentRef:ex,disclosePersonalKeys:ev=!1,personalKeysVersionHash:eb,enableVaultPicker:ej=!1,initialVaultRefs:ey,initialIncludeMyVault:ek=!0,vaultPickCreatorId:ew,enableEnvironmentPicker:eN=!1,environmentDefaults:eC,sessionId:eS,extraSettings:eR,lockAgent:eM=!1,pluginRefs:eI,onPluginRefsChange:eE,skillRefs:eA,onSkillRefsChange:e$,enableFiles:eL=!0,enableFileReferences:e_=!0,onFileValidationError:eO,initialFiles:eT,placeholder:eP="Reply…",initialRows:eV=1,autoFocus:ez=!1,ariaLabel:eB="Send message",className:eD},eW){(0,ei.f)("SessionComposer",{disabled:k,isSubmitting:r});let[eF,eH]=(0,s.useState)(z),eU=(0,s.useRef)(!1);(0,s.useEffect)(()=>{eU.current||eH(z)},[z]);let eK=(0,s.useCallback)(e=>{eU.current=!0,eH(e)},[]),[eY,eq]=(0,s.useState)(void 0),[eG,eJ]=(0,s.useState)(void 0),eX=ef?`${ef.org}/${ef.slug}`:"",eZ=(0,s.useRef)(eX);(0,s.useEffect)(()=>{eZ.current!==eX&&(eZ.current=eX,eU.current=!1,eH(z),eq(void 0),eJ(void 0))},[eX,z]);let eQ=B?.modelName??"",e0=(0,s.useRef)(eQ);(0,s.useEffect)(()=>{e0.current===eQ||(e0.current=eQ,eU.current||(eq(void 0),eJ(void 0)))},[eQ]);let[e1,e5]=(0,s.useState)(L??"stigmer");(0,s.useEffect)(()=>{void 0!==L&&e5(L)},[L]);let[e2,e6]=(0,s.useState)(()=>new Map),e3=k||r,e4=null!=R,e8=null!=eh&&null!=ec,e7=null!=eE&&null!=ec,e9=null!=q,te=null!=e$&&null!=ec,[tt,ts]=(0,s.useState)(!1),[tn,tr]=(0,s.useState)(null),[ti,ta]=(0,s.useState)(void 0),[tl,to]=(0,s.useState)(eS);tl!==eS&&(to(eS),ta(void 0));let td=(ey??[]).map(e=>`${e.org}/${e.slug}`).join(","),tu=(0,s.useMemo)(()=>({includeMyVault:ek,vaults:ey??[]}),[ek,td]);void 0!==ti&&(0,Z.$)(ti)===(0,Z.$)(tu)&&ta(void 0);let tg=ti??tu,tc=ej&&null!=ec,[tf,th]=(0,s.useState)(void 0),[tp,tm]=(0,s.useState)(eS);tp!==eS&&(tm(eS),th(void 0));let tx=eN&&null!=ec,{environments:tv}=(0,er.s)(tx?ec:null),tb=(0,s.useCallback)(e=>{let t=tv.find(t=>t.metadata?.slug===e.slug);return t?(0,er.B)(t):e.slug},[tv]),tj=eC?.agent,ty=eC?.organization,tk=(0,s.useMemo)(()=>(0,en.g)({agent:tj,organization:ty}),[tj,ty]),tw=(0,s.useMemo)(()=>(0,es.Q)((0,en.g)({own:tf,agent:tj,organization:ty}),tb),[tf,tj,ty,tb]),tN=void 0!==eS,{account:tC}=(0,ee.f)({enabled:tc&&tN}),tS=tC?.metadata?.id??"",tR=!tN||""!==tS&&tS===(ew??""),tM=(0,s.useRef)(tu);tM.current=tu;let tI=(0,s.useRef)(tg);tI.current=tg;let tE=tc&&tR,tA=(0,s.useCallback)(()=>tE?(ta(e=>{let t=e??tM.current;return t.includeMyVault?e:{includeMyVault:!0,vaults:[...t.vaults]}}),!0):tI.current.includeMyVault,[tE]),t$=(0,s.useMemo)(()=>new Set(Q),[]),tL=(0,j.f)(e8?ec??null:null,t$,tg);(0,s.useEffect)(()=>{"ready"===tL.state.status&&(eh?.(tL.state.agentRef),ep?.(tL.state.resolution))},[tL.state,eh,ep]),(0,s.useEffect)(()=>{em?.(tL.state.error??null)},[tL.state.error,em]);let t_=(0,N.f)(eL?{org:ec,sessionId:eS,onValidationError:eO}:void 0),{getByKey:tO,getModel:tT,visionLimits:tP,isLoading:tV}=(0,u.f)(),{defaultModel:tz,getModel:tB}=(0,u.f)({harness:e1}),tD=(0,s.useRef)(e1);(0,s.useEffect)(()=>{if(tD.current===e1||(tD.current=e1,!eU.current||void 0===eF))return;let e=(0,d.E)(eF);(void 0!==e&&e.harness!==e1||void 0===tB(e?.modelId??eF))&&(eU.current=!1,eH(z),eq(void 0),eJ(void 0))},[e1,eF,z,tB]);let tW=void 0!==B&&!eF,tF=(0,s.useMemo)(()=>{let e=eF?tO(eF)??tT(eF):void 0,t=eF,s=e;tW?(t=void 0,s=tB(B.modelName)):Y&&!tV&&void 0===e&&(t=tz?.modelId??eF,s=tz);let n=eY??(tW?B.serviceTier:void 0)??"standard",r=eG??(tW?B.thinkingMode:void 0)??"disabled",i="fast"===n&&s?.serviceTiers.includes(l.o)?"fast":"standard",a=void 0!==s&&((0,o._)(s)||"enabled"===r&&(0,o.u)(s))?"enabled":"disabled";return{modelId:t,model:s,shownServiceTier:n,shownThinkingMode:r,serviceTier:i,thinkingMode:a}},[eF,eY,eG,tW,B,tB,Y,tV,tO,tT,tz]),tH=(0,s.useMemo)(()=>{if(!eL||0===t_.entries.length)return null;let e=(0,g.W)(t_.entries.filter(e=>"preparing"!==e.phase).map(e=>({name:e.file.name,sizeBytes:e.file.size,contentType:e.contentType})),{model:tF.model,limits:tP});return(0,g.h)(e,{limits:tP,modelDisplayName:tF.model?.displayName})},[eL,t_.entries,tF.model,tP]),tU=function(){let[e,t]=(0,s.useState)([]),n=(0,s.useCallback)(e=>{t(t=>t.includes(e)?t:[...t,e])},[]),r=(0,s.useCallback)(e=>{t(t=>{let s=t.filter(t=>t!==e);return s.length===t.length?t:s})},[]),i=(0,s.useCallback)(()=>{t(e=>0===e.length?e:[])},[]);return(0,s.useMemo)(()=>({refs:e,hasRefs:e.length>0,add:n,remove:r,clear:i}),[e,n,r,i])}(),tK=(0,s.useRef)(null),[tY,tq]=(0,s.useState)(!1),[tG,tJ]=(0,s.useState)(!1),tX=(0,s.useCallback)(e=>{e.target.files&&e.target.files.length>0&&t_.addFiles(e.target.files),tK.current&&(tK.current.value="")},[t_]),tZ=(0,s.useCallback)(e=>{if(e.dataTransfer.types.includes(J.C)&&e_&&!e3){e.preventDefault(),e.stopPropagation(),tJ(!0),tq(!0);return}eL&&!e3&&(e.preventDefault(),e.stopPropagation(),tJ(!1),tq(!0))},[eL,e_,e3]),tQ=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),tq(!1),tJ(!1)},[]),t0=(0,s.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),tq(!1),tJ(!1),e3)return;let t=e.dataTransfer.getData(J.C);if(t&&e_){try{let{path:e}=JSON.parse(t);e&&tU.add(e)}catch{}return}eL&&e.dataTransfer.files.length>0&&t_.addFiles(e.dataTransfer.files)},[eL,e_,e3,t_,tU]),t1=(0,s.useCallback)(e=>{let t;if(!eL||e3)return;let s=(t=e.clipboardData?.files)&&0!==t.length?Array.from(t).map(e=>{var t,s;let n,r,i;return e.type.toLowerCase().startsWith("image/")&&(""===e.name||F.test(e.name))?new File([e],(t=e.type,s=new Date,n=e=>String(e).padStart(2,"0"),r=`${n(s.getHours())}${n(s.getMinutes())}${n(s.getSeconds())}`,i=H[t.toLowerCase()]??"png",U+=1,`pasted-image-${r}-${U}.${i}`),{type:e.type,lastModified:e.lastModified}):e}):[];0===s.length||(e.preventDefault(),(0,t_.addFiles)(s,{prepareImages:!0}))},[eL,e3,t_.addFiles]),t5=(0,s.useCallback)((t,s)=>{let n=eL?t_.handOff():null,r=[...n?.fileIds??[],...s?.fileIds??[]],i=r.length>0,a=s?.interactionMode??(V&&T?T:void 0),l=e_&&tU.hasRefs,u=s?.buildFromPlan,g=void 0!==eY?tF.serviceTier:void 0,c=void 0!==eG?tF.thinkingMode:void 0!==tF.modelId&&void 0!==tF.model&&(0,o._)(tF.model)?"enabled":void 0,f=i||a||l||u||g||c||void 0!==ti||tx&&void 0!==tf?{vaults:ti?[...ti.vaults]:void 0,includeMyVault:ti?.includeMyVault,environmentRef:tx?tf:void 0,fileIds:i?r:void 0,files:n&&n.files.length>0?n.files:void 0,releaseFiles:n&&n.fileIds.length>0?n.release:void 0,interactionMode:a,serviceTier:g,thinkingMode:c,workspaceFileRefs:l?[...tU.refs]:void 0,buildFromPlan:u}:void 0;e(t,tF.modelId?(0,d.E)(tF.modelId)?.modelId??tF.modelId:void 0,f),e_&&tU.clear()},[e,tF,eY,eG,eL,t_.handOff,e_,tU.hasRefs,tU.refs,tU.clear,V,T,ti,tx,tf]),t2=(0,i.f)({onSubmit:t5,disabled:e3});(0,s.useImperativeHandle)(eW,()=>({setMessage:t2.setMessage,focus:()=>t2.textareaRef.current?.focus(),submit:(e,t)=>{let s=e.trim();s&&!e3&&t5(s,t)}}),[t2.setMessage,t2.textareaRef,t5,e3]);let t6=(0,s.useCallback)(e=>{tW&&(void 0===eY&&void 0!==B.serviceTier&&eq(B.serviceTier),void 0===eG&&void 0!==B.thinkingMode&&eJ(B.thinkingMode)),eK(e),D?.(e)},[D,tW,B,eY,eG]),t3=(0,s.useCallback)(()=>{eK(void 0),eq(void 0),eJ(void 0),W?.()},[eK,W]),t4=(0,s.useCallback)(e=>{e5(e),_?.(e)},[_]),t8=(0,s.useCallback)(e=>{P?.(e)},[P]),t7=(0,s.useCallback)((e,t)=>{e6(s=>{let n=new Map(s);return n.set(e,t),n})},[]),t9="needsEnvVars"===tL.state.status,se="resolving"===tL.state.status||"submitting"===tL.state.status,st=(0,s.useCallback)(e=>{ts(e),e||"agent"!==tn||"needsEnvVars"===tL.state.status||"submitting"===tL.state.status||tL.reset()},[tn,tL]),ss=(0,s.useCallback)(e=>{"agent"===tn&&"agent"!==e&&"needsEnvVars"!==tL.state.status&&"submitting"!==tL.state.status&&tL.reset(),tr(e)},[tn,tL]),sn=(0,s.useCallback)(async e=>{if(!e){eh?.(null),ep?.(null);return}try{let t=await tL.resolveAgent(e);"ready"===t.status&&(eh?.(t.agentRef),ep?.(t.resolution),t7(`${t.agentRef.org}/${t.agentRef.slug}`,t.agentName),ts(!1))}catch{}},[tL,eh,ep,t7]),sr=(0,s.useCallback)(async e=>{try{let t=await tL.submitEnvVars(e),s=tA();t7(`${t.agentRef.org}/${t.agentRef.slug}`,t.agentName),"ready"===t.status&&(eh?.(t.agentRef),ep?.(t.resolution)),("ready"===t.status||s)&&ts(!1)}catch{}},[tL,tA,eh,ep,t7]),si=(0,s.useRef)(sn);si.current=sn;let sa=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!ex||!e8||!ec||sa.current)return;let e=!1;return sa.current=!0,si.current(ex).catch(()=>{e||(sa.current=!1)}),()=>{e=!0}},[ex,e8,ec]);let sl=(0,s.useRef)(!1);(0,s.useEffect)(()=>{sl.current||!ex||"needsEnvVars"===tL.state.status&&(sl.current=!0,ts(!0),tr("agent"))},[ex,tL.state.status]);let so=(0,s.useRef)(!1);(0,s.useEffect)(()=>{eT&&eT.length>0&&eL&&!so.current&&(so.current=!0,t_.addFiles(eT))},[eT,eL,t_]);let sd=eL&&t_.isUploading,su=t2.canSubmit&&!sd&&void 0===C,sg=t2.canSubmit&&sd,[sc,sf]=(0,s.useState)(!1);(0,s.useEffect)(()=>{sd||sf(!1)},[sd]);let sh=(0,s.useCallback)(e=>{if(A&&$&&"Escape"===e.key){e.preventDefault(),$();return}if(!su&&"Enter"===e.key&&!e.shiftKey){e.preventDefault(),sg&&sf(!0);return}t2.textareaProps.onKeyDown(e)},[su,sg,t2.textareaProps,A,$]),sp=q?.entries.length??0,sm=(0,s.useMemo)(()=>{if(!(sp>0)&&eo&&!el&&eg)return async()=>{let e=await eg();e&&q?.addLocalPath(e)}},[sp,eo,el,eg,q]),sx=(0,s.useMemo)(()=>sp>0?null:el&&!eo?"github":null,[sp,el,eo]),sv=e7?eI?.length??0:0,sb=eA?.length??0,sj=tg.vaults.length+ +!!tg.includeMyVault,sy=(0,s.useMemo)(()=>{let e=[];if(e8){let s=!ef&&("needsEnvVars"===tL.state.status||"resolving"===tL.state.status||"submitting"===tL.state.status);(!eM||s)&&e.push({id:"agent",icon:(0,t.jsx)(ea.g,{}),label:"Agent",count:ef||s?1:0,hasWarning:s&&"needsEnvVars"===tL.state.status})}for(let s of(e7&&e.push({id:"plugins",icon:(0,t.jsx)(v.f,{className:"stg:size-3.5"}),label:"Plugins",count:sv}),te&&e.push({id:"skills",icon:(0,t.jsx)(ea.R,{}),label:"Skills",count:sb}),tc&&e.push({id:"vaults",icon:(0,t.jsx)(ea.u,{}),label:"Vaults",count:sj}),tx&&e.push({id:"environment",icon:(0,t.jsx)(ea.E,{}),label:"Environment",count:+(void 0!==tf),detail:tw}),eR??[]))e.push(s.item);return e},[e8,eM,ef,tL.state,e7,sv,te,sb,tc,sj,tx,tf,tw,eR]),sk=(0,s.useCallback)(e=>{switch(e){case"agent":return t9&&"needsEnvVars"===tL.state.status?(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-3",children:[!tg.includeMyVault&&(0,t.jsx)(ed,{onInclude:tc&&tR?tA:void 0}),tL.state.pendingSignIns.length>0&&(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2",children:[(0,t.jsxs)("p",{className:"stg:text-sm stg:text-foreground",children:[tL.state.agentName," uses tools you have not signed in to yet."]}),(0,t.jsx)("ul",{className:(0,n.f)(b.J,"stg:flex stg:flex-col stg:divide-y stg:divide-border stg:rounded-md stg:border stg:border-border"),"aria-label":"Sign-ins this agent needs",children:tL.state.pendingSignIns.map(e=>(0,t.jsxs)("li",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3 stg:px-3 stg:py-2",children:[(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.name}),(0,t.jsx)(p.f,{org:ec,server:e.server,onSignedIn:e=>{tA(),tL.signInCompleted(e)}})]},e.address))})]}),0===tL.state.pendingSignIns.length&&tL.state.missingVariables.length>0&&(0,t.jsx)(h.f,{agentName:tL.state.agentName,variables:tL.state.missingVariables,onSubmit:sr,onCancel:()=>tL.reset(),isSubmitting:se,disabled:e3}),tL.state.error&&(0,t.jsx)(eu,{error:tL.state.error})]}):(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)(f.f,{org:ec,value:ef??null,onChange:sn,onDisplayNameResolved:t7,disabled:e3||se}),se&&(0,t.jsx)("div",{className:"stg:absolute stg:inset-0 stg:flex stg:items-center stg:justify-center stg:rounded-lg stg:bg-popover/80",children:(0,t.jsx)(ea.h,{})}),tL.state.error&&(0,t.jsx)(eu,{error:tL.state.error})]});case"plugins":return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-3",children:[(0,t.jsx)(x.f,{org:ec,value:eI??[],onChange:eE,onDisplayNameResolved:t7,disabled:e3}),(0,t.jsx)(m.f,{org:ec,plugins:eI??[],onSignedIn:()=>tA()})]});case"skills":return(0,t.jsx)(w.f,{org:ec,value:eA??[],onChange:e$,onDisplayNameResolved:t7,disabled:e3});case"vaults":return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:tR?"This conversation uses exactly these vaults, in order.":"This conversation uses exactly these vaults, in order. Only the person who started it can change them."}),(0,t.jsx)(X.f,{org:ec,value:tg.vaults,onChange:e=>ta({includeMyVault:tg.includeMyVault,vaults:e}),myVault:{checked:tg.includeMyVault,onChange:e=>ta({includeMyVault:e,vaults:[...tg.vaults]})},disabled:e3||!tR})]});case"environment":return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"The packages and network this conversation's sandbox gets. It is fixed once the first message runs."}),(0,t.jsx)(et.f,{org:ec,value:tf,onChange:th,defaultLabel:(0,es.P)(tk,tb),disabled:e3})]});default:return eR?.find(t=>t.item.id===e)?.panel??null}},[eR,tf,tk,tb,t9,tL,se,e3,ec,ef,sn,sr,t7,eI,eE,eA,e$,tg,tc,tR,tA]);return(0,t.jsxs)("div",{role:"form","aria-label":eB,className:(0,n.f)("stg:shrink-0",eD),children:[(0,t.jsxs)("div",{className:(0,n.f)("stg:rounded-xl stg:border stg:border-border stg:bg-card stg:shadow-sm","stg:@container/composer stg:@max-md/composer:rounded-2xl","stg:focus-within:ring-2 stg:focus-within:ring-ring","plan"===T&&"stg:border-primary-muted",e3&&!e4&&"stg:opacity-50",tY&&"stg:ring-2 stg:ring-primary/50"),onDragOver:tZ,onDragLeave:tQ,onDrop:t0,children:[A&&(0,t.jsxs)("div",{role:"status",className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-t-xl stg:border-b stg:border-border stg:bg-muted stg:px-3 stg:py-1.5",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Editing message"}),$&&(0,t.jsxs)(M.W,{children:[(0,t.jsx)(M.y,{render:(0,t.jsx)("button",{type:"button",onClick:$,"aria-label":"Cancel editing",className:"stg:rounded stg:p-0.5 stg:text-muted-foreground stg:transition-colors stg:hover:bg-accent stg:hover:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring"}),children:(0,t.jsx)(ea._,{})}),(0,t.jsx)(M.Y,{side:"top",children:"Cancel editing (Esc)"})]})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("textarea",{...t2.textareaProps,onKeyDown:sh,onPaste:t1,placeholder:eP,rows:eV,autoFocus:ez,className:"stg:block stg:w-full stg:resize-none stg:bg-transparent stg:px-4 stg:pt-3 stg:pb-2 stg:text-sm stg:text-foreground stg:placeholder:text-muted-foreground stg:focus:outline-none stg:disabled:cursor-not-allowed stg:@max-md/composer:min-h-16 stg:@max-md/composer:text-base"}),tY&&(0,t.jsx)("div",{className:"stg:pointer-events-none stg:absolute stg:inset-0 stg:flex stg:items-center stg:justify-center stg:rounded-t-xl stg:bg-primary-subtle",children:(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-primary",children:tG?"Reference workspace file":"Drop files to attach"})})]}),eL&&(0,t.jsx)("input",{ref:tK,type:"file",multiple:!0,onChange:tX,className:"stg:hidden","aria-hidden":"true",tabIndex:-1}),eL&&t_.hasEntries||e_&&tU.hasRefs?(0,t.jsxs)("div",{className:"stg:space-y-1.5 stg:px-3 stg:pb-2",children:[eL&&t_.hasEntries&&(0,t.jsx)(E,{entries:t_.entries,onRemove:t_.removeEntry,onRetry:t_.retryEntry,disabled:e3}),e_&&tU.hasRefs&&(0,t.jsx)(K,{refs:tU.refs,onRemove:tU.remove,disabled:e3})]}):null,sc&&(0,t.jsxs)("div",{role:"status",className:"stg:mx-3 stg:mb-2 stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:bg-muted stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-muted-foreground",children:[(0,t.jsx)(ea.N,{}),(0,t.jsx)("span",{children:t_.isPreparing?"Waiting for files to finish preparing…":"Waiting for files to finish uploading…"})]}),tH&&(0,t.jsxs)("div",{role:"status",className:"stg:mx-3 stg:mb-2 stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:bg-status-degraded-subtle stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-status-degraded",children:[(0,t.jsx)(ea.n,{}),(0,t.jsx)("span",{children:tH})]}),e8&&"needsEnvVars"===tL.state.status&&!ef&&(0,t.jsxs)("div",{role:"status",className:"stg:mx-3 stg:mb-2 stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:bg-status-degraded-subtle stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-status-degraded",children:[(0,t.jsx)(ea.n,{}),(0,t.jsx)("span",{children:"Agent needs configuration before use"}),(0,t.jsx)("button",{type:"button",onClick:()=>{ts(!0),tr("agent")},disabled:e3,className:"stg:ml-auto stg:shrink-0 stg:rounded stg:px-1.5 stg:py-0.5 stg:text-2xs stg:font-medium stg:hover:bg-status-degraded stg:hover:text-status-degraded-foreground stg:disabled:pointer-events-none stg:disabled:opacity-50",children:"Configure"})]}),(0,t.jsx)(a.f,{disabled:e3,isSubmitting:r,canSend:su,sendBlockedReason:C,onSend:t2.submit,onStop:R,isStopping:I,showWorkspace:e9,workspaceCount:sp,onWorkspaceDirectAction:sm,workspaceContent:q?(0,t.jsx)(c.f,{workspace:q,disabled:e3,gitHubConnection:G,enableGitHub:el,enableLocal:eo,onBrowseLocalFolder:eg,initialPanel:sx}):null,showAttach:eL,fileCount:t_.entries.length,onAttachClick:()=>tK.current?.click(),configureItems:sy,configOpen:tt,onConfigOpenChange:st,configActivePanel:tn,onConfigActivePanelChange:ss,renderConfigPanel:sk,showHarnessSelector:O,harness:L,onHarnessChange:t4,showInteractionModePicker:V,interactionMode:T,onInteractionModeChange:t8,showModelSelector:Y,modelId:tF.modelId,modelReadinessOf:S,inheritedModel:B?{modelId:B.modelName,source:"Agent default"}:void 0,onInheritedModelSelect:B?t3:void 0,onModelChange:t6,serviceTier:tF.shownServiceTier,onServiceTierChange:eq,thinkingMode:tF.shownThinkingMode,onThinkingModeChange:eJ})]}),ev&&tg.includeMyVault&&ef&&ec&&(0,t.jsx)(y.f,{agentRef:ef,runOrg:ec,versionHash:eb,className:"stg:mt-2 stg:px-1"})]})}),eo=(0,s.memo)(el);function ed({onInclude:e}){return(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-3 stg:rounded-md stg:border stg:border-border stg:px-3 stg:py-2",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:e?"Keys and sign-ins are saved in My vault, which this conversation does not use yet: a tool that reads Signed in is signed in there. Saving a key or signing in includes it.":"Keys and sign-ins are saved in My vault, which this conversation does not use: a tool that reads Signed in is signed in there. Only the person who started it can change its vaults."}),e&&(0,t.jsx)("button",{type:"button",onClick:e,className:"stg:shrink-0 stg:rounded-md stg:px-2 stg:py-1 stg:text-xs stg:font-medium stg:text-primary stg:hover:bg-accent-hover",children:"Use My vault"})]})}function eu({error:e}){return(0,k.A)(e)?(0,t.jsx)(k.D,{error:e,className:"stg:mt-2"}):(0,t.jsx)("p",{className:"stg:mt-2 stg:text-xs stg:text-destructive",children:(0,r.g)(e)})}e.s(["f",0,eo],570850)},776526,e=>{"use strict";var t=e.i(974265),s=e.i(651023),n=e.i(893976);function r(e,t,s,n){if(e)try{let t=localStorage.getItem(e);if(t){let e=Number(t);if(Number.isFinite(e)&&e>=s&&e<=n)return e}}catch{}return t}e.s(["f",0,function({primary:e,secondary:i,resizablePane:a="secondary",defaultSize:l=384,minSize:o=280,maxSize:d=800,storageKey:u,responsiveCollapse:g="none",collapsedPane:c="none",ariaLabel:f="Resize panel",className:h}){let p="primary"===a,m="none"!==c,[x,v]=(0,s.useState)(()=>r(u,l,o,d)),[b,j]=(0,s.useState)(u),[y,k]=(0,s.useState)(a);(u!==b||a!==y)&&(j(u),k(a),v(r(u,l,o,d)));let w=(0,s.useRef)(null),N=(0,s.useRef)(0),C=(0,s.useRef)(!1),S=(0,s.useCallback)(e=>Math.round(Math.max(o,Math.min(d,e))),[o,d]),R=(0,s.useCallback)(e=>{if(u)try{localStorage.setItem(u,String(e))}catch{}},[u]),M=(0,s.useCallback)(e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),C.current=!0},[]),I=(0,s.useCallback)(e=>{if(!C.current||!w.current)return;let t=e.clientX;cancelAnimationFrame(N.current),N.current=requestAnimationFrame(()=>{let e=w.current;if(!e)return;let s=e.getBoundingClientRect();v(S(p?t-s.left:s.right-t))})},[S,p]),E=(0,s.useCallback)(e=>{C.current&&(C.current=!1,e.currentTarget.releasePointerCapture(e.pointerId),cancelAnimationFrame(N.current),R(x))},[R,x]),A=(0,s.useCallback)(e=>{let t=0;"ArrowLeft"===e.key?t=p?-20:20:"ArrowRight"===e.key&&(t=p?20:-20),0!==t&&(e.preventDefault(),v(e=>{let s=S(e+t);return R(s),s}))},[S,R,p]);(0,s.useEffect)(()=>()=>cancelAnimationFrame(N.current),[]);let $="stg:shrink-0 stg:overflow-hidden",L="stg:min-w-0 stg:flex-1",_="primary"===c?"hidden":"secondary"!==c&&p?$:L,O="secondary"===c?"hidden":"primary"===c||p?L:$;return(0,t.jsxs)("div",{ref:w,className:(0,n.f)("stg:flex stg:min-h-0 stg:flex-1","none"!==g&&"stg:@container/resizable-split",h),children:[(0,t.jsx)("div",{className:(0,n.f)(_,"primary"===g&&"stg:@max-3xl/resizable-split:hidden"),style:p&&!m?{width:x}:void 0,children:e}),(0,t.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-valuenow":x,"aria-valuemin":o,"aria-valuemax":d,"aria-label":f,"aria-hidden":m||void 0,tabIndex:m?-1:0,onPointerDown:M,onPointerMove:I,onPointerUp:E,onKeyDown:A,className:(0,n.f)("stg:group stg:relative stg:z-10 stg:w-1 stg:shrink-0 stg:cursor-col-resize stg:touch-none stg:select-none","stg:bg-border","stg:hover:bg-primary","stg:focus-visible:bg-primary stg:focus-visible:outline-none","stg:active:bg-primary","stg:transition-colors stg:duration-100","none"!==g&&"stg:@max-3xl/resizable-split:hidden",m&&"stg:hidden"),children:(0,t.jsx)("div",{className:"stg:absolute stg:inset-y-0 stg:-left-1.5 stg:-right-1.5"})}),(0,t.jsx)("div",{className:(0,n.f)(O,"secondary"===g&&"stg:@max-3xl/resizable-split:hidden"),style:p||m?void 0:{width:x},children:i})]})}])},796545,503353,e=>{"use strict";var t=e.i(651023);let s={editors:[],activeKey:null,activeFile:null,reveal:null};function n(e,t){return`${e}\0${t}`}let r="\0virtual:";class i{_snapshot=s;_listeners=new Set;_revealSeq=0;openPreview(e,t,s){let r=n(e,t),{editors:i}=this._snapshot,a=this._makeReveal(r,s);if(i.some(e=>n(e.entryId,e.path)===r))return void this._commit(i,r,a);let l={entryId:e,path:t,preview:!0},o=i.findIndex(e=>e.preview),d=o>=0?i.map((e,t)=>t===o?l:e):[...i,l];this._commit(d,r,a)}openPinned(e,t){let s=n(e,t),{editors:r}=this._snapshot,i=r.findIndex(e=>n(e.entryId,e.path)===s);i>=0?r[i].preview?this._commit(r.map((e,t)=>t===i?{...e,preview:!1}:e),s):this._setActive(s):this._commit([...r,{entryId:e,path:t,preview:!1}],s)}pin(e,t){let s=n(e,t),{editors:r}=this._snapshot,i=r.findIndex(e=>n(e.entryId,e.path)===s);!(i<0)&&r[i].preview&&this._commit(r.map((e,t)=>t===i?{...e,preview:!1}:e),s)}activate(e,t){let s=n(e,t);this._snapshot.editors.some(e=>n(e.entryId,e.path)===s)&&this._setActive(s)}close(e,t){let s=n(e,t),{editors:r,activeKey:i}=this._snapshot,a=r.findIndex(e=>n(e.entryId,e.path)===s);if(a<0)return;let l=r.filter((e,t)=>t!==a),o=i;if(i===s){let e=l[a]??l[a-1]??null;o=e?n(e.entryId,e.path):null}this._commit(l,o)}closeAll(){0!==this._snapshot.editors.length&&(this._snapshot=s,this._notify())}subscribe=e=>(this._listeners.add(e),()=>{this._listeners.delete(e)});getSnapshot=()=>this._snapshot;_setActive(e){this._snapshot.activeKey!==e&&this._commit(this._snapshot.editors,e)}_makeReveal(e,t){let s=t?.line;return null==s?null:{key:e,line:s,nonce:++this._revealSeq}}_commit(e,t,s=null){let r=null!=t?e.find(e=>n(e.entryId,e.path)===t)??null:null,i=r?t:null,a=this._snapshot,l=r&&a.activeKey===i&&a.activeFile?a.activeFile:r?{entryId:r.entryId,path:r.path}:null;this._snapshot={editors:e,activeKey:i,activeFile:l,reveal:s},this._notify()}_notify(){for(let e of this._listeners)e()}}e.s(["o",0,i,"z",0,n,"I",0,function(e){return e.startsWith(r)},"h",0,function(e){return`${r}${e}`}],503353),e.s(["d",0,function(e){return(0,t.useSyncExternalStore)(e.subscribe,e.getSnapshot)},"L",0,function(){let e=(0,t.useRef)(null);return e.current||(e.current=new i),e.current}],796545)},748008,e=>{"use strict";var t=e.i(974265),s=e.i(893976),n=e.i(996675);let r=[[85,72,90],[78,65,88,70]];e.s(["f",0,function({className:e}){return(0,t.jsx)(n.f,{className:(0,s.f)("stg:flex stg:flex-col stg:gap-4 stg:pt-6 stg:pb-4",e),label:"Loading conversation",children:(0,t.jsxs)("div",{className:"stg:animate-pulse stg:space-y-4",children:[(0,t.jsx)("div",{className:"stg:ms-[20%] stg:rounded-lg stg:bg-muted-subtle stg:px-4 stg:py-3",children:(0,t.jsx)("div",{className:"stg:h-4 stg:w-3/5 stg:rounded stg:bg-muted"})}),(0,t.jsx)("div",{className:"stg:space-y-2 stg:px-4",children:r[0].map((e,s)=>(0,t.jsx)("div",{className:"stg:h-4 stg:rounded stg:bg-muted",style:{width:`${e}%`}},s))}),(0,t.jsx)("div",{className:"stg:ms-[20%] stg:rounded-lg stg:bg-muted-subtle stg:px-4 stg:py-3",children:(0,t.jsx)("div",{className:"stg:h-4 stg:w-2/5 stg:rounded stg:bg-muted"})}),(0,t.jsx)("div",{className:"stg:space-y-2 stg:px-4",children:r[1].map((e,s)=>(0,t.jsx)("div",{className:"stg:h-4 stg:rounded stg:bg-muted",style:{width:`${e}%`}},s))})]})})}])},24458,e=>{"use strict";var t=e.i(974265),s=e.i(893976),n=e.i(776526);e.s(["f",0,function({conversation:e,panel:r,chip:i,headerActions:a,splitStorageKey:l,responsive:o=!0,resizeAriaLabel:d="Resize chat panel",className:u}){let g=null!=r;return(0,t.jsx)("div",{className:(0,s.f)("stg:relative stg:flex stg:h-full stg:w-full stg:flex-col",u),children:(0,t.jsx)(n.f,{resizablePane:"primary",collapsedPane:g?"none":"secondary",defaultSize:420,minSize:320,maxSize:640,storageKey:l,responsiveCollapse:o&&g?"primary":"none",ariaLabel:d,className:"stg:min-h-0 stg:flex-1",primary:(0,t.jsxs)("div",{className:"stg:flex stg:h-full stg:min-w-0 stg:flex-col",children:[(null!=a||null!=i)&&(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:justify-end stg:gap-2 stg:px-4 stg:pt-2",children:[a,i]}),(0,t.jsx)("div",{className:"stg:min-h-0 stg:flex-1",children:e})]}),secondary:r})})}])},387880,e=>{"use strict";let t={integrator:!0,observer:!0,endUser:!1,guest:!1};e.s(["W",0,function(e){return"guest"!==e},"w",0,function(e){return t[e]}])},849756,e=>{"use strict";var t=e.i(836959);e.s(["f",0,function(e,s){let n=(0,t.c)(e);return"chosen"===n.kind||void 0===s?n:{kind:s}}])},442346,155917,381399,178583,109107,326454,e=>{"use strict";var t=e.i(974265),s=e.i(651023);let n="Assistant";function r(e){return e&&"Auto-created session"!==e?e:null}e.s(["F",0,n,"L",0,function(e,t){let s=t?.trim();return s?{...e,"stigmer.ai/session-context":s}:e},"m",0,r],155917);var i=e.i(504788),a=e.i(170255),l=e.i(174886),o=e.i(475254);let d=(0,o.f)("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);e.s(["f",0,d],381399);let u=(0,o.f)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["f",0,u],178583);var g=e.i(210731),c=e.i(934197),f=e.i(653650),h=e.i(891287),p=e.i(414385),m=e.i(269285),x=e.i(400553),v=e.i(577817),b=e.i(214254),j=e.i(786477),y=e.i(984073),k=e.i(647767),w=e.i(823363);let N=new Map,C=new Map;for(let e of y.R.oneofs.find(e=>"event"===e.name)?.fields??[]){let t=function(e){let t=(0,k.R)(e,w.Z);if(""===t)throw Error(`SessionEvent member '${e.name}' declares no event_type`);return t}(e);N.set(e.localName,t),C.set(t,e.localName)}function S(e){var t,s;let n,r=void 0===e.event.case?void 0:R.get(e.event.case);if(void 0===r||void 0===e.event.value)throw Error("a session event must hold an event");let i={...(t=r,s=e.event.value,n=(0,p.Z)(t,s,{useProtoFieldName:!0}),function e(t,s,n){for(let r of t.fields){if(!(0,j.f)(s,r)){!0===r.proto.proto3Optional&&(n[r.name]=null);continue}if(void 0===r.message||r.message.typeName.startsWith("google.protobuf."))continue;let t=s[r.localName],i=n[r.name];"message"===r.fieldKind?e(r.message,t,i):"list"===r.fieldKind&&Array.isArray(i)&&t.forEach((t,s)=>{e(r.message,t,i[s])})}}(t,s,n),n),type:function(e){let t=void 0===e.event.case?void 0:N.get(e.event.case);if(void 0===t)throw Error("a session event must hold an event");return t}(e)};return"userMessage"===e.event.case&&""===e.event.value.processedAt&&(i.processed_at=null),i}[...C.keys()];let R=new Map;for(let e of y.R.oneofs.find(e=>"event"===e.name)?.fields??[])void 0!==e.message&&R.set(e.localName,e.message);var M=e.i(205413),I=e.i(781126);async function E(e,t,s){let[n,r,i]=await Promise.all([e.session.get(t),A(e,t),$(e,t)]),a=function(e,t,s,n){let r=n?.includeSuperseded===!0,i=(0,I.s)(s),a=new Map(s.map(e=>[e.metadata?.id??"",e])),l=new Map;for(let e of t){let t=l.get(e.runId);void 0===t?l.set(e.runId,[e]):t.push(e)}let o=[];for(let e of(0,b.p)(t).turns){let t=i.has(e.runId);if(t&&!r)continue;let s=a.get(e.runId),n=void 0!==s&&(0,I.b)(s);o.push({runId:e.runId,turn:e,events:l.get(e.runId)??[],userPrompt:function(e,t){let s=e.userMessage?.text??"";return""===s||"execute"===s||t?null:s}(e,n),isBuildFromPlan:n,superseded:t,inProgress:!e.ended,startedAt:s?.status?.startedAt||void 0})}return{session:e,turns:o,resolvedOutputs:n?.resolvedOutputs??{},includesSuperseded:r}}(n,i,r,{includeSuperseded:s?.includeSuperseded});if(s?.resolveOutputs===!1)return a;let l=await L(e,a.turns.map(e=>e.turn),{concurrency:s?.concurrency});return{...a,resolvedOutputs:l}}async function A(e,t){let s=[];for await(let n of(0,M.Y)(s=>e.run.listBySession((0,h.f)(m.u,{sessionId:t,pageSize:100,pageToken:s}))))s.push(n);return s}async function $(e,t){let s=[],n="";do{let r=await e.session.listEvents((0,h.f)(v.p,{sessionId:t,pageSize:1e3,pageToken:n}));s.push(...r.events),n=r.nextPageToken}while(""!==n)return s}async function L(e,t,s){let n=new Map;for(let e of t)for(let t of function* e(t){for(let s of t)"tool_use"===s.kind&&(yield s,void 0!==s.thread&&(yield*e(s.thread.items)))}(e.items))void 0!==t.fullOutput&&""!==t.fullOutput.storageKey&&n.set(t.fullOutput.storageKey,{runId:t.runId,full:t.fullOutput});let r={},i=new TextDecoder("utf-8",{fatal:!1});return await _([...n.values()],s?.concurrency??4,async({runId:t,full:s})=>{let n={storageKey:s.storageKey,mimeType:s.mimeType,isImage:s.isImage,totalSizeBytes:Number(s.sizeBytes)};if(s.isImage){r[s.storageKey]={...n,truncated:!1};return}try{let a=await e.run.getArtifactContent((0,h.f)(m.B,{runId:t,storageKey:s.storageKey}));r[s.storageKey]={...n,content:i.decode(a.content),truncated:a.truncated,totalSizeBytes:Number(a.totalSizeBytes)}}catch(e){r[s.storageKey]={...n,truncated:!1,error:e instanceof Error?e.message:String(e)}}}),r}async function _(e,t,s){let n=e.values(),r=Array.from({length:Math.max(1,Math.min(t,e.length))},async()=>{for(let e of n)await s(e)});await Promise.all(r)}function O(e,t){let{session:s,turns:n,resolvedOutputs:l}=e,o=[],d=s.metadata?.id??"",u=r(s.spec?.subject)??`Session ${d}`;o.push(`# ${u}`,""),o.push(`- Session: \`${d}\``);let g=s.spec?.agentRef;for(let[s,r]of((0,i.Q)(g)?o.push(`- Agent: ${(0,i.$)(a.X.agent)}`):void 0!==g&&""!==g.slug&&o.push(`- Agent: \`${g.org}/${g.slug}\``),o.push(`- Turns: ${n.length}`),e.includesSuperseded&&o.push("- Includes superseded (edited-and-resubmitted) turns"),t?.generatedAt&&o.push(`- Exported: ${t.generatedAt}`),n.entries())){o.push("","---",""),o.push(`## Turn ${s+1}${r.startedAt?` \xb7 ${r.startedAt}`:""}`),r.superseded&&o.push("","_Superseded by an edited resubmission._"),r.inProgress&&o.push("","_In progress at export time — content is what the log held then._"),r.isBuildFromPlan&&o.push("","_Build from plan._"),null!==r.userPrompt&&o.push("","**User**","",r.userPrompt),function e(t,s,n){for(let r of s)switch(r.kind){case"message":r.text.trim()&&t.push("","**Assistant**","",r.text);continue;case"thinking":t.push("","**Thinking**","",V(r.text));continue;case"note":t.push("","**System**","",V(r.text));continue;case"compacted":t.push("","_Context compacted._");continue;case"user_message":t.push("","**User**","",r.text);continue;case"tool_use":void 0!==r.thread?function(t,s,n,r){let i=[],a=n.agentName||"subagent",l=P(s.processedAt,s.result?.processedAt);i.push(`**Subagent — ${a}**${l?` (${l})`:""}`),n.input&&i.push("","Input:","",n.input),e(i,n.items,r),n.reply&&i.push("",..."failed"===n.state?["Error:","",z(n.reply)]:["Output:","",n.reply]),"stopped"===n.state&&i.push("","_Stopped before it finished._"),t.push("",V(i.join("\n")))}(t,r,r.thread,n):function(e,t,s){let n=t.mcpServerName?`${t.mcpServerName}/${t.name}`:t.name;e.push("",`**Tool — \`${n}\`**${function(e){let t=[T[e.state]],s=P(e.processedAt,e.result?.processedAt);return s&&t.push(s),` (${t.join(" · ")})`}(t)}`);let r=JSON.stringify(t.input,null,2);for(let s of("{}"!==r&&e.push("",z(r,"json")),function(e){let t=[];return void 0!==e.ask&&t.push(`_Asked for approval${e.ask.message?`: ${e.ask.message}`:""}._`),e.confirmation?.result==="deny"?t.push(`_Denied${e.confirmation.denyMessage?`: ${e.confirmation.denyMessage}`:""}._`):void 0!==e.grant?t.push("_Allowed, with every call of its class for the rest of the turn._"):void 0!==e.confirmation&&t.push("_Allowed._"),t}(t)))e.push("",s);let i=function(e,t){let s=e.result?.text||void 0,n=e.fullOutput;if(void 0===n||""===n.storageKey)return{text:s};if(n.isImage)return{note:`Image output (${n.mimeType||"image"}, ${Number(n.sizeBytes)} bytes) — not inlined.`};let r=t[n.storageKey];return r?.content!==void 0?{text:r.content,note:r.truncated?`Output truncated at ${r.content.length} of ${r.totalSizeBytes} bytes (server content cap).`:void 0}:{text:s,note:r?.error?`Offloaded output unavailable (${r.error}) — showing its head.`:"Offloaded output not resolved — showing its head."}}(t,s);i.note&&e.push("",`_${i.note}_`),i.text&&e.push("",...t.result?.isError?["Error:",""]:[],z(i.text))}(t,r,n);continue;default:throw Error(`unknown turn item ${String(r)}`)}}(o,r.turn.items,l);let{turn:e}=r;void 0!==e.structuredOutput&&o.push("","**Structured output**","",z(JSON.stringify(e.structuredOutput,null,2),"json"));let t=e.status?.error??"";for(let s of e.errors)s.message!==t&&o.push("",`**Error** (\`${s.type}\`)`,"",V(s.message));t&&o.push("","**Run error**","",V(t))}return o.push(""),o.join("\n")}let T={running:"running",waiting:"waiting for approval",completed:"completed",failed:"failed",denied:"denied",stopped:"stopped"};function P(e,t){if(!e||!t)return null;let s=Date.parse(e),n=Date.parse(t);if(Number.isNaN(s)||Number.isNaN(n)||n<s)return null;let r=n-s;return r<1e3?`${r}ms`:`${(r/1e3).toFixed(1)}s`}function V(e){return e.split("\n").map(e=>e.length>0?`> ${e}`:">").join("\n")}function z(e,t=""){let s=0;for(let t of e.matchAll(/`+/g))t[0].length>s&&(s=t[0].length);let n="`".repeat(Math.max(3,s+1));return`${n}${t}
|
|
2
|
+
${e}
|
|
3
|
+
${n}`}var B=e.i(846696),D=e.i(255817),W=e.i(745176),F=e.i(367539),H=e.i(781836);function U(e,t){let n=(0,D.f)(),i=t?.includeSuperseded===!0,[a,l]=(0,s.useState)(!1),[o,d]=(0,s.useState)(null),u=(0,s.useCallback)(()=>e?E(n,e,{includeSuperseded:i}):Promise.reject(Error("Cannot export a transcript without a session id. Pass the session's id to useExportTranscript once the session exists.")),[n,e,i]),g=(0,s.useCallback)(async()=>{d(null),l(!0);let e=u().then(e=>O(e,{generatedAt:new Date().toISOString()}));try{"u">typeof ClipboardItem&&navigator.clipboard?.write?await navigator.clipboard.write([new ClipboardItem({"text/plain":e.then(e=>new Blob([e],{type:"text/plain"}))})]):await navigator.clipboard.writeText(await e),B.c.success("Transcript copied to clipboard")}catch(t){let e=(0,H.f)(t);d(e),B.c.error(`Couldn't copy the transcript: ${e.message}`)}finally{l(!1)}},[u]),c=(0,s.useCallback)(async e=>{d(null),l(!0);try{var t;let s,n,i=await u(),{content:a,extension:l,mimeType:o}=e(i);(0,W.a)(a,`${(t=i,n=(s=r(t.session.spec?.subject))?(0,F.f)(s).slice(0,60):"",`${n||t.session.metadata?.id||"session"}-transcript`)}.${l}`,o)}catch(t){let e=(0,H.f)(t);d(e),B.c.error(`Couldn't export the transcript: ${e.message}`)}finally{l(!1)}},[u]),f=(0,s.useCallback)(()=>c(e=>({content:O(e,{generatedAt:new Date().toISOString()}),extension:"md",mimeType:"text/markdown"})),[c]),h=(0,s.useCallback)(()=>c(e=>({content:JSON.stringify(function(e){let t=e.turns.map(e=>({run_id:e.runId,user_prompt:e.userPrompt,build_from_plan:e.isBuildFromPlan||void 0,superseded:e.superseded||void 0,in_progress:e.inProgress||void 0,started_at:e.startedAt,events:e.events.filter(e=>void 0!==e.event.case).map(S)})),s={};for(let[t,n]of Object.entries(e.resolvedOutputs))s[t]={storage_key:n.storageKey,content:n.content,truncated:n.truncated||void 0,total_size_bytes:n.totalSizeBytes,mime_type:n.mimeType,is_image:n.isImage||void 0,error:n.error};return{format:"stigmer.ai/session-transcript/v3",session:(0,p.Z)(x.t,e.session,{useProtoFieldName:!0}),includes_superseded:e.includesSuperseded,turns:t,resolved_outputs:s}}(e),null,2),extension:"json",mimeType:"application/json"})),[c]);return(0,s.useMemo)(()=>({copyMarkdown:g,downloadMarkdown:f,downloadJson:h,isExporting:a,error:o}),[g,f,h,a,o])}e.s(["f",0,U],109107);var K=e.i(893976);function Y({heading:e,count:s,annotation:n,children:r}){return(0,t.jsxs)("section",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsxs)("h3",{className:"stg:px-2 stg:text-2xs stg:font-semibold stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:[e,null!=s&&s>0&&(0,t.jsxs)("span",{className:"stg:ml-1 stg:text-muted-foreground-faint",children:["(",s,")"]}),n&&(0,t.jsxs)("span",{className:"stg:ml-1 stg:font-normal stg:normal-case stg:tracking-normal stg:text-muted-foreground-faint",children:["(",n,")"]})]}),r]})}function q({children:e,meta:s,actions:n,className:r}){return(0,t.jsxs)("div",{className:(0,K.f)("stg:group stg:flex stg:items-center stg:gap-2 stg:px-2 stg:py-1 stg:text-xs",r),children:[(0,t.jsx)("span",{className:"stg:flex stg:min-w-0 stg:flex-1 stg:items-center stg:gap-2 stg:text-foreground",children:e}),s&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-2xs stg:text-muted-foreground",children:s}),n]})}let G=(0,K.f)("stg:flex stg:w-full stg:min-w-0 stg:items-center stg:gap-2 stg:px-2 stg:py-1 stg:text-left stg:text-xs stg:text-muted-foreground stg:transition-colors","stg:hover:bg-muted stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50");function J({onClick:e,label:s}){return(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":s,className:(0,K.f)("stg:flex stg:shrink-0 stg:items-center stg:text-muted-foreground stg:opacity-0 stg:transition-opacity","stg:group-hover:opacity-100 stg:focus-visible:opacity-100","stg:hover:text-destructive","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:(0,t.jsx)(Q,{})})}function X({children:e}){return(0,t.jsx)("p",{className:"stg:px-2 stg:text-xs stg:text-muted-foreground-faint",children:e})}function Z({label:e,labelId:s,children:n}){return(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:px-2 stg:py-1 stg:text-xs",children:[(0,t.jsx)("span",{id:s,className:"stg:shrink-0 stg:text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-1.5 stg:truncate stg:text-foreground",children:n})]})}function Q(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M4 4L10 10M10 4L4 10"})})}function ee({harness:e,executionTarget:n,modelId:r,environment:i,autoApprove:a,curated:l=!1}){let o=(0,s.useId)();return(0,t.jsxs)(Y,{heading:"Run Config",children:[!l&&(0,t.jsx)(Z,{label:"Harness",children:g.H[e]?.label??e}),r&&(0,t.jsx)(Z,{label:"Model",children:r}),!l&&n&&(0,t.jsx)(Z,{label:"Target",children:"local"===n?"Local":"Cloud"}),!l&&i&&(0,t.jsx)(Z,{label:"Environment",children:(0,f.Q)(i)}),a&&(0,t.jsx)(Z,{label:"Auto-approve",labelId:o,children:(0,t.jsx)(c.f,{checked:a.armed,onCheckedChange:a.onChange,"aria-labelledby":o})})]})}function et(e,t){return(0,i.Q)(t)?(0,i.$)(e):t.slug}function es(e,t){return(0,i.Q)(e)?`deleted/${t}`:`${e.org}/${e.slug}`}function en({agentRef:e,onRemove:s}){return(0,t.jsx)(Y,{heading:"Agent",children:e?(0,t.jsx)(q,{actions:s?(0,t.jsx)(J,{onClick:s,label:`Remove agent ${et(a.X.agent,e)}`}):void 0,children:(0,t.jsx)("span",{className:"stg:truncate",children:et(a.X.agent,e)})}):(0,t.jsx)(q,{meta:"built-in",children:(0,t.jsx)("span",{className:"stg:truncate",children:n})})})}function er({pluginRefs:e,onRemove:s}){return(0,t.jsx)(Y,{heading:"Plugins",count:e.length,children:e.length>0?e.map((e,n)=>(0,t.jsx)(q,{actions:s?(0,t.jsx)(J,{onClick:()=>s(e),label:`Remove plugin ${et(a.X.plugin,e)}`}):void 0,children:(0,t.jsx)("span",{className:"stg:truncate",children:et(a.X.plugin,e)})},es(e,n))):(0,t.jsx)(X,{children:"No plugins attached."})})}function ei({skillRefs:e,onRemove:s}){return(0,t.jsx)(Y,{heading:"Skills",count:e.length,children:e.length>0?e.map((e,n)=>(0,t.jsx)(q,{actions:s?(0,t.jsx)(J,{onClick:()=>s(e),label:`Remove skill ${et(a.X.skill,e)}`}):void 0,children:(0,t.jsx)("span",{className:"stg:truncate",children:et(a.X.skill,e)})},es(e,n))):(0,t.jsx)(X,{children:"No skills attached."})})}function ea({sessionId:e}){let s=U(e);return(0,t.jsxs)(Y,{heading:"Transcript",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>void s.copyMarkdown(),disabled:s.isExporting,className:G,children:[(0,t.jsx)(l.f,{className:"stg:size-3.5 stg:shrink-0","aria-hidden":"true"}),"Copy transcript"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>void s.downloadMarkdown(),disabled:s.isExporting,className:G,children:[(0,t.jsx)(u,{className:"stg:size-3.5 stg:shrink-0","aria-hidden":"true"}),"Download Markdown"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>void s.downloadJson(),disabled:s.isExporting,className:G,children:[(0,t.jsx)(d,{className:"stg:size-3.5 stg:shrink-0","aria-hidden":"true"}),"Download JSON"]})]})}e.s(["T",0,G,"w",0,X,"f",0,Z,"I",0,J,"o",0,q,"Z",0,Y],326454),e.s(["S",0,ee,"I",0,function({agentRef:e,pluginRefs:s,skillRefs:n,harness:r,executionTarget:i,modelId:a,environment:l,autoApprove:o,sessionId:d,mutations:u,accessSlot:g}){return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-5",children:[(0,t.jsx)(ee,{harness:r,executionTarget:i,modelId:a,environment:l,autoApprove:o}),(0,t.jsx)(en,{agentRef:e,onRemove:u?.onRemoveAgent}),(0,t.jsx)(er,{pluginRefs:s,onRemove:u?.onRemovePlugin}),(0,t.jsx)(ei,{skillRefs:n,onRemove:u?.onRemoveSkill}),d&&(0,t.jsx)(ea,{sessionId:d}),g&&(0,t.jsx)("section",{children:g})]})}],442346)},297098,e=>{"use strict";var t=e.i(651023);let s=(0,t.createContext)(null);e.s(["b",0,s,"E",0,function(){return(0,t.useContext)(s)}])},900950,894696,e=>{"use strict";var t=e.i(503353);let s=(0,t.h)("plan");e.s(["$",0,s,"H",0,"Plan"],900950);let n=(0,t.h)("file");e.s(["f",0,n],894696)},1449,e=>{"use strict";e.s(["f",0,function(e){if("fast"===e.serviceTier&&!e.modelName)throw Error('SessionRunConfig: serviceTier "fast" requires modelName — the fast tier is a per-model price and Auto (no pinned model) has no tier dimension. Pin the model the surface should run.');if("enabled"===e.thinkingMode&&!e.modelName)throw Error('SessionRunConfig: thinkingMode "enabled" requires modelName — thinking is a per-model capability and Auto (no pinned model) has no variant dimensions. Pin the model the surface should run.')}])},844243,e=>{"use strict";var t=e.i(974265),s=e.i(651023),n=e.i(210731),r=e.i(452637),i=e.i(836959),a=e.i(816418),l=e.i(849756),o=e.i(442346);function d({session:e,...s}){let n=(0,a.a)(),r=e?.status?.environment,u=e?.status?.environmentSource,g=void 0===u?void 0:(0,l.f)({environment:r,environmentSource:u},(0,i.f)(n,s.executionTarget));return(0,t.jsx)(o.S,{...s,environment:g})}function u(e){let s=e.curated?void 0:n.H[e.harness]?.label??e.harness,i=e.curated?void 0:"local"===e.executionTarget?"Local":"cloud"===e.executionTarget?"Cloud":void 0,a=e.autoApprove?.armed===!0;return{item:{id:"run-settings",icon:(0,t.jsx)(r.S,{}),label:"Run settings",count:+!!a,detail:[s,i,a?"auto-approve on":void 0].filter(Boolean).join(" · ")},panel:(0,t.jsx)(o.S,{...e})}}e.s(["M",0,u,"z",0,function(e,n,r){let i=e.model[0]??e.agentRunDefaults?.modelName,{harness:a,executionTarget:l,autoApproveAll:o,setAutoApproveAll:g}=e,c=e.conv.session;return(0,s.useMemo)(()=>{let e=n?{armed:o,onChange:g}:void 0;return{item:u({harness:a,executionTarget:l,modelId:i,environment:void 0,autoApprove:e,curated:r}).item,panel:(0,t.jsx)(d,{harness:a,executionTarget:l,modelId:i,autoApprove:e,curated:r,session:c})}},[a,l,i,o,g,n,r,c])}])},293022,e=>{"use strict";let t={completed:"Done",failed:"Failed",cancelled:"Stopped",terminated:"Stopped"};e.s(["f",0,function(e){return t[e]??"Ended"}])},70514,e=>{"use strict";var t=e.i(651023),s=e.i(557702),n=e.i(210731);let r={stigmer:"stigmer:session:model",claude:"stigmer:session:model:claude"};function i(e=n.a){return r[e]}let a=()=>{};e.s(["O",0,i,"P",0,function(e){let n=e?.harness,r=e?.enabled??!0,{getModel:l}=(0,s.f)({harness:n}),o=i(n),d=(0,t.useRef)(o),[u,g]=(0,t.useState)(()=>{if(r)return localStorage.getItem(o)||void 0});return((0,t.useEffect)(()=>{r&&d.current!==o&&(d.current=o,g(localStorage.getItem(o)||void 0))},[r,o]),(0,t.useEffect)(()=>{r&&u&&localStorage.setItem(o,u)},[r,u,o]),r)?[u&&l(u)?u:void 0,g]:[void 0,a]}])},806095,190831,305279,e=>{"use strict";var t=e.i(651023),s=e.i(300868),n=e.i(796545),r=e.i(900950),i=e.i(894696);e.s(["f",0,function({phase:e,hasChanges:a,planKey:l=null,planKeyReady:o=!0,defaultView:d="files",open:u,defaultOpen:g=!1,onOpenChange:c}){let f=(0,n.L)(),h=void 0!==u,[p,m]=(0,t.useState)(g),x=h?u:p,v=(0,t.useRef)(c);v.current=c;let b=(0,t.useRef)(h);b.current=h;let j=(0,t.useRef)(x);j.current=x;let y=(0,t.useCallback)(e=>{j.current!==e&&(b.current||(j.current=e,m(e)),v.current?.(e))},[]),[k,w]=(0,t.useState)(d),N=(0,t.useRef)(!1),[C,S]=(0,t.useState)(e);if(e!==C){let t=null!==C&&(0,s.f)(C),n=null!==e&&(0,s.f)(e);S(e),t!==n&&(N.current=!1,w(d))}let[R,M]=(0,t.useState)(a);a!==R&&(M(a),a&&x&&!N.current&&w("changes"));let I=(0,t.useCallback)(()=>{f.openPinned(r.$,r.H),y(!0)},[f,y]),E=(0,t.useRef)(l),A=(0,t.useRef)(o);(0,t.useEffect)(()=>{if(!o||!A.current){A.current=o,E.current=l;return}l!==E.current&&(E.current=l,null!==l&&I())},[l,o,I]);let $=(0,t.useCallback)(()=>y(!0),[y]),L=(0,t.useCallback)(()=>y(!1),[y]),_=(0,t.useCallback)(e=>{N.current=!0,w(e)},[]),O=(0,t.useCallback)((e,t,s)=>{f.openPreview(e,t,s),y(!0)},[f,y]),T=(0,t.useCallback)(e=>{f.openPreview(i.f,e),y(!0)},[f,y]),P=(0,t.useCallback)(e=>{f.pin(i.f,e)},[f]),V=(0,t.useCallback)((e,t)=>f.activate(e,t),[f]),z=(0,t.useCallback)((e,t)=>f.pin(e,t),[f]),B=(0,t.useCallback)((e,t)=>f.close(e,t),[f]);return(0,t.useMemo)(()=>({editorsStore:f,isOpen:x,view:k,openPanel:$,closePanel:L,setView:_,openFile:O,activateEditor:V,pinEditor:z,closeEditor:B,openPlanDocument:I,openFileDocument:T,pinFileDocument:P}),[f,x,k,$,L,_,O,V,z,B,I,T,P])}],806095);var a=e.i(974265),l=e.i(893976),o=e.i(188482);function d({open:e}){return(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,a.jsx)("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"1.5"}),(0,a.jsx)("path",{d:"M9.5 2.5v11"}),e&&(0,a.jsx)("rect",{x:"9.5",y:"2.5",width:"5",height:"11",rx:"1.5",fill:"currentColor",stroke:"none"})]})}function u(){return(0,a.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0 stg:text-status-ready","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),(0,a.jsx)("path",{d:"m9 12 2 2 4-4"})]})}e.s(["f",0,function({isOpen:e,onToggle:s,badgeCount:n}){let r=!e&&null!=n&&n>0,i=(0,t.useRef)(null),u=(0,t.useRef)(e);return(0,t.useEffect)(()=>{u.current&&!e&&document.activeElement===document.body&&i.current?.focus(),u.current=e},[e]),(0,a.jsxs)(o.W,{children:[(0,a.jsxs)(o.y,{render:(0,a.jsx)("button",{ref:i,type:"button",onClick:s,"aria-expanded":e,"aria-label":e?"Hide panel":"Show panel",className:(0,l.f)("stg:flex stg:items-center stg:gap-1.5 stg:rounded-md stg:border stg:border-border stg:bg-card stg:px-1.5 stg:py-1","stg:text-muted-foreground stg:transition-colors stg:hover:bg-muted stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring")}),children:[r&&(0,a.jsx)("span",{"aria-label":`${n} new items`,className:"stg:inline-flex stg:min-w-[1rem] stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-1 stg:py-px stg:text-2xs stg:font-medium stg:leading-none stg:text-primary-foreground",children:n}),(0,a.jsx)(d,{open:e})]}),(0,a.jsx)(o.Y,{side:"top",children:e?"Hide panel":"Show panel"})]})}],190831),e.s(["f",0,function({onTurnOff:e}){return(0,a.jsxs)("div",{role:"status",className:"stg:flex stg:items-center stg:gap-2 stg:border-t stg:border-border-muted stg:px-4 stg:py-1.5 stg:text-xs stg:text-muted-foreground",children:[(0,a.jsx)(u,{}),(0,a.jsxs)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate",children:[(0,a.jsx)("span",{children:"Auto-approving tool calls for this session"}),(0,a.jsx)("span",{children:"; hooks and tool lists still apply"})]}),(0,a.jsx)("button",{type:"button",onClick:e,className:"stg:shrink-0 stg:rounded stg:font-medium stg:text-foreground stg:underline-offset-2 stg:hover:underline stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",children:"Turn off"})]})}],305279)},615132,e=>{"use strict";var t=e.i(651023);e.s(["f",0,function(e){let[s,n]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let t=URL.createObjectURL(e);return n(t),()=>URL.revokeObjectURL(t)},[e]),s}])},300868,e=>{"use strict";var t=e.i(394327);let s=new Set([t.A.RUN_COMPLETED,t.A.RUN_FAILED,t.A.RUN_CANCELLED,t.A.RUN_TERMINATED]);t.A.RUN_PENDING,t.A.RUN_IN_PROGRESS,t.A.RUN_WAITING_FOR_APPROVAL,t.A.RUN_PAUSED,t.A.RUN_COMPLETED,t.A.RUN_FAILED,t.A.RUN_CANCELLED,t.A.RUN_TERMINATED,e.s(["f",0,function(e){return s.has(e)}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,311015,e=>{"use strict";var s=e.i(974265),t=e.i(893976),r=e.i(65642),n=e.i(651023),i=e.i(475254);let a=(0,i.f)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),l=(0,i.f)("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),g=(0,i.f)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var o=e.i(63209);let d="stg:h-10 stg:w-10";e.s(["f",0,function({variant:e,resourceLabel:i,icon:c,title:u,description:m,errorMessage:x,action:h,children:f,className:p}){let v=function(e){let{variant:s,resourceLabel:t="resources",title:r,description:i,errorMessage:c}=e;return(0,n.useMemo)(()=>{let e=function(e,s){switch(e){case"first-use":return{title:`No ${s} yet`,description:`Create ${"agents"===s?"an agent":`a ${s.replace(/s$/,"")}`} to get started.`};case"zero-results":return{title:"No results found",description:"Try adjusting your search or filters."};case"permission":return{title:`No access to ${s}`,description:"You don't have permission to view these resources. Contact your organization admin."};case"error":return{title:"Something went wrong",description:"We couldn't load this content. Please try again."}}}(s,t);return{title:r??e.title,description:"error"===s&&c?c:i??e.description,defaultIcon:function(e){switch(e){case"first-use":return(0,n.createElement)(a,{className:d});case"zero-results":return(0,n.createElement)(l,{className:d});case"permission":return(0,n.createElement)(g,{className:d});case"error":return(0,n.createElement)(o.f,{className:d})}}(s),role:"error"===s?"alert":"status"}},[s,t,r,i,c])}({variant:e,resourceLabel:i,title:u,description:m,errorMessage:x});return(0,s.jsxs)("div",{role:v.role,className:(0,t.f)("stg:flex stg:flex-col stg:items-center stg:gap-3 stg:py-12 stg:text-center",p),children:[(0,s.jsx)("div",{className:"stg:text-muted-foreground-faint",children:c??v.defaultIcon}),(0,s.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,s.jsx)("p",{className:"stg:m-0 stg:text-sm stg:font-medium stg:text-muted-foreground",children:v.title}),(0,s.jsx)("p",{className:"stg:m-0 stg:max-w-sm stg:text-xs stg:text-muted-foreground",children:v.description})]}),f?(0,s.jsx)("div",{className:"stg:mt-1",children:f}):h&&(0,s.jsx)(r.f,{variant:"error"===e?"outline":"primary",icon:h.icon,onClick:h.onClick,className:"stg:mt-1",children:h.label})]})}],311015)},476007,e=>{"use strict";var s=e.i(974265),t=e.i(651023),r=e.i(610595),n=e.i(893976);let i={auth:"Authentication required",permission:"Access denied","not-found":"Not found",validation:"Invalid request",server:"Server error",unavailable:"Service unavailable",cancelled:"Request cancelled",unknown:"Something went wrong"};function a({className:e}){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M7.13 2.5a1 1 0 0 1 1.74 0l5.5 9.5A1 1 0 0 1 13.5 13.5h-11a1 1 0 0 1-.87-1.5l5.5-9.5z"}),(0,s.jsx)("path",{d:"M8 6v3"}),(0,s.jsx)("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor",stroke:"none"})]})}function l({className:e}){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M8 1.5l5 2v4c0 3.5-2.5 5.5-5 6.5-2.5-1-5-3-5-6.5v-4l5-2z"}),(0,s.jsx)("path",{d:"M6 6.5l4 4M10 6.5l-4 4"})]})}function g({className:e}){return(0,s.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:(0,s.jsx)("path",{d:"M4 6l4 4 4-4"})})}function o({className:e}){return(0,s.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M2 6.5h4v-4"}),(0,s.jsx)("path",{d:"M3.5 11.5a5.5 5.5 0 1 0 .5-6l-2 1"})]})}e.s(["f",0,function({error:e,title:d,retry:c,className:u}){let[m,x]=(0,t.useState)(!1);if(!e)return null;let h=(0,r.V)(e),f=(0,r.g)(e),p=(0,r.X)(e),v=(0,r.f)(e);return(0,s.jsx)("div",{role:"alert",className:(0,n.f)("stg:bg-destructive-subtle stg:border-destructive/20 stg:text-destructive stg:rounded-lg stg:border stg:p-4",u),children:(0,s.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:["auth"===h||"permission"===h?(0,s.jsx)(l,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}):(0,s.jsx)(a,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,s.jsxs)("div",{className:"stg:min-w-0 stg:flex-1 stg:space-y-1",children:[(0,s.jsx)("p",{className:"stg:text-sm stg:font-medium",children:d??i[h]}),(0,s.jsx)("p",{className:"stg:m-0 stg:text-destructive stg:text-sm",children:f}),p&&(0,s.jsxs)("div",{className:"stg:pt-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>x(e=>!e),className:"stg:text-destructive stg:hover:underline stg:inline-flex stg:items-center stg:gap-1 stg:text-xs stg:transition-colors",children:[(0,s.jsx)(g,{className:(0,n.f)("stg:size-3 stg:transition-transform",m&&"stg:rotate-180")}),"Technical details"]}),m&&(0,s.jsxs)("dl",{className:"stg:text-destructive stg:mt-1.5 stg:space-y-0.5 stg:font-mono stg:text-xs",children:[(0,s.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,s.jsx)("dt",{className:"stg:shrink-0",children:"Method:"}),(0,s.jsx)("dd",{className:"stg:truncate",children:p.method})]}),(0,s.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,s.jsx)("dt",{className:"stg:shrink-0",children:"Path:"}),(0,s.jsx)("dd",{className:"stg:truncate",children:p.path})]})]})]})]}),c&&v&&(0,s.jsxs)("button",{type:"button",onClick:c,className:(0,n.f)("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1.5 stg:rounded-md stg:border stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:border-destructive/20 stg:text-destructive stg:hover:bg-destructive-subtle","stg:transition-colors"),children:[(0,s.jsx)(o,{className:"stg:size-3"}),"Retry"]})]})})}])},630983,e=>{"use strict";var s=e.i(974265),t=e.i(893976);function r({className:e}){return(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"6.25"}),(0,s.jsx)("path",{d:"M8 7v4"}),(0,s.jsx)("circle",{cx:"8",cy:"5",r:"0.5",fill:"currentColor",stroke:"none"})]})}e.s(["f",0,function({children:e,className:n}){return(0,s.jsxs)("div",{role:"status",className:(0,t.f)("stg:bg-muted-subtle stg:text-muted-foreground stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-transparent stg:px-4 stg:py-3",n),children:[(0,s.jsx)(r,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,s.jsx)("p",{className:"stg:text-xs stg:leading-relaxed",children:e})]})}])},921321,e=>{"use strict";e.s(["f",0,function(e){return{org:e.org,slug:e.id?"":e.slug,...e.id?{id:e.id}:{},...e.version?{version:e.version}:{}}}])},513512,e=>{"use strict";var s=e.i(974265);e.s(["f",0,function({what:e,onRetry:t}){return(0,s.jsxs)("p",{className:"stg:m-0 stg:text-2xs stg:text-muted-foreground",role:"status",children:["Could not check whether you may ",e,"."," ",(0,s.jsx)("button",{type:"button",onClick:t,className:"stg:cursor-pointer stg:border-0 stg:bg-transparent stg:p-0 stg:text-2xs stg:font-medium stg:text-foreground stg:underline stg:underline-offset-2",children:"Try again"})]})}])},66724,e=>{"use strict";var s=e.i(974265),t=e.i(893976);e.s(["f",0,function({title:e,description:r,actions:n,headingLevel:i=1,headingId:a,className:l}){return(0,s.jsxs)("header",{className:(0,t.f)("stg:flex stg:flex-col stg:gap-1",l),children:[(0,s.jsxs)("div",{className:"stg:flex stg:min-h-8 stg:flex-wrap stg:items-center stg:justify-between stg:gap-x-6 stg:gap-y-2",children:[(0,s.jsx)(1===i?"h1":"h2",{id:a,className:"stg:m-0 stg:text-xl stg:font-semibold stg:tracking-tight stg:text-foreground",children:e}),null!=n&&!1!==n&&(0,s.jsx)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-2",children:n})]}),null!=r&&(0,s.jsx)("p",{className:"stg:m-0 stg:max-w-2xl stg:text-sm stg:text-muted-foreground",children:r})]})}])},193251,e=>{"use strict";var s=e.i(974265),t=e.i(311015);e.s(["H",0,"Ask one of them if this organization needs one.","j",0,function({what:e}){return(0,s.jsx)(t.f,{variant:"first-use",title:"No organization selected",description:`Choose an organization to see ${e}.`,className:"stg:rounded-lg stg:border stg:border-dashed stg:border-border"})}])},182647,e=>{"use strict";var s=e.i(974265),t=e.i(651023),r=e.i(893976),n=e.i(610595),i=e.i(430182),a=e.i(313488),l=e.i(891287),g=e.i(321417),o=e.i(827917),d=e.i(170255),c=e.i(255817),u=e.i(781836);function m(e){let s=e?.spec?.embedding;return{allowedOrigins:[...s?.allowedOrigins??[]],createAccountsOnSignIn:s?.createAccountsOnSignIn??!1,signInRole:s?.signInRole??i.M.iam_role_unspecified,vaults:(s?.vaults??[]).map(e=>({org:e.org,slug:e.slug,...e.id?{id:e.id}:{},...e.version?{version:e.version}:{}}))}}var x=e.i(803874),h=e.i(513512),f=e.i(934197),p=e.i(937719),v=e.i(379410),b=e.i(734433),j=e.i(476007),N=e.i(869803),y=e.i(921321);let k=[{value:i.M.iam_role_unspecified,label:"None"},{value:i.M.viewer,label:"Viewer"},{value:i.M.member,label:"Member"},{value:i.M.admin,label:"Admin"}],w=(0,r.f)("stg:min-w-0 stg:flex-1 stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50");function C({org:e,serviceAccountsHref:r,onUpdated:n,className:i}){let{organization:l,isLoading:g,error:o,refetch:d}=(0,a.f)(e||null),[c,u]=(0,t.useState)(!1),h=(0,x.f)(e?{kind:"organization",id:e}:null,"can_edit",{fail:"closed"}),f=!h.isLoading&&h.allowed,p=!h.isLoading&&null!==h.error,v=!h.isLoading&&!p&&!h.allowed;return g&&!l?(0,s.jsx)(b.SettingsSkeleton,{label:"Loading embedding settings",rows:2,className:i}):o?(0,s.jsx)(j.f,{error:o,title:"The embedding settings could not be read",retry:d,className:i}):l?(0,s.jsx)(S,{org:e,stored:m(l),canEdit:f,editDenied:v,checkFailed:p,onRetryCheck:h.refetch,serviceAccountsHref:r,saved:c,onSavedChange:u,refetch:d,onUpdated:n,className:i},JSON.stringify(m(l))):null}function S({org:e,stored:a,canEdit:m,editDenied:x,checkFailed:b,onRetryCheck:j,serviceAccountsHref:C,saved:A,onSavedChange:O,refetch:z,onUpdated:I,className:M}){let L=(0,t.useId)(),$=`${L}-create-accounts`,R=`${L}-role`,{updateEmbedding:E,isUpdating:_,error:T,clearError:W}=function(){let e=(0,c.f)(),[s,r]=(0,t.useState)(!1),[n,a]=(0,t.useState)(null),m=(0,t.useCallback)(()=>a(null),[]);return{updateEmbedding:(0,t.useCallback)(async(s,t)=>{r(!0),a(null);try{return await e.organization.updateEmbedding((0,l.f)(g.Z,{orgId:s,embedding:(0,l.f)(o.r,{allowedOrigins:[...t.allowedOrigins],createAccountsOnSignIn:t.createAccountsOnSignIn,signInRole:t.createAccountsOnSignIn?t.signInRole:i.M.iam_role_unspecified,vaults:t.vaults.map(e=>({kind:d.X.vault,org:e.org??"",slug:e.slug,id:e.id??"",version:e.version??""}))})}))}catch(e){throw a((0,u.f)(e)),e}finally{r(!1)}},[e]),isUpdating:s,error:n,clearError:m}}(),[B,q]=(0,t.useState)(a),[V,P]=(0,t.useState)(""),D=(0,t.useCallback)(e=>{q(s=>({...s,...e})),O(!1),W()},[W,O]),H=(0,t.useCallback)(()=>{let e=V.trim();""===e||B.allowedOrigins.includes(e)||D({allowedOrigins:[...B.allowedOrigins,e]}),P("")},[V,B.allowedOrigins,D]),F=(0,t.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),H())},[H]),K=(0,t.useCallback)(e=>{D({createAccountsOnSignIn:e,...e?{}:{signInRole:i.M.iam_role_unspecified}})},[D]),U=(0,t.useCallback)(async s=>{s.preventDefault(),O(!1);try{let s=await E(e,{...B,vaults:B.vaults.map(y.f)});O(!0),z(),I?.(s)}catch{}},[e,B,E,O,z,I]),J=_||!m;return(0,s.jsxs)("form",{className:(0,r.f)("stg:flex stg:flex-col stg:gap-5",M),onSubmit:e=>void U(e),children:[(0,s.jsxs)("p",{className:"stg:text-2xs stg:leading-snug stg:text-muted-foreground",children:["Your product's backend signs its users in to this organization by minting a token for each, with the API key of a service account that is an admin here.",m&&void 0!==C&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsx)("a",{href:C,className:"stg:text-primary stg:underline stg:underline-offset-2 stg:hover:text-primary-hover",children:"Manage service accounts"}),"."]})]}),(0,s.jsxs)("fieldset",{className:(0,r.f)(N.n,"stg:space-y-2.5"),disabled:J,children:[(0,s.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Sign-in"}),(0,s.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-3",children:[(0,s.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,s.jsx)("span",{id:`${$}-title`,className:"stg:block stg:text-xs stg:text-foreground",children:"Create accounts on sign-in"}),(0,s.jsx)("p",{id:`${$}-description`,className:"stg:text-2xs stg:leading-snug stg:text-muted-foreground",children:"Create a person's Stigmer account the first time a token is minted for them. When off, the account must already exist."})]}),(0,s.jsx)(f.f,{id:$,checked:B.createAccountsOnSignIn,onCheckedChange:K,disabled:J,"aria-labelledby":`${$}-title`,"aria-describedby":`${$}-description`})]}),(0,s.jsxs)("div",{className:"stg:space-y-1",children:[(0,s.jsx)("label",{htmlFor:R,className:"stg:text-xs stg:text-foreground",children:"Sign-in role"}),(0,s.jsx)("select",{id:R,value:String(B.signInRole),onChange:e=>D({signInRole:Number(e.target.value)}),disabled:J||!B.createAccountsOnSignIn,"aria-describedby":`${R}-hint`,className:(0,r.f)(w,"stg:w-full"),children:k.map(e=>(0,s.jsx)("option",{value:String(e.value),children:e.label},e.value))}),(0,s.jsx)("p",{id:`${R}-hint`,className:"stg:text-2xs stg:text-muted-foreground",children:"Granted on this organization when a sign-in creates an account; None grants nothing. Accounts that already exist keep the roles they hold."})]})]}),(0,s.jsxs)("fieldset",{className:(0,r.f)(N.n,"stg:space-y-2"),disabled:J,children:[(0,s.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Allowed origins"}),(0,s.jsx)("p",{className:"stg:text-2xs stg:text-muted-foreground",children:"Web pages whose origin is listed here may use the tokens. Leave empty to allow every origin."}),(0,s.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,s.jsx)("input",{type:"text",value:V,onChange:e=>P(e.target.value),onKeyDown:F,placeholder:"https://app.example.com","aria-label":"Add an allowed origin",disabled:J,className:w}),(0,s.jsx)("button",{type:"button",onClick:H,disabled:J||""===V.trim(),className:(0,r.f)("stg:shrink-0 stg:rounded-md stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50 stg:transition-colors"),children:"Add"})]}),B.allowedOrigins.length>0&&(0,s.jsx)("ul",{className:(0,r.f)(N.J,"stg:flex stg:flex-wrap stg:gap-1.5"),"aria-label":"Allowed origins",children:B.allowedOrigins.map(e=>(0,s.jsxs)("li",{className:"stg:inline-flex stg:items-center stg:gap-1 stg:rounded-full stg:border stg:border-border-muted stg:bg-muted-subtle stg:px-2 stg:py-0.5 stg:font-mono stg:text-2xs stg:text-foreground",children:[e,m&&(0,s.jsx)("button",{type:"button",onClick:()=>D({allowedOrigins:B.allowedOrigins.filter(s=>s!==e)}),disabled:_,"aria-label":`Remove ${e}`,className:"stg:text-muted-foreground stg:hover:text-destructive stg:transition-colors",children:"×"})]},e))})]}),(0,s.jsxs)("fieldset",{className:(0,r.f)(N.n,"stg:space-y-2"),disabled:J,children:[(0,s.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Vaults"}),(0,s.jsx)("p",{className:"stg:text-2xs stg:text-muted-foreground",children:"Shared vaults whose keys the conversations of people signed in from your product use, in order."}),(0,s.jsx)(p.f,{org:e,value:B.vaults,onChange:e=>D({vaults:e}),disabled:J})]}),T&&(0,s.jsx)("p",{className:"stg:text-2xs stg:text-destructive",role:"alert",children:(0,n.g)(T)}),m?(0,s.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,s.jsxs)("button",{type:"submit",disabled:_,className:(0,r.f)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-40"),children:[_&&(0,s.jsx)(v.f,{size:12}),"Save"]}),A&&!_&&(0,s.jsx)("span",{className:"stg:text-2xs stg:text-muted-foreground",role:"status",children:"Saved"})]}):x?(0,s.jsx)("p",{className:"stg:text-2xs stg:text-muted-foreground",children:"Only organization admins can change these settings."}):b?(0,s.jsx)(h.f,{what:"change these settings",onRetry:j}):null]})}var A=e.i(297629),O=e.i(294470),z=e.i(193251),I=e.i(365785);e.s(["OrgEmbeddingSection",0,function({serviceAccountsHref:e=O.j}={}){let{activeOrg:t}=(0,A.S)(),r=t?.metadata?.id??"";return(0,s.jsx)(I.f,{title:"Embedding",description:"How people sign in to this organization from your own product.",children:r?(0,s.jsx)(C,{org:r,serviceAccountsHref:e}):(0,s.jsx)(z.j,{what:"its embedding settings"})})}],182647)},365785,e=>{"use strict";var s=e.i(974265),t=e.i(651023),r=e.i(893976),n=e.i(311015),i=e.i(630983),a=e.i(66724);e.s(["f",0,function({title:e,description:l,actions:g,unavailable:o,denied:d=!1,children:c,className:u}){let m=(0,t.useId)(),x=!0===d?{title:`Only an admin can open ${e}`,description:"Ask an owner or an admin of this organization."}:d||null,h=!!o||null!==x;return(0,s.jsxs)("section",{"aria-labelledby":m,className:(0,r.f)("stg:flex stg:flex-col stg:gap-6",u),children:[(0,s.jsx)(a.f,{title:e,description:l,actions:h?void 0:g,headingLevel:2,headingId:m}),o?(0,s.jsx)(i.f,{children:o}):null!==x?(0,s.jsx)(n.f,{variant:"permission",title:x.title,description:x.description,className:"stg:rounded-lg stg:border stg:border-border"}):c]})}])},734433,e=>{"use strict";var s=e.i(974265),t=e.i(893976),r=e.i(996675);e.s(["SettingsSkeleton",0,function({label:e="Loading",variant:n="rows",rows:i,className:a}){return"figures"===n?(0,s.jsxs)(r.f,{label:e,className:(0,t.f)("stg:flex stg:flex-col stg:gap-4",a),children:[(0,s.jsx)("div",{className:"stg:grid stg:grid-cols-1 stg:gap-3 stg:sm:grid-cols-3","aria-hidden":"true",children:Array.from({length:i??3},(e,t)=>(0,s.jsxs)("span",{className:"stg:flex stg:h-20 stg:flex-col stg:justify-center stg:gap-2 stg:rounded-lg stg:border stg:border-border stg:bg-card stg:px-4",children:[(0,s.jsx)("span",{className:"stg:h-2.5 stg:w-20 stg:animate-pulse stg:rounded stg:bg-muted-subtle"}),(0,s.jsx)("span",{className:"stg:h-5 stg:w-24 stg:animate-pulse stg:rounded stg:bg-muted"})]},t))}),(0,s.jsx)("span",{className:"stg:block stg:h-40 stg:animate-pulse stg:rounded-lg stg:border stg:border-border stg:bg-card","aria-hidden":"true"})]}):(0,s.jsx)(r.f,{label:e,className:(0,t.f)("stg:overflow-hidden stg:rounded-lg stg:border stg:border-border stg:bg-card",a),children:(0,s.jsx)("ul",{className:"stg:m-0 stg:list-none stg:divide-y stg:divide-border stg:p-0","aria-hidden":"true",children:Array.from({length:i??4},(e,t)=>(0,s.jsxs)("li",{className:"stg:flex stg:items-center stg:gap-3 stg:px-4 stg:py-3",children:[(0,s.jsx)("span",{className:"stg:size-8 stg:shrink-0 stg:animate-pulse stg:rounded-full stg:bg-muted"}),(0,s.jsxs)("span",{className:"stg:flex stg:flex-1 stg:flex-col stg:gap-1.5",children:[(0,s.jsx)("span",{className:"stg:h-3 stg:w-40 stg:max-w-full stg:animate-pulse stg:rounded stg:bg-muted"}),(0,s.jsx)("span",{className:"stg:h-2.5 stg:w-64 stg:max-w-full stg:animate-pulse stg:rounded stg:bg-muted-subtle"})]}),(0,s.jsx)("span",{className:"stg:h-5 stg:w-14 stg:shrink-0 stg:animate-pulse stg:rounded-full stg:bg-muted"})]},t))})})}])}]);
|