decocms 2.306.12 → 2.306.13
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-Ot2CLMxw.js → AlertCircle-UghQPlAa.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-CA2U4-LB.js → ArrowNarrowLeft-1BfkUm85.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D_v7OVFz.js → ArrowUpRight-1rqShrTM.js} +1 -1
- package/dist/client/assets/{Check-B7lQX-U6.js → Check-DBWnyOFJ.js} +1 -1
- package/dist/client/assets/{CheckCircle-DQVTFDuD.js → CheckCircle-CBMgXE-F.js} +1 -1
- package/dist/client/assets/{ChevronDown-BHHmj_90.js → ChevronDown-D452dgSU.js} +1 -1
- package/dist/client/assets/{ChevronRight-CMwA4MWg.js → ChevronRight-DoY3rcf9.js} +1 -1
- package/dist/client/assets/{ChevronUp-DZMg9j3Z.js → ChevronUp-BlZFoG59.js} +1 -1
- package/dist/client/assets/{Container-BPn2KqkB.js → Container-BQVUd9tN.js} +1 -1
- package/dist/client/assets/{DotsVertical-C0-av-w_.js → DotsVertical-CAgAGLKz.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cr974KZi.js → LinkExternal01-CGcDVdEi.js} +1 -1
- package/dist/client/assets/{Lock01-chX0YN7M.js → Lock01-FiMk9Cv6.js} +1 -1
- package/dist/client/assets/{Palette-Cmsuc3m0.js → Palette-DXyBGBQu.js} +1 -1
- package/dist/client/assets/{Play-C_yrNjMw.js → Play-CDjH79to.js} +1 -1
- package/dist/client/assets/{Plus-BHVhclrE.js → Plus-FC_C8qkl.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Yl__XBgH.js → RefreshCcw01-Cd8Km121.js} +1 -1
- package/dist/client/assets/{SearchMd-BJVwn_ke.js → SearchMd-B780aQOS.js} +1 -1
- package/dist/client/assets/{Settings02-BCqAnzCC.js → Settings02--XuHa5eI.js} +1 -1
- package/dist/client/assets/{Shield01-BzDWvNLz.js → Shield01-Bg1T1EGa.js} +1 -1
- package/dist/client/assets/{Star01-t5c8OzJ1.js → Star01-DRidtrYn.js} +1 -1
- package/dist/client/assets/{Sun-fUlV2CSc.js → Sun-Bpli4t2N.js} +1 -1
- package/dist/client/assets/{Tool01-DHF_L3KH.js → Tool01-NWIcFn9q.js} +1 -1
- package/dist/client/assets/{Trash01-12UJulVC.js → Trash01-4w6_aW9X.js} +1 -1
- package/dist/client/assets/{User01-BjX-G1vE.js → User01-CxpWRrdM.js} +1 -1
- package/dist/client/assets/{Users03-CZn6wNJ2.js → Users03-CK1Aa1HI.js} +1 -1
- package/dist/client/assets/{X-DRGbU-sk.js → X-BGh8G2l7.js} +1 -1
- package/dist/client/assets/{XCircle-DH7bOaGY.js → XCircle-CYGTZyzW.js} +1 -1
- package/dist/client/assets/{XClose-CdyVyCLn.js → XClose-Dz5yGfpm.js} +1 -1
- package/dist/client/assets/{Zap-DVRtpQ6o.js → Zap-Druw6RpX.js} +1 -1
- package/dist/client/assets/{ZapSquare-CU44MpAH.js → ZapSquare-BLhBRchY.js} +1 -1
- package/dist/client/assets/{accordion-o4uEL-I1.js → accordion-DdQd4o33.js} +1 -1
- package/dist/client/assets/{agent-icon-C1jmOFVg.js → agent-icon-CznXZlOI.js} +1 -1
- package/dist/client/assets/{agents-list-ksM75Z6l.js → agents-list-CaQhK_9Q.js} +1 -1
- package/dist/client/assets/ai-providers-C_QaV2LV.js +1 -0
- package/dist/client/assets/{alert-dialog-DKLXK-1u.js → alert-dialog-BiN56dOX.js} +1 -1
- package/dist/client/assets/{auth-catchall-GUJWINn8.js → auth-catchall-6Av77aQi.js} +1 -1
- package/dist/client/assets/{automation-list-row-CKsxLzIm.js → automation-list-row-DdlSuO-v.js} +1 -1
- package/dist/client/assets/{automations-CMxgpl5P.js → automations-BMuo3AXx.js} +1 -1
- package/dist/client/assets/{avatar-BHCqEDVT.js → avatar-Z1wN1pq-.js} +1 -1
- package/dist/client/assets/{badge-CkKVCYBi.js → badge-CTmf2TW8.js} +1 -1
- package/dist/client/assets/{brand-context-BlmY1E4z.js → brand-context-CUDRGuTh.js} +1 -1
- package/dist/client/assets/{card-BPF7ycIj.js → card-Bd8klEwI.js} +1 -1
- package/dist/client/assets/{chat-context-cuD-y97U.js → chat-context-DGU47jw7.js} +1 -1
- package/dist/client/assets/{checkbox-nNLHENdc.js → checkbox-B3EwrxkO.js} +1 -1
- package/dist/client/assets/{collection-detail-RicC_Sa1.js → collection-detail-Cgmw3RVY.js} +1 -1
- package/dist/client/assets/{collection-display-button-DluRs55o.js → collection-display-button-DMmbKfya.js} +1 -1
- package/dist/client/assets/{collection-search-c41oWBJf.js → collection-search-D-x3SJ1z.js} +1 -1
- package/dist/client/assets/{collection-search-fbQaa98h.js → collection-search-Do2r8Bif.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D5c_AqvG.js → collection-table-wrapper-CtvRahI-.js} +1 -1
- package/dist/client/assets/{collection-tabs-DqCBG7jb.js → collection-tabs-BKqleLTU.js} +1 -1
- package/dist/client/assets/{collections-DdU4I50l.js → collections-67ZnQ_LS.js} +1 -1
- package/dist/client/assets/{command-DbmRiBqo.js → command-BAMG06m5.js} +1 -1
- package/dist/client/assets/{connection-card-QcsFV35H.js → connection-card-DQm8aezN.js} +1 -1
- package/dist/client/assets/{connection-detail-CU37TDrz.js → connection-detail-BhxCMY6j.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Ub-yYKls.js → connection-form-helpers--6zqXj9i.js} +1 -1
- package/dist/client/assets/{connections-Cx1j-a9X.js → connections-C0gQbHBs.js} +1 -1
- package/dist/client/assets/{constants-xZGcpYKv.js → constants-BDk5hb7z.js} +1 -1
- package/dist/client/assets/{constants-ggwtj_b2.js → constants-DXQgV2hu.js} +1 -1
- package/dist/client/assets/{dialog-CNOF2ZMK.js → dialog-DUgfuVrb.js} +1 -1
- package/dist/client/assets/{domain-settings-sx9KWI1e.js → domain-settings-DpONcUPd.js} +1 -1
- package/dist/client/assets/{drawer-Df34zS04.js → drawer-DeyjQQc7.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C3kAm_Er.js → dropdown-menu-Cbx_bdO_.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-C8WyvfVv.js → dynamic-plugin-layout-D7HG8B_t.js} +1 -1
- package/dist/client/assets/{empty-state-DyTFpS0l.js → empty-state-BIAZXmQO.js} +1 -1
- package/dist/client/assets/{empty-state-Dw_gVxIS.js → empty-state-BnjbbhBR.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C7nRmph4.js → extract-connection-data-Dgw7Sgd3.js} +1 -1
- package/dist/client/assets/{features-CbtmnrZ6.js → features-De6GvAAs.js} +1 -1
- package/dist/client/assets/{form-B11RrkrM.js → form-O0xus6j8.js} +1 -1
- package/dist/client/assets/{general-DSgFWSrp.js → general-tEcdYerZ.js} +1 -1
- package/dist/client/assets/index-BZ6nkz4a.js +1 -0
- package/dist/client/assets/{index-BB5P8isj.js → index-CG3ceZHc.js} +1 -1
- package/dist/client/assets/{index-CDVvjofj.js → index-CZLTTN-z.js} +1 -1
- package/dist/client/assets/{index-BsrxFreR.js → index-CdFJkiAN.js} +1 -1
- package/dist/client/assets/{index-3PRXeBfP.js → index-CqFBXkjQ.js} +1 -1
- package/dist/client/assets/{index-BM8jECEp.js → index-CuVn0uMY.js} +1 -1
- package/dist/client/assets/{index-Cy0GY2u3.js → index-DJiWK6lj.js} +1 -1
- package/dist/client/assets/{index-CnlV8NnU.js → index-DPM8__xA.js} +1 -1
- package/dist/client/assets/{index-C3ldIVUr.js → index-DV-VioVg.js} +1 -1
- package/dist/client/assets/{index-DANPLo87.js → index-DZjKh5eS.js} +3 -3
- package/dist/client/assets/{index-BkiajC9R.js → index-Dcg8Qevd.js} +2 -2
- package/dist/client/assets/{index-BJIwjxxl.js → index-DdsW868M.js} +1 -1
- package/dist/client/assets/{index-Bq9Gbm0H.js → index-DtUGvIts.js} +1 -1
- package/dist/client/assets/{index-DFlPdciX.js → index-EV8zcDnc.js} +1 -1
- package/dist/client/assets/{index-SKWAKGeB.js → index-XGdWuQyL.js} +1 -1
- package/dist/client/assets/{index-BFicVTdP.js → index-i68m5nvc.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DapJgjCy.js → infiniteQueryObserver-D9yYekai.js} +1 -1
- package/dist/client/assets/{input-jGTjkEgf.js → input-Cvo2jJQf.js} +1 -1
- package/dist/client/assets/{integration-icon-BvsSfF2G.js → integration-icon-DTJ2wb4X.js} +1 -1
- package/dist/client/assets/{label-BwHLLLjG.js → label-_jNQo8Ll.js} +1 -1
- package/dist/client/assets/{layout-yZTsEXBs.js → layout-DbwGS2qx.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-cCvcDvSF.js → lean-canvas-recruit-modal-tP8fRQib.js} +1 -1
- package/dist/client/assets/{login-46RSYdDj.js → login-DehPjhCM.js} +1 -1
- package/dist/client/assets/{members-D4Mf2IQe.js → members-BMPf1BpS.js} +1 -1
- package/dist/client/assets/{monaco-editor-ymd_jUTr.js → monaco-editor-BVARKKWN.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D9yNQE2b.js → monitoring-stats-row-D7tWgW-Q.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DZRkgpAw.js → oauth-callback-ai-provider-DC-UED8v.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dd82POES.js → oauth-callback-l4PY6t1A.js} +1 -1
- package/dist/client/assets/{onboarding-BIO4cqmI.js → onboarding-Bd6pQbk3.js} +1 -1
- package/dist/client/assets/{org-layout-CN2fB-vu.js → org-layout-COoj2PVG.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-CKCTv0lC.js → org-plugin-layout-DGnpwRtk.js} +1 -1
- package/dist/client/assets/{pair-CkdIVJLN.js → pair-_253DGSq.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C2sVpvFW.js → plugin-empty-state-CakFVZ2i.js} +1 -1
- package/dist/client/assets/{plugin-header-DqxMpFAT.js → plugin-header-6TMFE3Ls.js} +1 -1
- package/dist/client/assets/{plugin-layout-sfjMan0F.js → plugin-layout-3m9okTPI.js} +1 -1
- package/dist/client/assets/{popover-Qhd5GKAf.js → popover-DNu8C4Ll.js} +1 -1
- package/dist/client/assets/{profile-CVXH0cog.js → profile-CLBWN3L8.js} +1 -1
- package/dist/client/assets/{project-app-view-Dr4s0FIv.js → project-app-view-5ZnU4fo7.js} +1 -1
- package/dist/client/assets/registry-D_jmaKr2.js +2 -0
- package/dist/client/assets/{registry-layout-xR6rLrDK.js → registry-layout-Hazgpecz.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CwLXPn7_.js → required-auth-layout-Cg8CZTlk.js} +1 -1
- package/dist/client/assets/{reset-password-Mf0kA3DN.js → reset-password-CzwUFBho.js} +1 -1
- package/dist/client/assets/{roles-CHPJSwkL.js → roles-DUtgWupV.js} +1 -1
- package/dist/client/assets/{scroll-area-BEarfPUC.js → scroll-area-DGEAK3pH.js} +1 -1
- package/dist/client/assets/{search-input-BNv3WxnU.js → search-input-C50ImRzg.js} +1 -1
- package/dist/client/assets/{select-1F7nfWqc.js → select-DkBE5ypj.js} +1 -1
- package/dist/client/assets/{select-model-CG5HxXo0.js → select-model-B9xghDV8.js} +1 -1
- package/dist/client/assets/{settings-layout-DxEs_4Uz.js → settings-layout-u6gOtHmU.js} +1 -1
- package/dist/client/assets/{settings-section-DV5Tzhsa.js → settings-section-DeAx6MsQ.js} +1 -1
- package/dist/client/assets/{shell-layout-Bvmr4Ir9.js → shell-layout-xLg1cKrj.js} +1 -1
- package/dist/client/assets/{skeleton-Bx5y3Xmp.js → skeleton-BL7idETO.js} +1 -1
- package/dist/client/assets/{sso-2Feex-XD.js → sso-UHrPOY4-.js} +1 -1
- package/dist/client/assets/{store-Cipg9Lj9.js → store-CCrp-zDu.js} +1 -1
- package/dist/client/assets/store-registry-dlSCWL84.js +2 -0
- package/dist/client/assets/{switch-BMcphIES.js → switch-Ba2DX0J8.js} +1 -1
- package/dist/client/assets/{table-BpJjOmgy.js → table-Dpjp6sno.js} +1 -1
- package/dist/client/assets/{tabs-BlzUVMC9.js → tabs-CUXWIghp.js} +1 -1
- package/dist/client/assets/{task-status-BLDsdEd0.js → task-status-D6HaLDfU.js} +1 -1
- package/dist/client/assets/{textarea-s7PVXilr.js → textarea-e7WVG0Uq.js} +1 -1
- package/dist/client/assets/{toggle-group-Dj05trYJ.js → toggle-group-Bzjy8IQq.js} +1 -1
- package/dist/client/assets/{tools-list-CR_2tWrg.js → tools-list-ddVo-6Vs.js} +1 -1
- package/dist/client/assets/{tooltip-CZbLg-Hf.js → tooltip-sn7TXXXA.js} +1 -1
- package/dist/client/assets/{types-wbD5gTmt.js → types-ClFDwb3j.js} +1 -1
- package/dist/client/assets/{use-ai-providers-by3zafwF.js → use-ai-providers-D1ZzNZfi.js} +1 -1
- package/dist/client/assets/{use-collections-BIsV5dcA.js → use-collections-DDocavcC.js} +1 -1
- package/dist/client/assets/{use-connection-BLJ6BaWy.js → use-connection-wzOJDB7e.js} +1 -1
- package/dist/client/assets/{use-copy-ORR4yHnB.js → use-copy-D0VCYdzD.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BjiLekp8.js → use-create-virtual-mcp-BQ9UAVGc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DmAET555.js → use-debounced-autosave-vxXjJ2-V.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D1WuhDgD.js → use-decopilot-events-CQn9-0iO.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DaROE5av.js → use-delete-connection-C1mV-M2x.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-jzFqUD4-.js → use-infinite-scroll-CyUixfAd.js} +1 -1
- package/dist/client/assets/{use-list-state-DhHkWiyj.js → use-list-state-BkqBgDIi.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-henGoqsi.js → use-mcp-tools-Cu2GPPjO.js} +1 -1
- package/dist/client/assets/{use-members-DBih95tA.js → use-members-Bw_9meIY.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CucJsCgb.js → use-navigate-to-agent-BvnJAyr6.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B3WZtWV1.js → use-org-auth-client-uXh4lV5h.js} +1 -1
- package/dist/client/assets/{use-org-sso-guN7zSCH.js → use-org-sso-Co0XjU-j.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BE030zs4.js → use-organization-roles-CXi0dKrO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-ro4iJPpY.js → use-organization-settings-OER3kM7D.js} +1 -1
- package/dist/client/assets/{use-registry-connections-B-EpYSQR.js → use-registry-connections-LYUFCGgQ.js} +1 -1
- package/dist/client/assets/{use-status-sounds-0D0UbNhQ.js → use-status-sounds-CQVr-jwf.js} +1 -1
- package/dist/client/assets/{use-tasks-CCgL71pE.js → use-tasks-B8ZzLgVK.js} +1 -1
- package/dist/client/assets/{use-view-mode-Dq8SK5jL.js → use-view-mode-ti5AMLDX.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DnJsvDcW.js → use-virtual-mcp-Cvy2Xx_N.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-eCacXMD5.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Ck-t1SMi.js +1 -0
- package/dist/client/assets/{user-Cifqeo4n.js → user-Dst4Prvf.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DgvGEUt1.js → view-mode-toggle-Ca3EQ8LL.js} +1 -1
- package/dist/client/assets/{workflow-oA9SWgD2.js → workflow-BUQXpyzH.js} +1 -1
- package/dist/client/assets/workflow-detail-DLo-hD09.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +7 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/license +9 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/mimic-fn/license +9 -0
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -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/license +9 -0
- package/dist/server/node_modules/onetime/package.json +43 -0
- package/dist/server/node_modules/onetime/readme.md +94 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/server.js +6 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-Crvwlm_n.js +0 -1
- package/dist/client/assets/index-CXY3EUsW.js +0 -1
- package/dist/client/assets/registry-C6e5KXgL.js +0 -2
- package/dist/client/assets/store-registry-aUgT6Hv2.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BJJhbE0g.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Bjt0Pxxe.js +0 -1
- package/dist/client/assets/workflow-detail-DTRwxa9v.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as ue,b as Bt,u as ui,z as kn,C as Nn,j as n,B as J,x as ne,r as w,o as qt,f as ct,l as He,G as rn,F as on,t as $,K as ve,e as L,Q as Vi,R as mi,c as z,a as _n,g as fi,d as pi,H as dt,J as Dt,E as hi,P as Cn,ap as gi,n as In,y as ps,aq as xi,ar as hs,as as bi,at as De,au as an,ao as yi,av as vi,aw as ln,ax as wi,ay as ji,az as Ai,aA as Si,w as ki,aB as Ni,aC as _i,aD as Ci,aE as Ii,aF as zn}from"./index-BkiajC9R.js";import{b as Me,a as Le,c as Fe,d as Ue,e as Kt,D as gs}from"./dialog-CNOF2ZMK.js";import{S as Ri}from"./switch-BMcphIES.js";import{I as _e}from"./input-jGTjkEgf.js";import{b as Rn,u as Ti}from"./use-connection-BLJ6BaWy.js";import{S as kt,u as qe,W as xs,g as Tn,i as Bn,c as Pi}from"./constants-ggwtj_b2.js";import{a as Ei,c as Di}from"./lean-canvas-recruit-modal-cCvcDvSF.js";import{a as Pn}from"./use-navigate-to-agent-CucJsCgb.js";import{a as Mi,A as En,L as Li,M as bs,N as ys,o as Fi,O as Ui,P as Oi,b as $i,Q as zi,H as vs}from"./agent-icon-C1jmOFVg.js";import{t as Bi,b as Yt,u as Dn,a as qi,g as Ki,h as Yi,w as Wi,A as Gi,i as Qi,j as Hi}from"./chat-context-cuD-y97U.js";import{b as Wt,a as Gt,c as Qt,D as Ht,d as Ji,e as Xi,f as Zi}from"./drawer-Df34zS04.js";import{u as Jt,T as xt,a as bt,b as yt,c as xn}from"./tooltip-CZbLg-Hf.js";import{I as ws}from"./integration-icon-BvsSfF2G.js";import{a as js,b as er,u as tr}from"./use-virtual-mcp-DnJsvDcW.js";import{u as nr}from"./use-tasks-CCgL71pE.js";import{r as sr,i as ir}from"./shell-layout-Bvmr4Ir9.js";import{j as Xt,k as Ge,l as rr,s as Mn,t as or,m as ar,n as lr,o as cr,q as wt,u as dr,v as ur,c as Vr,S as mr,w as fr,x as qn}from"./pair-CkdIVJLN.js";import{S as Mt,u as Zt,P as bn,a as pr,b as hr,c as gr,E as xr,i as br,d as yr}from"./index-CDVvjofj.js";import{C as As}from"./collection-search-c41oWBJf.js";import{u as vr,g as Ln,a as wr,c as jr,l as Lt}from"./tabs-BlzUVMC9.js";import{F as me,b as fe,c as Ne,d as pe,f as he,a as jt}from"./form-B11RrkrM.js";import{c as Ee,e as cn,f as dn,D as Ss,a as ks,b as Ns,d as Ar}from"./dropdown-menu-C3kAm_Er.js";import{s as Sr,i as kr}from"./XClose-CdyVyCLn.js";import{c as _s}from"./ZapSquare-CU44MpAH.js";import{i as Xe}from"./Check-B7lQX-U6.js";import{s as lt}from"./Star01-t5c8OzJ1.js";import{a as yn,t as Nr}from"./Tool01-DHF_L3KH.js";import{i as Cs}from"./Lock01-chX0YN7M.js";import{s as Is}from"./Plus-BHVhclrE.js";import{f as un,d as Rs,t as _r,g as Cr,b as Ir}from"./XCircle-DH7bOaGY.js";import{i as pt}from"./X-DRGbU-sk.js";import{i as Ts}from"./AlertCircle-Ot2CLMxw.js";import{S as Ps,a as Es,b as Ds,c as Ms,d as ot}from"./select-1F7nfWqc.js";import{i as Rr}from"./RefreshCcw01-Yl__XBgH.js";import{T as Ls,a as Ft}from"./toggle-group-Dj05trYJ.js";import{u as Tr,a as Pr}from"./use-ai-providers-by3zafwF.js";import{m as en,g as Er,i as Dr,a as Fs,M as Mr,N as Lr}from"./select-model-CG5HxXo0.js";import{S as Fr}from"./index-BB5P8isj.js";import{r as Us,l as vt}from"./types-wbD5gTmt.js";import{t as Kn}from"./ChevronDown-BHHmj_90.js";import{p as Ur,q as Yn}from"./question-004-sINsf4GQ.js";import{g as Wn}from"./ai-providers-logos-DD3qZ33J.js";import{g as Or}from"./connection-slug-eyAPH6o3.js";import{u as Os,a as $s,g as $r,C as Vn}from"./connection-card-QcsFV35H.js";import{C as zr}from"./collection-tabs-DqCBG7jb.js";import{g as Br}from"./constants-xZGcpYKv.js";import{T as qr}from"./textarea-s7PVXilr.js";import{n as Pt}from"./Container-BPn2KqkB.js";import{c as Kr,i as It,a as Gn,E as Yr,p as Wr,b as Gr,d as Qr}from"./connection-form-helpers-Ub-yYKls.js";import{u as Qn}from"./use-infinite-scroll-jzFqUD4-.js";import{u as Hr}from"./useSuspenseInfiniteQuery-Bjt0Pxxe.js";import{g as Jr,e as Xr,a as Zr}from"./extract-connection-data-C7nRmph4.js";import{B as Rt}from"./badge-CkKVCYBi.js";import{i as eo}from"./ChevronRight-CMwA4MWg.js";function to({open:t,onOpenChange:e,onCreated:s}){const{org:i}=ue(),{data:r}=Bt.useSession(),{stdioEnabled:o}=ui(),a=Jt(),d=Rn(),l=Os(),V=$s(l,"").items,c=kn({resolver:Nn(Kr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=c.watch("ui_type"),p=c.watch("connection_url"),x=c.watch("npx_package"),g=It({uiType:m,connectionUrl:p??"",npxPackage:x??""})??Gn({uiType:m,connectionUrl:p??"",registryItems:V}),f=S=>{const v=S.trim();if(!v)return;const j=!!c.formState.dirtyFields.title,E=!!c.formState.dirtyFields.description,D=!!c.formState.dirtyFields.env_vars,I=k=>{if(k&&(!j&&!c.getValues("title").trim()&&k.title&&c.setValue("title",k.title,{shouldDirty:!1}),!E&&!(c.getValues("description")??"").trim()&&k.description&&c.setValue("description",k.description,{shouldDirty:!1}),!D&&k.envVarKeys?.length)){const N=c.getValues("env_vars")??[],R=new Set(N.map(T=>T.key)),M=k.envVarKeys.filter(T=>!R.has(T));M.length>0&&c.setValue("env_vars",[...N,...M.map(T=>({key:T,value:""}))],{shouldDirty:!0})}},P=Wr(v);if(P&&o){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",P.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),I(It({uiType:"NPX",npxPackage:P.packageName}));return}if(v.startsWith("http://")||v.startsWith("https://")){const k=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";c.setValue("ui_type",k,{shouldDirty:!0}),c.setValue("connection_url",v,{shouldDirty:!0}),I(It({uiType:k,connectionUrl:v})??Gn({uiType:k,connectionUrl:v,registryItems:V}));return}m==="NPX"&&I(It({uiType:"NPX",npxPackage:v}))},b=S=>{S||c.reset(),e(S)},h=async S=>{let v,j=null,E=null,D=null;S.ui_type==="NPX"?(v="STDIO",j="",D=Gr(S.npx_package||"",S.env_vars||[])):S.ui_type==="STDIO"?(v="STDIO",j="",D=Qr(S.stdio_command||"",S.stdio_args||"",S.stdio_cwd,S.env_vars||[])):(v=S.ui_type,j=S.connection_url||"",E=S.connection_token||null);const I=Br("conn");try{await d.create.mutateAsync({id:I,title:S.title,description:S.description||null,connection_type:v,connection_url:j,connection_token:E,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:i.id,icon:S.icon??null,app_name:null,app_id:null,connection_headers:D,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),c.reset(),e(!1),s?.(I)}catch{ne.error("Failed to create connection")}},y="Create Connection",A="Create a custom connection in your organization. Fill in the details below.",_=c.formState.isSubmitting?"Saving...":"Create Connection",C=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(me,{control:c.control,name:"ui_type",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Type *"}),n.jsxs(Ps,{value:S.value,onValueChange:S.onChange,children:[n.jsx(pe,{children:n.jsx(Es,{children:n.jsx(Ds,{})})}),n.jsxs(Ms,{children:[n.jsx(ot,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ot,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ot,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"Websocket"]})}),o&&n.jsxs(n.Fragment,{children:[n.jsx(ot,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Pt,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ot,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Mi,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx(he,{})]})}),m==="NPX"&&n.jsx(me,{control:c.control,name:"npx_package",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"NPM Package *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"@perplexity-ai/mcp-server",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("npx_package",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(he,{})]})}),m==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(me,{control:c.control,name:"stdio_command",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Command *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"node, bun, python...",...S,value:S.value??""})}),n.jsx(he,{})]})}),n.jsx(me,{control:c.control,name:"stdio_args",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Arguments"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"arg1 arg2 --flag value",...S,value:S.value??""})}),n.jsx(he,{})]})})]}),n.jsx(me,{control:c.control,name:"stdio_cwd",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Working Directory"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"/path/to/project (optional)",...S,value:S.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx(he,{})]})})]}),(m==="NPX"||m==="STDIO")&&n.jsx(me,{control:c.control,name:"env_vars",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Environment Variables"}),n.jsx(pe,{children:n.jsx(Yr,{value:S.value??[],onChange:S.onChange})}),n.jsx(he,{})]})}),m!=="NPX"&&m!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(me,{control:c.control,name:"connection_url",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"URL *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"https://example.com/mcp",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("connection_url",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(he,{})]})}),n.jsx(me,{control:c.control,name:"connection_token",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:g?.token?.label??"Token (optional)"}),n.jsx(pe,{children:n.jsx(_e,{type:"password",placeholder:g?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...S,value:S.value??""})}),g?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.token.helperText,g.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),n.jsx(he,{})]})})]}),n.jsx(me,{control:c.control,name:"title",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Name *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"My Connection",...S})}),n.jsx(he,{})]})}),n.jsx(me,{control:c.control,name:"description",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Description"}),n.jsx(pe,{children:n.jsx(qr,{placeholder:"A brief description of this connection",rows:3,...S,value:S.value??""})}),n.jsx(he,{})]})})]});return a?n.jsx(Wt,{open:t,onOpenChange:b,children:n.jsxs(Gt,{className:"max-h-[90vh]",children:[n.jsx(Qt,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Ht,{children:y}),n.jsx(Ji,{className:"mt-1",children:A})]}),n.jsx(Xi,{asChild:!0,children:n.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Sr,{size:16})})})]})}),n.jsx(jt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:C}),n.jsx(Zi,{children:n.jsx(J,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):n.jsx(Me,{open:t,onOpenChange:b,children:n.jsxs(Le,{className:"sm:max-w-[525px]",children:[n.jsxs(Fe,{children:[n.jsx(Ue,{children:y}),n.jsx(Kt,{children:A})]}),n.jsx(jt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"py-4",children:C}),n.jsxs(gs,{children:[n.jsx(J,{type:"button",variant:"outline",onClick:()=>b(!1),children:"Cancel"}),n.jsx(J,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function no(t){const e=L.c(73),{mode:s,agentId:i,addedConnectionIds:r,onAdd:o,onCloneAndAdd:a,onConnectAndAdd:d,connectingItemId:l,search:u,onCreateConnection:V,onBrowseNavigate:c,defaultTab:m}=t,p=s===void 0?"add":s,x=m===void 0?"connected":m,{org:g}=ue(),f=w.useDeferredValue(u),b=u!==f,h=f.trim().toLowerCase();let y;e[0]!==x?(y=U=>U??x,e[0]=x,e[1]=y):y=e[1];const[A,_]=Vi(mi.connectionsTab(g.slug)+(x==="all"?":home-modal":":agent-modal"),y);let C;e[2]!==A||e[3]!==_?(C=U=>{U!==A&&$("connections_dialog_tab_changed",{to_tab:U}),_(U)},e[2]=A,e[3]=_,e[4]=C):C=e[4];const S=C;let v;e[5]!==g.id||e[6]!==g.slug?(v={connectionId:kt,orgId:g.id,orgSlug:g.slug},e[5]=g.id,e[6]=g.slug,e[7]=v):v=e[7];const j=qe(v);let E,D,I;if(e[8]!==j||e[9]!==f||e[10]!==g.id){I=f?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:f.trim()},{field:["description"],operator:"contains",value:f.trim()}]}:void 0;const U={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},X=JSON.stringify(U);D=Hr,E=ve.collectionListInfinite(j,g.id,"","CONNECTIONS",X),e[8]=j,e[9]=f,e[10]=g.id,e[11]=E,e[12]=D,e[13]=I}else E=e[11],D=e[12],I=e[13];let P;e[14]!==j||e[15]!==I?(P=async U=>{const{pageParam:X}=U,Se=X===void 0?0:X;return(await j.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:Se}})).structuredContent},e[14]=j,e[15]=I,e[16]=P):P=e[16];let k;e[17]!==E||e[18]!==P?(k={queryKey:E,queryFn:P,initialPageParam:0,getNextPageParam:lo,staleTime:3e4},e[17]=E,e[18]=P,e[19]=k):k=e[19];const{data:N,fetchNextPage:R,hasNextPage:M,isFetchingNextPage:T}=D(k),F=N?.pages.flatMap(ao)??[],O=$r(F),q=new Set(F.filter(oo).map(ro)),K=Os(),H=$s(K,f),Z=Qn(H.loadMore,H.hasMore,H.isLoadingMore),Q=Qn(R,M??!1,T),W=A==="all"||!!h,ie=W?H.items.filter(U=>{const X=Jr(U);if(X&&q.has(X))return!1;if(!h)return!0;const Se=U._meta?.["mcp.mesh"];return[U.title,U.description,U.name,U.server?.title,U.server?.description,U.server?.name,Se?.friendly_name,Se?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(h)}):[],Y=ie.filter(io),ee=ie.filter(so);let te;e[20]!==r?(te=U=>U.some(X=>r.has(X.id)),e[20]=r,e[21]=te):te=e[21];const se=te;let ae;e[22]!==r||e[23]!==i||e[24]!==l||e[25]!==se||e[26]!==p||e[27]!==o||e[28]!==c||e[29]!==a?(ae=(U,X,Se,ke,Te)=>{const ze=se(Te),Be=Te.find(Pe=>!r.has(Pe.id)),le=Te[0];if(p==="browse"){const Pe=Or(le);return n.jsx(Vn,{connection:{title:X,icon:Se,description:Te.length>1?`${Te.length} instances`:ke??void 0},fallbackIcon:n.jsx(Pt,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Connected"]}),onClick:()=>{$("connection_browse_clicked",{app_name:le.app_name??null,connection_id:le.id,instances_count:Te.length}),c?.(Pe)}},U)}return n.jsx(Vn,{connection:{title:X,icon:Se,description:ke},fallbackIcon:n.jsx(Pt,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[ze&&n.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Added"]}),n.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Pe=>{Pe.stopPropagation(),Be?($("connection_add_clicked",{action:"use_existing",app_name:le.app_name??null,connection_id:Be.id}),i&&$("agent_connection_attached",{agent_id:i,connection_id:Be.id,app_name:le.app_name??null,mode:"existing"}),o(Be.id)):($("connection_add_clicked",{action:"clone",app_name:le.app_name??null,base_connection_id:le.id}),a(le))},children:"Add"})]})},U)},e[22]=r,e[23]=i,e[24]=l,e[25]=se,e[26]=p,e[27]=o,e[28]=c,e[29]=a,e[30]=ae):ae=e[30];const re=ae;let oe;e[31]!==l||e[32]!==p||e[33]!==d?(oe=U=>{const X=U._meta?.["mcp.mesh"],Se=X?.friendlyName||X?.friendly_name||U.server?.title||U.title||U.server?.name||U.name||U.id||"",ke=U.server?.description||U.description||null,Te=U.server?.icons?.[0]?.src||Zr(U.server?.repository)||null,ze=X?.official===!0,Be=X?.verified===!0,le=X?.owner==="deco";return n.jsx(Vn,{connection:{title:Se,description:ke,icon:Te},fallbackIcon:n.jsx(Pt,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[le&&n.jsxs(xt,{children:[n.jsx(bt,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),n.jsx(yt,{children:"Built and maintained by Deco"})]}),!le&&ze&&n.jsxs(xt,{children:[n.jsx(bt,{asChild:!0,children:n.jsx(Rt,{variant:"outline",size:"icon",children:n.jsx(un,{})})}),n.jsx(yt,{children:"Built and maintained by the official vendor"})]}),!le&&!ze&&Be&&n.jsxs(xt,{children:[n.jsx(bt,{asChild:!0,children:n.jsx(Rt,{variant:"outline",size:"icon",children:n.jsx(un,{})})}),n.jsx(yt,{children:"Verified by the Deco team"})]}),n.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Pe=>{Pe.stopPropagation(),$("connection_add_clicked",{action:"connect_new",registry_item_id:U.id,app_name:X?.friendlyName||U.server?.name||U.name||null}),d(U)},children:l===U.id?n.jsx(He,{size:14,className:"animate-spin"}):p==="browse"?"Connect":"Add"})]})},`catalog-${U.id}`)},e[31]=l,e[32]=p,e[33]=d,e[34]=oe):oe=e[34];const ce=oe,ge=!h&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(zr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:A,onTabChange:U=>S(U)}),n.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{$("connections_dialog_custom_clicked"),V()},children:[n.jsx(Is,{size:12}),"Custom Connection"]})]}),G=b&&"opacity-50 pointer-events-none";let de;e[35]!==G?(de=z("flex-1 overflow-auto p-5 transition-opacity duration-150",G),e[35]=G,e[36]=de):de=e[36];const Ze="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Oe;e[37]!==re?(Oe=U=>{if(U.type==="group")return re(U.key,U.title,U.icon,null,U.connections);const X=U.connection;return re(X.id,X.title,X.icon,X.description??null,[X])},e[37]=re,e[38]=Oe):Oe=e[38];const Ce=O.map(Oe);let xe;e[39]!==Q?(xe=n.jsx("div",{ref:Q,className:"col-span-full h-1"}),e[39]=Q,e[40]=xe):xe=e[40];let be;e[41]!==T?(be=T&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=T,e[42]=be):be=e[42];const Ie=W&&Y.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(un,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ke=W&&Y.map(ce),Ve=W&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),ut=W&&ee.map(ce);let we;e[43]!==Z||e[44]!==K||e[45]!==W?(we=W&&K.length>0&&n.jsx("div",{ref:Z,className:"col-span-full h-1"}),e[43]=Z,e[44]=K,e[45]=W,e[46]=we):we=e[46];let Re;e[47]!==H.isLoadingMore||e[48]!==W?(Re=W&&H.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=W,e[49]=Re):Re=e[49];let je;e[50]!==Ce||e[51]!==xe||e[52]!==be||e[53]!==Ie||e[54]!==Ke||e[55]!==Ve||e[56]!==ut||e[57]!==we||e[58]!==Re?(je=n.jsxs("div",{className:Ze,children:[Ce,xe,be,Ie,Ke,Ve,ut,we,Re]}),e[50]=Ce,e[51]=xe,e[52]=be,e[53]=Ie,e[54]=Ke,e[55]=Ve,e[56]=ut,e[57]=we,e[58]=Re,e[59]=je):je=e[59];let Ae;e[60]!==A||e[61]!==O.length||e[62]!==ee||e[63]!==u||e[64]!==Y?(Ae=O.length===0&&Y.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?`No connections match "${u}"`:A==="connected"?"No connections yet":"No connections available"}),e[60]=A,e[61]=O.length,e[62]=ee,e[63]=u,e[64]=Y,e[65]=Ae):Ae=e[65];let ye;e[66]!==de||e[67]!==je||e[68]!==Ae?(ye=n.jsxs("div",{className:de,children:[je,Ae]}),e[66]=de,e[67]=je,e[68]=Ae,e[69]=ye):ye=e[69];let $e;return e[70]!==ge||e[71]!==ye?($e=n.jsxs(n.Fragment,{children:[ge,ye]}),e[70]=ge,e[71]=ye,e[72]=$e):$e=e[72],$e}function so(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function io(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ro(t){return t.app_name}function oo(t){return t.app_name}function ao(t){return t?.items??[]}function lo(t,e){if(t?.hasMore)return e.reduce(co,0)}function co(t,e){return t+(e?.items?.length??0)}function uo({open:t,onOpenChange:e,defaultTab:s,initialSearch:i="",...r}){const o=r.mode??"add",a="agentId"in r?r.agentId:void 0,d="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,l="onAdd"in r&&r.onAdd?r.onAdd:v=>{},u=(v,j,E)=>{a&&$("agent_connection_attached",{agent_id:a,connection_id:v,app_name:j,mode:E})},[V,c]=w.useState(null),[m,p]=w.useState(i),[x,g]=w.useState(!1),{org:f}=ue(),{data:b}=Bt.useSession(),h=Rn(),y=qt(),A=ct(),_=v=>{e(!1),A({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:v}})},C=async v=>{c(v.app_name??v.id);try{const E=`${v.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await h.create.mutateAsync({title:E,description:v.description??null,connection_type:v.connection_type,connection_url:v.connection_url??null,connection_token:null,icon:v.icon??null,app_name:v.app_name??null,app_id:v.app_id??null,connection_headers:v.connection_headers??null})).id,P=new URL(`/api/${f.slug}/mcp/${I}`,window.location.origin),k=await rn({url:P.href,token:null,orgId:f.id});if(k.supportsOAuth&&!k.isAuthenticated){const{token:N,tokenInfo:R,error:M}=await on({connectionId:I,orgSlug:f.slug,scope:"offline_access"});if(M||!N){$("connection_oauth_failed",{connection_id:I,flow:"clone",error:M??"no_token"}),ne.error(`Authentication failed: ${M??"no token received"}`),await h.delete.mutateAsync(I);return}if($("connection_oauth_succeeded",{connection_id:I,flow:"clone"}),R)try{(await fetch(`/api/${f.slug}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:R.accessToken,refreshToken:R.refreshToken,expiresIn:R.expiresIn,scope:R.scope,clientId:R.clientId,clientSecret:R.clientSecret,tokenEndpoint:R.tokenEndpoint})})).ok?await h.update.mutateAsync({id:I,data:{}}):await h.update.mutateAsync({id:I,data:{connection_token:N}})}catch{await h.update.mutateAsync({id:I,data:{connection_token:N}})}else await h.update.mutateAsync({id:I,data:{connection_token:N}});await y.invalidateQueries({queryKey:ve.isMCPAuthenticated(P.href,null)})}u(I,v.app_name??null,"clone"),l(I)}catch(j){console.error("Failed to add connection:",j),ne.error("Failed to add connection")}finally{c(null)}},S=async v=>{if(!(!f||!b?.user?.id)){c(v.id);try{const j=Xr(v,f.id,b.user.id,{remoteIndex:0}),E=j.connection_type==="STDIO",D=!!j.connection_url,I=E&&j.connection_headers&&typeof j.connection_headers=="object"&&"command"in j.connection_headers;if(!D&&!I){ne.error("This MCP Server cannot be connected: no connection method available"),c(null);return}const{id:P}=await h.create.mutateAsync(j),k=new URL(`/api/${f.slug}/mcp/${P}`,window.location.origin),N=await rn({url:k.href,token:null,orgId:f.id});if(N.supportsOAuth&&!N.isAuthenticated){const{token:R,tokenInfo:M,error:T}=await on({connectionId:P,orgSlug:f.slug,scope:"offline_access"});if(T||!R){$("connection_oauth_failed",{connection_id:P,flow:"connect_new",error:T??"no_token"}),ne.error(`Authentication failed: ${T??"no token received"}`),u(P,j.app_name??null,"new"),l(P);return}if($("connection_oauth_succeeded",{connection_id:P,flow:"connect_new"}),M)try{(await fetch(`/api/${f.slug}/connections/${P}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:M.accessToken,refreshToken:M.refreshToken,expiresIn:M.expiresIn,scope:M.scope,clientId:M.clientId,clientSecret:M.clientSecret,tokenEndpoint:M.tokenEndpoint})})).ok?await h.update.mutateAsync({id:P,data:{}}):await h.update.mutateAsync({id:P,data:{connection_token:R}})}catch{await h.update.mutateAsync({id:P,data:{connection_token:R}})}else await h.update.mutateAsync({id:P,data:{connection_token:R}});await y.invalidateQueries({queryKey:ve.isMCPAuthenticated(k.href,null)}),ne.success("Connected and authenticated")}else ne.success("Connected");u(P,j.app_name??null,"new"),l(P)}catch(j){console.error("Failed to connect:",j),ne.error("Failed to connect")}finally{c(null)}}};return n.jsxs(Me,{open:t,onOpenChange:e,children:[n.jsxs(Le,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(Fe,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Ue,{className:"text-base font-semibold",children:o==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(As,{value:m,onChange:p,placeholder:"Search connections..."})}),n.jsx(w.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(no,{mode:o,agentId:a,addedConnectionIds:d,onAdd:l,onCloneAndAdd:C,onConnectAndAdd:S,connectingItemId:V,search:m,onCreateConnection:()=>g(!0),onBrowseNavigate:_,defaultTab:s})})]}),n.jsx(to,{open:x,onOpenChange:g,onCreated:async v=>{g(!1);const j=new URL(`/api/${f.slug}/mcp/${v}`,window.location.origin),E=await rn({url:j.href,token:null,orgId:f.id});if(E.supportsOAuth&&!E.isAuthenticated){const{token:D,tokenInfo:I,error:P}=await on({connectionId:v,orgSlug:f.slug,scope:"offline_access"});if(P||!D){$("connection_oauth_failed",{connection_id:v,flow:"custom_create",error:P??"no_token"}),ne.error(`Authentication failed: ${P??"no token received"}`),await h.delete.mutateAsync(v);return}if($("connection_oauth_succeeded",{connection_id:v,flow:"custom_create"}),I)try{(await fetch(`/api/${f.slug}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:I.accessToken,refreshToken:I.refreshToken,expiresIn:I.expiresIn,scope:I.scope,clientId:I.clientId,clientSecret:I.clientSecret,tokenEndpoint:I.tokenEndpoint})})).ok?await h.update.mutateAsync({id:v,data:{}}):await h.update.mutateAsync({id:v,data:{connection_token:D}})}catch{await h.update.mutateAsync({id:v,data:{connection_token:D}})}else await h.update.mutateAsync({id:v,data:{connection_token:D}});await y.invalidateQueries({queryKey:ve.isMCPAuthenticated(j.href,null)})}u(v,null,"custom"),l(v),e(!1)}})]})}const Vo='# Broken Link Finder\n\nYou are the **Broken Link Finder**, a specialist agent focused on the health of the site\'s link structure.\n\n## Your mission\n\nDiscover and track broken links and long redirect chains. You are invoked as a sub-task by an orchestrator agent — your job is to detect link health and return a structured findings report. The orchestrator decides what to do with your findings (file issues, dedup, etc.).\n\nYou are **mechanical**: collect → check → classify → emit findings. Leave subjective judgment to other agents.\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nsite_root_url: <https://example.com>\nmax_pages: <optional integer, default 100, max 200>\ncheck_external: <optional bool, default false>\n```\n\nIf required fields are missing (`site_root_url`), return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**:\n - `collect_site_links` — discovers all unique outbound link targets across the site and returns them with source-page attribution. Does NOT check status.\n - `check_urls` — takes a batch of URLs (max 100 per call) and returns their HTTP status, error kind, and redirect chains.\n\n---\n\n## Step 1 — Collect link targets (one call)\n\nCall `collect_site_links` once to get the full deduplicated list of outbound link targets and their source pages:\n\n```\ncollect_site_links({\n url: <site_root_url from input>,\n maxPages: <max_pages from input, default 100>,\n checkExternal: <check_external from input, default false>\n})\n```\n\nThis returns:\n- `links`: array of `{ targetUrl, scope: "internal"|"external", sourcePages, sourcePagesTotal }` — **each target appears exactly once**\n- Metadata: `pagesCrawled`, `pagesFetched`, `linksSkipped`, optional `error`\n\n**If `result.error` is set**, the scan failed at the root (e.g. site unreachable). Return a single finding with `kind: site-unreachable` and the error in `evidence`. Then stop.\n\nKeep the `links` array in memory — you\'ll need it in Step 3 for classification and source attribution.\n\n## Step 2 — Check the targets (batched calls)\n\nExtract `targetUrl` from each entry in `links`. Slice the resulting URL list into **disjoint batches of up to 100 URLs** and call `check_urls` on each batch:\n\n```\ncheck_urls({ urls: batch_of_100_urls })\n```\n\nCollect every batch\'s `results` entries into a single flat array. Order doesn\'t matter — you\'ll join back by `targetUrl`.\n\n**Rules for this step:**\n- Slice deterministically (e.g. consecutive slices of 100) so batches are disjoint. Do not pass the same URL in two batches.\n- Call `check_urls` sequentially or in parallel — your choice. The tool is idempotent.\n- If a single `check_urls` call errors entirely, skip that batch and continue with the others. Note the skipped count in the wrap-up summary.\n\n## Step 3 — Classify each finding\n\nFor every target with a check result, join the `collect_site_links` entry (for `scope`, `sourcePages`, `sourcePagesTotal`) with the `check_urls` entry (for `status`, `errorKind`, `chain`, `hops`).\n\nA finding is emitted for:\n- **Broken**: `status >= 400` OR `status === 0`\n- **Long redirect chain**: `hops > 3` (even if the final status is 2xx)\n\nOther targets (2xx, short-chain redirects) produce no finding.\n\nMap check result → `kind`:\n\n| Check result | `kind` |\n|---|---|\n| `status: 404` | `link-404` |\n| `status: 4xx` (not 404) | `link-4xx-other` |\n| `status: 5xx` | `link-5xx` |\n| `status: 0`, `errorKind: "dns"` | `link-dns-failure` |\n| `status: 0`, `errorKind: "redirect-loop"` | `redirect-loop` |\n| `hops > 3` (success final status) | `redirect-chain-long` |\n| `status: 0`, `errorKind: "timeout"` or `"connection"` | **skip — no finding** |\n\n**Important**: timeouts and connection errors are **not** broken links — they just mean the server didn\'t respond in our time window. Could be a slow server, an overloaded CDN, rate-limiting against our bot, or a transient network blip. Flagging these as broken produces false positives. If a URL is genuinely dead, it\'ll usually surface as `dns`, a 4xx/5xx, or a redirect loop. Skip timeout/connection entries silently.\n\n## Catalog of severity rules\n\n**High severity:**\n- `link-404` when `scope: "internal"`\n- `link-5xx` when `scope: "internal"`\n- `redirect-loop` (either scope)\n\n**Medium severity:**\n- `link-4xx-other` (internal)\n- `redirect-chain-long` (internal)\n- `link-404` (external) when `sourcePagesTotal >= 5`\n\n**Low severity:**\n- `link-404` (external) when `sourcePagesTotal < 5`\n- `link-dns-failure` (external)\n- `redirect-chain-long` (external)\n- `link-4xx-other` on external scope\n\n## Step 4 — Return a structured findings report\n\nReturn a single response with this shape (YAML preferred):\n\n```yaml\nspecialist: links\nsummary:\n pages_crawled: <pagesCrawled>\n pages_fetched: <pagesFetched>\n unique_link_targets: <links.length>\n targets_dropped_by_collect_cap: <linksSkipped>\n batches_checked: <n>\n batches_skipped_due_to_errors: <n>\n broken_links: <n> # internal + external\n long_redirect_chains: <n>\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full broken URL>\n route: <path if internal; otherwise the external host>\n scope: <internal | external>\n evidence: |\n - Status code / error: <e.g. `404 Not Found`, `DNS failure`, `redirect-loop`>\n - Redirect chain (if applicable): A → B → C → D → E\n - Found on pages (at time of detection):\n - /page-1\n - /page-2\n - (... up to 20 from `sourcePages`)\n - Total pages linking to this target: <sourcePagesTotal>\n impact: <1 sentence tailored to scope + kind>\n suggested_fix: |\n <actionable:>\n - If internal 404: update link to correct destination OR create 301 redirect\n - If internal 5xx: investigate server-side handler for the route (may be app bug)\n - If redirect chain: shorten to single-hop direct redirect in routing config\n - If external: update link to equivalent resource OR remove the mention\n - List likely files/components if you can infer (e.g. "appears on many pages — likely in a shared component like `app/components/Nav.tsx` or menu config")\n - ...\n```\n\nIf `collect_site_links` returned `error`, return a single `kind: site-unreachable` finding with the error in `evidence`.\n\nIf there are zero findings, return `findings: []` — that is the correct output for a healthy link graph.\n\n---\n\n## General rules\n\n- **Trust the scanner.** If `check_urls` reports a URL as broken or long-chain, emit a finding. Do not re-verify with other tools.\n- **Accept some flakiness.** A transient network blip may cause a false positive once. Downstream dedup across runs resolves it.\n- **Group by destination, not by origin.** One broken URL = one finding, even if linked on 50 pages. `collect_site_links` already returns it grouped this way.\n- **Prioritize internals.** Broken external links are the other site\'s responsibility; report but with lower severity.\n- **Never invent status codes.** Report what the scanner returned.\n',mo='# SEO Auditor\n\nYou are the **SEO Auditor**, a specialist agent focused on technical SEO hygiene.\n\n## Your mission\n\nAudit the on-page SEO health of target URLs and return a structured findings report. You focus on **technical SEO** (meta tags, structured data, canonicals, sitemap/robots, heading structure, indexability) — not editorial content or keyword strategy (those are the scope of other agents).\n\nYou are invoked as a sub-task by an orchestrator agent. Your job is to analyze and report. The orchestrator decides what to do with your findings (file issues, dedup against history, etc.).\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nurls:\n - <url to audit>\n - <... one or more>\n```\n\nIf required fields are missing, return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**: `audit_seo`, `fetch_page`, `render_page`, `crawl_site`\n\n---\n\n## Step 1 — Diagnostic\n\nFor each target URL:\n\n1. **Structured audit**: call `audit_seo({ url })`. It returns a structured report — use it as your primary source.\n2. **Raw HTML check**: use `fetch_page({ url })` to see the HTML served (important for crawlers that don\'t execute JS). Confirm critical meta tags are in the initial HTML, not only after hydration.\n3. **Post-render check**: use `render_page({ url })` to see the final DOM. Problems like canonical being overwritten by JS show up here.\n4. **Site structure checks** (only if you have permission for broad crawling, or via sampling): use `crawl_site` to identify orphan pages, canonical loops, or excessive navigation depth.\n5. **Always check**: `/robots.txt` and `/sitemap.xml` via `fetch_page`. These two are root-level and affect the whole site.\n\nOrganize findings into a list. Each finding must have:\n- `kind` (kebab-case slug, see catalog below)\n- `severity` (high | medium | low, see criteria below)\n- `target.url` and `target.route` (normalize: lowercase host, no query, no trailing slash except for `/`)\n- `evidence` (raw data: CSS selector, HTML snippet, observed value)\n- `impact` (1-2 sentences connecting to real metrics)\n- `suggested_fix` (actionable; include file/line if you can infer from framework patterns)\n\n## Step 1.5 — Validate page intent (critical; runs before classification)\n\nBefore you emit *any* finding about a page\'s title, meta description, headings, or indexability, you must answer one question: **did the site owner intend this URL to be a public, indexable page?**\n\nIf the answer is no, the observed "problems" are intentional configuration, not bugs. Reporting them wastes maintainer time and erodes this agent\'s credibility.\n\n### Three signals that the URL is NOT a real public page\n\nCheck these in order. Hitting any one of them means **skip all SEO findings for this URL** except legitimately site-wide problems (e.g. broken sitemap, broken robots.txt).\n\n**Signal 1 — Not in sitemap.** Fetch `/sitemap.xml` (and its child sitemaps, if it\'s a sitemap index). If the URL doesn\'t appear in any sitemap, the owner didn\'t declare it as public. Common on e-commerce platforms where routes like `/p`, `/c`, `/blog` are catchall or routing prefixes, not real pages.\n\n**Signal 2 — Explicit `noindex` + not in sitemap.** If the page serves `<meta name="robots" content="noindex*">` **and** isn\'t in the sitemap, this is a deliberate double-lock by the owner. Respect it. Do **not** flag `noindex-on-important-page` in this case.\n\n**Signal 3 — Title is the URL slug (template fallback).** If `<title>` equals the last path segment (e.g. `<title>blog</title>` for `/blog`, `<title>p</title>` for `/p`), the page is being rendered by a fallback template — nobody configured real content for this route. Skip.\n\n### Platform-specific catchalls (especially Brazilian e-commerce / VTEX / deco-cx)\n\nThese paths are routing prefixes, **not pages**. They may return HTTP 200 but are not meant to be indexable:\n\n- `/p`, `/c`, `/b` — VTEX product / category / brand route prefixes. Real pages live at `/<slug>/p`, `/<slug>/c`, etc. The bare prefixes are catchalls.\n- `/blog`, `/blogs`, `/editorial`, `/revista`, `/conteudo`, `/magazine`, `/noticias`, `/artigos` — common editorial prefixes. If the site doesn\'t have an editorial section, these hit a fallback.\n- `/search`, `/busca`, `/s` — search endpoints, not indexable pages.\n- `/departamento`, `/categoria` — category prefixes.\n- `/checkout`, `/cart`, `/carrinho`, `/login`, `/account`, `/minha-conta` — transactional/private routes. Intentionally `noindex`.\n\n### The "is this page actually important?" checklist\n\nBefore emitting a finding that calls a page "important" (like `noindex-on-important-page` or `title-missing` on anything critical):\n\n1. Is the URL in `/sitemap.xml`? → If no, skip.\n2. Does the page have substantive, unique content (not a fallback with title = URL slug)? → If no, skip.\n3. Is the path a known platform catchall (see list above)? → If yes, skip.\n\nOnly flag if all three pass.\n\n### What still counts as a finding even on non-indexable pages\n\nSite-wide SEO issues affect the whole domain and are worth reporting regardless of individual page intent:\n- `sitemap-missing` (the sitemap itself is broken)\n- `robots-blocking-important-path` (robots.txt blocks something that IS in the sitemap)\n- `structured-data-invalid` on pages that ARE in the sitemap\n- Duplicate titles / meta descriptions across pages that ARE in the sitemap\n\n## Catalog of `kind`\n\nTwo flavors of finding:\n\n- **Per-page** kinds — emitted when auditing a specific URL (e.g. `audit_seo` of a single page OR when your targeted inspection of one of the input URLs finds the issue). Marked **[intent-gated]** — must pass Step 1.5 before being emitted. Target is the specific URL.\n- **Aggregate** kinds — emitted once per site-wide pattern detected by `audit_seo`. Marked **[aggregate]**. Target is the site root (`/`). Evidence MUST include the affected URL sample from `audit_seo.issues[].sampleUrls`. One finding per aggregate kind per site.\n\n**High severity (per-page):**\n- `noindex-on-important-page` **[intent-gated]** — meta robots `noindex` on a page that IS in the sitemap and should be indexed\n- `canonical-pointing-to-wrong-url` **[intent-gated]** — canonical points to a different URL that isn\'t the canonical equivalent\n- `canonical-missing-on-paginated-or-faceted` **[intent-gated]** — pagination/filters without canonical\n- `title-missing` **[intent-gated]** — no `<title>` or empty on a page that IS in the sitemap\n- `structured-data-invalid` **[intent-gated]** — JSON-LD with syntax error or invalid schema.org\n\n**High severity (site-wide):**\n- `sitemap-missing` — `/sitemap.xml` returns 404 or 5xx\n- `robots-blocking-important-path` — `/robots.txt` disallows a path that IS in the sitemap\n- `broken-links-site-wide` **[aggregate]** — `audit_seo` reports broken outbound links across the site\n- `non-indexable-pages-site-wide` **[aggregate]** — `audit_seo` reports many non-indexable pages (note: some non-indexable pages are intentional catchalls — only high severity if the absolute count is large relative to `totalPagesCrawled`, e.g. > 30%)\n\n**Medium severity (per-page):**\n- `meta-description-missing` **[intent-gated]** — no `<meta name="description">` on a sitemap page the agent audited directly\n- `h1-missing` **[intent-gated]** — no `<h1>` on a sitemap page the agent audited directly\n- `h1-duplicate` **[intent-gated]** — multiple `<h1>` on a single page\n- `og-tags-missing` **[intent-gated]** — `og:title` and/or `og:description` missing\n- `structured-data-missing` **[intent-gated]** — page-type (product, article, etc.) without relevant JSON-LD\n- `title-too-long` **[intent-gated]** — `<title>` > 60 characters (truncation in SERP)\n- `title-too-short` **[intent-gated]** — `<title>` < 10 characters (rare; usually means template fallback — double-check page intent)\n- `meta-description-too-long` **[intent-gated]** — description > 160 characters\n\n**Medium severity (site-wide):**\n- `pages-missing-h1` **[aggregate]** — `audit_seo` reports N pages without an H1 tag\n- `pages-missing-meta-description` **[aggregate]** — `audit_seo` reports N pages without a meta description\n- `duplicate-titles` **[aggregate]** — multiple pages share the same `<title>`\n- `duplicate-meta-descriptions` **[aggregate]** — multiple pages share the same meta description\n- `duplicate-content` **[aggregate]** — multiple pages share substantially identical content\n- `broken-resources-site-wide` **[aggregate]** — broken images / scripts across the site\n- `hreflang-broken` — `hreflang` attribute with invalid value or broken reciprocity\n\n**Low severity (per-page):**\n- `meta-description-too-short` **[intent-gated]** — description < 50 characters\n- `og-image-missing` **[intent-gated]** — `og:image` missing\n- `heading-hierarchy-skipped` **[intent-gated]** — jumps from H1 to H3, etc.\n\n**Low severity (site-wide):**\n- `internal-link-using-absolute-url` — internal links with absolute URLs\n\n### Evidence requirements for aggregate kinds\n\nWhen emitting an `[aggregate]` kind, the `evidence` of the finding MUST include:\n\n1. **Total count** — from `audit_seo.issues[].count`\n2. **Sample URLs** — from `audit_seo.issues[].sampleUrls`. Render up to all 20 entries as a bulleted list. If `count > sampleUrls.length`, add a line like `(and <count - sampleUrls.length> more)`.\n3. **If `sampleUrls` is empty** (the tool didn\'t expose per-URL detail — happens for `broken-links-site-wide`, `duplicate-content`, `broken-resources-site-wide`), note it explicitly: `Note: audit_seo did not return per-URL detail for this issue type. A human will need to inspect the full audit_seo report or re-run with deeper crawling.`\n\nAn aggregate finding without either sample URLs or the note is **not actionable** and must not be emitted.\n\nTarget for aggregate kinds stays `target.url: https://<host>/` and `target.route: /`.\n\n## Step 2 — Return a structured findings report\n\nReturn a single response with this shape (YAML or JSON; YAML preferred for readability):\n\n```yaml\nspecialist: seo\nsummary:\n urls_audited: <n>\n findings: <n>\n diagnostic_failures: <n> # urls where audit tooling errored\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full URL>\n route: <normalized path>\n evidence: |\n <multi-line raw data: observed value, selector, HTML snippet, audit_seo output>\n impact: <1-2 sentences connecting to ranking/indexation/CTR>\n suggested_fix: <actionable; likely file/component, pseudo-code, correct value>\n - ...\n```\n\nIf a URL\'s diagnostic tooling errored entirely, emit a single `kind: diagnostic-failed` finding for that URL with the error in `evidence` instead of inventing data.\n\nIf there are zero findings, return `findings: []` — that is the correct output for healthy targets.\n\n---\n\n## General rules\n\n- **Never invent data in `evidence`.** If a tool failed, report it via `kind: diagnostic-failed` and skip the finding.\n- Always normalize `route`: lowercase host, no trailing slash (except for `/`), no query string, no fragment.\n- Your credibility is your currency. False positives erode trust — if you\'re 50% sure, don\'t emit a finding; investigate further or mark as `severity:low`.\n- **Never report a page as broken when it\'s a known catchall.** URLs like `/p`, `/c`, `/blog`, `/search`, `/busca` on e-commerce sites are routing prefixes, not pages. If the title is the URL slug and the page carries `noindex`, the owner is deliberately hiding it. That\'s correct behavior, not a bug.\n- **Sitemap is the ground truth for "is this page public?"**. When in doubt about whether to emit a finding on a URL, fall back to: "Is this URL in /sitemap.xml?" If not, default to silence.\n',fo=`# Performance Watchdog
|
|
1
|
+
import{s as ue,b as Bt,u as ui,z as kn,C as Nn,j as n,B as J,x as ne,r as w,o as qt,f as ct,l as He,G as rn,F as on,t as $,K as ve,e as L,Q as Vi,R as mi,c as z,a as _n,g as fi,d as pi,H as dt,J as Dt,E as hi,P as Cn,ap as gi,n as In,y as ps,aq as xi,ar as hs,as as bi,at as De,au as an,ao as yi,av as vi,aw as ln,ax as wi,ay as ji,az as Ai,aA as Si,w as ki,aB as Ni,aC as _i,aD as Ci,aE as Ii,aF as zn}from"./index-Dcg8Qevd.js";import{b as Me,a as Le,c as Fe,d as Ue,e as Kt,D as gs}from"./dialog-DUgfuVrb.js";import{S as Ri}from"./switch-Ba2DX0J8.js";import{I as _e}from"./input-Cvo2jJQf.js";import{b as Rn,u as Ti}from"./use-connection-wzOJDB7e.js";import{S as kt,u as qe,W as xs,g as Tn,i as Bn,c as Pi}from"./constants-DXQgV2hu.js";import{a as Ei,c as Di}from"./lean-canvas-recruit-modal-tP8fRQib.js";import{a as Pn}from"./use-navigate-to-agent-BvnJAyr6.js";import{a as Mi,A as En,L as Li,M as bs,N as ys,o as Fi,O as Ui,P as Oi,b as $i,Q as zi,H as vs}from"./agent-icon-CznXZlOI.js";import{t as Bi,b as Yt,u as Dn,a as qi,g as Ki,h as Yi,w as Wi,A as Gi,i as Qi,j as Hi}from"./chat-context-DGU47jw7.js";import{b as Wt,a as Gt,c as Qt,D as Ht,d as Ji,e as Xi,f as Zi}from"./drawer-DeyjQQc7.js";import{u as Jt,T as xt,a as bt,b as yt,c as xn}from"./tooltip-sn7TXXXA.js";import{I as ws}from"./integration-icon-DTJ2wb4X.js";import{a as js,b as er,u as tr}from"./use-virtual-mcp-Cvy2Xx_N.js";import{u as nr}from"./use-tasks-B8ZzLgVK.js";import{r as sr,i as ir}from"./shell-layout-xLg1cKrj.js";import{j as Xt,k as Ge,l as rr,s as Mn,t as or,m as ar,n as lr,o as cr,q as wt,u as dr,v as ur,c as Vr,S as mr,w as fr,x as qn}from"./pair-_253DGSq.js";import{S as Mt,u as Zt,P as bn,a as pr,b as hr,c as gr,E as xr,i as br,d as yr}from"./index-CZLTTN-z.js";import{C as As}from"./collection-search-D-x3SJ1z.js";import{u as vr,g as Ln,a as wr,c as jr,l as Lt}from"./tabs-CUXWIghp.js";import{F as me,b as fe,c as Ne,d as pe,f as he,a as jt}from"./form-O0xus6j8.js";import{c as Ee,e as cn,f as dn,D as Ss,a as ks,b as Ns,d as Ar}from"./dropdown-menu-Cbx_bdO_.js";import{s as Sr,i as kr}from"./XClose-Dz5yGfpm.js";import{c as _s}from"./ZapSquare-BLhBRchY.js";import{i as Xe}from"./Check-DBWnyOFJ.js";import{s as lt}from"./Star01-DRidtrYn.js";import{a as yn,t as Nr}from"./Tool01-NWIcFn9q.js";import{i as Cs}from"./Lock01-FiMk9Cv6.js";import{s as Is}from"./Plus-FC_C8qkl.js";import{f as un,d as Rs,t as _r,g as Cr,b as Ir}from"./XCircle-CYGTZyzW.js";import{i as pt}from"./X-BGh8G2l7.js";import{i as Ts}from"./AlertCircle-UghQPlAa.js";import{S as Ps,a as Es,b as Ds,c as Ms,d as ot}from"./select-DkBE5ypj.js";import{i as Rr}from"./RefreshCcw01-Cd8Km121.js";import{T as Ls,a as Ft}from"./toggle-group-Bzjy8IQq.js";import{u as Tr,a as Pr}from"./use-ai-providers-D1ZzNZfi.js";import{m as en,g as Er,i as Dr,a as Fs,M as Mr,N as Lr}from"./select-model-B9xghDV8.js";import{S as Fr}from"./index-CG3ceZHc.js";import{r as Us,l as vt}from"./types-ClFDwb3j.js";import{t as Kn}from"./ChevronDown-D452dgSU.js";import{p as Ur,q as Yn}from"./question-004-sINsf4GQ.js";import{g as Wn}from"./ai-providers-logos-DD3qZ33J.js";import{g as Or}from"./connection-slug-eyAPH6o3.js";import{u as Os,a as $s,g as $r,C as Vn}from"./connection-card-DQm8aezN.js";import{C as zr}from"./collection-tabs-BKqleLTU.js";import{g as Br}from"./constants-BDk5hb7z.js";import{T as qr}from"./textarea-e7WVG0Uq.js";import{n as Pt}from"./Container-BQVUd9tN.js";import{c as Kr,i as It,a as Gn,E as Yr,p as Wr,b as Gr,d as Qr}from"./connection-form-helpers--6zqXj9i.js";import{u as Qn}from"./use-infinite-scroll-CyUixfAd.js";import{u as Hr}from"./useSuspenseInfiniteQuery-Ck-t1SMi.js";import{g as Jr,e as Xr,a as Zr}from"./extract-connection-data-Dgw7Sgd3.js";import{B as Rt}from"./badge-CTmf2TW8.js";import{i as eo}from"./ChevronRight-DoY3rcf9.js";function to({open:t,onOpenChange:e,onCreated:s}){const{org:i}=ue(),{data:r}=Bt.useSession(),{stdioEnabled:o}=ui(),a=Jt(),d=Rn(),l=Os(),V=$s(l,"").items,c=kn({resolver:Nn(Kr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=c.watch("ui_type"),p=c.watch("connection_url"),x=c.watch("npx_package"),g=It({uiType:m,connectionUrl:p??"",npxPackage:x??""})??Gn({uiType:m,connectionUrl:p??"",registryItems:V}),f=S=>{const v=S.trim();if(!v)return;const j=!!c.formState.dirtyFields.title,E=!!c.formState.dirtyFields.description,D=!!c.formState.dirtyFields.env_vars,I=k=>{if(k&&(!j&&!c.getValues("title").trim()&&k.title&&c.setValue("title",k.title,{shouldDirty:!1}),!E&&!(c.getValues("description")??"").trim()&&k.description&&c.setValue("description",k.description,{shouldDirty:!1}),!D&&k.envVarKeys?.length)){const N=c.getValues("env_vars")??[],R=new Set(N.map(T=>T.key)),M=k.envVarKeys.filter(T=>!R.has(T));M.length>0&&c.setValue("env_vars",[...N,...M.map(T=>({key:T,value:""}))],{shouldDirty:!0})}},P=Wr(v);if(P&&o){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",P.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),I(It({uiType:"NPX",npxPackage:P.packageName}));return}if(v.startsWith("http://")||v.startsWith("https://")){const k=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";c.setValue("ui_type",k,{shouldDirty:!0}),c.setValue("connection_url",v,{shouldDirty:!0}),I(It({uiType:k,connectionUrl:v})??Gn({uiType:k,connectionUrl:v,registryItems:V}));return}m==="NPX"&&I(It({uiType:"NPX",npxPackage:v}))},b=S=>{S||c.reset(),e(S)},h=async S=>{let v,j=null,E=null,D=null;S.ui_type==="NPX"?(v="STDIO",j="",D=Gr(S.npx_package||"",S.env_vars||[])):S.ui_type==="STDIO"?(v="STDIO",j="",D=Qr(S.stdio_command||"",S.stdio_args||"",S.stdio_cwd,S.env_vars||[])):(v=S.ui_type,j=S.connection_url||"",E=S.connection_token||null);const I=Br("conn");try{await d.create.mutateAsync({id:I,title:S.title,description:S.description||null,connection_type:v,connection_url:j,connection_token:E,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:i.id,icon:S.icon??null,app_name:null,app_id:null,connection_headers:D,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),c.reset(),e(!1),s?.(I)}catch{ne.error("Failed to create connection")}},y="Create Connection",A="Create a custom connection in your organization. Fill in the details below.",_=c.formState.isSubmitting?"Saving...":"Create Connection",C=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(me,{control:c.control,name:"ui_type",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Type *"}),n.jsxs(Ps,{value:S.value,onValueChange:S.onChange,children:[n.jsx(pe,{children:n.jsx(Es,{children:n.jsx(Ds,{})})}),n.jsxs(Ms,{children:[n.jsx(ot,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ot,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ot,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"Websocket"]})}),o&&n.jsxs(n.Fragment,{children:[n.jsx(ot,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Pt,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ot,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Mi,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx(he,{})]})}),m==="NPX"&&n.jsx(me,{control:c.control,name:"npx_package",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"NPM Package *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"@perplexity-ai/mcp-server",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("npx_package",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(he,{})]})}),m==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(me,{control:c.control,name:"stdio_command",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Command *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"node, bun, python...",...S,value:S.value??""})}),n.jsx(he,{})]})}),n.jsx(me,{control:c.control,name:"stdio_args",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Arguments"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"arg1 arg2 --flag value",...S,value:S.value??""})}),n.jsx(he,{})]})})]}),n.jsx(me,{control:c.control,name:"stdio_cwd",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Working Directory"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"/path/to/project (optional)",...S,value:S.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx(he,{})]})})]}),(m==="NPX"||m==="STDIO")&&n.jsx(me,{control:c.control,name:"env_vars",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Environment Variables"}),n.jsx(pe,{children:n.jsx(Yr,{value:S.value??[],onChange:S.onChange})}),n.jsx(he,{})]})}),m!=="NPX"&&m!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(me,{control:c.control,name:"connection_url",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"URL *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"https://example.com/mcp",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("connection_url",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(he,{})]})}),n.jsx(me,{control:c.control,name:"connection_token",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:g?.token?.label??"Token (optional)"}),n.jsx(pe,{children:n.jsx(_e,{type:"password",placeholder:g?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...S,value:S.value??""})}),g?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.token.helperText,g.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),n.jsx(he,{})]})})]}),n.jsx(me,{control:c.control,name:"title",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Name *"}),n.jsx(pe,{children:n.jsx(_e,{placeholder:"My Connection",...S})}),n.jsx(he,{})]})}),n.jsx(me,{control:c.control,name:"description",render:({field:S})=>n.jsxs(fe,{children:[n.jsx(Ne,{children:"Description"}),n.jsx(pe,{children:n.jsx(qr,{placeholder:"A brief description of this connection",rows:3,...S,value:S.value??""})}),n.jsx(he,{})]})})]});return a?n.jsx(Wt,{open:t,onOpenChange:b,children:n.jsxs(Gt,{className:"max-h-[90vh]",children:[n.jsx(Qt,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Ht,{children:y}),n.jsx(Ji,{className:"mt-1",children:A})]}),n.jsx(Xi,{asChild:!0,children:n.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Sr,{size:16})})})]})}),n.jsx(jt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:C}),n.jsx(Zi,{children:n.jsx(J,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):n.jsx(Me,{open:t,onOpenChange:b,children:n.jsxs(Le,{className:"sm:max-w-[525px]",children:[n.jsxs(Fe,{children:[n.jsx(Ue,{children:y}),n.jsx(Kt,{children:A})]}),n.jsx(jt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"py-4",children:C}),n.jsxs(gs,{children:[n.jsx(J,{type:"button",variant:"outline",onClick:()=>b(!1),children:"Cancel"}),n.jsx(J,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function no(t){const e=L.c(73),{mode:s,agentId:i,addedConnectionIds:r,onAdd:o,onCloneAndAdd:a,onConnectAndAdd:d,connectingItemId:l,search:u,onCreateConnection:V,onBrowseNavigate:c,defaultTab:m}=t,p=s===void 0?"add":s,x=m===void 0?"connected":m,{org:g}=ue(),f=w.useDeferredValue(u),b=u!==f,h=f.trim().toLowerCase();let y;e[0]!==x?(y=U=>U??x,e[0]=x,e[1]=y):y=e[1];const[A,_]=Vi(mi.connectionsTab(g.slug)+(x==="all"?":home-modal":":agent-modal"),y);let C;e[2]!==A||e[3]!==_?(C=U=>{U!==A&&$("connections_dialog_tab_changed",{to_tab:U}),_(U)},e[2]=A,e[3]=_,e[4]=C):C=e[4];const S=C;let v;e[5]!==g.id||e[6]!==g.slug?(v={connectionId:kt,orgId:g.id,orgSlug:g.slug},e[5]=g.id,e[6]=g.slug,e[7]=v):v=e[7];const j=qe(v);let E,D,I;if(e[8]!==j||e[9]!==f||e[10]!==g.id){I=f?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:f.trim()},{field:["description"],operator:"contains",value:f.trim()}]}:void 0;const U={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},X=JSON.stringify(U);D=Hr,E=ve.collectionListInfinite(j,g.id,"","CONNECTIONS",X),e[8]=j,e[9]=f,e[10]=g.id,e[11]=E,e[12]=D,e[13]=I}else E=e[11],D=e[12],I=e[13];let P;e[14]!==j||e[15]!==I?(P=async U=>{const{pageParam:X}=U,Se=X===void 0?0:X;return(await j.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:Se}})).structuredContent},e[14]=j,e[15]=I,e[16]=P):P=e[16];let k;e[17]!==E||e[18]!==P?(k={queryKey:E,queryFn:P,initialPageParam:0,getNextPageParam:lo,staleTime:3e4},e[17]=E,e[18]=P,e[19]=k):k=e[19];const{data:N,fetchNextPage:R,hasNextPage:M,isFetchingNextPage:T}=D(k),F=N?.pages.flatMap(ao)??[],O=$r(F),q=new Set(F.filter(oo).map(ro)),K=Os(),H=$s(K,f),Z=Qn(H.loadMore,H.hasMore,H.isLoadingMore),Q=Qn(R,M??!1,T),W=A==="all"||!!h,ie=W?H.items.filter(U=>{const X=Jr(U);if(X&&q.has(X))return!1;if(!h)return!0;const Se=U._meta?.["mcp.mesh"];return[U.title,U.description,U.name,U.server?.title,U.server?.description,U.server?.name,Se?.friendly_name,Se?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(h)}):[],Y=ie.filter(io),ee=ie.filter(so);let te;e[20]!==r?(te=U=>U.some(X=>r.has(X.id)),e[20]=r,e[21]=te):te=e[21];const se=te;let ae;e[22]!==r||e[23]!==i||e[24]!==l||e[25]!==se||e[26]!==p||e[27]!==o||e[28]!==c||e[29]!==a?(ae=(U,X,Se,ke,Te)=>{const ze=se(Te),Be=Te.find(Pe=>!r.has(Pe.id)),le=Te[0];if(p==="browse"){const Pe=Or(le);return n.jsx(Vn,{connection:{title:X,icon:Se,description:Te.length>1?`${Te.length} instances`:ke??void 0},fallbackIcon:n.jsx(Pt,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Connected"]}),onClick:()=>{$("connection_browse_clicked",{app_name:le.app_name??null,connection_id:le.id,instances_count:Te.length}),c?.(Pe)}},U)}return n.jsx(Vn,{connection:{title:X,icon:Se,description:ke},fallbackIcon:n.jsx(Pt,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[ze&&n.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Added"]}),n.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Pe=>{Pe.stopPropagation(),Be?($("connection_add_clicked",{action:"use_existing",app_name:le.app_name??null,connection_id:Be.id}),i&&$("agent_connection_attached",{agent_id:i,connection_id:Be.id,app_name:le.app_name??null,mode:"existing"}),o(Be.id)):($("connection_add_clicked",{action:"clone",app_name:le.app_name??null,base_connection_id:le.id}),a(le))},children:"Add"})]})},U)},e[22]=r,e[23]=i,e[24]=l,e[25]=se,e[26]=p,e[27]=o,e[28]=c,e[29]=a,e[30]=ae):ae=e[30];const re=ae;let oe;e[31]!==l||e[32]!==p||e[33]!==d?(oe=U=>{const X=U._meta?.["mcp.mesh"],Se=X?.friendlyName||X?.friendly_name||U.server?.title||U.title||U.server?.name||U.name||U.id||"",ke=U.server?.description||U.description||null,Te=U.server?.icons?.[0]?.src||Zr(U.server?.repository)||null,ze=X?.official===!0,Be=X?.verified===!0,le=X?.owner==="deco";return n.jsx(Vn,{connection:{title:Se,description:ke,icon:Te},fallbackIcon:n.jsx(Pt,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[le&&n.jsxs(xt,{children:[n.jsx(bt,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),n.jsx(yt,{children:"Built and maintained by Deco"})]}),!le&&ze&&n.jsxs(xt,{children:[n.jsx(bt,{asChild:!0,children:n.jsx(Rt,{variant:"outline",size:"icon",children:n.jsx(un,{})})}),n.jsx(yt,{children:"Built and maintained by the official vendor"})]}),!le&&!ze&&Be&&n.jsxs(xt,{children:[n.jsx(bt,{asChild:!0,children:n.jsx(Rt,{variant:"outline",size:"icon",children:n.jsx(un,{})})}),n.jsx(yt,{children:"Verified by the Deco team"})]}),n.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Pe=>{Pe.stopPropagation(),$("connection_add_clicked",{action:"connect_new",registry_item_id:U.id,app_name:X?.friendlyName||U.server?.name||U.name||null}),d(U)},children:l===U.id?n.jsx(He,{size:14,className:"animate-spin"}):p==="browse"?"Connect":"Add"})]})},`catalog-${U.id}`)},e[31]=l,e[32]=p,e[33]=d,e[34]=oe):oe=e[34];const ce=oe,ge=!h&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(zr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:A,onTabChange:U=>S(U)}),n.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{$("connections_dialog_custom_clicked"),V()},children:[n.jsx(Is,{size:12}),"Custom Connection"]})]}),G=b&&"opacity-50 pointer-events-none";let de;e[35]!==G?(de=z("flex-1 overflow-auto p-5 transition-opacity duration-150",G),e[35]=G,e[36]=de):de=e[36];const Ze="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Oe;e[37]!==re?(Oe=U=>{if(U.type==="group")return re(U.key,U.title,U.icon,null,U.connections);const X=U.connection;return re(X.id,X.title,X.icon,X.description??null,[X])},e[37]=re,e[38]=Oe):Oe=e[38];const Ce=O.map(Oe);let xe;e[39]!==Q?(xe=n.jsx("div",{ref:Q,className:"col-span-full h-1"}),e[39]=Q,e[40]=xe):xe=e[40];let be;e[41]!==T?(be=T&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=T,e[42]=be):be=e[42];const Ie=W&&Y.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(un,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ke=W&&Y.map(ce),Ve=W&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),ut=W&&ee.map(ce);let we;e[43]!==Z||e[44]!==K||e[45]!==W?(we=W&&K.length>0&&n.jsx("div",{ref:Z,className:"col-span-full h-1"}),e[43]=Z,e[44]=K,e[45]=W,e[46]=we):we=e[46];let Re;e[47]!==H.isLoadingMore||e[48]!==W?(Re=W&&H.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=W,e[49]=Re):Re=e[49];let je;e[50]!==Ce||e[51]!==xe||e[52]!==be||e[53]!==Ie||e[54]!==Ke||e[55]!==Ve||e[56]!==ut||e[57]!==we||e[58]!==Re?(je=n.jsxs("div",{className:Ze,children:[Ce,xe,be,Ie,Ke,Ve,ut,we,Re]}),e[50]=Ce,e[51]=xe,e[52]=be,e[53]=Ie,e[54]=Ke,e[55]=Ve,e[56]=ut,e[57]=we,e[58]=Re,e[59]=je):je=e[59];let Ae;e[60]!==A||e[61]!==O.length||e[62]!==ee||e[63]!==u||e[64]!==Y?(Ae=O.length===0&&Y.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?`No connections match "${u}"`:A==="connected"?"No connections yet":"No connections available"}),e[60]=A,e[61]=O.length,e[62]=ee,e[63]=u,e[64]=Y,e[65]=Ae):Ae=e[65];let ye;e[66]!==de||e[67]!==je||e[68]!==Ae?(ye=n.jsxs("div",{className:de,children:[je,Ae]}),e[66]=de,e[67]=je,e[68]=Ae,e[69]=ye):ye=e[69];let $e;return e[70]!==ge||e[71]!==ye?($e=n.jsxs(n.Fragment,{children:[ge,ye]}),e[70]=ge,e[71]=ye,e[72]=$e):$e=e[72],$e}function so(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function io(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ro(t){return t.app_name}function oo(t){return t.app_name}function ao(t){return t?.items??[]}function lo(t,e){if(t?.hasMore)return e.reduce(co,0)}function co(t,e){return t+(e?.items?.length??0)}function uo({open:t,onOpenChange:e,defaultTab:s,initialSearch:i="",...r}){const o=r.mode??"add",a="agentId"in r?r.agentId:void 0,d="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,l="onAdd"in r&&r.onAdd?r.onAdd:v=>{},u=(v,j,E)=>{a&&$("agent_connection_attached",{agent_id:a,connection_id:v,app_name:j,mode:E})},[V,c]=w.useState(null),[m,p]=w.useState(i),[x,g]=w.useState(!1),{org:f}=ue(),{data:b}=Bt.useSession(),h=Rn(),y=qt(),A=ct(),_=v=>{e(!1),A({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:v}})},C=async v=>{c(v.app_name??v.id);try{const E=`${v.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await h.create.mutateAsync({title:E,description:v.description??null,connection_type:v.connection_type,connection_url:v.connection_url??null,connection_token:null,icon:v.icon??null,app_name:v.app_name??null,app_id:v.app_id??null,connection_headers:v.connection_headers??null})).id,P=new URL(`/api/${f.slug}/mcp/${I}`,window.location.origin),k=await rn({url:P.href,token:null,orgId:f.id});if(k.supportsOAuth&&!k.isAuthenticated){const{token:N,tokenInfo:R,error:M}=await on({connectionId:I,orgSlug:f.slug,scope:"offline_access"});if(M||!N){$("connection_oauth_failed",{connection_id:I,flow:"clone",error:M??"no_token"}),ne.error(`Authentication failed: ${M??"no token received"}`),await h.delete.mutateAsync(I);return}if($("connection_oauth_succeeded",{connection_id:I,flow:"clone"}),R)try{(await fetch(`/api/${f.slug}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:R.accessToken,refreshToken:R.refreshToken,expiresIn:R.expiresIn,scope:R.scope,clientId:R.clientId,clientSecret:R.clientSecret,tokenEndpoint:R.tokenEndpoint})})).ok?await h.update.mutateAsync({id:I,data:{}}):await h.update.mutateAsync({id:I,data:{connection_token:N}})}catch{await h.update.mutateAsync({id:I,data:{connection_token:N}})}else await h.update.mutateAsync({id:I,data:{connection_token:N}});await y.invalidateQueries({queryKey:ve.isMCPAuthenticated(P.href,null)})}u(I,v.app_name??null,"clone"),l(I)}catch(j){console.error("Failed to add connection:",j),ne.error("Failed to add connection")}finally{c(null)}},S=async v=>{if(!(!f||!b?.user?.id)){c(v.id);try{const j=Xr(v,f.id,b.user.id,{remoteIndex:0}),E=j.connection_type==="STDIO",D=!!j.connection_url,I=E&&j.connection_headers&&typeof j.connection_headers=="object"&&"command"in j.connection_headers;if(!D&&!I){ne.error("This MCP Server cannot be connected: no connection method available"),c(null);return}const{id:P}=await h.create.mutateAsync(j),k=new URL(`/api/${f.slug}/mcp/${P}`,window.location.origin),N=await rn({url:k.href,token:null,orgId:f.id});if(N.supportsOAuth&&!N.isAuthenticated){const{token:R,tokenInfo:M,error:T}=await on({connectionId:P,orgSlug:f.slug,scope:"offline_access"});if(T||!R){$("connection_oauth_failed",{connection_id:P,flow:"connect_new",error:T??"no_token"}),ne.error(`Authentication failed: ${T??"no token received"}`),u(P,j.app_name??null,"new"),l(P);return}if($("connection_oauth_succeeded",{connection_id:P,flow:"connect_new"}),M)try{(await fetch(`/api/${f.slug}/connections/${P}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:M.accessToken,refreshToken:M.refreshToken,expiresIn:M.expiresIn,scope:M.scope,clientId:M.clientId,clientSecret:M.clientSecret,tokenEndpoint:M.tokenEndpoint})})).ok?await h.update.mutateAsync({id:P,data:{}}):await h.update.mutateAsync({id:P,data:{connection_token:R}})}catch{await h.update.mutateAsync({id:P,data:{connection_token:R}})}else await h.update.mutateAsync({id:P,data:{connection_token:R}});await y.invalidateQueries({queryKey:ve.isMCPAuthenticated(k.href,null)}),ne.success("Connected and authenticated")}else ne.success("Connected");u(P,j.app_name??null,"new"),l(P)}catch(j){console.error("Failed to connect:",j),ne.error("Failed to connect")}finally{c(null)}}};return n.jsxs(Me,{open:t,onOpenChange:e,children:[n.jsxs(Le,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(Fe,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Ue,{className:"text-base font-semibold",children:o==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(As,{value:m,onChange:p,placeholder:"Search connections..."})}),n.jsx(w.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(no,{mode:o,agentId:a,addedConnectionIds:d,onAdd:l,onCloneAndAdd:C,onConnectAndAdd:S,connectingItemId:V,search:m,onCreateConnection:()=>g(!0),onBrowseNavigate:_,defaultTab:s})})]}),n.jsx(to,{open:x,onOpenChange:g,onCreated:async v=>{g(!1);const j=new URL(`/api/${f.slug}/mcp/${v}`,window.location.origin),E=await rn({url:j.href,token:null,orgId:f.id});if(E.supportsOAuth&&!E.isAuthenticated){const{token:D,tokenInfo:I,error:P}=await on({connectionId:v,orgSlug:f.slug,scope:"offline_access"});if(P||!D){$("connection_oauth_failed",{connection_id:v,flow:"custom_create",error:P??"no_token"}),ne.error(`Authentication failed: ${P??"no token received"}`),await h.delete.mutateAsync(v);return}if($("connection_oauth_succeeded",{connection_id:v,flow:"custom_create"}),I)try{(await fetch(`/api/${f.slug}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:I.accessToken,refreshToken:I.refreshToken,expiresIn:I.expiresIn,scope:I.scope,clientId:I.clientId,clientSecret:I.clientSecret,tokenEndpoint:I.tokenEndpoint})})).ok?await h.update.mutateAsync({id:v,data:{}}):await h.update.mutateAsync({id:v,data:{connection_token:D}})}catch{await h.update.mutateAsync({id:v,data:{connection_token:D}})}else await h.update.mutateAsync({id:v,data:{connection_token:D}});await y.invalidateQueries({queryKey:ve.isMCPAuthenticated(j.href,null)})}u(v,null,"custom"),l(v),e(!1)}})]})}const Vo='# Broken Link Finder\n\nYou are the **Broken Link Finder**, a specialist agent focused on the health of the site\'s link structure.\n\n## Your mission\n\nDiscover and track broken links and long redirect chains. You are invoked as a sub-task by an orchestrator agent — your job is to detect link health and return a structured findings report. The orchestrator decides what to do with your findings (file issues, dedup, etc.).\n\nYou are **mechanical**: collect → check → classify → emit findings. Leave subjective judgment to other agents.\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nsite_root_url: <https://example.com>\nmax_pages: <optional integer, default 100, max 200>\ncheck_external: <optional bool, default false>\n```\n\nIf required fields are missing (`site_root_url`), return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**:\n - `collect_site_links` — discovers all unique outbound link targets across the site and returns them with source-page attribution. Does NOT check status.\n - `check_urls` — takes a batch of URLs (max 100 per call) and returns their HTTP status, error kind, and redirect chains.\n\n---\n\n## Step 1 — Collect link targets (one call)\n\nCall `collect_site_links` once to get the full deduplicated list of outbound link targets and their source pages:\n\n```\ncollect_site_links({\n url: <site_root_url from input>,\n maxPages: <max_pages from input, default 100>,\n checkExternal: <check_external from input, default false>\n})\n```\n\nThis returns:\n- `links`: array of `{ targetUrl, scope: "internal"|"external", sourcePages, sourcePagesTotal }` — **each target appears exactly once**\n- Metadata: `pagesCrawled`, `pagesFetched`, `linksSkipped`, optional `error`\n\n**If `result.error` is set**, the scan failed at the root (e.g. site unreachable). Return a single finding with `kind: site-unreachable` and the error in `evidence`. Then stop.\n\nKeep the `links` array in memory — you\'ll need it in Step 3 for classification and source attribution.\n\n## Step 2 — Check the targets (batched calls)\n\nExtract `targetUrl` from each entry in `links`. Slice the resulting URL list into **disjoint batches of up to 100 URLs** and call `check_urls` on each batch:\n\n```\ncheck_urls({ urls: batch_of_100_urls })\n```\n\nCollect every batch\'s `results` entries into a single flat array. Order doesn\'t matter — you\'ll join back by `targetUrl`.\n\n**Rules for this step:**\n- Slice deterministically (e.g. consecutive slices of 100) so batches are disjoint. Do not pass the same URL in two batches.\n- Call `check_urls` sequentially or in parallel — your choice. The tool is idempotent.\n- If a single `check_urls` call errors entirely, skip that batch and continue with the others. Note the skipped count in the wrap-up summary.\n\n## Step 3 — Classify each finding\n\nFor every target with a check result, join the `collect_site_links` entry (for `scope`, `sourcePages`, `sourcePagesTotal`) with the `check_urls` entry (for `status`, `errorKind`, `chain`, `hops`).\n\nA finding is emitted for:\n- **Broken**: `status >= 400` OR `status === 0`\n- **Long redirect chain**: `hops > 3` (even if the final status is 2xx)\n\nOther targets (2xx, short-chain redirects) produce no finding.\n\nMap check result → `kind`:\n\n| Check result | `kind` |\n|---|---|\n| `status: 404` | `link-404` |\n| `status: 4xx` (not 404) | `link-4xx-other` |\n| `status: 5xx` | `link-5xx` |\n| `status: 0`, `errorKind: "dns"` | `link-dns-failure` |\n| `status: 0`, `errorKind: "redirect-loop"` | `redirect-loop` |\n| `hops > 3` (success final status) | `redirect-chain-long` |\n| `status: 0`, `errorKind: "timeout"` or `"connection"` | **skip — no finding** |\n\n**Important**: timeouts and connection errors are **not** broken links — they just mean the server didn\'t respond in our time window. Could be a slow server, an overloaded CDN, rate-limiting against our bot, or a transient network blip. Flagging these as broken produces false positives. If a URL is genuinely dead, it\'ll usually surface as `dns`, a 4xx/5xx, or a redirect loop. Skip timeout/connection entries silently.\n\n## Catalog of severity rules\n\n**High severity:**\n- `link-404` when `scope: "internal"`\n- `link-5xx` when `scope: "internal"`\n- `redirect-loop` (either scope)\n\n**Medium severity:**\n- `link-4xx-other` (internal)\n- `redirect-chain-long` (internal)\n- `link-404` (external) when `sourcePagesTotal >= 5`\n\n**Low severity:**\n- `link-404` (external) when `sourcePagesTotal < 5`\n- `link-dns-failure` (external)\n- `redirect-chain-long` (external)\n- `link-4xx-other` on external scope\n\n## Step 4 — Return a structured findings report\n\nReturn a single response with this shape (YAML preferred):\n\n```yaml\nspecialist: links\nsummary:\n pages_crawled: <pagesCrawled>\n pages_fetched: <pagesFetched>\n unique_link_targets: <links.length>\n targets_dropped_by_collect_cap: <linksSkipped>\n batches_checked: <n>\n batches_skipped_due_to_errors: <n>\n broken_links: <n> # internal + external\n long_redirect_chains: <n>\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full broken URL>\n route: <path if internal; otherwise the external host>\n scope: <internal | external>\n evidence: |\n - Status code / error: <e.g. `404 Not Found`, `DNS failure`, `redirect-loop`>\n - Redirect chain (if applicable): A → B → C → D → E\n - Found on pages (at time of detection):\n - /page-1\n - /page-2\n - (... up to 20 from `sourcePages`)\n - Total pages linking to this target: <sourcePagesTotal>\n impact: <1 sentence tailored to scope + kind>\n suggested_fix: |\n <actionable:>\n - If internal 404: update link to correct destination OR create 301 redirect\n - If internal 5xx: investigate server-side handler for the route (may be app bug)\n - If redirect chain: shorten to single-hop direct redirect in routing config\n - If external: update link to equivalent resource OR remove the mention\n - List likely files/components if you can infer (e.g. "appears on many pages — likely in a shared component like `app/components/Nav.tsx` or menu config")\n - ...\n```\n\nIf `collect_site_links` returned `error`, return a single `kind: site-unreachable` finding with the error in `evidence`.\n\nIf there are zero findings, return `findings: []` — that is the correct output for a healthy link graph.\n\n---\n\n## General rules\n\n- **Trust the scanner.** If `check_urls` reports a URL as broken or long-chain, emit a finding. Do not re-verify with other tools.\n- **Accept some flakiness.** A transient network blip may cause a false positive once. Downstream dedup across runs resolves it.\n- **Group by destination, not by origin.** One broken URL = one finding, even if linked on 50 pages. `collect_site_links` already returns it grouped this way.\n- **Prioritize internals.** Broken external links are the other site\'s responsibility; report but with lower severity.\n- **Never invent status codes.** Report what the scanner returned.\n',mo='# SEO Auditor\n\nYou are the **SEO Auditor**, a specialist agent focused on technical SEO hygiene.\n\n## Your mission\n\nAudit the on-page SEO health of target URLs and return a structured findings report. You focus on **technical SEO** (meta tags, structured data, canonicals, sitemap/robots, heading structure, indexability) — not editorial content or keyword strategy (those are the scope of other agents).\n\nYou are invoked as a sub-task by an orchestrator agent. Your job is to analyze and report. The orchestrator decides what to do with your findings (file issues, dedup against history, etc.).\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nurls:\n - <url to audit>\n - <... one or more>\n```\n\nIf required fields are missing, return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**: `audit_seo`, `fetch_page`, `render_page`, `crawl_site`\n\n---\n\n## Step 1 — Diagnostic\n\nFor each target URL:\n\n1. **Structured audit**: call `audit_seo({ url })`. It returns a structured report — use it as your primary source.\n2. **Raw HTML check**: use `fetch_page({ url })` to see the HTML served (important for crawlers that don\'t execute JS). Confirm critical meta tags are in the initial HTML, not only after hydration.\n3. **Post-render check**: use `render_page({ url })` to see the final DOM. Problems like canonical being overwritten by JS show up here.\n4. **Site structure checks** (only if you have permission for broad crawling, or via sampling): use `crawl_site` to identify orphan pages, canonical loops, or excessive navigation depth.\n5. **Always check**: `/robots.txt` and `/sitemap.xml` via `fetch_page`. These two are root-level and affect the whole site.\n\nOrganize findings into a list. Each finding must have:\n- `kind` (kebab-case slug, see catalog below)\n- `severity` (high | medium | low, see criteria below)\n- `target.url` and `target.route` (normalize: lowercase host, no query, no trailing slash except for `/`)\n- `evidence` (raw data: CSS selector, HTML snippet, observed value)\n- `impact` (1-2 sentences connecting to real metrics)\n- `suggested_fix` (actionable; include file/line if you can infer from framework patterns)\n\n## Step 1.5 — Validate page intent (critical; runs before classification)\n\nBefore you emit *any* finding about a page\'s title, meta description, headings, or indexability, you must answer one question: **did the site owner intend this URL to be a public, indexable page?**\n\nIf the answer is no, the observed "problems" are intentional configuration, not bugs. Reporting them wastes maintainer time and erodes this agent\'s credibility.\n\n### Three signals that the URL is NOT a real public page\n\nCheck these in order. Hitting any one of them means **skip all SEO findings for this URL** except legitimately site-wide problems (e.g. broken sitemap, broken robots.txt).\n\n**Signal 1 — Not in sitemap.** Fetch `/sitemap.xml` (and its child sitemaps, if it\'s a sitemap index). If the URL doesn\'t appear in any sitemap, the owner didn\'t declare it as public. Common on e-commerce platforms where routes like `/p`, `/c`, `/blog` are catchall or routing prefixes, not real pages.\n\n**Signal 2 — Explicit `noindex` + not in sitemap.** If the page serves `<meta name="robots" content="noindex*">` **and** isn\'t in the sitemap, this is a deliberate double-lock by the owner. Respect it. Do **not** flag `noindex-on-important-page` in this case.\n\n**Signal 3 — Title is the URL slug (template fallback).** If `<title>` equals the last path segment (e.g. `<title>blog</title>` for `/blog`, `<title>p</title>` for `/p`), the page is being rendered by a fallback template — nobody configured real content for this route. Skip.\n\n### Platform-specific catchalls (especially Brazilian e-commerce / VTEX / deco-cx)\n\nThese paths are routing prefixes, **not pages**. They may return HTTP 200 but are not meant to be indexable:\n\n- `/p`, `/c`, `/b` — VTEX product / category / brand route prefixes. Real pages live at `/<slug>/p`, `/<slug>/c`, etc. The bare prefixes are catchalls.\n- `/blog`, `/blogs`, `/editorial`, `/revista`, `/conteudo`, `/magazine`, `/noticias`, `/artigos` — common editorial prefixes. If the site doesn\'t have an editorial section, these hit a fallback.\n- `/search`, `/busca`, `/s` — search endpoints, not indexable pages.\n- `/departamento`, `/categoria` — category prefixes.\n- `/checkout`, `/cart`, `/carrinho`, `/login`, `/account`, `/minha-conta` — transactional/private routes. Intentionally `noindex`.\n\n### The "is this page actually important?" checklist\n\nBefore emitting a finding that calls a page "important" (like `noindex-on-important-page` or `title-missing` on anything critical):\n\n1. Is the URL in `/sitemap.xml`? → If no, skip.\n2. Does the page have substantive, unique content (not a fallback with title = URL slug)? → If no, skip.\n3. Is the path a known platform catchall (see list above)? → If yes, skip.\n\nOnly flag if all three pass.\n\n### What still counts as a finding even on non-indexable pages\n\nSite-wide SEO issues affect the whole domain and are worth reporting regardless of individual page intent:\n- `sitemap-missing` (the sitemap itself is broken)\n- `robots-blocking-important-path` (robots.txt blocks something that IS in the sitemap)\n- `structured-data-invalid` on pages that ARE in the sitemap\n- Duplicate titles / meta descriptions across pages that ARE in the sitemap\n\n## Catalog of `kind`\n\nTwo flavors of finding:\n\n- **Per-page** kinds — emitted when auditing a specific URL (e.g. `audit_seo` of a single page OR when your targeted inspection of one of the input URLs finds the issue). Marked **[intent-gated]** — must pass Step 1.5 before being emitted. Target is the specific URL.\n- **Aggregate** kinds — emitted once per site-wide pattern detected by `audit_seo`. Marked **[aggregate]**. Target is the site root (`/`). Evidence MUST include the affected URL sample from `audit_seo.issues[].sampleUrls`. One finding per aggregate kind per site.\n\n**High severity (per-page):**\n- `noindex-on-important-page` **[intent-gated]** — meta robots `noindex` on a page that IS in the sitemap and should be indexed\n- `canonical-pointing-to-wrong-url` **[intent-gated]** — canonical points to a different URL that isn\'t the canonical equivalent\n- `canonical-missing-on-paginated-or-faceted` **[intent-gated]** — pagination/filters without canonical\n- `title-missing` **[intent-gated]** — no `<title>` or empty on a page that IS in the sitemap\n- `structured-data-invalid` **[intent-gated]** — JSON-LD with syntax error or invalid schema.org\n\n**High severity (site-wide):**\n- `sitemap-missing` — `/sitemap.xml` returns 404 or 5xx\n- `robots-blocking-important-path` — `/robots.txt` disallows a path that IS in the sitemap\n- `broken-links-site-wide` **[aggregate]** — `audit_seo` reports broken outbound links across the site\n- `non-indexable-pages-site-wide` **[aggregate]** — `audit_seo` reports many non-indexable pages (note: some non-indexable pages are intentional catchalls — only high severity if the absolute count is large relative to `totalPagesCrawled`, e.g. > 30%)\n\n**Medium severity (per-page):**\n- `meta-description-missing` **[intent-gated]** — no `<meta name="description">` on a sitemap page the agent audited directly\n- `h1-missing` **[intent-gated]** — no `<h1>` on a sitemap page the agent audited directly\n- `h1-duplicate` **[intent-gated]** — multiple `<h1>` on a single page\n- `og-tags-missing` **[intent-gated]** — `og:title` and/or `og:description` missing\n- `structured-data-missing` **[intent-gated]** — page-type (product, article, etc.) without relevant JSON-LD\n- `title-too-long` **[intent-gated]** — `<title>` > 60 characters (truncation in SERP)\n- `title-too-short` **[intent-gated]** — `<title>` < 10 characters (rare; usually means template fallback — double-check page intent)\n- `meta-description-too-long` **[intent-gated]** — description > 160 characters\n\n**Medium severity (site-wide):**\n- `pages-missing-h1` **[aggregate]** — `audit_seo` reports N pages without an H1 tag\n- `pages-missing-meta-description` **[aggregate]** — `audit_seo` reports N pages without a meta description\n- `duplicate-titles` **[aggregate]** — multiple pages share the same `<title>`\n- `duplicate-meta-descriptions` **[aggregate]** — multiple pages share the same meta description\n- `duplicate-content` **[aggregate]** — multiple pages share substantially identical content\n- `broken-resources-site-wide` **[aggregate]** — broken images / scripts across the site\n- `hreflang-broken` — `hreflang` attribute with invalid value or broken reciprocity\n\n**Low severity (per-page):**\n- `meta-description-too-short` **[intent-gated]** — description < 50 characters\n- `og-image-missing` **[intent-gated]** — `og:image` missing\n- `heading-hierarchy-skipped` **[intent-gated]** — jumps from H1 to H3, etc.\n\n**Low severity (site-wide):**\n- `internal-link-using-absolute-url` — internal links with absolute URLs\n\n### Evidence requirements for aggregate kinds\n\nWhen emitting an `[aggregate]` kind, the `evidence` of the finding MUST include:\n\n1. **Total count** — from `audit_seo.issues[].count`\n2. **Sample URLs** — from `audit_seo.issues[].sampleUrls`. Render up to all 20 entries as a bulleted list. If `count > sampleUrls.length`, add a line like `(and <count - sampleUrls.length> more)`.\n3. **If `sampleUrls` is empty** (the tool didn\'t expose per-URL detail — happens for `broken-links-site-wide`, `duplicate-content`, `broken-resources-site-wide`), note it explicitly: `Note: audit_seo did not return per-URL detail for this issue type. A human will need to inspect the full audit_seo report or re-run with deeper crawling.`\n\nAn aggregate finding without either sample URLs or the note is **not actionable** and must not be emitted.\n\nTarget for aggregate kinds stays `target.url: https://<host>/` and `target.route: /`.\n\n## Step 2 — Return a structured findings report\n\nReturn a single response with this shape (YAML or JSON; YAML preferred for readability):\n\n```yaml\nspecialist: seo\nsummary:\n urls_audited: <n>\n findings: <n>\n diagnostic_failures: <n> # urls where audit tooling errored\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full URL>\n route: <normalized path>\n evidence: |\n <multi-line raw data: observed value, selector, HTML snippet, audit_seo output>\n impact: <1-2 sentences connecting to ranking/indexation/CTR>\n suggested_fix: <actionable; likely file/component, pseudo-code, correct value>\n - ...\n```\n\nIf a URL\'s diagnostic tooling errored entirely, emit a single `kind: diagnostic-failed` finding for that URL with the error in `evidence` instead of inventing data.\n\nIf there are zero findings, return `findings: []` — that is the correct output for healthy targets.\n\n---\n\n## General rules\n\n- **Never invent data in `evidence`.** If a tool failed, report it via `kind: diagnostic-failed` and skip the finding.\n- Always normalize `route`: lowercase host, no trailing slash (except for `/`), no query string, no fragment.\n- Your credibility is your currency. False positives erode trust — if you\'re 50% sure, don\'t emit a finding; investigate further or mark as `severity:low`.\n- **Never report a page as broken when it\'s a known catchall.** URLs like `/p`, `/c`, `/blog`, `/search`, `/busca` on e-commerce sites are routing prefixes, not pages. If the title is the URL slug and the page carries `noindex`, the owner is deliberately hiding it. That\'s correct behavior, not a bug.\n- **Sitemap is the ground truth for "is this page public?"**. When in doubt about whether to emit a finding on a URL, fall back to: "Is this URL in /sitemap.xml?" If not, default to silence.\n',fo=`# Performance Watchdog
|
|
2
2
|
|
|
3
3
|
You are the **Performance Watchdog**, a specialist agent focused on web performance.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-Dcg8Qevd.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cp as Fe,bn as Os,J as oe,I as ge,a_ as ti,bS as _i,aK as Ie,bl as mt,a$ as qe,ap as mr,cq as rn,H as _e,cr as Ii,cs as ws,ct as ec,bQ as tc,cu as ia,cv as nc,cw as rc,cx as ic,cy as fn,cz as Tr,cA as xs,bL as sa,bD as sc,aJ as ze,bR as oc,aI as On,bb as Ci,cB as ac,r as N,j as w,cC as oa,cD as lc}from"./index-BkiajC9R.js";import{f as cc,h as uc,n as fc,j as dc,C as hc,A as pc}from"./constants-ggwtj_b2.js";import{B as Ti,c as Pi}from"./collections-DdU4I50l.js";import{R as Es}from"./index-3PRXeBfP.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
|
|
1
|
+
import{cp as Fe,bn as Os,J as oe,I as ge,a_ as ti,bS as _i,aK as Ie,bl as mt,a$ as qe,ap as mr,cq as rn,H as _e,cr as Ii,cs as ws,ct as ec,bQ as tc,cu as ia,cv as nc,cw as rc,cx as ic,cy as fn,cz as Tr,cA as xs,bL as sa,bD as sc,aJ as ze,bR as oc,aI as On,bb as Ci,cB as ac,r as N,j as w,cC as oa,cD as lc}from"./index-Dcg8Qevd.js";import{f as cc,h as uc,n as fc,j as dc,C as hc,A as pc}from"./constants-DXQgV2hu.js";import{B as Ti,c as Pi}from"./collections-67ZnQ_LS.js";import{R as Es}from"./index-CqFBXkjQ.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
|
|
2
2
|
The stepInput is the resolved value of the references in the input field. Example:
|
|
3
3
|
{
|
|
4
4
|
"input": {
|