decocms 2.277.0 → 2.278.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CDrkM01U.js → AlertCircle-DUgLKRqD.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-D40KhznE.js → ArrowNarrowLeft-kCQ-qIL4.js} +1 -1
- package/dist/client/assets/{CheckCircle-BTIsSwsN.js → CheckCircle-DGqHVO6J.js} +1 -1
- package/dist/client/assets/{ChevronDown-CYdW9NBw.js → ChevronDown-B24A-aAH.js} +1 -1
- package/dist/client/assets/{ChevronRight-YkSQYi3B.js → ChevronRight-te-i08ST.js} +1 -1
- package/dist/client/assets/{ChevronUp-BcPC1hCC.js → ChevronUp-ClIw8oee.js} +1 -1
- package/dist/client/assets/{Container-ChD3KoS4.js → Container-BEpzzcWb.js} +1 -1
- package/dist/client/assets/{LinkExternal01-l0w4_WlJ.js → LinkExternal01-DGR8dD9K.js} +1 -1
- package/dist/client/assets/{Lock01-CmojMPTn.js → Lock01-CgN6byUv.js} +1 -1
- package/dist/client/assets/{Palette-D4s8zWmN.js → Palette-hGvX_iIm.js} +1 -1
- package/dist/client/assets/{Play-CiTVDuYt.js → Play-B45MhCGv.js} +1 -1
- package/dist/client/assets/{Plus-CVdax6FK.js → Plus-DEi1gvs0.js} +1 -1
- package/dist/client/assets/{SearchMd-DJ0JdIz3.js → SearchMd-Bb-t_BjN.js} +1 -1
- package/dist/client/assets/{Settings02-D-hypCbK.js → Settings02-DqmMmEZU.js} +1 -1
- package/dist/client/assets/{Star01-Vcjv0Tzc.js → Star01-ByFKZL35.js} +1 -1
- package/dist/client/assets/{Sun-51uZR1E5.js → Sun-BSLTRNwf.js} +1 -1
- package/dist/client/assets/{Tool01-DCaYwllU.js → Tool01-A2H1ijQd.js} +1 -1
- package/dist/client/assets/{Trash01-D5ZS0TOT.js → Trash01-Dtv8SktB.js} +1 -1
- package/dist/client/assets/{Upload01-CBYhGwn0.js → Upload01-BnthyrUJ.js} +1 -1
- package/dist/client/assets/{User01-Dq3q9cE-.js → User01-B6A46HmV.js} +1 -1
- package/dist/client/assets/{Users03-BIYd5t8v.js → Users03-SGJicyFL.js} +1 -1
- package/dist/client/assets/{X-D_4PiiTE.js → X-ZYbgpGnr.js} +1 -1
- package/dist/client/assets/{XCircle-rGav0QLs.js → XCircle-CQXPNkKc.js} +1 -1
- package/dist/client/assets/{Zap-qFCEz_qt.js → Zap-CT4bYj4K.js} +1 -1
- package/dist/client/assets/{ZapSquare-BYfCzFpy.js → ZapSquare-BIpgOhjL.js} +1 -1
- package/dist/client/assets/{accordion-C_FjDGY7.js → accordion-DlHNJyYy.js} +1 -1
- package/dist/client/assets/{agent-icon-31CiXnkF.js → agent-icon-BPm7_0O4.js} +1 -1
- package/dist/client/assets/{agents-list-kGMjebHK.js → agents-list-DDy9vjua.js} +1 -1
- package/dist/client/assets/ai-providers-B4zJ5gIB.js +1 -0
- package/dist/client/assets/{alert-dialog-BpydK2MI.js → alert-dialog-BYfF9kq9.js} +1 -1
- package/dist/client/assets/{auth-catchall-I0vdEcHs.js → auth-catchall-IXiVEa8k.js} +1 -1
- package/dist/client/assets/{automation-list-row-mTTWiKQ6.js → automation-list-row-DdODiuWb.js} +1 -1
- package/dist/client/assets/{automations-Z179s9qX.js → automations-DaQmwJ_-.js} +1 -1
- package/dist/client/assets/{avatar-BVvDTfBW.js → avatar-Cd7pOZ3k.js} +1 -1
- package/dist/client/assets/{badge-BhfSxzi-.js → badge-XxgdnuAZ.js} +1 -1
- package/dist/client/assets/{brand-context-Bn_7uvJT.js → brand-context-gdbCtW1V.js} +1 -1
- package/dist/client/assets/{card-BAp6Jwgi.js → card-ohyYL2jd.js} +1 -1
- package/dist/client/assets/{chat-context-Dp5HM8R-.js → chat-context-BBBi8D2H.js} +1 -1
- package/dist/client/assets/{checkbox-BhkHXCse.js → checkbox-CV6BjILT.js} +1 -1
- package/dist/client/assets/{collection-detail-Bm3mvhEG.js → collection-detail-BDC-qOMT.js} +1 -1
- package/dist/client/assets/{collection-display-button-jqECsu1f.js → collection-display-button-Dzc3fhoU.js} +1 -1
- package/dist/client/assets/{collection-search-C0B93tJw.js → collection-search-RK7vbvUN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bf17fkBP.js → collection-table-wrapper-DSiZO_Rx.js} +1 -1
- package/dist/client/assets/{collection-tabs-CMC3SILy.js → collection-tabs-BThF2_kc.js} +1 -1
- package/dist/client/assets/{collections-DIuw_dNV.js → collections-D4PM7cfP.js} +1 -1
- package/dist/client/assets/{command-CRMnQTof.js → command-D-rn-MCf.js} +1 -1
- package/dist/client/assets/{connection-card-CJ6uOT9E.js → connection-card-C77H1oWc.js} +1 -1
- package/dist/client/assets/{connection-detail-Dj-OLW3C.js → connection-detail-B3eR0g_I.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CDPt3S_P.js → connection-form-helpers-C9kgqFQD.js} +1 -1
- package/dist/client/assets/{connections-aYS5E8PJ.js → connections-DLnzLvDf.js} +1 -1
- package/dist/client/assets/{constants-BG70AVFL.js → constants-CBMPX4Nz.js} +1 -1
- package/dist/client/assets/{constants-CdNdiXMf.js → constants-DV3gfGwj.js} +1 -1
- package/dist/client/assets/{dialog-C0FUDu40.js → dialog-LWRIZTr3.js} +1 -1
- package/dist/client/assets/{drawer-D4_wXu6X.js → drawer-D1pg0ocH.js} +1 -1
- package/dist/client/assets/{dropdown-menu-aG44dJsz.js → dropdown-menu-DLn7MpGb.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-pzG9mWCw.js → dynamic-plugin-layout-BSXEX5vh.js} +1 -1
- package/dist/client/assets/{empty-state-BjAjwUcB.js → empty-state-DkrYdGBA.js} +1 -1
- package/dist/client/assets/{empty-state-BGqwS_3w.js → empty-state-t8Y8fpWZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CAAXAkZY.js → extract-connection-data-BhJroSSL.js} +1 -1
- package/dist/client/assets/{features-DCfAHIGS.js → features-B5cMQOy4.js} +1 -1
- package/dist/client/assets/{form-BQFhlKGv.js → form-DYWw7BDT.js} +1 -1
- package/dist/client/assets/{general-0YlUSUig.js → general-Bx99MR-8.js} +1 -1
- package/dist/client/assets/{index-CoTOPljc.js → index-9mpD21lu.js} +1 -1
- package/dist/client/assets/{index-CEQG3Gi2.js → index-BAPPcxpC.js} +1 -1
- package/dist/client/assets/{index-EE9r4ne7.js → index-CAeiwvn1.js} +2 -2
- package/dist/client/assets/{index-C6SXa4V4.js → index-CTb5Ivgi.js} +1 -1
- package/dist/client/assets/{index-mdSoEPSF.js → index-DNVFRTN5.js} +1 -1
- package/dist/client/assets/{index-DRjT3wqk.js → index-DQr1bBCj.js} +3 -3
- package/dist/client/assets/{index-CIlSPTSj.js → index-DphB1nct.js} +1 -1
- package/dist/client/assets/{index-CN1oVHjb.js → index-Ds-JIDUi.js} +4 -4
- package/dist/client/assets/{index-NYDZhYFt.js → index-RqKqA1J6.js} +1 -1
- package/dist/client/assets/{index-BRiQU6du.js → index-dR4PVdxt.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BQYXKuj2.js → infiniteQueryObserver-DgmIeDDw.js} +1 -1
- package/dist/client/assets/{input-r_oEqK-V.js → input-bSmRFU9Y.js} +1 -1
- package/dist/client/assets/{integration-icon-BKKqOsd5.js → integration-icon-BCfLG4yN.js} +1 -1
- package/dist/client/assets/{label-CenAgqhm.js → label-DHm3L_Pw.js} +1 -1
- package/dist/client/assets/{layout-DB6YepVn.js → layout-Bi-oKYFz.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-TnasvQfT.js → lean-canvas-recruit-modal-Y-73eqIT.js} +1 -1
- package/dist/client/assets/{login-DDMVtz0x.js → login-oTC9k0u0.js} +1 -1
- package/dist/client/assets/{members-BH6aFn0i.js → members-DXtluaQF.js} +1 -1
- package/dist/client/assets/{monaco-editor-C3TYqqnp.js → monaco-editor-J6gXCbSf.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DosCpU_L.js → monitoring-stats-row-COftXD12.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DjkxS6zo.js → oauth-callback-ai-provider-BG5KUhrn.js} +1 -1
- package/dist/client/assets/{oauth-callback-BV7Kg1aN.js → oauth-callback-iJ681_o2.js} +1 -1
- package/dist/client/assets/{onboarding-DmzJa5qN.js → onboarding-CaPHCpYM.js} +1 -1
- package/dist/client/assets/{org-layout-D05CVA_8.js → org-layout-tpbZft4k.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-Cv_313Tb.js → org-plugin-layout-DKUGssvU.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CQeGBgOP.js → plugin-empty-state-CjLoe77j.js} +1 -1
- package/dist/client/assets/{plugin-header-BXYsY1_p.js → plugin-header-D-DgJiT_.js} +1 -1
- package/dist/client/assets/{plugin-layout-Do_Ws-WY.js → plugin-layout-BxoJjnAH.js} +1 -1
- package/dist/client/assets/{popover-BktSfQG9.js → popover-QXf8PVl2.js} +1 -1
- package/dist/client/assets/{profile-BSS2RbEG.js → profile-BXxDmHas.js} +1 -1
- package/dist/client/assets/project-app-view-CpeukqHC.js +1 -0
- package/dist/client/assets/registry-BwQkRfy5.js +2 -0
- package/dist/client/assets/{registry-layout-B0UM9hrK.js → registry-layout-Dp1ULu6N.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C6TLzB3T.js → required-auth-layout-BQkYfP3n.js} +1 -1
- package/dist/client/assets/{reset-password-BV1UW9SB.js → reset-password-CU4ON9vN.js} +1 -1
- package/dist/client/assets/{scroll-area-C6ws31M0.js → scroll-area-CM6U9wSm.js} +1 -1
- package/dist/client/assets/{search-input-Dxw50-Fc.js → search-input-D1anatj6.js} +1 -1
- package/dist/client/assets/{select-DMKL-iI9.js → select-DE9H0LNP.js} +1 -1
- package/dist/client/assets/{select-model-D2d213qn.js → select-model-C72ySuI7.js} +1 -1
- package/dist/client/assets/{settings-layout-BBdiRp4e.js → settings-layout-BcGWWnw4.js} +1 -1
- package/dist/client/assets/{shell-layout-CDe1Q4z8.js → shell-layout-DbjX6AWI.js} +1 -1
- package/dist/client/assets/{skeleton-C8k5qVSG.js → skeleton-DJZQh5Pk.js} +1 -1
- package/dist/client/assets/{sso-CChrq6HN.js → sso-330TvduR.js} +1 -1
- package/dist/client/assets/{store-Dk4svl-0.js → store-CValARVk.js} +1 -1
- package/dist/client/assets/store-registry-DxTZD8aD.js +2 -0
- package/dist/client/assets/{switch-BlmZa3uf.js → switch-DXZpP3PP.js} +1 -1
- package/dist/client/assets/{table-omg9OiL8.js → table-BC1vaa2h.js} +1 -1
- package/dist/client/assets/{tabs-ZI6fRQkw.js → tabs-y_vyQ1bZ.js} +1 -1
- package/dist/client/assets/{task-status-erNd2Sbl.js → task-status-u0ZgPY9s.js} +31 -31
- package/dist/client/assets/{textarea-CpW5pfml.js → textarea-BKBUm0h-.js} +1 -1
- package/dist/client/assets/{toggle-group-By5F9baT.js → toggle-group-BGNuzMLR.js} +1 -1
- package/dist/client/assets/{tools-list-2T2hc8nL.js → tools-list-DnYw-GLl.js} +1 -1
- package/dist/client/assets/{types-BOQuLrVp.js → types-_e2R6uHw.js} +14 -14
- package/dist/client/assets/{use-ai-providers-CITI1iNq.js → use-ai-providers-DA7fBB8t.js} +1 -1
- package/dist/client/assets/{use-collections-CRzXRke9.js → use-collections-B56DgGhQ.js} +1 -1
- package/dist/client/assets/{use-connection-CeSGdaGP.js → use-connection-DmlqhQzU.js} +1 -1
- package/dist/client/assets/{use-copy-DGEKKbaG.js → use-copy-yDy37O6x.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-UIh1S6RD.js → use-create-virtual-mcp-St-hxc3T.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CN7YV5I-.js → use-decopilot-events-C6hMvsnN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DeXytvwf.js → use-delete-connection-9Vw8o7eu.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DjXaeUEQ.js → use-infinite-scroll-BDoBJohW.js} +1 -1
- package/dist/client/assets/{use-list-state-UZMoJUvO.js → use-list-state-BSaQM_cf.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BKQPDk4x.js → use-mcp-tools-CrNS6JKZ.js} +1 -1
- package/dist/client/assets/{use-members-afZV5Me8.js → use-members-CuGMiyzy.js} +1 -1
- package/dist/client/assets/{use-mobile-DP4MR1ix.js → use-mobile-Dcrjnr8n.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C0iuNKaP.js → use-navigate-to-agent-CK6LXIOn.js} +1 -1
- package/dist/client/assets/{use-org-sso-B4mWsSMh.js → use-org-sso-CDZI8wr6.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CcvcpCtE.js → use-organization-settings-Dz4Ob_xk.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bj_DPVwf.js → use-registry-connections-C4iSg1no.js} +1 -1
- package/dist/client/assets/{use-status-sounds-ChUYFOhF.js → use-status-sounds-BpX9On4z.js} +1 -1
- package/dist/client/assets/{use-tasks-DGmrkFpo.js → use-tasks-B1E3D-6c.js} +1 -1
- package/dist/client/assets/{use-view-mode-zFqL6G4U.js → use-view-mode-OuDPu3JY.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Dn9ixQmR.js → use-virtual-mcp-C84ySRY_.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C63zt5p0.js +1 -0
- package/dist/client/assets/{user-D7q59BB0.js → user-D-ueNiJ9.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BTfIGFL4.js → view-mode-toggle-JzxZIaam.js} +1 -1
- package/dist/client/assets/{workflow-DXb2lFI1.js → workflow-DILBdxqV.js} +1 -1
- package/dist/client/assets/workflow-detail-CbBLr-jD.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/deepmerge/.editorconfig +7 -0
- package/dist/server/node_modules/deepmerge/.eslintcache +1 -0
- package/dist/server/node_modules/deepmerge/changelog.md +167 -0
- package/dist/server/node_modules/deepmerge/dist/cjs.js +133 -0
- package/dist/server/node_modules/deepmerge/dist/umd.js +139 -0
- package/dist/server/node_modules/deepmerge/index.d.ts +20 -0
- package/dist/server/node_modules/deepmerge/index.js +106 -0
- package/dist/server/node_modules/{postgres-bytea/license → deepmerge/license.txt} +1 -1
- package/dist/server/node_modules/deepmerge/package.json +42 -0
- package/dist/server/node_modules/deepmerge/readme.md +264 -0
- package/dist/server/node_modules/deepmerge/rollup.config.js +22 -0
- package/dist/server/node_modules/onetime/index.d.ts +64 -0
- package/dist/server/node_modules/onetime/index.js +44 -0
- package/dist/server/node_modules/onetime/package.json +43 -0
- package/dist/server/node_modules/onetime/readme.md +94 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-Bykzb-xW.js +0 -1
- package/dist/client/assets/project-app-view-B_z1QorU.js +0 -1
- package/dist/client/assets/registry-B_QfL3wE.js +0 -2
- package/dist/client/assets/store-registry-DNqLsJlQ.js +0 -2
- package/dist/client/assets/useInfiniteQuery-7hq96Va6.js +0 -1
- package/dist/client/assets/workflow-detail-CC_ctEsy.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/package.json +0 -54
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
- package/dist/server/node_modules/figures/index.d.ts +0 -279
- package/dist/server/node_modules/figures/index.js +0 -292
- package/dist/server/node_modules/figures/license +0 -9
- package/dist/server/node_modules/figures/package.json +0 -49
- package/dist/server/node_modules/figures/readme.md +0 -337
- package/dist/server/node_modules/pg/LICENSE +0 -21
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/LICENSE +0 -20
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
- /package/dist/server/node_modules/{ansi-styles → onetime}/license +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,c as l,j as n}from"./index-
|
|
1
|
+
import{e as o,c as l,j as n}from"./index-CAeiwvn1.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,aU as h,j as c,ai as m,aj as k,ae as p,aR as S,aS as T,aT as M,aW as A,ap as F,aY as $,e as P,c as C}from"./index-
|
|
1
|
+
import{r as x,aU as h,j as c,ai as m,aj as k,ae as p,aR as S,aS as T,aT as M,aW as A,ap as F,aY as $,e as P,c as C}from"./index-CAeiwvn1.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=h({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),G=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});G.displayName=v;var[z,R]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(y,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(y,{...r,ref:e})})});G.displayName=v;var[O,U]=w(v),y=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=M(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=R(f,a.__scopeToggleGroup),s=U(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(S,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(b,{...o,ref:e})}):c.jsx(b,{...o,ref:e})});N.displayName=f;var b=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=R(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=G,L=N;const W=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function J(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(W({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{q as T,J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as h,K as T,V as b,a0 as g,D as C,aE as k,j as s}from"./index-
|
|
1
|
+
import{e as h,K as T,V as b,a0 as g,D as C,aE as k,j as s}from"./index-CAeiwvn1.js";import{B as x}from"./badge-XxgdnuAZ.js";import{c as y,a as j,b as v,T as N}from"./use-mobile-Dcrjnr8n.js";import{g as S}from"./types-_e2R6uHw.js";import{s as _}from"./SearchMd-Bb-t_BjN.js";import{s as A}from"./Star01-ByFKZL35.js";import{Z as $}from"./agent-icon-BPm7_0O4.js";function q(m){const e=h.c(9),{connectionId:a}=m;let t,r,i;e[0]!==a?(t=new URL(`/mcp/${a}`,window.location.origin),i=b,r=T.isMCPAuthenticated(t.href,null),e[0]=a,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let n;e[4]!==t?(n=()=>g({url:t.href,token:null}),e[4]=t,e[5]=n):n=e[5];let l;e[6]!==r||e[7]!==n?(l={queryKey:r,queryFn:n},e[6]=r,e[7]=n,e[8]=l):l=e[8];const{data:o}=i(l);return o}const w=[{key:"readOnlyHint",label:"Read-only",Icon:_,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function z(m){const e=h.c(18),{annotations:a,_meta:t}=m;let r;e[0]!==t?(r=S(t),e[0]=t,e[1]=r):r=e[1];const i=!!r;let n,l,o,c,u;if(e[2]!==a||e[3]!==i){u=Symbol.for("react.early_return_sentinel");e:{const f=a?w.filter(I=>a[I.key]===!0):[];if(f.length===0&&!i){u=null;break e}n=N,l="flex gap-1 flex-nowrap",e[9]!==i?(o=i&&s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:s.jsx($,{})})}),s.jsx(v,{children:"Interactive"})]}),e[9]=i,e[10]=o):o=e[10],c=f.map(H)}e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=o,e[7]=c,e[8]=u}else n=e[4],l=e[5],o=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==l||e[12]!==o||e[13]!==c?(d=s.jsxs("div",{className:l,children:[o,c]}),e[11]=l,e[12]=o,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==n||e[16]!==d?(p=s.jsx(n,{children:d}),e[15]=n,e[16]=d,e[17]=p):p=e[17],p}function H(m){const{label:e,Icon:a,variant:t}=m;return s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:t,className:"size-6 p-1",children:s.jsx(a,{})})}),s.jsx(v,{children:e})]},e)}export{z as T,q as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as F,n as ke,aP as
|
|
1
|
+
import{e as F,n as ke,aP as qe,aQ as Pe,V as be,bk as p,b0 as t,aJ as b,y as l,bl as P,v as s,a$ as g,aL as u,aD as f,aK as x,bm as B,bn as ye,bo as ve,bp as V,bq as j,br as xe,bs as we,bt as K,bu as Te,bv as Ie,bw as Ee,bx as Le,by as ze,bz as De,bA as Ne,bB as Ae,bC as Ue,bD as Oe,bE as $e,bF as Be,bG as je,bH as Fe,bI as Ve,bJ as Ke,bK as We,r as oe,t as Ze,c as se,j as v}from"./index-CAeiwvn1.js";import{K as re,P as Je}from"./constants-DV3gfGwj.js";async function Re(n){if(!n.getServerCapabilities()?.resources)return{resources:[]};try{return await n.listResources()}catch(o){if(o instanceof qe&&o.code===Pe.MethodNotFound)return{resources:[]};throw o}}async function Qe(n,e){return await n.readResource({uri:e})}function Yt(n){const e=F.c(12);let o,i;e[0]!==n?({client:o,...i}=n,e[0]=n,e[1]=o,e[2]=i):(o=e[1],i=e[2]);let r;e[3]!==o?(r=re.mcpResourcesList(o),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==o?(a=()=>Re(o),e[5]=o,e[6]=a):a=e[6];const c=i.staleTime??3e4;let d;return e[7]!==i||e[8]!==r||e[9]!==a||e[10]!==c?(d={...i,queryKey:r,queryFn:a,staleTime:c,retry:!1},e[7]=i,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],be(d)}function Gt(n){const e=F.c(12);let o,i;e[0]!==n?({client:o,...i}=n,e[0]=n,e[1]=o,e[2]=i):(o=e[1],i=e[2]);let r;e[3]!==o?(r=re.mcpResourcesList(o),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==o?(a=()=>Re(o),e[5]=o,e[6]=a):a=e[6];const c=i.staleTime??3e4;let d;return e[7]!==i||e[8]!==r||e[9]!==a||e[10]!==c?(d={...i,queryKey:r,queryFn:a,staleTime:c,retry:!1},e[7]=i,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],ke(d)}function Ye(n){const e=F.c(15);let o,i,r;e[0]!==n?({client:o,uri:r,...i}=n,e[0]=n,e[1]=o,e[2]=i,e[3]=r):(o=e[1],i=e[2],r=e[3]);let a;e[4]!==o||e[5]!==r?(a=re.mcpReadResource(o,r),e[4]=o,e[5]=r,e[6]=a):a=e[6];let c;e[7]!==o||e[8]!==r?(c=()=>Qe(o,r),e[7]=o,e[8]=r,e[9]=c):c=e[9];const d=i.staleTime??3e4;let h;return e[10]!==i||e[11]!==a||e[12]!==c||e[13]!==d?(h={...i,queryKey:a,queryFn:c,staleTime:d,retry:!1},e[10]=i,e[11]=a,e[12]=c,e[13]=d,e[14]=h):h=e[14],be(h)}const de=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ge(n,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${et(e)}">`,r=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,a=n.match(r);if(a){const m=(a.index??0)+a[0].length;return n.slice(0,m)+`
|
|
2
2
|
`+i+n.slice(m)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=n.match(c);if(d){const m=(d.index??0)+d[0].length;return n.slice(0,m)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -8,13 +8,13 @@ import{e as F,n as ke,aP as Me,aQ as Pe,V as ge,bk as p,b0 as t,aJ as b,y as l,b
|
|
|
8
8
|
</head>`+n.slice(m)}return`<head>
|
|
9
9
|
`+i+`
|
|
10
10
|
</head>
|
|
11
|
-
`+n}const
|
|
11
|
+
`+n}const Xe=/^https?:\/\/(\*\.)?[a-zA-Z0-9._-]+(:\d+)?\/?$/;function $(n){return!n||n.length===0?[]:n.filter(e=>Xe.test(e))}function et(n){if(n.csp)return n.csp;const e=n.resourceCsp;if(!e)return de;const o=$(e.resourceDomains),i=$(e.connectDomains),r=$(e.frameDomains),a=$(e.baseUriDomains),c=o.length>0,d=i.length>0,h=r.length>0,y=a.length>0;if(!c&&!d&&!h&&!y)return de;const m=o.join(" ");return["default-src 'none'",c?`script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' ${m}`:"script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'",c?`style-src 'unsafe-inline' ${m}`:"style-src 'unsafe-inline'",c?`img-src * data: blob: ${m}`:"img-src * data: blob:",c?`media-src * data: blob: ${m}`:"media-src * data: blob:",c?`font-src data: ${m}`:"font-src data:",d?`connect-src ${i.join(" ")}`:"connect-src 'none'",h?`frame-src ${r.join(" ")}`:"frame-src 'none'","worker-src blob:","form-action 'none'",y?`base-uri ${a.join(" ")}`:"base-uri 'none'"].join("; ")}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class tt extends Je{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,o){}_ensureEventSlot(e){let o=this._eventSlots.get(e);if(!o){let i=this.eventSchemas[e];if(!i)throw Error(`Unknown event: ${String(e)}`);o={listeners:[]},this._eventSlots.set(e,o);let r=i.shape.method.value;this._registeredMethods.add(r);let a=o;super.setNotificationHandler(i,c=>{let d=c.params;this.onEventDispatch(e,d),a.onHandler?.(d);for(let h of[...a.listeners])h(d)})}return o}setEventHandler(e,o){let i=this._ensureEventSlot(e);i.onHandler&&o&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),i.onHandler=o}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,o){this._ensureEventSlot(e).listeners.push(o)}removeEventListener(e,o){let i=this._eventSlots.get(e);if(!i)return;let r=i.listeners.indexOf(o);r!==-1&&i.listeners.splice(r,1)}setRequestHandler=(e,o)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,o)};setNotificationHandler=(e,o)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,o)};warnIfRequestHandlerReplaced(e,o,i){o&&i&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,o)=>{let i=e.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(e,o)};_assertMethodNotRegistered(e,o){let i=e.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${o}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var Ce="2026-01-26",ot="ui/notifications/tool-input-partial",st=p([t("light"),t("dark")]).describe("Color theme preference for the host environment."),T=p([t("inline"),t("fullscreen"),t("pip")]).describe("Display mode for UI presentation."),it=p([t("--color-background-primary"),t("--color-background-secondary"),t("--color-background-tertiary"),t("--color-background-inverse"),t("--color-background-ghost"),t("--color-background-info"),t("--color-background-danger"),t("--color-background-success"),t("--color-background-warning"),t("--color-background-disabled"),t("--color-text-primary"),t("--color-text-secondary"),t("--color-text-tertiary"),t("--color-text-inverse"),t("--color-text-ghost"),t("--color-text-info"),t("--color-text-danger"),t("--color-text-success"),t("--color-text-warning"),t("--color-text-disabled"),t("--color-border-primary"),t("--color-border-secondary"),t("--color-border-tertiary"),t("--color-border-inverse"),t("--color-border-ghost"),t("--color-border-info"),t("--color-border-danger"),t("--color-border-success"),t("--color-border-warning"),t("--color-border-disabled"),t("--color-ring-primary"),t("--color-ring-secondary"),t("--color-ring-inverse"),t("--color-ring-info"),t("--color-ring-danger"),t("--color-ring-success"),t("--color-ring-warning"),t("--font-sans"),t("--font-mono"),t("--font-weight-normal"),t("--font-weight-medium"),t("--font-weight-semibold"),t("--font-weight-bold"),t("--font-text-xs-size"),t("--font-text-sm-size"),t("--font-text-md-size"),t("--font-text-lg-size"),t("--font-heading-xs-size"),t("--font-heading-sm-size"),t("--font-heading-md-size"),t("--font-heading-lg-size"),t("--font-heading-xl-size"),t("--font-heading-2xl-size"),t("--font-heading-3xl-size"),t("--font-text-xs-line-height"),t("--font-text-sm-line-height"),t("--font-text-md-line-height"),t("--font-text-lg-line-height"),t("--font-heading-xs-line-height"),t("--font-heading-sm-line-height"),t("--font-heading-md-line-height"),t("--font-heading-lg-line-height"),t("--font-heading-xl-line-height"),t("--font-heading-2xl-line-height"),t("--font-heading-3xl-line-height"),t("--border-radius-xs"),t("--border-radius-sm"),t("--border-radius-md"),t("--border-radius-lg"),t("--border-radius-xl"),t("--border-radius-full"),t("--border-width-regular"),t("--shadow-hairline"),t("--shadow-sm"),t("--shadow-md"),t("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),rt=b(it.describe(`Style variables for theming MCP apps.
|
|
12
12
|
|
|
13
13
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
14
14
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
15
15
|
|
|
16
16
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
17
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([l(),
|
|
17
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([l(),P()]).describe(`Style variables for theming MCP apps.
|
|
18
18
|
|
|
19
19
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
20
20
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -26,10 +26,10 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
26
26
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
27
27
|
|
|
28
28
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
29
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
29
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),nt=s({method:t("ui/open-link"),params:s({url:l().describe("URL to open in the host's browser")})});s({isError:g().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough();s({isError:g().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough();s({isError:g().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();var at=s({method:t("ui/notifications/sandbox-proxy-ready"),params:s({})}),ne=s({connectDomains:u(l()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
30
30
|
|
|
31
31
|
- Maps to CSP \`connect-src\` directive
|
|
32
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:u(l()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:u(l()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:u(l()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),
|
|
32
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:u(l()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:u(l()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:u(l()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),ae=s({camera:s({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:s({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:s({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:s({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),lt=s({method:t("ui/notifications/size-changed"),params:s({width:f().optional().describe("New width in pixels."),height:f().optional().describe("New height in pixels.")})});s({method:t("ui/notifications/tool-input"),params:s({arguments:b(l(),x().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})});s({method:t("ui/notifications/tool-input-partial"),params:s({arguments:b(l(),x().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})});s({method:t("ui/notifications/tool-cancelled"),params:s({reason:l().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})});var ct=s({fonts:l().optional()}),dt=s({variables:rt.optional().describe("CSS variables for theming the app."),css:ct.optional().describe("CSS blocks that apps can inject.")});s({method:t("ui/resource-teardown"),params:s({})});var pt=b(l(),x()),pe=s({text:s({}).optional().describe("Host supports text content blocks."),image:s({}).optional().describe("Host supports image content blocks."),audio:s({}).optional().describe("Host supports audio content blocks."),resource:s({}).optional().describe("Host supports resource content blocks."),resourceLink:s({}).optional().describe("Host supports resource link content blocks."),structuredContent:s({}).optional().describe("Host supports structured content.")}),ut=s({method:t("ui/notifications/request-teardown"),params:s({}).optional()}),ht=s({experimental:s({}).optional().describe("Experimental features (structure TBD)."),openLinks:s({}).optional().describe("Host supports opening external URLs."),downloadFile:s({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:s({listChanged:g().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:s({listChanged:g().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:s({}).optional().describe("Host accepts log messages."),sandbox:s({permissions:ae.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:ne.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:pe.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:pe.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:s({tools:s({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),mt=s({experimental:s({}).optional().describe("Experimental features (structure TBD)."),tools:s({listChanged:g().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:u(T).optional().describe("Display modes the app supports.")}),ft=s({method:t("ui/notifications/initialized"),params:s({}).optional()});s({csp:ne.optional().describe("Content Security Policy configuration for UI resources."),permissions:ae.optional().describe("Sandbox permissions requested by the UI resource."),domain:l().optional().describe(`Dedicated origin for view sandbox.
|
|
33
33
|
|
|
34
34
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
35
35
|
|
|
@@ -43,16 +43,16 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
43
43
|
|
|
44
44
|
- \`true\`: request visible border + background
|
|
45
45
|
- \`false\`: request no visible border + background
|
|
46
|
-
- omitted: host decides border`)});var
|
|
46
|
+
- omitted: host decides border`)});var ue=s({method:t("ui/request-display-mode"),params:s({mode:T.describe("The display mode being requested.")})});s({mode:T.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough();var gt=p([t("model"),t("app")]).describe("Tool visibility scope - who can access the tool.");s({resourceUri:l().optional(),visibility:u(gt).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
47
47
|
- "model": Tool visible to and callable by the agent
|
|
48
|
-
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var
|
|
49
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:Re.describe("Partial context update containing only changed fields.")});var yt=s({method:t("ui/update-model-context"),params:s({content:u(V).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),vt=s({method:t("ui/initialize"),params:s({appInfo:K.describe("App identification (name and version)."),appCapabilities:ht.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:K.describe("Host application identification and version."),hostCapabilities:ut.describe("Features and capabilities provided by the host."),hostContext:Re.describe("Rich context about the host environment.")}).passthrough();class xt{eventTarget;eventSource;messageListener;constructor(e=window.parent,o){this.eventTarget=e,this.eventSource=o,this.messageListener=i=>{if(o&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let r=Ke.safeParse(i.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):i.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,i):(console.error("Failed to parse message",r.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,o){e.method!==tt&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var wt="ui/resourceUri";function Ct(n){let e=n._meta?.ui?.resourceUri;if(e===void 0&&(e=n._meta?.[wt]),typeof e=="string"&&e.startsWith("ui://"))return e;if(e!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(e)}`)}var Rt=[Ce];class St extends et{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,o)=>{this._baseReplaceRequestHandler(e,(i,r)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${i.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),o(i,r)))};eventSchemas={sizechange:at,sandboxready:nt,initialized:mt,requestteardown:pt,loggingmessage:qe};constructor(e,o,i,r){super(r),this._client=e,this._hostInfo=o,this._capabilities=i,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(vt,a=>this._oninitialize(a)),this.setRequestHandler(Te,(a,c)=>(this.onping?.(a.params,c),{})),this.replaceRequestHandler(pe,a=>({mode:this._hostContext.displayMode??"inline"}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(bt,async(o,i)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(o.params,i)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(rt,async(o,i)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(o.params,i)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(gt,async(o,i)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(o.params,i)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(pe,async(o,i)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(o.params,i)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(yt,async(o,i)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(o.params,i)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Ie,async(o,i)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,i)})}set oncreatesamplingmessage(e){this.setRequestHandler(Ee,async(o,i)=>e(o.params,i))}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(Le,async(o,i)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(o.params,i)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(ze,async(o,i)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(o.params,i)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(De,async(o,i)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(o.params,i)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(Ne,async(o,i)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(o.params,i)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(e){let o=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values."),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:Rt.includes(o)?o:Ce,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let o={},i=!1;for(let r of Object.keys(e)){let a=this._hostContext[r],c=e[r];_t(a,c)||(o[r]=c,i=!0)}i&&(this._hostContext=e,this.sendHostContextChange(o))}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,o){return this.request({method:"ui/resource-teardown",params:e},dt,o)}sendResourceTeardown=this.teardownResource;callTool(e,o){return this.request({method:"tools/call",params:e},j,o)}listTools(e,o){return this.request({method:"tools/list",params:e},Ae,o)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let o=this._client.getServerCapabilities();if(!o)throw Error("Client server capabilities not available");o.tools&&(this.oncalltool=async(i,r)=>this._client.request({method:"tools/call",params:i},j,{signal:r.signal}),o.tools.listChanged&&this._client.setNotificationHandler(Ue,i=>this.sendToolListChanged(i.params))),o.resources&&(this.onlistresources=async(i,r)=>this._client.request({method:"resources/list",params:i},Oe,{signal:r.signal}),this.onlistresourcetemplates=async(i,r)=>this._client.request({method:"resources/templates/list",params:i},$e,{signal:r.signal}),this.onreadresource=async(i,r)=>this._client.request({method:"resources/read",params:i},Be,{signal:r.signal}),o.resources.listChanged&&this._client.setNotificationHandler(je,i=>this.sendResourceListChanged(i.params))),o.prompts&&(this.onlistprompts=async(i,r)=>this._client.request({method:"prompts/list",params:i},Fe,{signal:r.signal}),o.prompts.listChanged&&this._client.setNotificationHandler(Ve,i=>this.sendPromptListChanged(i.params)))}return super.connect(e)}}function _t(n,e){return JSON.stringify(n)===JSON.stringify(e)}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var Ht=p([t("light"),t("dark")]).describe("Color theme preference for the host environment."),I=p([t("inline"),t("fullscreen"),t("pip")]).describe("Display mode for UI presentation."),kt=p([t("--color-background-primary"),t("--color-background-secondary"),t("--color-background-tertiary"),t("--color-background-inverse"),t("--color-background-ghost"),t("--color-background-info"),t("--color-background-danger"),t("--color-background-success"),t("--color-background-warning"),t("--color-background-disabled"),t("--color-text-primary"),t("--color-text-secondary"),t("--color-text-tertiary"),t("--color-text-inverse"),t("--color-text-ghost"),t("--color-text-info"),t("--color-text-danger"),t("--color-text-success"),t("--color-text-warning"),t("--color-text-disabled"),t("--color-border-primary"),t("--color-border-secondary"),t("--color-border-tertiary"),t("--color-border-inverse"),t("--color-border-ghost"),t("--color-border-info"),t("--color-border-danger"),t("--color-border-success"),t("--color-border-warning"),t("--color-border-disabled"),t("--color-ring-primary"),t("--color-ring-secondary"),t("--color-ring-inverse"),t("--color-ring-info"),t("--color-ring-danger"),t("--color-ring-success"),t("--color-ring-warning"),t("--font-sans"),t("--font-mono"),t("--font-weight-normal"),t("--font-weight-medium"),t("--font-weight-semibold"),t("--font-weight-bold"),t("--font-text-xs-size"),t("--font-text-sm-size"),t("--font-text-md-size"),t("--font-text-lg-size"),t("--font-heading-xs-size"),t("--font-heading-sm-size"),t("--font-heading-md-size"),t("--font-heading-lg-size"),t("--font-heading-xl-size"),t("--font-heading-2xl-size"),t("--font-heading-3xl-size"),t("--font-text-xs-line-height"),t("--font-text-sm-line-height"),t("--font-text-md-line-height"),t("--font-text-lg-line-height"),t("--font-heading-xs-line-height"),t("--font-heading-sm-line-height"),t("--font-heading-md-line-height"),t("--font-heading-lg-line-height"),t("--font-heading-xl-line-height"),t("--font-heading-2xl-line-height"),t("--font-heading-3xl-line-height"),t("--border-radius-xs"),t("--border-radius-sm"),t("--border-radius-md"),t("--border-radius-lg"),t("--border-radius-xl"),t("--border-radius-full"),t("--border-width-regular"),t("--shadow-hairline"),t("--shadow-sm"),t("--shadow-md"),t("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Mt=b(kt.describe(`Style variables for theming MCP apps.
|
|
48
|
+
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var bt=s({method:t("ui/download-file"),params:s({contents:u(p([ye,ve])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),yt=s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(V).describe("Message content blocks (text, image, etc.).")})});s({method:t("ui/notifications/sandbox-resource-ready"),params:s({html:l().describe("HTML content to load into the inner iframe."),sandbox:l().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:ne.optional().describe("CSP configuration from resource metadata."),permissions:ae.optional().describe("Sandbox permissions from resource metadata.")})});s({method:t("ui/notifications/tool-result"),params:j.describe("Standard MCP tool execution result.")});var Se=s({toolInfo:s({id:we.optional().describe("JSON-RPC id of the tools/call request."),tool:xe.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:st.optional().describe("Current color theme preference."),styles:dt.optional().describe("Style configuration for theming the app."),displayMode:T.optional().describe("How the UI is currently displayed."),availableDisplayModes:u(T).optional().describe("Display modes the host supports."),containerDimensions:p([s({height:f().describe("Fixed container height in pixels.")}),s({maxHeight:p([f(),P()]).optional().describe("Maximum container height in pixels.")})]).and(p([s({width:f().describe("Fixed container width in pixels.")}),s({maxWidth:p([f(),P()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
49
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:Se.describe("Partial context update containing only changed fields.")});var vt=s({method:t("ui/update-model-context"),params:s({content:u(V).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),xt=s({method:t("ui/initialize"),params:s({appInfo:K.describe("App identification (name and version)."),appCapabilities:mt.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:K.describe("Host application identification and version."),hostCapabilities:ht.describe("Features and capabilities provided by the host."),hostContext:Se.describe("Rich context about the host environment.")}).passthrough();class wt{eventTarget;eventSource;messageListener;constructor(e=window.parent,o){this.eventTarget=e,this.eventSource=o,this.messageListener=i=>{if(o&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let r=We.safeParse(i.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):i.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,i):(console.error("Failed to parse message",r.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,o){e.method!==ot&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var Rt="ui/resourceUri";function Ct(n){let e=n._meta?.ui?.resourceUri;if(e===void 0&&(e=n._meta?.[Rt]),typeof e=="string"&&e.startsWith("ui://"))return e;if(e!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(e)}`)}var St=[Ce];class _t extends tt{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,o)=>{this._baseReplaceRequestHandler(e,(i,r)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${i.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),o(i,r)))};eventSchemas={sizechange:lt,sandboxready:at,initialized:ft,requestteardown:ut,loggingmessage:Te};constructor(e,o,i,r){super(r),this._client=e,this._hostInfo=o,this._capabilities=i,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(xt,a=>this._oninitialize(a)),this.setRequestHandler(Ie,(a,c)=>(this.onping?.(a.params,c),{})),this.replaceRequestHandler(ue,a=>({mode:this._hostContext.displayMode??"inline"}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(yt,async(o,i)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(o.params,i)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(nt,async(o,i)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(o.params,i)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(bt,async(o,i)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(o.params,i)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(ue,async(o,i)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(o.params,i)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(vt,async(o,i)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(o.params,i)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Ee,async(o,i)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(o.params,i)})}set oncreatesamplingmessage(e){this.setRequestHandler(Le,async(o,i)=>e(o.params,i))}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(ze,async(o,i)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(o.params,i)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(De,async(o,i)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(o.params,i)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(Ne,async(o,i)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(o.params,i)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(Ae,async(o,i)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(o.params,i)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(e){let o=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values."),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:St.includes(o)?o:Ce,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let o={},i=!1;for(let r of Object.keys(e)){let a=this._hostContext[r],c=e[r];Ht(a,c)||(o[r]=c,i=!0)}i&&(this._hostContext=e,this.sendHostContextChange(o))}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,o){return this.request({method:"ui/resource-teardown",params:e},pt,o)}sendResourceTeardown=this.teardownResource;callTool(e,o){return this.request({method:"tools/call",params:e},j,o)}listTools(e,o){return this.request({method:"tools/list",params:e},Ue,o)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let o=this._client.getServerCapabilities();if(!o)throw Error("Client server capabilities not available");o.tools&&(this.oncalltool=async(i,r)=>this._client.request({method:"tools/call",params:i},j,{signal:r.signal}),o.tools.listChanged&&this._client.setNotificationHandler(Oe,i=>this.sendToolListChanged(i.params))),o.resources&&(this.onlistresources=async(i,r)=>this._client.request({method:"resources/list",params:i},$e,{signal:r.signal}),this.onlistresourcetemplates=async(i,r)=>this._client.request({method:"resources/templates/list",params:i},Be,{signal:r.signal}),this.onreadresource=async(i,r)=>this._client.request({method:"resources/read",params:i},je,{signal:r.signal}),o.resources.listChanged&&this._client.setNotificationHandler(Fe,i=>this.sendResourceListChanged(i.params))),o.prompts&&(this.onlistprompts=async(i,r)=>this._client.request({method:"prompts/list",params:i},Ve,{signal:r.signal}),o.prompts.listChanged&&this._client.setNotificationHandler(Ke,i=>this.sendPromptListChanged(i.params)))}return super.connect(e)}}function Ht(n,e){return JSON.stringify(n)===JSON.stringify(e)}(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var Mt=p([t("light"),t("dark")]).describe("Color theme preference for the host environment."),I=p([t("inline"),t("fullscreen"),t("pip")]).describe("Display mode for UI presentation."),kt=p([t("--color-background-primary"),t("--color-background-secondary"),t("--color-background-tertiary"),t("--color-background-inverse"),t("--color-background-ghost"),t("--color-background-info"),t("--color-background-danger"),t("--color-background-success"),t("--color-background-warning"),t("--color-background-disabled"),t("--color-text-primary"),t("--color-text-secondary"),t("--color-text-tertiary"),t("--color-text-inverse"),t("--color-text-ghost"),t("--color-text-info"),t("--color-text-danger"),t("--color-text-success"),t("--color-text-warning"),t("--color-text-disabled"),t("--color-border-primary"),t("--color-border-secondary"),t("--color-border-tertiary"),t("--color-border-inverse"),t("--color-border-ghost"),t("--color-border-info"),t("--color-border-danger"),t("--color-border-success"),t("--color-border-warning"),t("--color-border-disabled"),t("--color-ring-primary"),t("--color-ring-secondary"),t("--color-ring-inverse"),t("--color-ring-info"),t("--color-ring-danger"),t("--color-ring-success"),t("--color-ring-warning"),t("--font-sans"),t("--font-mono"),t("--font-weight-normal"),t("--font-weight-medium"),t("--font-weight-semibold"),t("--font-weight-bold"),t("--font-text-xs-size"),t("--font-text-sm-size"),t("--font-text-md-size"),t("--font-text-lg-size"),t("--font-heading-xs-size"),t("--font-heading-sm-size"),t("--font-heading-md-size"),t("--font-heading-lg-size"),t("--font-heading-xl-size"),t("--font-heading-2xl-size"),t("--font-heading-3xl-size"),t("--font-text-xs-line-height"),t("--font-text-sm-line-height"),t("--font-text-md-line-height"),t("--font-text-lg-line-height"),t("--font-heading-xs-line-height"),t("--font-heading-sm-line-height"),t("--font-heading-md-line-height"),t("--font-heading-lg-line-height"),t("--font-heading-xl-line-height"),t("--font-heading-2xl-line-height"),t("--font-heading-3xl-line-height"),t("--border-radius-xs"),t("--border-radius-sm"),t("--border-radius-md"),t("--border-radius-lg"),t("--border-radius-xl"),t("--border-radius-full"),t("--border-width-regular"),t("--shadow-hairline"),t("--shadow-sm"),t("--shadow-md"),t("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),qt=b(kt.describe(`Style variables for theming MCP apps.
|
|
50
50
|
|
|
51
51
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
52
52
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
53
53
|
|
|
54
54
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
55
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([l(),
|
|
55
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([l(),P()]).describe(`Style variables for theming MCP apps.
|
|
56
56
|
|
|
57
57
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
58
58
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -64,10 +64,10 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
64
64
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
65
65
|
|
|
66
66
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
67
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);s({method:t("ui/open-link"),params:s({url:l().describe("URL to open in the host's browser")})});s({isError:g().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough();s({isError:g().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough();s({isError:g().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();s({method:t("ui/notifications/sandbox-proxy-ready"),params:s({})});var
|
|
67
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);s({method:t("ui/open-link"),params:s({url:l().describe("URL to open in the host's browser")})});s({isError:g().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough();s({isError:g().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough();s({isError:g().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();s({method:t("ui/notifications/sandbox-proxy-ready"),params:s({})});var le=s({connectDomains:u(l()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
68
68
|
|
|
69
69
|
- Maps to CSP \`connect-src\` directive
|
|
70
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:u(l()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:u(l()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:u(l()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),
|
|
70
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:u(l()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:u(l()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:u(l()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),ce=s({camera:s({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:s({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:s({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:s({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});s({method:t("ui/notifications/size-changed"),params:s({width:f().optional().describe("New width in pixels."),height:f().optional().describe("New height in pixels.")})});s({method:t("ui/notifications/tool-input"),params:s({arguments:b(l(),x().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})});s({method:t("ui/notifications/tool-input-partial"),params:s({arguments:b(l(),x().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})});s({method:t("ui/notifications/tool-cancelled"),params:s({reason:l().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})});var Pt=s({fonts:l().optional()}),Tt=s({variables:qt.optional().describe("CSS variables for theming the app."),css:Pt.optional().describe("CSS blocks that apps can inject.")});s({method:t("ui/resource-teardown"),params:s({})});b(l(),x());var he=s({text:s({}).optional().describe("Host supports text content blocks."),image:s({}).optional().describe("Host supports image content blocks."),audio:s({}).optional().describe("Host supports audio content blocks."),resource:s({}).optional().describe("Host supports resource content blocks."),resourceLink:s({}).optional().describe("Host supports resource link content blocks."),structuredContent:s({}).optional().describe("Host supports structured content.")});s({method:t("ui/notifications/request-teardown"),params:s({}).optional()});var It=s({experimental:s({}).optional().describe("Experimental features (structure TBD)."),openLinks:s({}).optional().describe("Host supports opening external URLs."),downloadFile:s({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:s({listChanged:g().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:s({listChanged:g().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:s({}).optional().describe("Host accepts log messages."),sandbox:s({permissions:ce.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:le.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:he.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:he.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:s({tools:s({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Et=s({experimental:s({}).optional().describe("Experimental features (structure TBD)."),tools:s({listChanged:g().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:u(I).optional().describe("Display modes the app supports.")});s({method:t("ui/notifications/initialized"),params:s({}).optional()});s({csp:le.optional().describe("Content Security Policy configuration for UI resources."),permissions:ce.optional().describe("Sandbox permissions requested by the UI resource."),domain:l().optional().describe(`Dedicated origin for view sandbox.
|
|
71
71
|
|
|
72
72
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
73
73
|
|
|
@@ -81,7 +81,7 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
81
81
|
|
|
82
82
|
- \`true\`: request visible border + background
|
|
83
83
|
- \`false\`: request no visible border + background
|
|
84
|
-
- omitted: host decides border`)});s({method:t("ui/request-display-mode"),params:s({mode:I.describe("The display mode being requested.")})});s({mode:I.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough();var
|
|
84
|
+
- omitted: host decides border`)});s({method:t("ui/request-display-mode"),params:s({mode:I.describe("The display mode being requested.")})});s({mode:I.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough();var Lt=p([t("model"),t("app")]).describe("Tool visibility scope - who can access the tool.");s({resourceUri:l().optional(),visibility:u(Lt).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
85
85
|
- "model": Tool visible to and callable by the agent
|
|
86
|
-
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});s({method:t("ui/download-file"),params:s({contents:u(p([
|
|
87
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:Se.describe("Partial context update containing only changed fields.")});s({method:t("ui/update-model-context"),params:s({content:u(V).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});s({method:t("ui/initialize"),params:s({appInfo:K.describe("App identification (name and version)."),appCapabilities:It.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:K.describe("Host application identification and version."),hostCapabilities:Tt.describe("Features and capabilities provided by the host."),hostContext:Se.describe("Rich context about the host environment.")}).passthrough();function Lt(){let n=document.documentElement.getAttribute("data-theme");return n==="dark"||n==="light"?n:document.documentElement.classList.contains("dark")?"dark":"light"}const zt=[["--background","--color-background-primary"],["--muted","--color-background-secondary"],["--accent","--color-background-tertiary"],["--destructive","--color-background-danger"],["--success","--color-background-success"],["--warning","--color-background-warning"],["--foreground","--color-text-primary"],["--muted-foreground","--color-text-secondary"],["--accent-foreground","--color-text-tertiary"],["--destructive-foreground","--color-text-danger"],["--success-foreground","--color-text-success"],["--warning-foreground","--color-text-warning"],["--border","--color-border-primary"],["--input","--color-border-secondary"],["--ring","--color-ring-primary"],["--font-sans","--font-sans"],["--font-mono","--font-mono"],["--font-weight-normal","--font-weight-normal"],["--font-weight-medium","--font-weight-medium"],["--font-weight-semibold","--font-weight-semibold"],["--font-weight-bold","--font-weight-bold"],["--radius","--border-radius-md"],["--default-border-width","--border-width-regular"],["--shadow-sm","--shadow-sm"],["--shadow-md","--shadow-md"],["--shadow-lg","--shadow-lg"]];function Dt(){if(typeof document>"u")return{};const n=getComputedStyle(document.documentElement),e={};for(const[o,i]of zt){const r=n.getPropertyValue(o).trim();r&&(e[i]=r)}return{variables:e}}const Nt={name:"MCP Mesh",version:"1.0.0"},At={openLinks:{},serverTools:{},serverResources:{},logging:{},message:{},downloadFile:{},updateModelContext:{text:{}}},Ut=15e3;function Ot(){return typeof navigator>"u"?"en":navigator.language??"en"}function $t(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function Bt(){return typeof navigator>"u"?"web":/Mobi|Android/i.test(navigator.userAgent)?"mobile":"web"}function he(n,e,o,i){return{theme:Lt(),styles:Dt(),displayMode:n,availableDisplayModes:["inline","fullscreen"],locale:Ot(),timeZone:$t(),platform:Bt(),...e!=null&&{toolInfo:e},...o!=null&&{containerDimensions:{maxHeight:o}},...i!=null&&{orgId:i}}}const se=new Set;let me=!1;function jt(){if(me||typeof document>"u")return;me=!0;const n=()=>se.forEach(e=>e());new MutationObserver(n).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n)}function Ft(n){return se.add(n),jt(),()=>se.delete(n)}class Vt{bridge=null;timeout=null;disposed=!1;unsubTheme=null;snapshot;listeners=new Set;config;constructor(e){this.config=e,this.snapshot=Object.freeze({height:e.minHeight,isLoading:!0,error:null})}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.snapshot;updateConfig(e){const o=this.config;this.config=e,!(!this.bridge||this.disposed)&&(e.toolInput!==o.toolInput&&e.toolInput!=null&&this.bridge.sendToolInput({arguments:e.toolInput}),e.toolResult!==o.toolResult&&e.toolResult!=null&&this.bridge.sendToolResult(e.toolResult))}pushHostContext(){if(!this.bridge||this.disposed)return;const{displayMode:e,maxHeight:o,toolInfo:i,orgId:r}=this.config;this.bridge.setHostContext(he(e,i,o,r))}set(e){const o=this.snapshot,i={...o,...e};if(!(i.height===o.height&&i.isLoading===o.isLoading&&i.error===o.error)){this.snapshot=Object.freeze(i);for(const r of this.listeners)r()}}teardown(){(this.bridge||this.timeout||this.unsubTheme)&&this.config.onTeardown?.(),this.disposed=!0,this.unsubTheme?.(),this.unsubTheme=null,this.bridge&&(this.bridge.teardownResource({}).catch(()=>{}),this.bridge.close(),this.bridge=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}attach=e=>{if(this.teardown(),this.disposed=!1,this.set({height:this.config.minHeight,isLoading:!0,error:null}),!!e){e.onerror=()=>{this.disposed||this.set({error:"Failed to load app",isLoading:!1})};try{const{client:o,displayMode:i,maxHeight:r,toolInfo:a,orgId:c}=this.config,d=he(i,a,r,c),h=new St(o,Nt,At,{hostContext:d});this.bridge=h,this.registerHandlers(h),this.startInitTimeout(),this.registerInitHandler(h),this.connectTransport(h,e),this.unsubTheme=Ft(()=>this.pushHostContext())}catch(o){this.clearTimeout(),console.error("Failed to create AppBridge:",o),this.set({error:o instanceof Error?o.message:"Unknown error",isLoading:!1})}}};registerHandlers(e){e.onopenlink=async({url:o})=>{let i=null;try{i=new URL(o)}catch{}if(!i||!["http:","https:"].includes(i.protocol))throw new Error("Only http and https URLs are allowed");return window.open(o,"_blank","noopener,noreferrer"),{}},e.onmessage=async o=>(this.config.onMessage?.(o),{}),e.onupdatemodelcontext=async o=>(this.config.onUpdateModelContext?.(o),{}),e.onsizechange=({height:o})=>{if(!this.disposed&&o!=null){const{minHeight:i,maxHeight:r}=this.config;this.set({height:Math.max(i,Math.min(r,o))})}},e.onloggingmessage=({level:o,data:i})=>{console[o==="error"?"error":"debug"](`[MCP App ${this.config.toolInfo?.tool.name??"unknown"}]`,i)},e.ondownloadfile=async({contents:o})=>{for(const i of o)if(i.type==="resource"){const r=i.resource,a="blob"in r?new Blob([Uint8Array.from(atob(r.blob),h=>h.charCodeAt(0))],{type:r.mimeType}):new Blob([r.text??""],{type:r.mimeType}),c=URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download=r.uri.split("/").pop()??"download",d.click(),URL.revokeObjectURL(c)}else i.type==="resource_link"&&window.open(i.uri,"_blank");return{}}}registerInitHandler(e){e.oninitialized=()=>{if(this.disposed)return;this.clearTimeout(),this.set({isLoading:!1});const{toolInput:o,toolResult:i}=this.config;o!=null&&e.sendToolInput({arguments:o}),i!=null&&e.sendToolResult(i)}}startInitTimeout(){this.timeout=setTimeout(()=>{this.disposed||this.set({error:"App took too long to load",isLoading:!1})},Ut)}clearTimeout(){this.timeout&&(globalThis.clearTimeout(this.timeout),this.timeout=null)}connectTransport(e,o){if(!o.contentWindow){console.warn("iframe contentWindow not yet available");return}const i=new xt(o.contentWindow,o.contentWindow);e.connect(i).catch(r=>{this.disposed||(this.clearTimeout(),console.error("AppBridge connect failed:",r),this.set({error:r instanceof Error?r.message:"Connection failed",isLoading:!1}))})}}function Kt(n){const e=te.useRef(new Vt(n));te.useEffect(()=>{e.current.updateConfig(n)},[n]);const{height:o,isLoading:i,error:r}=te.useSyncExternalStore(e.current.subscribe,e.current.getSnapshot);return{height:o,isLoading:i,error:r,iframeRef:e.current.attach}}const fe=new Set;function Wt(n){const e=n?.contents?.[0];return!e||!("text"in e)||!e.text?null:Ye(e.text,{resourceCsp:e._meta?.ui?.csp})}function Gt(n){const e=F.c(41),{resourceURI:o,orgId:i,toolInfo:r,toolInput:a,toolResult:c,displayMode:d,minHeight:h,maxHeight:y,client:m,onMessage:E,onUpdateModelContext:W,onTeardown:Z,className:C}=n,w=d===void 0?"inline":d,J=h===void 0?150:h,Q=y===void 0?600:y;let L;e[0]!==m||e[1]!==o?(L={client:m,uri:o,staleTime:3e4},e[0]=m,e[1]=o,e[2]=L):L=e[2];const{data:_e}=Qe(L),z=Wt(_e);o&&!fe.has(o)&&(fe.add(o),We("mcp_app_opened",{resource_uri:o,display_mode:w,tool_name:r?.tool?.name??null}));let D;e[3]!==m||e[4]!==w||e[5]!==Q||e[6]!==J||e[7]!==E||e[8]!==Z||e[9]!==W||e[10]!==i||e[11]!==r||e[12]!==a||e[13]!==c?(D={client:m,displayMode:w,minHeight:J,maxHeight:Q,orgId:i,toolInfo:r,toolInput:a,toolResult:c,onMessage:E,onUpdateModelContext:W,onTeardown:Z},e[3]=m,e[4]=w,e[5]=Q,e[6]=J,e[7]=E,e[8]=Z,e[9]=W,e[10]=i,e[11]=r,e[12]=a,e[13]=c,e[14]=D):D=e[14];const{height:Y,isLoading:N,error:A,iframeRef:G}=Kt(D);if(!z)return null;if(A){let M;e[15]!==C?(M=oe("flex items-center justify-center p-4 text-destructive bg-destructive/10 rounded-lg",C),e[15]=C,e[16]=M):M=e[16];let P;e[17]!==A?(P=v.jsx("span",{className:"text-sm",children:A}),e[17]=A,e[18]=P):P=e[18];let O;return e[19]!==M||e[20]!==P?(O=v.jsx("div",{className:M,children:P}),e[19]=M,e[20]=P,e[21]=O):O=e[21],O}const He=r?.tool.name;let R;e[22]!==C?(R=oe("relative w-full overflow-hidden rounded-lg",C),e[22]=C,e[23]=R):R=e[23];let S;e[24]!==w||e[25]!==Y?(S=w!=="fullscreen"?{height:`${Y}px`}:void 0,e[24]=w,e[25]=Y,e[26]=S):S=e[26];let _;e[27]!==N?(_=N&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background z-10",children:v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),v.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),e[27]=N,e[28]=_):_=e[28];const X=N&&"invisible";let H;e[29]!==X?(H=oe("w-full h-full border-0",X),e[29]=X,e[30]=H):H=e[30];const ee=`MCP App: ${He??o}`;let k;e[31]!==z||e[32]!==G||e[33]!==H||e[34]!==ee?(k=v.jsx("iframe",{ref:G,srcDoc:z,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups",className:H,title:ee}),e[31]=z,e[32]=G,e[33]=H,e[34]=ee,e[35]=k):k=e[35];let U;return e[36]!==k||e[37]!==R||e[38]!==S||e[39]!==_?(U=v.jsxs("div",{className:R,style:S,children:[_,k]}),e[36]=k,e[37]=R,e[38]=S,e[39]=_,e[40]=U):U=e[40],U}const Xt={view:{minHeight:400,maxHeight:800},fullscreen:{minHeight:600,maxHeight:1200}};function eo(n){if(!(n==null||typeof n!="object"))try{return Ct({_meta:n})}catch{return}}export{Gt as M,Yt as a,Xt as b,eo as g,we as l,Je as r,Qt as u};
|
|
86
|
+
- "app": Tool callable by the app from this server only`),csp:B().optional(),permissions:B().optional()});s({mimeTypes:u(l()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});s({method:t("ui/download-file"),params:s({contents:u(p([ye,ve])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});s({method:t("ui/message"),params:s({role:t("user").describe('Message role, currently only "user" is supported.'),content:u(V).describe("Message content blocks (text, image, etc.).")})});s({method:t("ui/notifications/sandbox-resource-ready"),params:s({html:l().describe("HTML content to load into the inner iframe."),sandbox:l().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:le.optional().describe("CSP configuration from resource metadata."),permissions:ce.optional().describe("Sandbox permissions from resource metadata.")})});s({method:t("ui/notifications/tool-result"),params:j.describe("Standard MCP tool execution result.")});var _e=s({toolInfo:s({id:we.optional().describe("JSON-RPC id of the tools/call request."),tool:xe.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Mt.optional().describe("Current color theme preference."),styles:Tt.optional().describe("Style configuration for theming the app."),displayMode:I.optional().describe("How the UI is currently displayed."),availableDisplayModes:u(I).optional().describe("Display modes the host supports."),containerDimensions:p([s({height:f().describe("Fixed container height in pixels.")}),s({maxHeight:p([f(),P()]).optional().describe("Maximum container height in pixels.")})]).and(p([s({width:f().describe("Fixed container width in pixels.")}),s({maxWidth:p([f(),P()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
87
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l().optional().describe("User's timezone in IANA format."),userAgent:l().optional().describe("Host application identifier."),platform:p([t("web"),t("desktop"),t("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:s({touch:g().optional().describe("Whether the device supports touch input."),hover:g().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:s({top:f().describe("Top safe area inset in pixels."),right:f().describe("Right safe area inset in pixels."),bottom:f().describe("Bottom safe area inset in pixels."),left:f().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough();s({method:t("ui/notifications/host-context-changed"),params:_e.describe("Partial context update containing only changed fields.")});s({method:t("ui/update-model-context"),params:s({content:u(V).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:b(l(),x().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});s({method:t("ui/initialize"),params:s({appInfo:K.describe("App identification (name and version)."),appCapabilities:Et.describe("Features and capabilities this app provides."),protocolVersion:l().describe("Protocol version this app supports.")})});s({protocolVersion:l().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:K.describe("Host application identification and version."),hostCapabilities:It.describe("Features and capabilities provided by the host."),hostContext:_e.describe("Rich context about the host environment.")}).passthrough();function zt(){let n=document.documentElement.getAttribute("data-theme");return n==="dark"||n==="light"?n:document.documentElement.classList.contains("dark")?"dark":"light"}const Dt=[["--background","--color-background-primary"],["--muted","--color-background-secondary"],["--accent","--color-background-tertiary"],["--destructive","--color-background-danger"],["--success","--color-background-success"],["--warning","--color-background-warning"],["--foreground","--color-text-primary"],["--muted-foreground","--color-text-secondary"],["--accent-foreground","--color-text-tertiary"],["--destructive-foreground","--color-text-danger"],["--success-foreground","--color-text-success"],["--warning-foreground","--color-text-warning"],["--border","--color-border-primary"],["--input","--color-border-secondary"],["--ring","--color-ring-primary"],["--font-sans","--font-sans"],["--font-mono","--font-mono"],["--font-weight-normal","--font-weight-normal"],["--font-weight-medium","--font-weight-medium"],["--font-weight-semibold","--font-weight-semibold"],["--font-weight-bold","--font-weight-bold"],["--radius","--border-radius-md"],["--default-border-width","--border-width-regular"],["--shadow-sm","--shadow-sm"],["--shadow-md","--shadow-md"],["--shadow-lg","--shadow-lg"]];function Nt(){if(typeof document>"u")return{};const n=getComputedStyle(document.documentElement),e={};for(const[o,i]of Dt){const r=n.getPropertyValue(o).trim();r&&(e[i]=r)}return{variables:e}}const At={name:"MCP Mesh",version:"1.0.0"},Ut={openLinks:{},serverTools:{},serverResources:{},logging:{},message:{},downloadFile:{},updateModelContext:{text:{}}},Ot=15e3;function $t(){return typeof navigator>"u"?"en":navigator.language??"en"}function Bt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function jt(){return typeof navigator>"u"?"web":/Mobi|Android/i.test(navigator.userAgent)?"mobile":"web"}function me(n,e,o,i){return{theme:zt(),styles:Nt(),displayMode:n,availableDisplayModes:["inline","fullscreen"],locale:$t(),timeZone:Bt(),platform:jt(),...e!=null&&{toolInfo:e},...o!=null&&{containerDimensions:{maxHeight:o}},...i!=null&&{orgId:i}}}const ie=new Set;let fe=!1;function Ft(){if(fe||typeof document>"u")return;fe=!0;const n=()=>ie.forEach(e=>e());new MutationObserver(n).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n)}function Vt(n){return ie.add(n),Ft(),()=>ie.delete(n)}class Kt{bridge=null;timeout=null;disposed=!1;unsubTheme=null;snapshot;listeners=new Set;config;constructor(e){this.config=e,this.snapshot=Object.freeze({height:e.minHeight,isLoading:!0,error:null})}subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.snapshot;updateConfig(e){const o=this.config;this.config=e,!(!this.bridge||this.disposed)&&(e.displayMode!==o.displayMode&&this.pushHostContext(),e.toolInput!==o.toolInput&&e.toolInput!=null&&this.bridge.sendToolInput({arguments:e.toolInput}),e.toolResult!==o.toolResult&&e.toolResult!=null&&this.bridge.sendToolResult(e.toolResult))}pushHostContext(){if(!this.bridge||this.disposed)return;const{displayMode:e,maxHeight:o,toolInfo:i,orgId:r}=this.config;this.bridge.setHostContext(me(e,i,o,r))}set(e){const o=this.snapshot,i={...o,...e};if(!(i.height===o.height&&i.isLoading===o.isLoading&&i.error===o.error)){this.snapshot=Object.freeze(i);for(const r of this.listeners)r()}}teardown(){(this.bridge||this.timeout||this.unsubTheme)&&this.config.onTeardown?.(),this.disposed=!0,this.unsubTheme?.(),this.unsubTheme=null,this.bridge&&(this.bridge.teardownResource({}).catch(()=>{}),this.bridge.close(),this.bridge=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}attach=e=>{if(this.teardown(),this.disposed=!1,this.set({height:this.config.minHeight,isLoading:!0,error:null}),!!e){e.onerror=()=>{this.disposed||this.set({error:"Failed to load app",isLoading:!1})};try{const{client:o,displayMode:i,maxHeight:r,toolInfo:a,orgId:c}=this.config,d=me(i,a,r,c),h=new _t(o,At,Ut,{hostContext:d});this.bridge=h,this.registerHandlers(h),this.startInitTimeout(),this.registerInitHandler(h),this.connectTransport(h,e),this.unsubTheme=Vt(()=>this.pushHostContext())}catch(o){this.clearTimeout(),console.error("Failed to create AppBridge:",o),this.set({error:o instanceof Error?o.message:"Unknown error",isLoading:!1})}}};registerHandlers(e){e.onopenlink=async({url:o})=>{let i=null;try{i=new URL(o)}catch{}if(!i||!["http:","https:"].includes(i.protocol))throw new Error("Only http and https URLs are allowed");return window.open(o,"_blank","noopener,noreferrer"),{}},e.onmessage=async o=>(this.config.onMessage?.(o),{}),e.onupdatemodelcontext=async o=>(this.config.onUpdateModelContext?.(o),{}),e.onsizechange=({height:o})=>{if(!this.disposed&&o!=null){const{minHeight:i,maxHeight:r}=this.config;this.set({height:Math.max(i,Math.min(r,o))})}},e.onloggingmessage=({level:o,data:i})=>{console[o==="error"?"error":"debug"](`[MCP App ${this.config.toolInfo?.tool.name??"unknown"}]`,i)},e.onrequestdisplaymode=async({mode:o})=>({mode:this.config.onRequestDisplayMode?await this.config.onRequestDisplayMode(o):this.config.displayMode}),e.ondownloadfile=async({contents:o})=>{for(const i of o)if(i.type==="resource"){const r=i.resource,a="blob"in r?new Blob([Uint8Array.from(atob(r.blob),h=>h.charCodeAt(0))],{type:r.mimeType}):new Blob([r.text??""],{type:r.mimeType}),c=URL.createObjectURL(a),d=document.createElement("a");d.href=c,d.download=r.uri.split("/").pop()??"download",d.click(),URL.revokeObjectURL(c)}else i.type==="resource_link"&&window.open(i.uri,"_blank");return{}}}registerInitHandler(e){e.oninitialized=()=>{if(this.disposed)return;this.clearTimeout(),this.set({isLoading:!1});const{toolInput:o,toolResult:i}=this.config;o!=null&&e.sendToolInput({arguments:o}),i!=null&&e.sendToolResult(i)}}startInitTimeout(){this.timeout=setTimeout(()=>{this.disposed||this.set({error:"App took too long to load",isLoading:!1})},Ot)}clearTimeout(){this.timeout&&(globalThis.clearTimeout(this.timeout),this.timeout=null)}connectTransport(e,o){if(!o.contentWindow){console.warn("iframe contentWindow not yet available");return}const i=new wt(o.contentWindow,o.contentWindow);e.connect(i).catch(r=>{this.disposed||(this.clearTimeout(),console.error("AppBridge connect failed:",r),this.set({error:r instanceof Error?r.message:"Connection failed",isLoading:!1}))})}}function Wt(n){const e=oe.useRef(new Kt(n));oe.useEffect(()=>{e.current.updateConfig(n)},[n]);const{height:o,isLoading:i,error:r}=oe.useSyncExternalStore(e.current.subscribe,e.current.getSnapshot);return{height:o,isLoading:i,error:r,iframeRef:e.current.attach}}const ge=new Set;function Zt(n){const e=n?.contents?.[0];return!e||!("text"in e)||!e.text?null:Ge(e.text,{resourceCsp:e._meta?.ui?.csp})}function Xt(n){const e=F.c(42),{resourceURI:o,orgId:i,toolInfo:r,toolInput:a,toolResult:c,displayMode:d,minHeight:h,maxHeight:y,client:m,onMessage:E,onUpdateModelContext:W,onTeardown:Z,onRequestDisplayMode:J,className:R}=n,w=d===void 0?"inline":d,Q=h===void 0?150:h,Y=y===void 0?600:y;let L;e[0]!==m||e[1]!==o?(L={client:m,uri:o,staleTime:3e4},e[0]=m,e[1]=o,e[2]=L):L=e[2];const{data:He}=Ye(L),z=Zt(He);o&&!ge.has(o)&&(ge.add(o),Ze("mcp_app_opened",{resource_uri:o,display_mode:w,tool_name:r?.tool?.name??null}));let D;e[3]!==m||e[4]!==w||e[5]!==Y||e[6]!==Q||e[7]!==E||e[8]!==J||e[9]!==Z||e[10]!==W||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==c?(D={client:m,displayMode:w,minHeight:Q,maxHeight:Y,orgId:i,toolInfo:r,toolInput:a,toolResult:c,onMessage:E,onUpdateModelContext:W,onTeardown:Z,onRequestDisplayMode:J},e[3]=m,e[4]=w,e[5]=Y,e[6]=Q,e[7]=E,e[8]=J,e[9]=Z,e[10]=W,e[11]=i,e[12]=r,e[13]=a,e[14]=c,e[15]=D):D=e[15];const{height:G,isLoading:N,error:A,iframeRef:X}=Wt(D);if(!z)return null;if(A){let k;e[16]!==R?(k=se("flex items-center justify-center p-4 text-destructive bg-destructive/10 rounded-lg",R),e[16]=R,e[17]=k):k=e[17];let q;e[18]!==A?(q=v.jsx("span",{className:"text-sm",children:A}),e[18]=A,e[19]=q):q=e[19];let O;return e[20]!==k||e[21]!==q?(O=v.jsx("div",{className:k,children:q}),e[20]=k,e[21]=q,e[22]=O):O=e[22],O}const Me=r?.tool.name;let C;e[23]!==R?(C=se("relative w-full overflow-hidden rounded-lg",R),e[23]=R,e[24]=C):C=e[24];let S;e[25]!==w||e[26]!==G?(S=w!=="fullscreen"?{height:`${G}px`}:void 0,e[25]=w,e[26]=G,e[27]=S):S=e[27];let _;e[28]!==N?(_=N&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background z-10",children:v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),v.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),e[28]=N,e[29]=_):_=e[29];const ee=N&&"invisible";let H;e[30]!==ee?(H=se("w-full h-full border-0",ee),e[30]=ee,e[31]=H):H=e[31];const te=`MCP App: ${Me??o}`;let M;e[32]!==z||e[33]!==X||e[34]!==H||e[35]!==te?(M=v.jsx("iframe",{ref:X,srcDoc:z,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups",className:H,title:te}),e[32]=z,e[33]=X,e[34]=H,e[35]=te,e[36]=M):M=e[36];let U;return e[37]!==M||e[38]!==C||e[39]!==S||e[40]!==_?(U=v.jsxs("div",{className:C,style:S,children:[_,M]}),e[37]=M,e[38]=C,e[39]=S,e[40]=_,e[41]=U):U=e[41],U}const eo={view:{minHeight:400,maxHeight:800},fullscreen:{minHeight:600,maxHeight:1200}};function to(n){if(!(n==null||typeof n!="object"))try{return Ct({_meta:n})}catch{return}}export{Xt as M,Gt as a,eo as b,to as g,Re as l,Qe as r,Yt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,s as m,K as P,V as y,n as I}from"./index-
|
|
1
|
+
import{e as f,s as m,K as P,V as y,n as I}from"./index-CAeiwvn1.js";import{S,u as g}from"./constants-DV3gfGwj.js";function K(){const t=f.c(9),{org:e}=m();let n;t[0]!==e.id?(n={connectionId:S,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const o=g(n);let i;t[2]!==e.id?(i=P.aiProviders(e.id),t[2]=e.id,t[3]=i):i=t[3];let s;t[4]!==o?(s=async()=>(await o.callTool({name:"AI_PROVIDERS_LIST",arguments:{}})).structuredContent,t[4]=o,t[5]=s):s=t[5];let l;t[6]!==i||t[7]!==s?(l={queryKey:i,staleTime:1/0,queryFn:s},t[6]=i,t[7]=s,t[8]=l):l=t[8];const{data:r}=y(l);return r}function R(){const t=f.c(11),{org:e}=m();let n;t[0]!==e.id?(n={connectionId:S,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const o=g(n);let i;t[2]!==e.id?(i=P.aiProviderKeys(e.id),t[2]=e.id,t[3]=i):i=t[3];let s;t[4]!==o?(s=async()=>(await o.callTool({name:"AI_PROVIDER_KEY_LIST",arguments:{}})).structuredContent??null,t[4]=o,t[5]=s):s=t[5];let l;t[6]!==i||t[7]!==s?(l={queryKey:i,staleTime:6e4,queryFn:s},t[6]=i,t[7]=s,t[8]=l):l=t[8];const{data:r}=y(l);let u;return t[9]!==r?.keys?(u=r?.keys??[],t[9]=r?.keys,t[10]=u):u=t[10],u}function q(t){const e=f.c(17),{org:n}=m();let o;e[0]!==n.id?(o={connectionId:S,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const i=g(o);let s;e[2]!==t||e[3]!==n.id?(s=P.aiProviderModels(n.id,t??""),e[2]=t,e[3]=n.id,e[4]=s):s=e[4];const l=!!t;let r;e[5]!==i||e[6]!==t?(r=async()=>(await i.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:t}})).structuredContent??null,e[5]=i,e[6]=t,e[7]=r):r=e[7];let u;e[8]!==s||e[9]!==l||e[10]!==r?(u={queryKey:s,enabled:l,staleTime:6e4,queryFn:r},e[8]=s,e[9]=l,e[10]=r,e[11]=u):u=e[11];const{data:c,isLoading:T}=I(u);let a;e[12]!==c?.models?(a=c?.models??[],e[12]=c?.models,e[13]=a):a=e[13];const _=!!t&&T;let d;return e[14]!==a||e[15]!==_?(d={models:a,isLoading:_},e[14]=a,e[15]=_,e[16]=d):d=e[16],d}function v(t){const e=f.c(13),{org:n}=m();let o;e[0]!==n.id?(o={connectionId:S,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const i=g(o);let s;e[2]!==t||e[3]!==n.id?(s=P.aiProviderModels(n.id,t),e[2]=t,e[3]=n.id,e[4]=s):s=e[4];let l;e[5]!==i||e[6]!==t?(l=async()=>(await i.callTool({name:"AI_PROVIDERS_LIST_MODELS",arguments:{keyId:t}})).structuredContent??null,e[5]=i,e[6]=t,e[7]=l):l=e[7];let r;e[8]!==s||e[9]!==l?(r={queryKey:s,staleTime:6e4,queryFn:l},e[8]=s,e[9]=l,e[10]=r):r=e[10];const{data:u}=y(r);let c;return e[11]!==u?.models?(c=u?.models??[],e[11]=u?.models,e[12]=c):c=e[12],c}export{q as a,K as b,v as c,R as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as I,o as D,a as v,V as K,z as L}from"./index-
|
|
1
|
+
import{e as I,o as D,a as v,V as K,z as L}from"./index-CAeiwvn1.js";import{K as x}from"./constants-DV3gfGwj.js";function q(o,s,n){const t=[];if(o?.trim()){const e=o.trim(),r=n.map(a=>({field:[String(a)],operator:"contains",value:e}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const e of s)t.push({field:[e.column],operator:"eq",value:e.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function U(o,s,n){const t=o??n,e=s??"desc";return[{field:[String(t)],direction:e}]}function O(o){if(!o||typeof o!="object")throw new Error("Invalid result");if("isError"in o&&o.isError)throw new Error("content"in o&&Array.isArray(o.content)&&o.content[0]?.type==="text"?o.content[0].text:"Unknown error");if("structuredContent"in o)return o.structuredContent;throw new Error("No structured content found")}function M(o,s,n,t){const e=I.c(14);let r,a,u;if(e[0]!==t||e[1]!==s||e[2]!==n||e[3]!==o){const i=s.toUpperCase();r=`COLLECTION_${i}_GET`,u=K,a=x.collectionItem(t,o,"",i,n??""),e[0]=t,e[1]=s,e[2]=n,e[3]=o,e[4]=r,e[5]=a,e[6]=u}else r=e[4],a=e[5],u=e[6];let c;e[7]!==t||e[8]!==r||e[9]!==n?(c=async()=>{if(!n)return{item:null};const i=await t.callTool({name:r,arguments:{id:n}});return O(i)},e[7]=t,e[8]=r,e[9]=n,e[10]=c):c=e[10];let d;e[11]!==a||e[12]!==c?(d={queryKey:a,queryFn:c,staleTime:6e4},e[11]=a,e[12]=c,e[13]=d):d=e[13];const{data:y}=u(d);return y?.item??null}const Q={structuredContent:{items:[]},isError:!1};function Y(o,s,n,t={}){const{searchTerm:e,filters:r,sortKey:a,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:y=100,additionalToolArgs:i}=t,f=s.toUpperCase(),m=`COLLECTION_${f}_LIST`,g=q(e,r,c),T=U(a,u,d),p={...g&&{where:g},...T&&{orderBy:T},limit:y,offset:0,...i},C=JSON.stringify(p),h=x.collectionList(n,o,"",f,C),{data:w}=K({queryKey:h,queryFn:async()=>n?await n.callTool({name:m,arguments:p}):Q,staleTime:3e4,retry:!1,select:E=>O(E??{})?.items??[]});return w}function j(o,s,n,t={}){const{searchTerm:e,filters:r,sortKey:a,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:y=100,additionalToolArgs:i}=t,f=s.toUpperCase(),m=q(e,r,c),g=U(a,u,d),T={...m&&{where:m},...g&&{orderBy:g},limit:y,offset:0,...i},p=JSON.stringify(T);return x.collectionList(o,n,"",f,p)}function G(o,s,n){const t=I.c(34),e=D();let r;t[0]!==s?(r=s.toUpperCase(),t[0]=s,t[1]=r):r=t[1];const a=r,u=`COLLECTION_${a}_CREATE`,c=`COLLECTION_${a}_UPDATE`,d=`COLLECTION_${a}_DELETE`;let y;t[2]!==e||t[3]!==o||t[4]!==a?(y=()=>{e.invalidateQueries({predicate:S=>{const l=S.queryKey;return l[1]===o&&l[3]==="collection"&&l[4]===a}})},t[2]=e,t[3]=o,t[4]=a,t[5]=y):y=t[5];const i=y;let f;t[6]!==n||t[7]!==u?(f=async S=>{const l=await n.callTool({name:u,arguments:{data:S}});if(l.isError)throw new Error(Array.isArray(l.content)?l.content[0]?.text:String(l.content));return O(l).item},t[6]=n,t[7]=u,t[8]=f):f=t[8];let m;t[9]!==i?(m=()=>{i(),L.success("Item created successfully")},t[9]=i,t[10]=m):m=t[10];let g;t[11]!==f||t[12]!==m?(g={mutationFn:f,onSuccess:m,onError:B},t[11]=f,t[12]=m,t[13]=g):g=t[13];const T=v(g);let p;t[14]!==n||t[15]!==c?(p=async S=>{const{id:l,data:$}=S,b=await n.callTool({name:c,arguments:{id:l,data:$}});return O(b).item},t[14]=n,t[15]=c,t[16]=p):p=t[16];let C;t[17]!==i?(C=()=>{i(),L.success("Item updated successfully")},t[17]=i,t[18]=C):C=t[18];let h;t[19]!==p||t[20]!==C?(h={mutationFn:p,onSuccess:C,onError:z},t[19]=p,t[20]=C,t[21]=h):h=t[21];const w=v(h);let E;t[22]!==n||t[23]!==d?(E=async S=>{const l=await n.callTool({name:d,arguments:{id:S}});return O(l).item.id},t[22]=n,t[23]=d,t[24]=E):E=t[24];let _;t[25]!==i?(_=()=>{i(),L.success("Item deleted successfully")},t[25]=i,t[26]=_):_=t[26];let N;t[27]!==E||t[28]!==_?(N={mutationFn:E,onSuccess:_,onError:k},t[27]=E,t[28]=_,t[29]=N):N=t[29];const F=v(N);let A;return t[30]!==T||t[31]!==F||t[32]!==w?(A={create:T,update:w,delete:F},t[30]=T,t[31]=F,t[32]=w,t[33]=A):A=t[33],A}function k(o){const s=o instanceof Error?o.message:String(o);L.error(`Failed to delete item: ${s}`)}function z(o){const s=o instanceof Error?o.message:String(o);L.error(`Failed to update item: ${s}`)}function B(o){const s=o instanceof Error?o.message:String(o);L.error(`Failed to create item: ${s}`)}export{G as a,j as b,Y as c,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as g,s as C}from"./index-
|
|
1
|
+
import{e as g,s as C}from"./index-CAeiwvn1.js";import{u as N,c as O,a as T}from"./use-collections-B56DgGhQ.js";import{S as I,u as m}from"./constants-DV3gfGwj.js";function b(t){const o=g.c(19);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let s,l,c,d;o[2]!==n?({binding:s,includeVirtual:c,slug:d,...l}=n,o[2]=n,o[3]=s,o[4]=l,o[5]=c,o[6]=d):(s=o[3],l=o[4],c=o[5],d=o[6]);let e;o[7]!==s||o[8]!==l.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...l.additionalToolArgs},s!==void 0&&(e.binding=s),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=s,o[8]=l.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let a;o[14]!==l||o[15]!==r?(a={...l,additionalToolArgs:r},o[14]=l,o[15]=r,o[16]=a):a=o[16];const p=a,{org:u}=C();let f;o[17]!==u.id?(f={connectionId:I,orgId:u.id},o[17]=u.id,o[18]=f):f=o[18];const A=m(f);return O(u.id,"CONNECTIONS",A,p)}function _(t){const o=g.c(2),{org:i}=C();let n;o[0]!==i.id?(n={connectionId:I,orgId:i.id},o[0]=i.id,o[1]=n):n=o[1];const s=m(n);return N(i.id,"CONNECTIONS",t,s)}function x(){const t=g.c(2),{org:o}=C();let i;t[0]!==o.id?(i={connectionId:I,orgId:o.id},t[0]=o.id,t[1]=i):i=t[1];const n=m(i);return T(o.id,"CONNECTIONS",n)}export{x as a,_ as b,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,r as n}from"./index-
|
|
1
|
+
import{e as c,r as n}from"./index-CAeiwvn1.js";function p(){const e=c.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async i=>{await navigator.clipboard.writeText(i),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
|
package/dist/client/assets/{use-create-virtual-mcp-UIh1S6RD.js → use-create-virtual-mcp-St-hxc3T.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as g}from"./index-
|
|
1
|
+
import{e as g}from"./index-CAeiwvn1.js";import{b as p}from"./use-virtual-mcp-C84ySRY_.js";import{u as f}from"./use-navigate-to-agent-CK6LXIOn.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const l=n,{navigateOnCreate:d}=l,r=d===void 0?!1:d,t=p(),c=f();let s;e[2]!==t.create||e[3]!==r||e[4]!==c?(s=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!0});return r&&c(u.id,{search:{main:"instructions"}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=r,e[4]=c,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
|
package/dist/client/assets/{use-decopilot-events-CN7YV5I-.js → use-decopilot-events-C6hMvsnN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-CAeiwvn1.js";import{c as k}from"./create-sse-subscription-CxkOgzKf.js";const c={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},b=Object.values(c),R=k({buildUrl:o=>{const e=b.join(",");return`/org/${o}/watch?types=${e}`},eventTypes:[...b]}),d=()=>0;function y(o){const{orgId:e,taskId:u,enabled:n=!0,onStep:i,onFinish:S,onTaskStatus:p}=o,l=s.useRef({taskId:u,onStep:i,onFinish:S,onTaskStatus:p});l.current={taskId:u,onStep:i,onFinish:S,onTaskStatus:p};const a=s.useRef(null),E=s.useRef(n),T=s.useRef(e);(!a.current||E.current!==n||T.current!==e)&&(E.current=n,T.current=e,a.current=f=>{if(!n||!e)return()=>{};const I=h=>{let t;try{t=JSON.parse(h.data)}catch{return}const r=l.current;if(!(r.taskId&&t.subject!==r.taskId)){switch(t.type){case c.STEP:r.onStep?.(t);break;case c.FINISH:r.onFinish?.(t);break;case c.THREAD_STATUS:r.onTaskStatus?.(t);break}f()}};return R.subscribe(e,I)}),s.useSyncExternalStore(a.current,d,d)}export{y as u};
|
package/dist/client/assets/{use-delete-connection-DeXytvwf.js → use-delete-connection-9Vw8o7eu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as R,j as n,s as z,o as H,r as J,z as S}from"./index-
|
|
1
|
+
import{e as R,j as n,s as z,o as H,r as J,z as S}from"./index-CAeiwvn1.js";import{c as F,b as L,d as $,A as k,e as q,g as M,a as P,f as U}from"./alert-dialog-BYfF9kq9.js";import{u as K,S as B}from"./constants-DV3gfGwj.js";function X(j){const e=R.c(41),{deleteState:r,cancelDelete:i,confirmDelete:a,confirmForceDelete:l}=j,y=r.mode==="deleting";let d;e[0]!==i?(d=w=>{w||i()},e[0]=i,e[1]=d):d=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(F,{children:"Delete Connection?"}),e[2]=N):N=e[2];const T=r.mode==="deleting"&&r.connection.title;let m;e[3]!==T?(m=n.jsxs(L,{children:[N,n.jsxs($,{children:["This action cannot be undone. This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:T}),"."]})]}),e[3]=T,e[4]=m):m=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(k,{children:"Cancel"}),e[5]=E):E=e[5];let o;e[6]!==a?(o=n.jsxs(q,{children:[E,n.jsx(M,{onClick:a,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[6]=a,e[7]=o):o=e[7];let t;e[8]!==m||e[9]!==o?(t=n.jsxs(P,{children:[m,o]}),e[8]=m,e[9]=o,e[10]=t):t=e[10];let s;e[11]!==y||e[12]!==d||e[13]!==t?(s=n.jsx(U,{open:y,onOpenChange:d,children:t}),e[11]=y,e[12]=d,e[13]=t,e[14]=s):s=e[14];const _=r.mode==="force-deleting";let c;e[15]!==i?(c=w=>{w||i()},e[15]=i,e[16]=c):c=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(F,{children:"Connection Used by Agents"}),e[17]=f):f=e[17];const v=r.mode==="force-deleting"&&r.connection.title;let u;e[18]!==v?(u=n.jsx("span",{className:"font-medium text-foreground",children:v}),e[18]=v,e[19]=u):u=e[19];const I=r.mode==="force-deleting"&&r.agentNames;let g;e[20]!==I?(g=n.jsx("span",{className:"font-medium text-foreground",children:I}),e[20]=I,e[21]=g):g=e[21];let h;e[22]!==u||e[23]!==g?(h=n.jsxs("p",{children:["The connection"," ",u," ","is currently used by the following agent(s):"," ",g,"."]}),e[22]=u,e[23]=g,e[24]=h):h=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."}),e[25]=A):A=e[25];let x;e[26]!==h?(x=n.jsxs(L,{children:[f,n.jsx($,{asChild:!0,children:n.jsxs("div",{children:[h,A]})})]}),e[26]=h,e[27]=x):x=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(k,{children:"Cancel"}),e[28]=O):O=e[28];let C;e[29]!==l?(C=n.jsxs(q,{children:[O,n.jsx(M,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]}),e[29]=l,e[30]=C):C=e[30];let D;e[31]!==x||e[32]!==C?(D=n.jsxs(P,{children:[x,C]}),e[31]=x,e[32]=C,e[33]=D):D=e[33];let p;e[34]!==_||e[35]!==c||e[36]!==D?(p=n.jsx(U,{open:_,onOpenChange:c,children:D}),e[34]=_,e[35]=c,e[36]=D,e[37]=p):p=e[37];let b;return e[38]!==p||e[39]!==s?(b=n.jsxs(n.Fragment,{children:[s,p]}),e[38]=p,e[39]=s,e[40]=b):b=e[40],b}function Q(j){const e=j.content;return Array.isArray(e)&&e[0]?.type==="text"&&typeof e[0].text=="string"?e[0].text:"Unknown error"}function Y({onSuccess:j}={}){const{org:e}=z(),r=H(),i=K({connectionId:B,orgId:e.id}),[a,l]=J.useState({mode:"idle"}),y=()=>{r.invalidateQueries({predicate:o=>{const t=o.queryKey;return t[1]===e.id&&t[3]==="collection"&&t[4]==="CONNECTIONS"}})},d=()=>{y(),S.success("Connection deleted successfully"),l({mode:"idle"}),j?.()};return{deleteState:a,requestDelete:o=>{l({mode:"deleting",connection:o})},cancelDelete:()=>{l({mode:"idle"})},confirmDelete:async()=>{if(a.mode!=="deleting")return;const o=a.connection;l({mode:"idle"});try{const t=await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:o.id}});if(t.isError){const s=Q(t),_=s.replace(/^Error:\s*/,"");try{const c=JSON.parse(_);if(c.code==="CONNECTION_IN_USE"&&c.agentNames){l({mode:"force-deleting",connection:o,agentNames:c.agentNames.map(f=>`"${f}"`).join(", ")});return}}catch{}S.error(`Failed to delete connection: ${s}`);return}d()}catch(t){const s=t instanceof Error?t.message:String(t);S.error(`Failed to delete connection: ${s}`)}},confirmForceDelete:async()=>{if(a.mode!=="force-deleting")return;const o=a.connection.id;l({mode:"idle"});try{const t=await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:o,force:!0}});if(t.isError){S.error(`Failed to delete connection: ${Q(t)}`);return}d()}catch(t){const s=t instanceof Error?t.message:String(t);S.error(`Failed to delete connection: ${s}`)}}}}export{X as D,Y as u};
|
package/dist/client/assets/{use-infinite-scroll-DjXaeUEQ.js → use-infinite-scroll-BDoBJohW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./index-
|
|
1
|
+
import{r}from"./index-CAeiwvn1.js";function a(t,n,s=!1){const e=r.useRef(null),c=r.useRef(t),u=r.useRef(n),f=r.useRef(s);return c.current=t,u.current=n,f.current=s,o=>{e.current&&e.current.disconnect(),e.current=new IntersectionObserver(i=>{i[0]?.isIntersecting&&u.current&&!f.current&&c.current()}),o&&e.current.observe(o)}}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,e as w}from"./index-
|
|
1
|
+
import{r as u,e as w}from"./index-CAeiwvn1.js";import{u as E}from"./use-view-mode-OuDPu3JY.js";function J(a){const e=`deco-filters-${a}`,[s,i]=u.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[s,t=>{i(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function N(a){const e=w.c(7),[s,i]=u.useState(a),[r,t]=u.useState(a?"desc":null);let l;e[0]!==r||e[1]!==s?(l=S=>{s!==S?(i(S),t("asc")):r==="asc"?t("desc"):r==="desc"&&(i(void 0),t(null))},e[0]=r,e[1]=s,e[2]=l):l=e[2];const d=l;let o;return e[3]!==d||e[4]!==r||e[5]!==s?(o={sortKey:s,sortDirection:r,handleSort:d},e[3]=d,e[4]=r,e[5]=s,e[6]=o):o=e[6],o}function W(a){const e=w.c(20),{namespace:s,resource:i,defaultSortKey:r,defaultViewMode:t}=a,l=r===void 0?"title":r,d=t===void 0?"table":t,[o,S]=u.useState(""),b=u.useDeferredValue(o),D=`${s}-${i}`,[p,F]=J(D),c=`mesh-${i}-filter-visible-${s}`;let g;e[0]!==c?(g=()=>globalThis.localStorage?.getItem(c)==="true",e[0]=c,e[1]=g):g=e[1];const[n,x]=u.useState(g);let h;e[2]!==c?(h=T=>{x(T),globalThis.localStorage?.setItem(c,String(T))},e[2]=c,e[3]=h):h=e[3];const f=h;let m;e[4]!==n||e[5]!==f?(m=()=>{f(!n)},e[4]=n,e[5]=f,e[6]=m):m=e[6];const V=m,[$,K]=E(`mesh-${i}-${s}`,d),{sortKey:I,sortDirection:v,handleSort:B}=N(l),M=I;let y;return e[7]!==n||e[8]!==p||e[9]!==B||e[10]!==o||e[11]!==b||e[12]!==f||e[13]!==F||e[14]!==K||e[15]!==v||e[16]!==M||e[17]!==V||e[18]!==$?(y={search:o,searchTerm:b,setSearch:S,filters:p,setFilters:F,filterBarVisible:n,setFilterBarVisible:f,toggleFilterBar:V,viewMode:$,setViewMode:K,sortKey:M,sortDirection:v,handleSort:B},e[7]=n,e[8]=p,e[9]=B,e[10]=o,e[11]=b,e[12]=f,e[13]=F,e[14]=K,e[15]=v,e[16]=M,e[17]=V,e[18]=$,e[19]=y):y=e[19],y}export{W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as m,a as C,n as p,V as q}from"./index-
|
|
1
|
+
import{e as m,a as C,n as p,V as q}from"./index-CAeiwvn1.js";import{K as T}from"./constants-DV3gfGwj.js";function M(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function O(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function w(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function F(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function P(a){const e=m.c(8);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{M as a,O as b,w as c,P as d,F as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,s as o,V as u,K as i,b as a}from"./index-
|
|
1
|
+
import{e as n,s as o,V as u,K as i,b as a}from"./index-CAeiwvn1.js";function l(){const e=n.c(4),{locator:r}=o();let t;e[0]!==r?(t=i.members(r),e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s={queryKey:t,queryFn:m},e[2]=t,e[3]=s):s=e[3],u(s)}function m(){return a.organization.listMembers()}export{l as u};
|