decocms 2.344.0 → 2.344.1
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-Zr3qXN_Y.js → AlertCircle-bwh-njhy.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-BlpE5X0d.js → ArrowNarrowLeft-DKu_FgKl.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CRJhQzeV.js → ArrowUpRight-CVcoZbg7.js} +1 -1
- package/dist/client/assets/{Building02-CN-CxzRQ.js → Building02-BMx63ME6.js} +1 -1
- package/dist/client/assets/{Check-C8FolzI7.js → Check-DQJBzV3Q.js} +1 -1
- package/dist/client/assets/{CheckCircle-D42QA24s.js → CheckCircle-CWARhZeh.js} +1 -1
- package/dist/client/assets/{ChevronDown-CyvRbm23.js → ChevronDown-DgQUayCd.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cl7_f5Tw.js → ChevronRight-CFEYuyQK.js} +1 -1
- package/dist/client/assets/{ChevronUp-15q5S78Q.js → ChevronUp-BgO5mJEu.js} +1 -1
- package/dist/client/assets/{Container-B8tBPRyK.js → Container-CsMdjyhb.js} +1 -1
- package/dist/client/assets/{DotsVertical-BwfRmKn5.js → DotsVertical-6m_CrItm.js} +1 -1
- package/dist/client/assets/{Key01-CMccSk3m.js → Key01-Do9NG_0X.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CUMht0c7.js → LayoutLeft-2RABF8Og.js} +1 -1
- package/dist/client/assets/{LinkExternal01-fEinjB8u.js → LinkExternal01-Rp7MbQx6.js} +1 -1
- package/dist/client/assets/{Lock01-DSl8Z9Ls.js → Lock01-ZyB7Ltig.js} +1 -1
- package/dist/client/assets/{Monitor01-CtLfDZn9.js → Monitor01-wdarBriC.js} +1 -1
- package/dist/client/assets/{Palette-CL_K1Dej.js → Palette-B5K6Qdn2.js} +1 -1
- package/dist/client/assets/{Play-BByjp7KN.js → Play-DbGk3Udx.js} +1 -1
- package/dist/client/assets/{Plus-Cg9NXsL1.js → Plus-bv9cJbRl.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-miji2R0O.js → RefreshCcw01-CqcTE-Jk.js} +1 -1
- package/dist/client/assets/{SearchLg-BsNRgtQ9.js → SearchLg-DaZZIiNM.js} +1 -1
- package/dist/client/assets/{SearchMd-DOFW3xul.js → SearchMd-BB-cSGVk.js} +1 -1
- package/dist/client/assets/{Settings02-B6yKqjEJ.js → Settings02-DUl6jhvf.js} +1 -1
- package/dist/client/assets/{Shield01-OCXjYIsU.js → Shield01-CFZl0iIh.js} +1 -1
- package/dist/client/assets/{Star01-Bg-y0v_C.js → Star01-Dkql2WEg.js} +1 -1
- package/dist/client/assets/{Sun-DLmF9uX2.js → Sun-9m1Y0oyC.js} +1 -1
- package/dist/client/assets/{Tool01-bIBOxhhC.js → Tool01-Di7pqNjI.js} +1 -1
- package/dist/client/assets/{Trash01-CuKKsBcr.js → Trash01--NIzvL5p.js} +1 -1
- package/dist/client/assets/{Upload01-BkaQ7nKE.js → Upload01-B_1Qf-22.js} +1 -1
- package/dist/client/assets/{User01-BZrs6bE2.js → User01-DLi7Q0Fd.js} +1 -1
- package/dist/client/assets/{Users01-C7tq6IJ0.js → Users01-D1KjxPwB.js} +1 -1
- package/dist/client/assets/{Users03-BOwqtfs2.js → Users03-D4pjzeB5.js} +1 -1
- package/dist/client/assets/{X-DgTeTani.js → X-Dai0EM1U.js} +1 -1
- package/dist/client/assets/{XCircle-BdL2HFXH.js → XCircle-D57ZBW6P.js} +1 -1
- package/dist/client/assets/{XClose-Bgw0XVU1.js → XClose-Bh09JFxC.js} +1 -1
- package/dist/client/assets/{Zap-oLZU1yYN.js → Zap-mhpp9vta.js} +1 -1
- package/dist/client/assets/{ZapSquare-C4bP3ArS.js → ZapSquare-B3tIEVrC.js} +1 -1
- package/dist/client/assets/{accordion-BzKq7jAq.js → accordion-D8rZJiVF.js} +1 -1
- package/dist/client/assets/{agent-icon-DVdZ9Hda.js → agent-icon-B9Pj-gb8.js} +1 -1
- package/dist/client/assets/{agent-models-Dr1Ht5Qv.js → agent-models-BAUYB-sb.js} +1 -1
- package/dist/client/assets/{agents-list-B4eBSMwj.js → agents-list-D2d2MRqk.js} +1 -1
- package/dist/client/assets/{ai-providers-D2h_QUN4.js → ai-providers-CYkgrlrS.js} +1 -1
- package/dist/client/assets/{alert-dialog-efbw1plv.js → alert-dialog-Djn_H2Rc.js} +1 -1
- package/dist/client/assets/{auth-catchall-CDYm5ZJv.js → auth-catchall-6ktpZb0T.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cqh_8Loe.js → auth-split-layout-CCMVLEKr.js} +1 -1
- package/dist/client/assets/{automation-list-row-BfnI4QQC.js → automation-list-row-B46x7o_b.js} +1 -1
- package/dist/client/assets/{automations-D64Hy4e8.js → automations-BQq1fRzy.js} +1 -1
- package/dist/client/assets/{avatar-stvERg0h.js → avatar-B2gux03L.js} +1 -1
- package/dist/client/assets/{badge-Bvcg6UkD.js → badge-D95F95jp.js} +1 -1
- package/dist/client/assets/{brand-context-DN6USQVd.js → brand-context-1h4PgY_a.js} +1 -1
- package/dist/client/assets/{card-CpJdFbq0.js → card-BTvwJe1w.js} +1 -1
- package/dist/client/assets/{chat-context-BCnqaOys.js → chat-context-BrQc8C2Q.js} +1 -1
- package/dist/client/assets/{checkbox-DqVlRw_g.js → checkbox-DrtWISHO.js} +1 -1
- package/dist/client/assets/{collection-detail-Cyzh2LI_.js → collection-detail-4lLFT51B.js} +1 -1
- package/dist/client/assets/{collection-display-button-BX9atEyC.js → collection-display-button-B3HAkAyt.js} +1 -1
- package/dist/client/assets/{collection-search-B02K4H4e.js → collection-search-CxZKJKgM.js} +1 -1
- package/dist/client/assets/{collection-search-DqNxlePA.js → collection-search-D_3Fs_7f.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BG86Vmt4.js → collection-table-wrapper-BkEZWN27.js} +1 -1
- package/dist/client/assets/{collection-tabs-bgQP1IL8.js → collection-tabs-DwNPEXUc.js} +1 -1
- package/dist/client/assets/{collections-Kb4FfdCY.js → collections-BCCJVNFI.js} +1 -1
- package/dist/client/assets/{command-BzWBPiJZ.js → command-BY3JIOwj.js} +1 -1
- package/dist/client/assets/{connection-card-QOPOnJjN.js → connection-card-ahJFttOQ.js} +1 -1
- package/dist/client/assets/{connection-detail-WEII0wDF.js → connection-detail-B8fRyAxV.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DdMoIvme.js → connection-form-helpers-C9XUmqvc.js} +1 -1
- package/dist/client/assets/{connections-ZAdsGqJI.js → connections-BMfeHlHX.js} +1 -1
- package/dist/client/assets/{constants-Cm768MQ2.js → constants-BTDlb8Xq.js} +1 -1
- package/dist/client/assets/{constants-DvXZBnwV.js → constants-CU5qTPFR.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D9HgxWs_.js → decopilot-sse-pool-CQYEElZK.js} +1 -1
- package/dist/client/assets/{dialog-BJ1oTeIz.js → dialog-DZil2cub.js} +1 -1
- package/dist/client/assets/{domain-settings-CKeo-Lnw.js → domain-settings-CifIiFCr.js} +1 -1
- package/dist/client/assets/{drawer-BVIrDRGi.js → drawer-VsoKfR_8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-63xeIpOO.js → dropdown-menu-CtOsG6kE.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DA6hRQw4.js → dynamic-plugin-layout-BkYimDwS.js} +1 -1
- package/dist/client/assets/{empty-state-D9bO00vZ.js → empty-state-C5kNOhZm.js} +1 -1
- package/dist/client/assets/{empty-state-DnKXvZYK.js → empty-state-gNdxCZ-f.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C5avaYWp.js → extract-connection-data-DEYgjBHv.js} +1 -1
- package/dist/client/assets/{features-BZOW7Kw7.js → features-CB4-qBAZ.js} +1 -1
- package/dist/client/assets/{file-explorer-BVCGJnRU.js → file-explorer-UwAU6I5S.js} +1 -1
- package/dist/client/assets/{form-Bi-7QlXg.js → form-DVAWMe1e.js} +1 -1
- package/dist/client/assets/{general-CjA4ACGS.js → general-Z9EH8wK-.js} +1 -1
- package/dist/client/assets/{hooks-CgJEU0S8.js → hooks-ChfROHvV.js} +1 -1
- package/dist/client/assets/{index-Ceui8akN.js → index-AhUZd0wF.js} +1 -1
- package/dist/client/assets/{index-CFPLte98.js → index-B6e02X2I.js} +1 -1
- package/dist/client/assets/{index-BvP5IxM4.js → index-Bgo8UhqC.js} +1 -1
- package/dist/client/assets/{index-DI1RjLHo.js → index-BslSCtx8.js} +1 -1
- package/dist/client/assets/{index-Idgaou0t.js → index-BspAIPeF.js} +1 -1
- package/dist/client/assets/{index-CopA--lx.js → index-BukzwEAB.js} +1 -1
- package/dist/client/assets/{index-DVC_amR_.js → index-CBWObXGL.js} +2 -2
- package/dist/client/assets/{index-CegFj2iI.js → index-CghrJuns.js} +1 -1
- package/dist/client/assets/{index-BFG6dRiB.js → index-CqM2YZAG.js} +1 -1
- package/dist/client/assets/{index-Bty99rvW.js → index-DB8doOZq.js} +1 -1
- package/dist/client/assets/{index-DITV5Nm6.js → index-DS7TCkFE.js} +1 -1
- package/dist/client/assets/{index-CcWfIOdp.js → index-DZ8Rjjil.js} +1 -1
- package/dist/client/assets/{index-B9WbkG-Q.js → index-DhwZSuUp.js} +1 -1
- package/dist/client/assets/{index-ckYYV1B9.js → index-SOxdes-X.js} +4 -4
- package/dist/client/assets/{index-Bvq1VcBz.js → index-aS7sqHY3.js} +1 -1
- package/dist/client/assets/{index-BWUePYs8.js → index-ih2KVqW5.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-6F1JNrHV.js → infiniteQueryObserver-BR-XyzMF.js} +1 -1
- package/dist/client/assets/{input-BDzeSRCZ.js → input-CJPXM-0_.js} +1 -1
- package/dist/client/assets/{integration-icon-BbiJcPOj.js → integration-icon-CJZrsRwF.js} +1 -1
- package/dist/client/assets/{label-CrI5aSmo.js → label-C4x9sOtX.js} +1 -1
- package/dist/client/assets/{layout-BSMFDfV_.js → layout-FAbydrZW.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-CIuqw0v_.js → lean-canvas-recruit-modal-DqgOXX4A.js} +1 -1
- package/dist/client/assets/{login-C87VdqRs.js → login-BZs2QqIB.js} +1 -1
- package/dist/client/assets/{members-B1Rq0hvx.js → members-zdPZv15z.js} +1 -1
- package/dist/client/assets/{monaco-editor-Ci3lXHpj.js → monaco-editor-Bo8VkyGH.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bf8q2X95.js → monitoring-stats-row-2DD2jVGN.js} +1 -1
- package/dist/client/assets/{oauth-callback-CHtqspDH.js → oauth-callback-CoSc2Xeo.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-658DPaRJ.js → oauth-callback-ai-provider-ODbJNVcB.js} +1 -1
- package/dist/client/assets/{onboarding-tW7e9kr4.js → onboarding-DI4N5MjE.js} +1 -1
- package/dist/client/assets/{org-layout-Cdjw-Zql.js → org-layout-B4R4U_MQ.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-L_H9ds6U.js → org-plugin-layout-C6RkF9hx.js} +1 -1
- package/dist/client/assets/{pair-D8dbQ1ne.js → pair-BNU7uLG7.js} +39 -39
- package/dist/client/assets/{plugin-empty-state-DqERuuMf.js → plugin-empty-state-Dr10olN1.js} +1 -1
- package/dist/client/assets/{plugin-header-DJ0iwv5V.js → plugin-header-BlGki-QC.js} +1 -1
- package/dist/client/assets/{plugin-layout-DwnDbKFz.js → plugin-layout-DARd19kl.js} +1 -1
- package/dist/client/assets/{popover-ctbEGii0.js → popover-BUvxWtuH.js} +1 -1
- package/dist/client/assets/{profile-C7ggpOjU.js → profile-Csu4aQEB.js} +1 -1
- package/dist/client/assets/{project-app-view-CraU2qdw.js → project-app-view-B4Kke2Bu.js} +1 -1
- package/dist/client/assets/registry-CKjyGKEG.js +2 -0
- package/dist/client/assets/{registry-layout-D8aXzRFf.js → registry-layout-uelp9nBQ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B7gTxYFz.js → required-auth-layout-Bma3WDxq.js} +1 -1
- package/dist/client/assets/{reset-password-Dreg-pQf.js → reset-password-Bgc8I2F9.js} +1 -1
- package/dist/client/assets/{roles-CzYq-o3U.js → roles-Dqqrlj7G.js} +1 -1
- package/dist/client/assets/{search-input-DHT0QuZ-.js → search-input-DeZvs61q.js} +1 -1
- package/dist/client/assets/{secrets-CDIw5rrR.js → secrets-B0ImDqON.js} +1 -1
- package/dist/client/assets/{sections-editor-C7D-Qj_u.js → sections-editor-ar7wx2--.js} +1 -1
- package/dist/client/assets/{select-BLV2lgg8.js → select-CABzLKLY.js} +1 -1
- package/dist/client/assets/{settings-layout-Clska9qL.js → settings-layout-DszcSMEZ.js} +1 -1
- package/dist/client/assets/{settings-section-CAi1zz5W.js → settings-section-PSdaatB0.js} +1 -1
- package/dist/client/assets/{shell-layout-Bi_E3KfQ.js → shell-layout-DtOKBAiT.js} +1 -1
- package/dist/client/assets/{sidebar-BMfrF5kw.js → sidebar-CCnjHo9B.js} +1 -1
- package/dist/client/assets/{skeleton-CttuE_Kl.js → skeleton-Bba1xVPm.js} +1 -1
- package/dist/client/assets/{spinner-Cw6dcArJ.js → spinner-Cj5rH4A2.js} +1 -1
- package/dist/client/assets/{sso-BFdMoUva.js → sso-jAXVMv9Y.js} +1 -1
- package/dist/client/assets/{store-B1BzcoJB.js → store-BdWXr71q.js} +1 -1
- package/dist/client/assets/store-registry-VyUS6_Us.js +2 -0
- package/dist/client/assets/{switch-LDnz85Rk.js → switch-ZUMJxJUW.js} +1 -1
- package/dist/client/assets/{table-R9M5g5WG.js → table-CFUTtJhf.js} +1 -1
- package/dist/client/assets/{tabs-D514ndu7.js → tabs-C9rtBnQ9.js} +1 -1
- package/dist/client/assets/{task-status-YDzJwJ5r.js → task-status-4M1g2SWK.js} +1 -1
- package/dist/client/assets/{textarea-B3J52C5p.js → textarea-B0LOxuqd.js} +1 -1
- package/dist/client/assets/{toggle-group-nw3sxkYN.js → toggle-group-mrmahHkN.js} +1 -1
- package/dist/client/assets/{tools-list-DnUpEIzv.js → tools-list-D2TZ_pKY.js} +1 -1
- package/dist/client/assets/{tooltip-DWlRhba1.js → tooltip-jEhdTkb8.js} +1 -1
- package/dist/client/assets/{types-DVx_zvWX.js → types-BQnj9Iu3.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CrBwMtoH.js → use-ai-providers-CWuJLdQl.js} +1 -1
- package/dist/client/assets/{use-collections-BPpafU1Y.js → use-collections-eNNjLWPD.js} +1 -1
- package/dist/client/assets/{use-connection-BM01VLiP.js → use-connection-BXtcCeOB.js} +1 -1
- package/dist/client/assets/{use-copy-LH27c1BU.js → use-copy-D8VjIT69.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DxctOMYl.js → use-create-virtual-mcp-BJ_85owj.js} +1 -1
- package/dist/client/assets/{use-create-website-agent-sZrGr-VJ.js → use-create-website-agent-CHxa8I7_.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C-zO8yJw.js → use-debounced-autosave-ur4BnuEX.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cgdg6Pxv.js → use-delete-connection-BXAFbprf.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-6hyFl57Q.js → use-infinite-scroll-CSmVOwEN.js} +1 -1
- package/dist/client/assets/{use-list-state-CSdZ88km.js → use-list-state-CP8wVehu.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C1NvNreM.js → use-mcp-tools-CLPnsoVx.js} +1 -1
- package/dist/client/assets/{use-members-DcKjcH9B.js → use-members-rsUu793b.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-F6dcDYVN.js → use-navigate-to-agent-DeoSCXQ3.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CN-RShxc.js → use-org-auth-client-hXNxLs_8.js} +1 -1
- package/dist/client/assets/{use-org-sso-C_FXtfYC.js → use-org-sso-rrngGDgt.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C0ae2v1C.js → use-organization-roles-DF6GO7Ih.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CbbDQN8t.js → use-organization-settings-CpP73tj4.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BXNQ_Hou.js → use-registry-connections-3TJEaPEi.js} +1 -1
- package/dist/client/assets/{use-secrets-CsevBJHm.js → use-secrets-BqjH7lzm.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DX_GeR-k.js → use-status-sounds-CPbi3b3R.js} +1 -1
- package/dist/client/assets/{use-view-mode-BoAhjzmG.js → use-view-mode-Dt6kuxto.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CL8_1JvZ.js → use-virtual-mcp-z6s77kRo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BoB6J8UO.js +1 -0
- package/dist/client/assets/{useRouterState-C16OYKPu.js → useRouterState-Cfwcfnrc.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Hz8NX6DF.js +1 -0
- package/dist/client/assets/{user-BWGdTKRQ.js → user-EYE1kh7H.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-eN2VYj6l.js → view-mode-toggle-DRQNpSaD.js} +1 -1
- package/dist/client/assets/{workflow-D6Gjk7E5.js → workflow-CPCxTO9-.js} +1 -1
- package/dist/client/assets/workflow-detail-D2VXZlZ5.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js +6 -36
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +0 -15
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js +6 -36
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js +0 -15
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js +6 -36
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js +0 -15
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/package.json +14 -12
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.js +10 -13
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/dist/server/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/dist/server/node_modules/protobufjs/dist/protobuf.js +55 -14
- package/dist/server/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/dist/server/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/dist/server/node_modules/protobufjs/package.json +1 -1
- package/dist/server/node_modules/protobufjs/src/message.js +3 -7
- package/dist/server/node_modules/protobufjs/src/object.js +6 -3
- package/dist/server/node_modules/protobufjs/src/parse.js +45 -1
- package/dist/server/node_modules/protobufjs/src/type.js +0 -1
- package/package.json +1 -1
- package/dist/client/assets/registry-BtpgEc_i.js +0 -2
- package/dist/client/assets/store-registry-DYlMAZ-n.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Bf13dNrT.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D1OCB8E3.js +0 -1
- package/dist/client/assets/workflow-detail-BEtvIl5Y.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/license +0 -9
- package/dist/server/node_modules/ansi-styles/package.json +0 -54
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
- package/dist/server/node_modules/indent-string/index.d.ts +0 -38
- package/dist/server/node_modules/indent-string/index.js +0 -38
- package/dist/server/node_modules/indent-string/license +0 -9
- package/dist/server/node_modules/indent-string/package.json +0 -40
- package/dist/server/node_modules/indent-string/readme.md +0 -73
- package/dist/server/node_modules/pg/LICENSE +0 -21
- package/dist/server/node_modules/pg/README.md +0 -89
- package/dist/server/node_modules/pg/lib/client.js +0 -631
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -167
- package/dist/server/node_modules/pg/lib/connection.js +0 -223
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -186
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -37
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -83
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -84
- package/dist/server/node_modules/pg/lib/index.js +0 -58
- package/dist/server/node_modules/pg/lib/native/client.js +0 -307
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -241
- package/dist/server/node_modules/pg/lib/result.js +0 -107
- package/dist/server/node_modules/pg/lib/stream.js +0 -28
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -204
- package/dist/server/node_modules/pg/package.json +0 -64
- package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
- package/dist/server/node_modules/postgres-array/index.js +0 -97
- package/dist/server/node_modules/postgres-array/license +0 -21
- package/dist/server/node_modules/postgres-array/package.json +0 -35
- package/dist/server/node_modules/postgres-array/readme.md +0 -43
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/license +0 -21
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
- package/dist/server/node_modules/postgres-interval/index.js +0 -125
- package/dist/server/node_modules/postgres-interval/license +0 -21
- package/dist/server/node_modules/postgres-interval/package.json +0 -36
- package/dist/server/node_modules/postgres-interval/readme.md +0 -48
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
package/dist/client/assets/{use-debounced-autosave-C-zO8yJw.js → use-debounced-autosave-ur4BnuEX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-CBWObXGL.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
|
package/dist/client/assets/{use-delete-connection-Cgdg6Pxv.js → use-delete-connection-BXAFbprf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as R,j as n,p as z,z as H,r as J,o as S}from"./index-
|
|
1
|
+
import{e as R,j as n,p as z,z as H,r as J,o as S}from"./index-CBWObXGL.js";import{c as F,b as L,d as $,f as k,e as q,g as M,a as P,A as U}from"./alert-dialog-Djn_H2Rc.js";import{u as K,S as B}from"./constants-BTDlb8Xq.js";function X(j){const e=R.c(41),{deleteState:r,cancelDelete:i,confirmDelete:a,confirmForceDelete:l}=j,y=r.mode==="deleting";let d;e[0]!==i?(d=w=>{w||i()},e[0]=i,e[1]=d):d=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(F,{children:"Delete Connection?"}),e[2]=N):N=e[2];const T=r.mode==="deleting"&&r.connection.title;let m;e[3]!==T?(m=n.jsxs(L,{children:[N,n.jsxs($,{children:["This action cannot be undone. This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:T}),"."]})]}),e[3]=T,e[4]=m):m=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(k,{children:"Cancel"}),e[5]=E):E=e[5];let o;e[6]!==a?(o=n.jsxs(q,{children:[E,n.jsx(M,{onClick:a,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[6]=a,e[7]=o):o=e[7];let t;e[8]!==m||e[9]!==o?(t=n.jsxs(P,{children:[m,o]}),e[8]=m,e[9]=o,e[10]=t):t=e[10];let s;e[11]!==y||e[12]!==d||e[13]!==t?(s=n.jsx(U,{open:y,onOpenChange:d,children:t}),e[11]=y,e[12]=d,e[13]=t,e[14]=s):s=e[14];const _=r.mode==="force-deleting";let c;e[15]!==i?(c=w=>{w||i()},e[15]=i,e[16]=c):c=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(F,{children:"Connection Used by Agents"}),e[17]=f):f=e[17];const v=r.mode==="force-deleting"&&r.connection.title;let u;e[18]!==v?(u=n.jsx("span",{className:"font-medium text-foreground",children:v}),e[18]=v,e[19]=u):u=e[19];const I=r.mode==="force-deleting"&&r.agentNames;let g;e[20]!==I?(g=n.jsx("span",{className:"font-medium text-foreground",children:I}),e[20]=I,e[21]=g):g=e[21];let h;e[22]!==u||e[23]!==g?(h=n.jsxs("p",{children:["The connection"," ",u," ","is currently used by the following agent(s):"," ",g,"."]}),e[22]=u,e[23]=g,e[24]=h):h=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."}),e[25]=A):A=e[25];let x;e[26]!==h?(x=n.jsxs(L,{children:[f,n.jsx($,{asChild:!0,children:n.jsxs("div",{children:[h,A]})})]}),e[26]=h,e[27]=x):x=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(k,{children:"Cancel"}),e[28]=O):O=e[28];let C;e[29]!==l?(C=n.jsxs(q,{children:[O,n.jsx(M,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]}),e[29]=l,e[30]=C):C=e[30];let D;e[31]!==x||e[32]!==C?(D=n.jsxs(P,{children:[x,C]}),e[31]=x,e[32]=C,e[33]=D):D=e[33];let p;e[34]!==_||e[35]!==c||e[36]!==D?(p=n.jsx(U,{open:_,onOpenChange:c,children:D}),e[34]=_,e[35]=c,e[36]=D,e[37]=p):p=e[37];let b;return e[38]!==p||e[39]!==s?(b=n.jsxs(n.Fragment,{children:[s,p]}),e[38]=p,e[39]=s,e[40]=b):b=e[40],b}function Q(j){const e=j.content;return Array.isArray(e)&&e[0]?.type==="text"&&typeof e[0].text=="string"?e[0].text:"Unknown error"}function Y({onSuccess:j}={}){const{org:e}=z(),r=H(),i=K({connectionId:B,orgId:e.id,orgSlug:e.slug}),[a,l]=J.useState({mode:"idle"}),y=()=>{r.invalidateQueries({predicate:o=>{const t=o.queryKey;return t[1]===e.id&&t[3]==="collection"&&t[4]==="CONNECTIONS"}})},d=()=>{y(),S.success("Connection deleted successfully"),l({mode:"idle"}),j?.()};return{deleteState:a,requestDelete:o=>{l({mode:"deleting",connection:o})},cancelDelete:()=>{l({mode:"idle"})},confirmDelete:async()=>{if(a.mode!=="deleting")return;const o=a.connection;l({mode:"idle"});try{const t=await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:o.id}});if(t.isError){const s=Q(t),_=s.replace(/^Error:\s*/,"");try{const c=JSON.parse(_);if(c.code==="CONNECTION_IN_USE"&&c.agentNames){l({mode:"force-deleting",connection:o,agentNames:c.agentNames.map(f=>`"${f}"`).join(", ")});return}}catch{}S.error(`Failed to delete connection: ${s}`);return}d()}catch(t){const s=t instanceof Error?t.message:String(t);S.error(`Failed to delete connection: ${s}`)}},confirmForceDelete:async()=>{if(a.mode!=="force-deleting")return;const o=a.connection.id;l({mode:"idle"});try{const t=await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:o,force:!0}});if(t.isError){S.error(`Failed to delete connection: ${Q(t)}`);return}d()}catch(t){const s=t instanceof Error?t.message:String(t);S.error(`Failed to delete connection: ${s}`)}}}}export{X as D,Y as u};
|
package/dist/client/assets/{use-infinite-scroll-6hyFl57Q.js → use-infinite-scroll-CSmVOwEN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-CBWObXGL.js";function v(n,u,c=!1,s){const r=e.useRef(null),o=e.useRef(null),f=e.useRef(n),i=e.useRef(u),R=e.useRef(c),l=e.useRef(s);f.current=n,i.current=u,R.current=c,l.current=s;const[p]=e.useState(()=>t=>{o.current=t,r.current&&(r.current.disconnect(),r.current=null),t&&queueMicrotask(()=>{if(o.current!==t)return;const a=new IntersectionObserver(x=>{x[0]?.isIntersecting&&i.current&&!R.current&&f.current()},{root:l.current?.current??null,rootMargin:"0px 0px 200px 0px"});a.observe(t),r.current=a})});return p}export{v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,e as w}from"./index-
|
|
1
|
+
import{r as u,e as w}from"./index-CBWObXGL.js";import{u as E}from"./use-view-mode-Dt6kuxto.js";function J(a){const e=`deco-filters-${a}`,[s,i]=u.useState(()=>{try{const t=globalThis.localStorage?.getItem(e);if(t)return JSON.parse(t)}catch(t){console.error("Failed to parse stored filters:",t)}return[]});return[s,t=>{i(t);try{globalThis.localStorage?.setItem(e,JSON.stringify(t))}catch(l){console.error("Failed to save filters:",l)}}]}function N(a){const e=w.c(7),[s,i]=u.useState(a),[r,t]=u.useState(a?"desc":null);let l;e[0]!==r||e[1]!==s?(l=S=>{s!==S?(i(S),t("asc")):r==="asc"?t("desc"):r==="desc"&&(i(void 0),t(null))},e[0]=r,e[1]=s,e[2]=l):l=e[2];const d=l;let o;return e[3]!==d||e[4]!==r||e[5]!==s?(o={sortKey:s,sortDirection:r,handleSort:d},e[3]=d,e[4]=r,e[5]=s,e[6]=o):o=e[6],o}function W(a){const e=w.c(20),{namespace:s,resource:i,defaultSortKey:r,defaultViewMode:t}=a,l=r===void 0?"title":r,d=t===void 0?"table":t,[o,S]=u.useState(""),b=u.useDeferredValue(o),D=`${s}-${i}`,[p,F]=J(D),c=`mesh-${i}-filter-visible-${s}`;let g;e[0]!==c?(g=()=>globalThis.localStorage?.getItem(c)==="true",e[0]=c,e[1]=g):g=e[1];const[n,x]=u.useState(g);let h;e[2]!==c?(h=T=>{x(T),globalThis.localStorage?.setItem(c,String(T))},e[2]=c,e[3]=h):h=e[3];const f=h;let m;e[4]!==n||e[5]!==f?(m=()=>{f(!n)},e[4]=n,e[5]=f,e[6]=m):m=e[6];const V=m,[$,K]=E(`mesh-${i}-${s}`,d),{sortKey:I,sortDirection:v,handleSort:B}=N(l),M=I;let y;return e[7]!==n||e[8]!==p||e[9]!==B||e[10]!==o||e[11]!==b||e[12]!==f||e[13]!==F||e[14]!==K||e[15]!==v||e[16]!==M||e[17]!==V||e[18]!==$?(y={search:o,searchTerm:b,setSearch:S,filters:p,setFilters:F,filterBarVisible:n,setFilterBarVisible:f,toggleFilterBar:V,viewMode:$,setViewMode:K,sortKey:M,sortDirection:v,handleSort:B},e[7]=n,e[8]=p,e[9]=B,e[10]=o,e[11]=b,e[12]=f,e[13]=F,e[14]=K,e[15]=v,e[16]=M,e[17]=V,e[18]=$,e[19]=y):y=e[19],y}export{W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as m,a as C,n as p,q}from"./index-
|
|
1
|
+
import{e as m,a as C,n as p,q}from"./index-CBWObXGL.js";import{K as T}from"./constants-BTDlb8Xq.js";function M(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function O(a){const e=m.c(12);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function w(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function F(a){const e=m.c(21);let t,s,l,o;e[0]!==a?({client:t,toolName:o,toolArguments:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const f=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,f),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let r;e[12]!==t||e[13]!==l||e[14]!==o?(r=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=r):r=e[15];const y=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==r||e[19]!==y?(c={...i,queryKey:n,queryFn:r,staleTime:y,retry:!1},e[16]=i,e[17]=n,e[18]=r,e[19]=y,e[20]=c):c=e[20],u(c)}function P(a){const e=m.c(8);let t,s;e[0]!==a?({client:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{F as a,O as b,w as c,P as d,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,p as i,q as l,K as m}from"./index-
|
|
1
|
+
import{e as n,p as i,q as l,K as m}from"./index-CBWObXGL.js";import{u as a}from"./use-org-auth-client-hXNxLs_8.js";function f(){const e=n.c(7),{locator:o}=i(),u=a();let t;e[0]!==o?(t=m.members(o),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.organization.listMembers(),e[2]=u,e[3]=s):s=e[3];let r;return e[4]!==t||e[5]!==s?(r={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=r):r=e[6],l(r)}export{f as u};
|
package/dist/client/assets/{use-navigate-to-agent-F6dcDYVN.js → use-navigate-to-agent-DeoSCXQ3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as x,b as C,T as b,f as k,p as v}from"./index-
|
|
1
|
+
import{e as x,b as C,T as b,f as k,p as v}from"./index-CBWObXGL.js";import{b as y}from"./use-virtual-mcp-z6s77kRo.js";function N(t,i){const e=x.c(16),{data:l}=C.useSession(),a=l?.user?.id??"anon",$=`mesh:pinned-agents:${t}:${a}`;let r;e[0]!==i?(r=o=>o??i,e[0]=i,e[1]=r):r=e[1];const[n,s]=b($,r);let c;e[2]!==s?(c=o=>{s(f=>f.includes(o)?f:[...f,o])},e[2]=s,e[3]=c):c=e[3];const u=c;let d;e[4]!==s?(d=o=>{s(f=>f.filter(A=>A!==o))},e[4]=s,e[5]=d):d=e[5];const h=d;let g;e[6]!==s?(g=o=>{s(o)},e[6]=s,e[7]=g):g=e[7];const I=g;let p;e[8]!==n?(p=o=>n.includes(o),e[8]=n,e[9]=p):p=e[9];const P=p;let m;return e[10]!==P||e[11]!==u||e[12]!==n||e[13]!==I||e[14]!==h?(m={pinnedIds:n,pin:u,unpin:h,reorder:I,isPinned:P},e[10]=P,e[11]=u,e[12]=n,e[13]=I,e[14]=h,e[15]=m):m=e[15],m}function j(){const t=x.c(6),i=k(),{org:e}=v(),l=y();let a;t[0]!==l?(a=l.filter(T).map(S),t[0]=l,t[1]=a):a=t[1];const $=a,{pin:r}=N(e.id,$);let n;return t[2]!==i||t[3]!==e.slug||t[4]!==r?(n=(s,c)=>{r(s);const u=crypto.randomUUID();i({to:"/$org/$taskId",params:{org:e.slug,taskId:u},search:{...c?.search??{},virtualmcpid:s}})},t[2]=i,t[3]=e.slug,t[4]=r,t[5]=n):n=t[5],n}function S(t){return t.id}function T(t){return!!t.pinned}export{j as a,N as u};
|
package/dist/client/assets/{use-org-auth-client-CN-RShxc.js → use-org-auth-client-hXNxLs_8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as h,p as x,b as i}from"./index-
|
|
1
|
+
import{e as h,p as x,b as i}from"./index-CBWObXGL.js";function q(){const e=h.c(29),{org:y}=x(),n=y.id;let v;e[0]!==n?(v=R=>(M=>i.organization[R]({...M??{},organizationId:n})),e[0]=n,e[1]=v):v=e[1];const t=v;let z;e[2]!==n?(z=R=>(M=>{const f={...M??{}},O=f.query??{};return f.query={...O,organizationId:n},i.organization[R](f)}),e[2]=n,e[3]=z):z=e[3];const b=z;let o,a;e[4]!==b?(o=b("listMembers"),a=b("listRoles"),e[4]=b,e[5]=o,e[6]=a):(o=e[5],a=e[6]);let r,l,s,c,u,g,d,m,p;e[7]!==t?(c=t("inviteMember"),u=t("removeMember"),g=t("updateMemberRole"),d=t("addMember"),m=t("createRole"),p=t("updateRole"),r=t("deleteRole"),l=t("cancelInvitation"),s=t("update"),e[7]=t,e[8]=r,e[9]=l,e[10]=s,e[11]=c,e[12]=u,e[13]=g,e[14]=d,e[15]=m,e[16]=p):(r=e[8],l=e[9],s=e[10],c=e[11],u=e[12],g=e[13],d=e[14],m=e[15],p=e[16]);let I;return e[17]!==r||e[18]!==l||e[19]!==s||e[20]!==o||e[21]!==a||e[22]!==c||e[23]!==u||e[24]!==g||e[25]!==d||e[26]!==m||e[27]!==p?(I={organization:{listMembers:o,listRoles:a,inviteMember:c,removeMember:u,updateMemberRole:g,addMember:d,createRole:m,updateRole:p,deleteRole:r,cancelInvitation:l,update:s,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[17]=r,e[18]=l,e[19]=s,e[20]=o,e[21]=a,e[22]=c,e[23]=u,e[24]=g,e[25]=d,e[26]=m,e[27]=p,e[28]=I):I=e[28],I}export{q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,n as S,z as l,a as y,K as c}from"./index-
|
|
1
|
+
import{e as u,n as S,z as l,a as y,K as c}from"./index-CBWObXGL.js";function w(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoStatus(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/status`);if(!r.ok)throw new Error("Failed to check SSO status");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function q(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoConfig(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`);if(!r.ok)throw new Error("Failed to fetch SSO config");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function C(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to save SSO config")}return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function O(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`,{method:"DELETE"});if(!r.ok)throw new Error("Failed to delete SSO config");return r.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function m(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:r})});if(!f.ok)throw new Error("Failed to toggle SSO enforcement");return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}export{q as a,C as b,O as c,m as d,w as u};
|
package/dist/client/assets/{use-organization-roles-C0ae2v1C.js → use-organization-roles-DF6GO7Ih.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as R}from"./use-org-auth-client-
|
|
1
|
+
import{u as R}from"./use-org-auth-client-hXNxLs_8.js";import{p as P,n as b,K as y}from"./index-CBWObXGL.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ")}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const a=[];let n=!1;const u=[];let c=!1;const r=new Set;let s=!1,f=0,o=!1;for(const[l,e]of Object.entries(t)){if(l==="self"){e.includes("*")?n=!0:a.push(...e);continue}if(l==="models"){e.includes("*:*")?o=!0:f=e.length;continue}if(l==="*"){if(c=!0,e.includes("*"))s=!0;else for(const i of e)r.add(i);continue}if(u.push(l),e.includes("*"))s=!0;else for(const i of e)r.add(i)}return{staticPermissions:a,allowsAllStaticPermissions:n,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(r),allowsAllTools:s,modelCount:f,allowsAllModels:o}}function I(){const{locator:t}=P(),a=R(),{data:n,isLoading:u,error:c,refetch:r}=b({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const o=await a.organization.listRoles();return o?.error?(console.error("[useOrganizationRoles] API error:",o.error),[]):o?.data??[]}catch(o){return console.error("[useOrganizationRoles] Fetch error:",o),[]}},staleTime:3e4}),s=w.map(o=>({role:o.value,label:o.label,isBuiltin:o.isBuiltin}));if(n&&Array.isArray(n))for(const o of n){const l=o.role;if(!l||w.some(C=>C.value===l))continue;const{staticPermissions:e,allowsAllStaticPermissions:i,connectionIds:g,allowsAllConnections:m,toolNames:h,allowsAllTools:d,modelCount:p,allowsAllModels:A}=O(o.permission);s.push({id:o.id,role:l,label:B(l),isBuiltin:!1,permission:o.permission??void 0,staticPermissionCount:i?-1:e.length,allowsAllStaticPermissions:i,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:h.length,allowsAllTools:d,modelCount:A?-1:p,allowsAllModels:A})}const f=s.filter(o=>!o.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(o=>o.isBuiltin),isLoading:u,error:c,refetch:r}}export{I as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,p as m,K as f,n as E,z as A,a as I,q as z}from"./index-
|
|
1
|
+
import{e as c,p as m,K as f,n as E,z as A,a as I,q as z}from"./index-CBWObXGL.js";import{S as g,u as _,d as h}from"./constants-BTDlb8Xq.js";const d={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null},T={tiers:{fast:null,smart:null,thinking:null,image:null,web_research:null}};function y(t){const e=c.c(12),{org:n}=m();let s;e[0]!==n.id||e[1]!==n.slug?(s={connectionId:g,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const a=_(s);let i;e[3]!==n.id?(i=f.organizationSettings(n.id),e[3]=n.id,e[4]=i):i=e[4];let r;e[5]!==a||e[6]!==n.id?(r=async()=>{const l=await a.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return l?.isError?{...d,organizationId:n.id}:l.structuredContent??{...d,organizationId:n.id}},e[5]=a,e[6]=n.id,e[7]=r):r=e[7];const u=t;let o;return e[8]!==i||e[9]!==r||e[10]!==u?(o={queryKey:i,queryFn:r,staleTime:6e4,select:u},e[8]=i,e[9]=r,e[10]=u,e[11]=o):o=e[11],E(o)}function P(t,e){const n=c.c(11);let s;n[0]!==t||n[1]!==e?(s={connectionId:g,orgId:t,orgSlug:e},n[0]=t,n[1]=e,n[2]=s):s=n[2];const a=_(s);let i;n[3]!==t?(i=f.organizationSettings(t),n[3]=t,n[4]=i):i=n[4];let r;n[5]!==a||n[6]!==t?(r=async()=>{const l=await a.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}});return l?.isError?{...d,organizationId:t}:l.structuredContent??{...d,organizationId:t}},n[5]=a,n[6]=t,n[7]=r):r=n[7];let u;n[8]!==i||n[9]!==r?(u={queryKey:i,queryFn:r,staleTime:6e4},n[8]=i,n[9]=r,n[10]=u):u=n[10];const{data:o}=z(u);return o}function S(){const t=c.c(12),{org:e}=m();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=_(n),a=A();let i;t[3]!==s||t[4]!==e.id?(i=async o=>{const l=await s.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e.id,...o}});if(l?.isError)throw new Error(l.content?.[0]?.text??"Failed to update organization settings");const p=l.structuredContent;if(!p)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return p},t[3]=s,t[4]=e.id,t[5]=i):i=t[5];let r;t[6]!==e.id||t[7]!==a?(r=o=>{a.setQueryData(f.organizationSettings(e.id),l=>({...l??d,...o}))},t[6]=e.id,t[7]=a,t[8]=r):r=t[8];let u;return t[9]!==i||t[10]!==r?(u={mutationFn:i,onSuccess:r},t[9]=i,t[10]=r,t[11]=u):u=t[11],I(u)}function C(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_research:t.tiers.web_research??null}}:T}function b(){const{data:t}=y(N);return t??T}function N(t){return C(t.simple_mode)}function D(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,r)=>e.mutate({simple_mode:i},r),s=(i,r)=>e.mutateAsync({simple_mode:i},r),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let a;return t[3]!==e||t[4]!==n||t[5]!==s?(a={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=a):a=t[6],a}function O(){const{data:t}=y(G);return t??null}function G(t){return t.registry_config}function $(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,r)=>e.mutate({registry_config:i},r),s=(i,r)=>e.mutateAsync({registry_config:i},r),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let a;return t[3]!==e||t[4]!==n||t[5]!==s?(a={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=a):a=t[6],a}function q(){const{data:t}=y(w);return t??null}function w(t){return t.default_home_agents}function U(){const t=c.c(7),e=S();let n,s;t[0]!==e?(n=(i,r)=>e.mutate({default_home_agents:i},r),s=(i,r)=>e.mutateAsync({default_home_agents:i},r),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let a;return t[3]!==e||t[4]!==n||t[5]!==s?(a={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=a):a=t[6],a}function F(){const t=c.c(5),{org:e}=m(),n=O();let s;t[0]!==e.id?(s=h.REGISTRY(e.id),t[0]=e.id,t[1]=s):s=t[1];const a=s;let i;return t[2]!==a||t[3]!==n?(i=r=>{if(!n)return r===a;const u=n.registries[r];return u?u.enabled:r===a},t[2]=a,t[3]=n,t[4]=i):i=t[4],i}export{F as a,P as b,U as c,S as d,b as e,D as f,O as g,$ as h,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,p}from"./index-
|
|
1
|
+
import{e as a,p}from"./index-CBWObXGL.js";import{u as C}from"./use-connection-BXtcCeOB.js";import{d as u}from"./constants-BTDlb8Xq.js";import{g as R}from"./use-organization-settings-CpP73tj4.js";function E(){const e=a.c(17),{org:i}=p(),o=R();let n;e[0]!==i.id?(n=u.REGISTRY(i.id),e[0]=i.id,e[1]=n):n=e[1];const c=n;let l;e[2]!==i.id?(l=u.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=l):l=e[3];const d=l;let r;e[4]!==d||e[5]!==c?(r=[c,d],e[4]=d,e[5]=c,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const m of s)t.add(m)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const g=C();let f;if(e[12]!==g||e[13]!==t){let s;e[15]!==t?(s=m=>t.has(m.id),e[15]=t,e[16]=s):s=e[16],f=g.filter(s),e[12]=g,e[13]=t,e[14]=f}else f=e[14];return f}export{E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,p as c,K as d,q as y,z as C,a as p}from"./index-
|
|
1
|
+
import{e as a,p as c,K as d,q as y,z as C,a as p}from"./index-CBWObXGL.js";import{S as g,u as m}from"./constants-BTDlb8Xq.js";import{u as f}from"./unwrap-tool-result-BYXdCQMg.js";function q(){const e=a.c(10),{org:t}=c();let l;e[0]!==t.id||e[1]!==t.slug?(l={connectionId:g,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=l):l=e[2];const o=m(l);let i;e[3]!==t.id?(i=d.secrets(t.id),e[3]=t.id,e[4]=i):i=e[4];let s;e[5]!==o?(s=async()=>{const u=await o.callTool({name:"SECRET_LIST",arguments:{}});return f(u)},e[5]=o,e[6]=s):s=e[6];let n;e[7]!==i||e[8]!==s?(n={queryKey:i,staleTime:6e4,queryFn:s},e[7]=i,e[8]=s,e[9]=n):n=e[9];const{data:r}=y(n);return r.secrets}function R(){const e=a.c(11),{org:t}=c();let l;e[0]!==t.id||e[1]!==t.slug?(l={connectionId:g,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=l):l=e[2];const o=m(l),i=C();let s;e[3]!==o?(s=async u=>{const S=await o.callTool({name:"SECRET_CREATE",arguments:{...u}});return f(S)},e[3]=o,e[4]=s):s=e[4];let n;e[5]!==t.id||e[6]!==i?(n=()=>{i.invalidateQueries({queryKey:d.secrets(t.id)})},e[5]=t.id,e[6]=i,e[7]=n):n=e[7];let r;return e[8]!==s||e[9]!==n?(r={mutationFn:s,onSuccess:n},e[8]=s,e[9]=n,e[10]=r):r=e[10],p(r)}export{R as a,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,e as m,R}from"./index-
|
|
1
|
+
import{r as o,e as m,R}from"./index-CBWObXGL.js";import{p as h,q as I}from"./question-004-sINsf4GQ.js";import{d as y,D as S}from"./decopilot-sse-pool-CQYEElZK.js";const b=()=>0;function D(s){const{orgSlug:e,taskId:r,enabled:t=!0,onStep:n,onFinish:u,onTaskStatus:f}=s,l=o.useRef({taskId:r,onStep:n,onFinish:u,onTaskStatus:f});l.current={taskId:r,onStep:n,onFinish:u,onTaskStatus:f};const i=o.useRef(null),p=o.useRef(t),d=o.useRef(e);(!i.current||p.current!==t||d.current!==e)&&(p.current=t,d.current=e,i.current=E=>{if(!t||!e)return()=>{};const k=T=>{let a;try{a=JSON.parse(T.data)}catch{return}const c=l.current;if(!(c.taskId&&a.subject!==c.taskId)){switch(a.type){case S.STEP:c.onStep?.(a);break;case S.FINISH:c.onFinish?.(a);break;case S.THREAD_STATUS:c.onTaskStatus?.(a);break}E()}};return y.subscribe(e,k)}),o.useSyncExternalStore(i.current,b,b)}const O=new Set(["completed","failed","requires_action"]);function U(s){const e=m.c(5),[r]=R();let t;e[0]!==r?(t=u=>{r.enableSounds&&O.has(u.data.status)&&h(I.dataUri).catch(_)},e[0]=r,e[1]=t):t=e[1];let n;e[2]!==s||e[3]!==t?(n={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=n):n=e[4],D(n)}function _(s){console.warn("[status-sounds] playback failed:",s)}export{U as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p,r as f}from"./index-
|
|
1
|
+
import{e as p,r as f}from"./index-CBWObXGL.js";import{u as w}from"./tooltip-jEhdTkb8.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,p as u}from"./index-
|
|
1
|
+
import{e as l,p as u}from"./index-CBWObXGL.js";import{b as g,a,u as C}from"./use-collections-eNNjLWPD.js";import{S as c,u as r}from"./constants-BTDlb8Xq.js";function M(s){const o=l.c(5);let t;o[0]!==s?(t=s===void 0?{}:s,o[0]=s,o[1]=t):t=o[1];const n=t,{org:i}=u();let e;o[2]!==i.id||o[3]!==i.slug?(e={connectionId:c,orgId:i.id,orgSlug:i.slug},o[2]=i.id,o[3]=i.slug,o[4]=e):e=o[4];const d=r(e);return g(i.id,"VIRTUAL_MCP",d,n)}function m(s){const o=l.c(3),{org:t}=u();let n;o[0]!==t.id||o[1]!==t.slug?(n={connectionId:c,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=n):n=o[2];const i=r(n);return C(t.id,"VIRTUAL_MCP",s??void 0,i)}function p(){const s=l.c(3),{org:o}=u();let t;s[0]!==o.id||s[1]!==o.slug?(t={connectionId:c,orgId:o.id,orgSlug:o.slug},s[0]=o.id,s[1]=o.slug,s[2]=t):t=s[2];const n=r(t);return a(o.id,"VIRTUAL_MCP",n)}export{p as a,M as b,m as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as u}from"./infiniteQueryObserver-BR-XyzMF.js";import{c6 as i}from"./index-CBWObXGL.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b2 as s,r as c,bo as a,bp as i}from"./index-
|
|
1
|
+
import{b2 as s,r as c,bo as a,bp as i}from"./index-CBWObXGL.js";function f(r){const n=s({warn:r?.router===void 0}),t=r?.router||n,u=c.useRef(void 0);return a(t.stores.__store,e=>{if(r?.select){if(r.structuralSharing??t.options.defaultStructuralSharing){const o=i(u.current,r.select(e));return u.current=o,o}return r.select(e)}return e})}export{f as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as s}from"./infiniteQueryObserver-BR-XyzMF.js";import{c6 as u,c7 as n}from"./index-CBWObXGL.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,p as b,n as C,K as k,c as y,j as t}from"./index-
|
|
1
|
+
import{e as S,p as b,n as C,K as k,c as y,j as t}from"./index-CBWObXGL.js";import{A as E}from"./avatar-B2gux03L.js";import{S as A,u as _}from"./constants-BTDlb8Xq.js";function K(m){const e=S.c(12),{org:u}=b();let x;e[0]!==u.id||e[1]!==u.slug?(x={connectionId:A,orgId:u.id,orgSlug:u.slug},e[0]=u.id,e[1]=u.slug,e[2]=x):x=e[2];const p=_(x);let d;e[3]!==m?(d=k.user(m),e[3]=m,e[4]=d):d=e[4];let s;e[5]!==p||e[6]!==m?(s=async()=>{const c=await p.callTool({name:"USER_GET",arguments:{id:m}});return(c.structuredContent??c).user},e[5]=p,e[6]=m,e[7]=s):s=e[7];const l=!!m;let o;return e[8]!==d||e[9]!==s||e[10]!==l?(o={queryKey:d,queryFn:s,staleTime:3e5,retry:1,enabled:l},e[8]=d,e[9]=s,e[10]=l,e[11]=o):o=e[11],C(o)}function T(m){const e=S.c(36),{id:u,size:x,showEmail:p,avatarOnly:d,className:s}=m,l=x===void 0?"xs":x,o=p===void 0?!1:p,c=d===void 0?!1:d,{data:r,isLoading:w,isError:U}=K(u);if(w){let a;e[0]!==s?(a=y("flex items-center gap-2",s),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==l?(i=t.jsx(E.Skeleton,{shape:"circle",size:l}),e[2]=l,e[3]=i):i=e[3];let n;e[4]!==c||e[5]!==o?(n=!c&&t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),o&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"})]}),e[4]=c,e[5]=o,e[6]=n):n=e[6];let f;return e[7]!==a||e[8]!==i||e[9]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[7]=a,e[8]=i,e[9]=n,e[10]=f):f=e[10],f}if(U||!r){let a;e[11]!==s?(a=y("flex items-center gap-2",s),e[11]=s,e[12]=a):a=e[12];let i;e[13]!==l?(i=t.jsx(E,{shape:"circle",size:l,fallback:"?",muted:!0}),e[13]=l,e[14]=i):i=e[14];let n;e[15]!==c?(n=!c&&t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[15]=c,e[16]=n):n=e[16];let f;return e[17]!==a||e[18]!==i||e[19]!==n?(f=t.jsxs("div",{className:a,children:[i,n]}),e[17]=a,e[18]=i,e[19]=n,e[20]=f):f=e[20],f}let g;e[21]!==s?(g=y("flex items-center gap-2",s),e[21]=s,e[22]=g):g=e[22];const N=r.image??void 0;let v;e[23]!==l||e[24]!==N||e[25]!==r.name?(v=t.jsx(E,{shape:"circle",size:l,url:N,fallback:r.name}),e[23]=l,e[24]=N,e[25]=r.name,e[26]=v):v=e[26];let j;e[27]!==c||e[28]!==o||e[29]!==r.email||e[30]!==r.name?(j=!c&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-sm font-medium",children:r.name}),o&&t.jsx("div",{className:"text-xs text-muted-foreground",children:r.email})]}),e[27]=c,e[28]=o,e[29]=r.email,e[30]=r.name,e[31]=j):j=e[31];let h;return e[32]!==g||e[33]!==v||e[34]!==j?(h=t.jsxs("div",{className:g,children:[v,j]}),e[32]=g,e[33]=v,e[34]=j,e[35]=h):h=e[35],h}export{T as U};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,r as C,c as x,j as i}from"./index-
|
|
1
|
+
import{e as k,r as C,c as x,j as i}from"./index-CBWObXGL.js";import{b as I,T as P,a as L}from"./tooltip-jEhdTkb8.js";const M={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function B(S){const e=k.c(27),{value:s,onValueChange:y,options:o,size:R,fullWidth:E,className:z}=S,V=R===void 0?"sm":R,u=E===void 0?!1:E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0];const _=C.useRef(b);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g={left:0,width:0,opacity:0},e[1]=g):g=e[1];const[f,W]=C.useState(g);let h,p;e[2]!==o||e[3]!==s?(h=()=>{const t=o.findIndex(j=>j.value===s),m=_.current[t];m&&W({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],e[2]=o,e[3]=s,e[4]=h,e[5]=p):(h=e[4],p=e[5]),C.useEffect(h,p);const d=M[V];let n;e[6]!==z?(n=x("relative flex gap-0 bg-muted rounded-lg",z),e[6]=z,e[7]=n):n=e[7];let l;e[8]!==d||e[9]!==u||e[10]!==y||e[11]!==o||e[12]!==s?(l=o.map((t,m)=>{const j=i.jsxs("button",{ref:$=>{_.current[m]=$},type:"button",onClick:()=>y(t.value),className:x("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",u?"flex-1 h-12 px-4":d.button,!u&&t.label?"px-3":""),children:[i.jsx("span",{className:x("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",d.icon,s===t.value?"text-foreground":"text-muted-foreground"),children:t.icon}),t.label&&i.jsx("span",{className:x("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===t.value?"text-foreground":"text-muted-foreground"),children:t.label})]},t.value);return t.tooltip?i.jsxs(I,{children:[i.jsx(P,{asChild:!0,children:j}),i.jsx(L,{side:"bottom",children:t.tooltip})]},t.value):j}),e[8]=d,e[9]=u,e[10]=y,e[11]=o,e[12]=s,e[13]=l):l=e[13];const w=u?"h-12":d.button;let a;e[14]!==w?(a=x("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),e[14]=w,e[15]=a):a=e[15];const N=`${f.left}px`,T=`${f.width}px`;let r;e[16]!==f.opacity||e[17]!==N||e[18]!==T?(r={left:N,width:T,opacity:f.opacity},e[16]=f.opacity,e[17]=N,e[18]=T,e[19]=r):r=e[19];let c;e[20]!==a||e[21]!==r?(c=i.jsx("div",{className:a,style:r}),e[20]=a,e[21]=r,e[22]=c):c=e[22];let v;return e[23]!==c||e[24]!==n||e[25]!==l?(v=i.jsxs("div",{className:n,children:[l,c]}),e[23]=c,e[24]=n,e[25]=l,e[26]=v):v=e[26],v}export{B as V};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as oe,j as t,B as Ce,f as Be,b as ct,p as ze,r as dt,o as Le,z as mt,a as ut,K as Fe,Z as Ke,$ as pt}from"./index-DVC_amR_.js";import{u as Ve,S as qe}from"./constants-Cm768MQ2.js";import{B as ft,g as Me}from"./constants-DvXZBnwV.js";import{C as Qe}from"./collection-display-button-BX9atEyC.js";import{C as ht}from"./collection-search-DqNxlePA.js";import{C as gt}from"./card-CpJdFbq0.js";import{I as Ge}from"./integration-icon-BbiJcPOj.js";import{D as Je,a as He,b as Ye,c as $}from"./dropdown-menu-63xeIpOO.js";import{s as Ze,a as Xe}from"./RefreshCcw01-miji2R0O.js";import{i as et}from"./DotsVertical-BwfRmKn5.js";import{b as tt}from"./Tool01-bIBOxhhC.js";import{s as st}from"./Trash01-CuKKsBcr.js";import{C as xt}from"./collection-table-wrapper-BG86Vmt4.js";import{E as Ue}from"./empty-state-D9bO00vZ.js";import{J as We}from"./agent-icon-DVdZ9Hda.js";import{U as jt}from"./user-BWGdTKRQ.js";import{E as it}from"./empty-state-DnKXvZYK.js";import{u as Ct}from"./use-list-state-CSdZ88km.js";import{g as bt}from"./connection-slug-eyAPH6o3.js";import{f as vt,g as yt,c as Nt,b as wt,d as St,e as Pt,a as _t,A as Dt}from"./alert-dialog-efbw1plv.js";import{a as It,b as At}from"./use-collections-BPpafU1Y.js";import{a as Tt}from"./use-connection-BM01VLiP.js";import{s as Et}from"./Plus-Cg9NXsL1.js";import{a as $t}from"./layout-BSMFDfV_.js";import{P as je}from"./index-DI1RjLHo.js";import"./collections-Kb4FfdCY.js";import"./XClose-Bgw0XVU1.js";import"./Check-C8FolzI7.js";import"./tooltip-DWlRhba1.js";import"./view-mode-toggle-eN2VYj6l.js";import"./badge-Bvcg6UkD.js";import"./SearchMd-DOFW3xul.js";import"./Container-B8tBPRyK.js";import"./ChevronRight-Cl7_f5Tw.js";import"./table-R9M5g5WG.js";import"./AlertCircle-Zr3qXN_Y.js";import"./SearchLg-BsNRgtQ9.js";import"./ArrowNarrowLeft-BlpE5X0d.js";import"./XCircle-BdL2HFXH.js";import"./ArrowUpRight-CRJhQzeV.js";import"./ZapSquare-C4bP3ArS.js";import"./Building02-CN-CxzRQ.js";import"./CheckCircle-D42QA24s.js";import"./ChevronDown-CyvRbm23.js";import"./ChevronUp-15q5S78Q.js";import"./Star01-Bg-y0v_C.js";import"./Palette-CL_K1Dej.js";import"./Key01-CMccSk3m.js";import"./LayoutLeft-CUMht0c7.js";import"./LinkExternal01-fEinjB8u.js";import"./Lock01-DSl8Z9Ls.js";import"./Monitor01-CtLfDZn9.js";import"./Sun-DLmF9uX2.js";import"./Play-BByjp7KN.js";import"./Settings02-B6yKqjEJ.js";import"./Shield01-OCXjYIsU.js";import"./Upload01-BkaQ7nKE.js";import"./User01-BZrs6bE2.js";import"./Users01-C7tq6IJ0.js";import"./Users03-BOwqtfs2.js";import"./X-DgTeTani.js";import"./Zap-oLZU1yYN.js";import"./avatar-stvERg0h.js";import"./use-view-mode-BoAhjzmG.js";import"./sidebar-BMfrF5kw.js";function Ot(i,e){const s=i.properties||{};for(const n in s){const c=s[n];if(c&&c.type==="string"&&(c.format==="url"||c.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let c;e[0]!==s||e[1]!==l?(c=Ot(l,s),e[0]=s,e[1]=l,e[2]=c):c=e[2];const r=c,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let d;e[3]!==n?(d=n&&Object.keys(n).length>0,e[3]=n,e[4]=d):d=e[4];const o=d;let u;e[5]!==r||e[6]!==s.title?(u=t.jsx(Ge,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=s.title,e[7]=u):u=e[7];let m;e[8]!==s.title?(m=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=m):m=e[9];const f=p||"No description";let a;e[10]!==f?(a=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:f}),e[10]=f,e[11]=a):a=e[11];let v;e[12]!==m||e[13]!==a?(v=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[m,a]}),e[12]=m,e[13]=a,e[14]=v):v=e[14];let y;e[15]!==u||e[16]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[u,v]}),e[15]=u,e[16]=v,e[17]=y):y=e[17];let b;e[18]!==n||e[19]!==o||e[20]!==s?(b=o&&t.jsx("div",{className:"absolute top-6 right-6 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",onClick:Kt,onMouseDown:Ft,children:t.jsxs(Je,{children:[t.jsx(He,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Lt,children:t.jsx(et,{size:20})})}),t.jsxs(Ye,{align:"end",onClick:zt,children:[n.open&&t.jsxs($,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(Ze,{size:16}),"Open"]}),n.edit&&t.jsxs($,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(tt,{size:16}),"Edit"]}),n.duplicate&&t.jsxs($,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Xe,{size:16}),"Duplicate"]}),n.delete&&t.jsxs($,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(st,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=o,e[20]=s,e[21]=b):b=e[21];let x;return e[22]!==y||e[23]!==b?(x=t.jsxs(gt,{className:"cursor-pointer transition-colors hover:bg-accent/50 h-full flex flex-col group relative",children:[y,b]}),e[22]=y,e[23]=b,e[24]=x):x=e[24],x}function zt(i){return i.stopPropagation()}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}const Mt=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Ut(i){return Object.keys(i).find(e=>Mt.includes(e.toLowerCase()))}function ot(i,e){return Object.keys(i.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Wt(i){const e=oe.c(30),{data:s,schema:l,viewMode:n,search:c,sortKey:r,sortDirection:p,onSort:d,actions:o,onItemClick:u,headerActions:m,emptyState:f,readOnly:a,columns:v,hideToolbar:y,sortableFields:b}=i,x=p===void 0?"asc":p,g=d===void 0?qt:d;let O;e[0]!==o?(O=o===void 0?{}:o,e[0]=o,e[1]=O):O=e[1];const h=O,T=u===void 0?Vt:u,E=m===void 0?null:m,N=f===void 0?null:f,k=a===void 0?!1:a,j=v===void 0?void 0:v,z=y===void 0?!1:y,P=b===void 0?void 0:b;let D;e[2]!==j||e[3]!==l||e[4]!==P?(D=j?j.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(l,P),e[2]=j,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==x||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Qe,{sortKey:r,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==c||e[22]!==x||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(kt,{item:A,schema:l,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Jt(j,l,P,h),data:s,sortKey:r,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}),e[13]=h,e[14]=j,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=l,e[21]=c,e[22]=x,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function Rt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function Bt(i){return i.sortable!==!1}function Vt(){}function qt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(Je,{children:[t.jsx(He,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(et,{size:20})})}),t.jsxs(Ye,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs($,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(Ze,{size:16}),"Open"]}),i.edit&&t.jsxs($,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(tt,{size:16}),"Edit"]}),i.duplicate&&t.jsxs($,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Xe,{size:16}),"Duplicate"]}),i.delete&&t.jsxs($,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(st,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function nt(i){const e=i.type;return Array.isArray(e)?e.every(s=>nt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Gt(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const u=s[o];return u&&nt(u)}),n=Ut(s),c=[],r=new Set;n&&l.includes(n)&&(c.push(n),r.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));const d=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,u)=>o.localeCompare(u));for(const o of d)c.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));return c.map(o=>{const u=s[o],m=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:f=>{const a=f[o];return t.jsx(Ge,{icon:a,name:f.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(a)})},sortable:m,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx(jt,{id:String(a),size:"xs"}):"—"},sortable:m,cellClassName:"max-w-[250px]"}:u?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx("span",{className:"block truncate max-w-full",children:new Date(a).toLocaleDateString()}):"—"},sortable:m,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(a)})},sortable:m,cellClassName:"max-w-[200px]"}})}function Jt(i,e,s,l){const n=i||Gt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(l).length>0?[...n,Qt(l)]:n}function Ht(i){const e=oe.c(119),{connectionId:s,org:l,activeCollection:n,onItemClick:c}=i,r=n.name,p=n.schema??ft,d=n.hasCreateTool,o=n.hasUpdateTool,u=n.hasDeleteTool,m=Be(),{data:f}=ct.useSession(),a=f?.user?.id||"unknown",v=Tt(s);let y;e[0]!==v||e[1]!==s?(y=v?bt(v):s,e[0]=v,e[1]=s,e[2]=y):y=e[2];const b=y,{org:x}=ze();let g;e[3]!==s||e[4]!==x.id||e[5]!==x.slug?(g={connectionId:s,orgId:x.id,orgSlug:x.slug},e[3]=s,e[4]=x.id,e[5]=x.slug,e[6]=g):g=e[6];const O=Ve(g),h=It(s,r,O),T=`${s}-${r}`;let E;e[7]!==l||e[8]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[7]=l,e[8]=T,e[9]=E):E=e[9];const{search:N,searchTerm:k,setSearch:j,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[10]!==k||e[11]!==w||e[12]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[10]=k,e[11]=w,e[12]=D,e[13]=_):_=e[13];const I=At(s,r,O,_),A=!d&&!o&&!u;let ne;e[14]!==b||e[15]!==r||e[16]!==m||e[17]!==c||e[18]!==l?(ne=C=>{if(c){c(C);return}m({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:C.id}})},e[14]=b,e[15]=r,e[16]=m,e[17]=c,e[18]=l,e[19]=ne):ne=e[19];const L=ne;let re;e[20]!==h.create||e[21]!==a?(re=async C=>{const xe=new Date().toISOString();await h.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:xe,updated_at:xe,created_by:a,updated_by:a})},e[20]=h.create,e[21]=a,e[22]=re):re=e[22];const be=re,[F,ve]=dt.useState(null);let le;e[23]===Symbol.for("react.memo_cache_sentinel")?(le=C=>{ve(C)},e[23]=le):le=e[23];const rt=le;let K;e[24]!==L||e[25]!==o?(K=o&&{edit:L},e[24]=L,e[25]=o,e[26]=K):K=e[26];let M;e[27]!==be||e[28]!==d?(M=d&&{duplicate:be},e[27]=be,e[28]=d,e[29]=M):M=e[29];let U;e[30]!==u?(U=u&&{delete:rt},e[30]=u,e[31]=U):U=e[31];let ae;e[32]!==M||e[33]!==U||e[34]!==K?(ae={...K,...M,...U},e[32]=M,e[33]=U,e[34]=K,e[35]=ae):ae=e[35];const ye=ae;let ce;e[36]!==h.delete||e[37]!==F?(ce=async()=>{F&&(await h.delete.mutateAsync(F.id),ve(null))},e[36]=h.delete,e[37]=F,e[38]=ce):ce=e[38];const Ne=ce;let de;e[39]!==h.create||e[40]!==b||e[41]!==r||e[42]!==d||e[43]!==m||e[44]!==l||e[45]!==a?(de=async()=>{if(!d){Le.error("Create operation is not available for this collection");return}const C=new Date().toISOString(),xe={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:C,updated_at:C,created_by:a,updated_by:a};try{const ke=await h.create.mutateAsync(xe);m({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=h.create,e[40]=b,e[41]=r,e[42]=d,e[43]=m,e[44]=l,e[45]=a,e[46]=de):de=e[46];const we=de;let me;e[47]!==p?(me=ot(p),e[47]=p,e[48]=me):me=e[48];const Se=me,lt=(I?.length??0)>0,at=d&&!lt&&!N;let ue;e[49]!==h.create||e[50]!==we||e[51]!==d?(ue=d?t.jsxs(Ce,{onClick:we,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[49]=h.create,e[50]=we,e[51]=d,e[52]=ue):ue=e[52];const pe=ue,Pe=D;let W;e[53]!==S||e[54]!==w||e[55]!==Se||e[56]!==Pe?(W=t.jsx($t,{children:t.jsx(Qe,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[53]=S,e[54]=w,e[55]=Se,e[56]=Pe,e[57]=W):W=e[57];const _e=`Search ${r}...`;let R;e[58]!==j?(R=C=>{C.key==="Escape"&&(j(""),C.target.blur())},e[58]=j,e[59]=R):R=e[59];let B;e[60]!==N||e[61]!==j||e[62]!==_e||e[63]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:j,placeholder:_e,onKeyDown:R})}),e[60]=N,e[61]=j,e[62]=_e,e[63]=R,e[64]=B):B=e[64];let V;e[65]!==pe||e[66]!==d?(V=d&&t.jsx("div",{className:"pr-3",children:pe}),e[65]=pe,e[66]=d,e[67]=V):V=e[67];let q;e[68]!==B||e[69]!==V?(q=t.jsxs("div",{className:"flex items-center gap-2",children:[B,V]}),e[68]=B,e[69]=V,e[70]=q):q=e[70];let Q;e[71]!==I?(Q=I??[],e[71]=I,e[72]=Q):Q=e[72];const De=D;let G;e[73]!==L?(G=C=>L(C),e[73]=L,e[74]=G):G=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let J;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(J=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=J):J=e[78];let H;e[79]!==S||e[80]!==A||e[81]!==ye||e[82]!==p||e[83]!==N||e[84]!==j||e[85]!==P||e[86]!==w||e[87]!==Q||e[88]!==De||e[89]!==G||e[90]!==J||e[91]!==z?(H=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:Q,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:G,readOnly:A,emptyState:J})}),e[79]=S,e[80]=A,e[81]=ye,e[82]=p,e[83]=N,e[84]=j,e[85]=P,e[86]=w,e[87]=Q,e[88]=De,e[89]=G,e[90]=J,e[91]=z,e[92]=H):H=e[92];let Y;e[93]!==q||e[94]!==H?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,H]}),e[93]=q,e[94]=H,e[95]=Y):Y=e[95];const Ee=!!F;let fe;e[96]===Symbol.for("react.memo_cache_sentinel")?(fe=C=>{C||ve(null)},e[96]=fe):fe=e[96];let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Nt,{children:"Delete item?"}),e[97]=he):he=e[97];const $e=F?.title;let Z;e[98]!==$e?(Z=t.jsxs(wt,{children:[he,t.jsxs(St,{children:['Are you sure you want to delete "',$e,'"? This action cannot be undone.']})]}),e[98]=$e,e[99]=Z):Z=e[99];let X;e[100]!==h.delete.isPending?(X=t.jsx(vt,{disabled:h.delete.isPending,children:"Cancel"}),e[100]=h.delete.isPending,e[101]=X):X=e[101];const Oe=h.delete.isPending?"Deleting...":"Delete";let ee;e[102]!==h.delete.isPending||e[103]!==Ne||e[104]!==Oe?(ee=t.jsx(yt,{onClick:Ne,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Oe}),e[102]=h.delete.isPending,e[103]=Ne,e[104]=Oe,e[105]=ee):ee=e[105];let te;e[106]!==X||e[107]!==ee?(te=t.jsxs(Pt,{children:[X,ee]}),e[106]=X,e[107]=ee,e[108]=te):te=e[108];let se;e[109]!==Z||e[110]!==te?(se=t.jsxs(_t,{children:[Z,te]}),e[109]=Z,e[110]=te,e[111]=se):se=e[111];let ie;e[112]!==Ee||e[113]!==se?(ie=t.jsx(Dt,{open:Ee,onOpenChange:fe,children:se}),e[112]=Ee,e[113]=se,e[114]=ie):ie=e[114];let ge;return e[115]!==W||e[116]!==Y||e[117]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,Y,ie]}),e[115]=W,e[116]=Y,e[117]=ie,e[118]=ge):ge=e[118],ge}function Yt(){const i=oe.c(13),{org:e,project:s}=ze(),l=mt();let n;i[0]!==e.id||i[1]!==e.slug?(n={connectionId:qe,orgId:e.id,orgSlug:e.slug},i[0]=e.id,i[1]=e.slug,i[2]=n):n=i[2];const c=Ve(n);let r;i[3]!==c||i[4]!==s?(r=async u=>{const m=s.enabledPlugins??[];if(m.includes(u))return;const f=[...m,u],a=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s.id,data:{metadata:{enabled_plugins:f}}}});return a.structuredContent??a},i[3]=c,i[4]=s,i[5]=r):r=i[5];let p;i[6]!==e.id||i[7]!==s||i[8]!==l?(p=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[6]=e.id,i[7]=s,i[8]=l,i[9]=p):p=i[9];let d;return i[10]!==r||i[11]!==p?(d={mutationFn:r,onSuccess:p,onError:Zt},i[10]=r,i[11]=p,i[12]=d):d=i[12],ut(d)}function Zt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function Xt(i){const e=oe.c(12),{pluginId:s,title:l,description:n,icon:c}=i,r=Yt();let p;e[0]!==r||e[1]!==s?(p=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,u=r.isPending?"Enabling…":"Enable plugin";let m;e[3]!==r.isPending||e[4]!==d||e[5]!==u?(m=t.jsx(Ce,{onClick:d,disabled:r.isPending,children:u}),e[3]=r.isPending,e[4]=d,e[5]=u,e[6]=m):m=e[6];let f;return e[7]!==n||e[8]!==o||e[9]!==m||e[10]!==l?(f=t.jsx(it,{image:o,title:l,description:n,actions:m}),e[7]=n,e[8]=o,e[9]=m,e[10]=l,e[11]=f):f=e[11],f}const es={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function pi(){const{project:i,org:e}=ze();if(!(i.enabledPlugins??[]).includes(Ke))return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(Xt,{pluginId:Ke,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(pt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Ht,{connectionId:qe,org:e.slug,activeCollection:es,onItemClick:c=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:c.id}})})})})}export{pi as default};
|
|
1
|
+
import{e as oe,j as t,B as Ce,f as Be,b as ct,p as ze,r as dt,o as Le,z as mt,a as ut,K as Fe,Z as Ke,$ as pt}from"./index-CBWObXGL.js";import{u as Ve,S as qe}from"./constants-BTDlb8Xq.js";import{B as ft,g as Me}from"./constants-CU5qTPFR.js";import{C as Qe}from"./collection-display-button-B3HAkAyt.js";import{C as ht}from"./collection-search-D_3Fs_7f.js";import{C as gt}from"./card-BTvwJe1w.js";import{I as Ge}from"./integration-icon-CJZrsRwF.js";import{D as Je,a as He,b as Ye,c as $}from"./dropdown-menu-CtOsG6kE.js";import{s as Ze,a as Xe}from"./RefreshCcw01-CqcTE-Jk.js";import{i as et}from"./DotsVertical-6m_CrItm.js";import{b as tt}from"./Tool01-Di7pqNjI.js";import{s as st}from"./Trash01--NIzvL5p.js";import{C as xt}from"./collection-table-wrapper-BkEZWN27.js";import{E as Ue}from"./empty-state-C5kNOhZm.js";import{J as We}from"./agent-icon-B9Pj-gb8.js";import{U as jt}from"./user-EYE1kh7H.js";import{E as it}from"./empty-state-gNdxCZ-f.js";import{u as Ct}from"./use-list-state-CP8wVehu.js";import{g as bt}from"./connection-slug-eyAPH6o3.js";import{f as vt,g as yt,c as Nt,b as wt,d as St,e as Pt,a as _t,A as Dt}from"./alert-dialog-Djn_H2Rc.js";import{a as It,b as At}from"./use-collections-eNNjLWPD.js";import{a as Tt}from"./use-connection-BXtcCeOB.js";import{s as Et}from"./Plus-bv9cJbRl.js";import{a as $t}from"./layout-FAbydrZW.js";import{P as je}from"./index-BslSCtx8.js";import"./collections-BCCJVNFI.js";import"./XClose-Bh09JFxC.js";import"./Check-DQJBzV3Q.js";import"./tooltip-jEhdTkb8.js";import"./view-mode-toggle-DRQNpSaD.js";import"./badge-D95F95jp.js";import"./SearchMd-BB-cSGVk.js";import"./Container-CsMdjyhb.js";import"./ChevronRight-CFEYuyQK.js";import"./table-CFUTtJhf.js";import"./AlertCircle-bwh-njhy.js";import"./SearchLg-DaZZIiNM.js";import"./ArrowNarrowLeft-DKu_FgKl.js";import"./XCircle-D57ZBW6P.js";import"./ArrowUpRight-CVcoZbg7.js";import"./ZapSquare-B3tIEVrC.js";import"./Building02-BMx63ME6.js";import"./CheckCircle-CWARhZeh.js";import"./ChevronDown-DgQUayCd.js";import"./ChevronUp-BgO5mJEu.js";import"./Star01-Dkql2WEg.js";import"./Palette-B5K6Qdn2.js";import"./Key01-Do9NG_0X.js";import"./LayoutLeft-2RABF8Og.js";import"./LinkExternal01-Rp7MbQx6.js";import"./Lock01-ZyB7Ltig.js";import"./Monitor01-wdarBriC.js";import"./Sun-9m1Y0oyC.js";import"./Play-DbGk3Udx.js";import"./Settings02-DUl6jhvf.js";import"./Shield01-CFZl0iIh.js";import"./Upload01-B_1Qf-22.js";import"./User01-DLi7Q0Fd.js";import"./Users01-D1KjxPwB.js";import"./Users03-D4pjzeB5.js";import"./X-Dai0EM1U.js";import"./Zap-mhpp9vta.js";import"./avatar-B2gux03L.js";import"./use-view-mode-Dt6kuxto.js";import"./sidebar-CCnjHo9B.js";function Ot(i,e){const s=i.properties||{};for(const n in s){const c=s[n];if(c&&c.type==="string"&&(c.format==="url"||c.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let c;e[0]!==s||e[1]!==l?(c=Ot(l,s),e[0]=s,e[1]=l,e[2]=c):c=e[2];const r=c,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let d;e[3]!==n?(d=n&&Object.keys(n).length>0,e[3]=n,e[4]=d):d=e[4];const o=d;let u;e[5]!==r||e[6]!==s.title?(u=t.jsx(Ge,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=s.title,e[7]=u):u=e[7];let m;e[8]!==s.title?(m=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=m):m=e[9];const f=p||"No description";let a;e[10]!==f?(a=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:f}),e[10]=f,e[11]=a):a=e[11];let v;e[12]!==m||e[13]!==a?(v=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[m,a]}),e[12]=m,e[13]=a,e[14]=v):v=e[14];let y;e[15]!==u||e[16]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[u,v]}),e[15]=u,e[16]=v,e[17]=y):y=e[17];let b;e[18]!==n||e[19]!==o||e[20]!==s?(b=o&&t.jsx("div",{className:"absolute top-6 right-6 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",onClick:Kt,onMouseDown:Ft,children:t.jsxs(Je,{children:[t.jsx(He,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Lt,children:t.jsx(et,{size:20})})}),t.jsxs(Ye,{align:"end",onClick:zt,children:[n.open&&t.jsxs($,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(Ze,{size:16}),"Open"]}),n.edit&&t.jsxs($,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(tt,{size:16}),"Edit"]}),n.duplicate&&t.jsxs($,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Xe,{size:16}),"Duplicate"]}),n.delete&&t.jsxs($,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(st,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=o,e[20]=s,e[21]=b):b=e[21];let x;return e[22]!==y||e[23]!==b?(x=t.jsxs(gt,{className:"cursor-pointer transition-colors hover:bg-accent/50 h-full flex flex-col group relative",children:[y,b]}),e[22]=y,e[23]=b,e[24]=x):x=e[24],x}function zt(i){return i.stopPropagation()}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}const Mt=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Ut(i){return Object.keys(i).find(e=>Mt.includes(e.toLowerCase()))}function ot(i,e){return Object.keys(i.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Wt(i){const e=oe.c(30),{data:s,schema:l,viewMode:n,search:c,sortKey:r,sortDirection:p,onSort:d,actions:o,onItemClick:u,headerActions:m,emptyState:f,readOnly:a,columns:v,hideToolbar:y,sortableFields:b}=i,x=p===void 0?"asc":p,g=d===void 0?qt:d;let O;e[0]!==o?(O=o===void 0?{}:o,e[0]=o,e[1]=O):O=e[1];const h=O,T=u===void 0?Vt:u,E=m===void 0?null:m,N=f===void 0?null:f,k=a===void 0?!1:a,j=v===void 0?void 0:v,z=y===void 0?!1:y,P=b===void 0?void 0:b;let D;e[2]!==j||e[3]!==l||e[4]!==P?(D=j?j.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(l,P),e[2]=j,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==x||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Qe,{sortKey:r,sortDirection:x,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=x,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==j||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==c||e[22]!==x||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(kt,{item:A,schema:l,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Jt(j,l,P,h),data:s,sortKey:r,sortDirection:x,onSort:g,onRowClick:T,emptyState:N||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}),e[13]=h,e[14]=j,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=l,e[21]=c,e[22]=x,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function Rt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function Bt(i){return i.sortable!==!1}function Vt(){}function qt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(Je,{children:[t.jsx(He,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(et,{size:20})})}),t.jsxs(Ye,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs($,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(Ze,{size:16}),"Open"]}),i.edit&&t.jsxs($,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(tt,{size:16}),"Edit"]}),i.duplicate&&t.jsxs($,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Xe,{size:16}),"Duplicate"]}),i.delete&&t.jsxs($,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(st,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function nt(i){const e=i.type;return Array.isArray(e)?e.every(s=>nt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Gt(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const u=s[o];return u&&nt(u)}),n=Ut(s),c=[],r=new Set;n&&l.includes(n)&&(c.push(n),r.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));const d=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,u)=>o.localeCompare(u));for(const o of d)c.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));return c.map(o=>{const u=s[o],m=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:f=>{const a=f[o];return t.jsx(Ge,{icon:a,name:f.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(a)})},sortable:m,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx(jt,{id:String(a),size:"xs"}):"—"},sortable:m,cellClassName:"max-w-[250px]"}:u?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx("span",{className:"block truncate max-w-full",children:new Date(a).toLocaleDateString()}):"—"},sortable:m,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(a)})},sortable:m,cellClassName:"max-w-[200px]"}})}function Jt(i,e,s,l){const n=i||Gt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(l).length>0?[...n,Qt(l)]:n}function Ht(i){const e=oe.c(119),{connectionId:s,org:l,activeCollection:n,onItemClick:c}=i,r=n.name,p=n.schema??ft,d=n.hasCreateTool,o=n.hasUpdateTool,u=n.hasDeleteTool,m=Be(),{data:f}=ct.useSession(),a=f?.user?.id||"unknown",v=Tt(s);let y;e[0]!==v||e[1]!==s?(y=v?bt(v):s,e[0]=v,e[1]=s,e[2]=y):y=e[2];const b=y,{org:x}=ze();let g;e[3]!==s||e[4]!==x.id||e[5]!==x.slug?(g={connectionId:s,orgId:x.id,orgSlug:x.slug},e[3]=s,e[4]=x.id,e[5]=x.slug,e[6]=g):g=e[6];const O=Ve(g),h=It(s,r,O),T=`${s}-${r}`;let E;e[7]!==l||e[8]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[7]=l,e[8]=T,e[9]=E):E=e[9];const{search:N,searchTerm:k,setSearch:j,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[10]!==k||e[11]!==w||e[12]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[10]=k,e[11]=w,e[12]=D,e[13]=_):_=e[13];const I=At(s,r,O,_),A=!d&&!o&&!u;let ne;e[14]!==b||e[15]!==r||e[16]!==m||e[17]!==c||e[18]!==l?(ne=C=>{if(c){c(C);return}m({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:C.id}})},e[14]=b,e[15]=r,e[16]=m,e[17]=c,e[18]=l,e[19]=ne):ne=e[19];const L=ne;let re;e[20]!==h.create||e[21]!==a?(re=async C=>{const xe=new Date().toISOString();await h.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:xe,updated_at:xe,created_by:a,updated_by:a})},e[20]=h.create,e[21]=a,e[22]=re):re=e[22];const be=re,[F,ve]=dt.useState(null);let le;e[23]===Symbol.for("react.memo_cache_sentinel")?(le=C=>{ve(C)},e[23]=le):le=e[23];const rt=le;let K;e[24]!==L||e[25]!==o?(K=o&&{edit:L},e[24]=L,e[25]=o,e[26]=K):K=e[26];let M;e[27]!==be||e[28]!==d?(M=d&&{duplicate:be},e[27]=be,e[28]=d,e[29]=M):M=e[29];let U;e[30]!==u?(U=u&&{delete:rt},e[30]=u,e[31]=U):U=e[31];let ae;e[32]!==M||e[33]!==U||e[34]!==K?(ae={...K,...M,...U},e[32]=M,e[33]=U,e[34]=K,e[35]=ae):ae=e[35];const ye=ae;let ce;e[36]!==h.delete||e[37]!==F?(ce=async()=>{F&&(await h.delete.mutateAsync(F.id),ve(null))},e[36]=h.delete,e[37]=F,e[38]=ce):ce=e[38];const Ne=ce;let de;e[39]!==h.create||e[40]!==b||e[41]!==r||e[42]!==d||e[43]!==m||e[44]!==l||e[45]!==a?(de=async()=>{if(!d){Le.error("Create operation is not available for this collection");return}const C=new Date().toISOString(),xe={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:C,updated_at:C,created_by:a,updated_by:a};try{const ke=await h.create.mutateAsync(xe);m({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:b,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[39]=h.create,e[40]=b,e[41]=r,e[42]=d,e[43]=m,e[44]=l,e[45]=a,e[46]=de):de=e[46];const we=de;let me;e[47]!==p?(me=ot(p),e[47]=p,e[48]=me):me=e[48];const Se=me,lt=(I?.length??0)>0,at=d&&!lt&&!N;let ue;e[49]!==h.create||e[50]!==we||e[51]!==d?(ue=d?t.jsxs(Ce,{onClick:we,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[49]=h.create,e[50]=we,e[51]=d,e[52]=ue):ue=e[52];const pe=ue,Pe=D;let W;e[53]!==S||e[54]!==w||e[55]!==Se||e[56]!==Pe?(W=t.jsx($t,{children:t.jsx(Qe,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[53]=S,e[54]=w,e[55]=Se,e[56]=Pe,e[57]=W):W=e[57];const _e=`Search ${r}...`;let R;e[58]!==j?(R=C=>{C.key==="Escape"&&(j(""),C.target.blur())},e[58]=j,e[59]=R):R=e[59];let B;e[60]!==N||e[61]!==j||e[62]!==_e||e[63]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:j,placeholder:_e,onKeyDown:R})}),e[60]=N,e[61]=j,e[62]=_e,e[63]=R,e[64]=B):B=e[64];let V;e[65]!==pe||e[66]!==d?(V=d&&t.jsx("div",{className:"pr-3",children:pe}),e[65]=pe,e[66]=d,e[67]=V):V=e[67];let q;e[68]!==B||e[69]!==V?(q=t.jsxs("div",{className:"flex items-center gap-2",children:[B,V]}),e[68]=B,e[69]=V,e[70]=q):q=e[70];let Q;e[71]!==I?(Q=I??[],e[71]=I,e[72]=Q):Q=e[72];const De=D;let G;e[73]!==L?(G=C=>L(C),e[73]=L,e[74]=G):G=e[74];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let J;e[75]!==Ie||e[76]!==Ae||e[77]!==Te?(J=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[75]=Ie,e[76]=Ae,e[77]=Te,e[78]=J):J=e[78];let H;e[79]!==S||e[80]!==A||e[81]!==ye||e[82]!==p||e[83]!==N||e[84]!==j||e[85]!==P||e[86]!==w||e[87]!==Q||e[88]!==De||e[89]!==G||e[90]!==J||e[91]!==z?(H=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:Q,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:j,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:G,readOnly:A,emptyState:J})}),e[79]=S,e[80]=A,e[81]=ye,e[82]=p,e[83]=N,e[84]=j,e[85]=P,e[86]=w,e[87]=Q,e[88]=De,e[89]=G,e[90]=J,e[91]=z,e[92]=H):H=e[92];let Y;e[93]!==q||e[94]!==H?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,H]}),e[93]=q,e[94]=H,e[95]=Y):Y=e[95];const Ee=!!F;let fe;e[96]===Symbol.for("react.memo_cache_sentinel")?(fe=C=>{C||ve(null)},e[96]=fe):fe=e[96];let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Nt,{children:"Delete item?"}),e[97]=he):he=e[97];const $e=F?.title;let Z;e[98]!==$e?(Z=t.jsxs(wt,{children:[he,t.jsxs(St,{children:['Are you sure you want to delete "',$e,'"? This action cannot be undone.']})]}),e[98]=$e,e[99]=Z):Z=e[99];let X;e[100]!==h.delete.isPending?(X=t.jsx(vt,{disabled:h.delete.isPending,children:"Cancel"}),e[100]=h.delete.isPending,e[101]=X):X=e[101];const Oe=h.delete.isPending?"Deleting...":"Delete";let ee;e[102]!==h.delete.isPending||e[103]!==Ne||e[104]!==Oe?(ee=t.jsx(yt,{onClick:Ne,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Oe}),e[102]=h.delete.isPending,e[103]=Ne,e[104]=Oe,e[105]=ee):ee=e[105];let te;e[106]!==X||e[107]!==ee?(te=t.jsxs(Pt,{children:[X,ee]}),e[106]=X,e[107]=ee,e[108]=te):te=e[108];let se;e[109]!==Z||e[110]!==te?(se=t.jsxs(_t,{children:[Z,te]}),e[109]=Z,e[110]=te,e[111]=se):se=e[111];let ie;e[112]!==Ee||e[113]!==se?(ie=t.jsx(Dt,{open:Ee,onOpenChange:fe,children:se}),e[112]=Ee,e[113]=se,e[114]=ie):ie=e[114];let ge;return e[115]!==W||e[116]!==Y||e[117]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,Y,ie]}),e[115]=W,e[116]=Y,e[117]=ie,e[118]=ge):ge=e[118],ge}function Yt(){const i=oe.c(13),{org:e,project:s}=ze(),l=mt();let n;i[0]!==e.id||i[1]!==e.slug?(n={connectionId:qe,orgId:e.id,orgSlug:e.slug},i[0]=e.id,i[1]=e.slug,i[2]=n):n=i[2];const c=Ve(n);let r;i[3]!==c||i[4]!==s?(r=async u=>{const m=s.enabledPlugins??[];if(m.includes(u))return;const f=[...m,u],a=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s.id,data:{metadata:{enabled_plugins:f}}}});return a.structuredContent??a},i[3]=c,i[4]=s,i[5]=r):r=i[5];let p;i[6]!==e.id||i[7]!==s||i[8]!==l?(p=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[6]=e.id,i[7]=s,i[8]=l,i[9]=p):p=i[9];let d;return i[10]!==r||i[11]!==p?(d={mutationFn:r,onSuccess:p,onError:Zt},i[10]=r,i[11]=p,i[12]=d):d=i[12],ut(d)}function Zt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function Xt(i){const e=oe.c(12),{pluginId:s,title:l,description:n,icon:c}=i,r=Yt();let p;e[0]!==r||e[1]!==s?(p=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,u=r.isPending?"Enabling…":"Enable plugin";let m;e[3]!==r.isPending||e[4]!==d||e[5]!==u?(m=t.jsx(Ce,{onClick:d,disabled:r.isPending,children:u}),e[3]=r.isPending,e[4]=d,e[5]=u,e[6]=m):m=e[6];let f;return e[7]!==n||e[8]!==o||e[9]!==m||e[10]!==l?(f=t.jsx(it,{image:o,title:l,description:n,actions:m}),e[7]=n,e[8]=o,e[9]=m,e[10]=l,e[11]=f):f=e[11],f}const es={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function pi(){const{project:i,org:e}=ze();if(!(i.enabledPlugins??[]).includes(Ke))return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(Xt,{pluginId:Ke,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(pt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Ht,{connectionId:qe,org:e.slug,activeCollection:es,onItemClick:c=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:c.id}})})})})}export{pi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-CBWObXGL.js";import{a as f}from"./index-B6e02X2I.js";import"./index-CqM2YZAG.js";import"./constants-BTDlb8Xq.js";import"./collections-BCCJVNFI.js";import"./index-Bgo8UhqC.js";import"./use-virtual-mcp-z6s77kRo.js";import"./use-collections-eNNjLWPD.js";import"./monaco-editor-Bo8VkyGH.js";import"./select-CABzLKLY.js";import"./tooltip-jEhdTkb8.js";import"./Check-DQJBzV3Q.js";import"./ChevronDown-DgQUayCd.js";import"./ChevronUp-BgO5mJEu.js";import"./spinner-Cj5rH4A2.js";import"./accordion-D8rZJiVF.js";import"./agent-icon-B9Pj-gb8.js";import"./AlertCircle-bwh-njhy.js";import"./Tool01-Di7pqNjI.js";import"./SearchLg-DaZZIiNM.js";import"./XClose-Bh09JFxC.js";import"./RefreshCcw01-CqcTE-Jk.js";import"./ArrowNarrowLeft-DKu_FgKl.js";import"./XCircle-D57ZBW6P.js";import"./ArrowUpRight-CVcoZbg7.js";import"./ZapSquare-B3tIEVrC.js";import"./Building02-BMx63ME6.js";import"./CheckCircle-CWARhZeh.js";import"./ChevronRight-CFEYuyQK.js";import"./DotsVertical-6m_CrItm.js";import"./Container-CsMdjyhb.js";import"./Star01-Dkql2WEg.js";import"./Palette-B5K6Qdn2.js";import"./Key01-Do9NG_0X.js";import"./LayoutLeft-2RABF8Og.js";import"./LinkExternal01-Rp7MbQx6.js";import"./Lock01-ZyB7Ltig.js";import"./Monitor01-wdarBriC.js";import"./Sun-9m1Y0oyC.js";import"./Play-DbGk3Udx.js";import"./Plus-bv9cJbRl.js";import"./SearchMd-BB-cSGVk.js";import"./Settings02-DUl6jhvf.js";import"./Shield01-CFZl0iIh.js";import"./Trash01--NIzvL5p.js";import"./Upload01-B_1Qf-22.js";import"./User01-DLi7Q0Fd.js";import"./Users01-D1KjxPwB.js";import"./Users03-D4pjzeB5.js";import"./X-Dai0EM1U.js";import"./Zap-mhpp9vta.js";import"./index-DB8doOZq.js";import"./badge-D95F95jp.js";import"./view-mode-toggle-DRQNpSaD.js";import"./layout-FAbydrZW.js";import"./index-BslSCtx8.js";import"./sidebar-CCnjHo9B.js";import"./use-connection-BXtcCeOB.js";import"./use-mcp-tools-CLPnsoVx.js";import"./dialog-DZil2cub.js";import"./index-BukzwEAB.js";import"./dropdown-menu-CtOsG6kE.js";import"./integration-icon-CJZrsRwF.js";import"./index-ih2KVqW5.js";import"./empty-state-C5kNOhZm.js";import"./create-sse-subscription-CjI9SUTI.js";import"./input-CJPXM-0_.js";function Rt(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{Rt as default};
|
package/dist/client/index.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
28
28
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
29
29
|
<meta name="theme-color" content="#D0EC1A" />
|
|
30
|
-
<script type="module" crossorigin src="/assets/index-
|
|
30
|
+
<script type="module" crossorigin src="/assets/index-CBWObXGL.js"></script>
|
|
31
31
|
<link rel="stylesheet" crossorigin href="/assets/index-CHIy8cK2.css">
|
|
32
32
|
</head>
|
|
33
33
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -75140,7 +75140,7 @@ AS SELECT
|
|
|
75140
75140
|
FROM monitoring_metrics
|
|
75141
75141
|
GROUP BY organization_id, name, bucket, connection_id, tool_name, status
|
|
75142
75142
|
`}),console.log("[clickhouse-schema] monitoring_metrics_rollup_1m_mv view ready")}finally{await f.close()}}catch(u){console.error("[clickhouse-schema] Failed to create rollup DDL (queries will fall back to raw table):",u)}}async function VN0($){let u={...process.env},f=OY0($,u),X=f.settings.encryptionKey;console.log(`[settings] ENCRYPTION_KEY = ${JSON.stringify(X)} (${X.length} chars)`);let{ensureServices:J}=await Promise.resolve().then(() => (dJ0(),cJ0)),{outputs:w,services:E}=await J({home:f.settings.dataDir,externalDatabaseUrl:f.externalDatabaseUrl,externalNatsUrl:f.externalNatsUrl});if(!f.skipMigrations){let{migrateBetterAuth:Y}=await Promise.resolve().then(() => (a51(),rw4));await Y(w.databaseUrl);let{createDatabase:Z}=await Promise.resolve().then(() => (VY(),tw4)),{migrateToLatest:W}=await Promise.resolve().then(() => (PO4(),jO4)),G=Z(w.databaseUrl);await W({keepOpen:!0,database:G,skipBetterAuth:!0})}if(f.settings.clickhouseUrl){let{ensureClickHouseRollup:Y}=await Promise.resolve().then(() => LK4);await Y(f.settings.clickhouseUrl)}let Q={...f.settings,databaseUrl:w.databaseUrl,natsUrls:w.natsUrls};return PV1(Q),{settings:Q,services:E.map((Y)=>({name:Y.name==="PostgreSQL"?"Postgres":Y.name,port:Y.port})),managedServiceNames:E.filter((Y)=>Y.owner==="managed").map((Y)=>Y.name)}}var iE1=U(()=>{Ea0();O5()});var iN0={};Y1(iN0,{updateService:()=>dP,toggleViewMode:()=>cE1,toggleVibeState:()=>mE1,toggleLogFlow:()=>dE1,subscribeCliState:()=>Cu0,setVibe:()=>Ah6,setTuiConsoleIntercepted:()=>bN0,setServerUrl:()=>gu0,setMigrationsDone:()=>yu0,setEnv:()=>hu0,setDevMode:()=>Lh6,setDataDir:()=>Th6,isTuiConsoleIntercepted:()=>xN0,getCliState:()=>Mu0,addLogEntry:()=>vG});function r2(){for(let $ of lE1)$()}function Mu0(){return J5}function Cu0($){return lE1.add($),()=>lE1.delete($)}function dP($){J5={...J5,services:J5.services.map((u)=>u.name===$.name?$:u)},r2()}function yu0(){J5={...J5,migrationsStatus:"done"},r2()}function gu0($){J5={...J5,serverUrl:$},r2()}function hu0($){J5={...J5,env:$},r2()}function vG($){let u=[...J5.logs,$];J5={...J5,logs:u.length>500?u.slice(-500):u},r2()}function Lh6($={}){J5={...J5,services:[...J5.services,{name:"Vite",status:"pending",port:0},...$.localSandboxProvider?[{name:"Sandbox",status:"pending",port:0}]:[]]},r2()}function cE1(){J5={...J5,viewMode:J5.viewMode==="requests"?"config":"requests"},r2()}function dE1(){J5={...J5,logFlow:!J5.logFlow},r2()}function Th6($){J5={...J5,dataDir:$},r2()}function Ah6($){J5={...J5,vibe:$},r2()}function mE1(){J5={...J5,vibe:!J5.vibe},r2()}function bN0($){TK4=$}function xN0(){return TK4}var J5,lE1,TK4=!1;var BG=U(()=>{J5={services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,env:null,logs:[],viewMode:"requests",logFlow:!1,vibe:!1,dataDir:null},lE1=new Set});import{createServer as AK4}from"net";function Ih6($){return new Promise((u)=>{let f=AK4();f.once("error",()=>u(!1)),f.listen($,"0.0.0.0",()=>{f.close(()=>u(!0))})})}async function lN0($){if(await Ih6($))return $;let u=await new Promise((f,X)=>{let J=AK4();J.once("error",X),J.listen(0,"0.0.0.0",()=>{let w=J.address(),E=typeof w==="object"&&w?w.port:0;J.close(()=>f(E))})});return console.warn(`Port ${$} is in use, using port ${u} instead.`),u}var nE1=()=>{};import{createServer as Sh6}from"net";async function Rh6($){for(let u of kh6)if(await qh6(u,$))return u;return null}async function tE1($,{intervalMs:u=1000}={}){for(;;){let f=await Rh6($);if(f)return f;await new Promise((X)=>setTimeout(X,u))}}function qh6($,u){return new Promise((f)=>{let X=Sh6();X.once("error",(J)=>{f(J.code==="EADDRINUSE")}),X.listen(u,$,()=>{X.close(()=>f(!1))})})}var kh6;var IK4=U(()=>{kh6=["localhost","127.0.0.1","0.0.0.0"]});var rE1={};Y1(rE1,{startDevServer:()=>yh6});import{existsSync as Mh6}from"fs";import{tmpdir as Ch6}from"os";import{join as cN0}from"path";function SK4($){return $.replace(/\x1b\[[0-9;]*m/g,"")}function dN0($){let u=$.getReader(),f=new TextDecoder,X="";function J(){let w=X.split(`
|
|
75143
|
-
`);X=w.pop()??"";for(let E of w){let Q=SK4(E).replace(/^\[\d+\]\s*/,"").trim();if(!Q)continue;vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:Q})}}(async()=>{for(;;){let{done:w,value:E}=await u.read();if(w)break;X+=f.decode(E,{stream:!0}),J()}if(X.trim()){let w=SK4(X).replace(/^\[\d+\]\s*/,"").trim();if(w)vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:w})}})()}async function yh6($){let{vitePort:u,baseUrl:f,noTui:X}=$,J=await lN0(Number($.port)),{settings:w,services:E,managedServiceNames:Q}=await VN0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let K of E)dP({name:K.name,status:"ready",port:K.port});hu0(w),yu0();let Y=cN0(import.meta.dir,"..","..","..","..",".."),Z=process.env.WORKTREE_SLUG??process.env.CONDUCTOR_WORKSPACE_NAME??"default",W=cN0(Ch6(),`decocms-dev-link-${Z}`),G=X===!0,F=Bun.spawn(["bun","run","--cwd=apps/mesh","dev:servers"],{cwd:Y,env:{...process.env,PORT:String(w.port),VITE_PORT:String(u),DATABASE_URL:w.databaseUrl,NATS_URL:w.natsUrls.join(","),NODE_ENV:w.nodeEnv,DECOCMS_LOCAL_MODE:String(w.localMode),DECOCMS_HOME:w.dataDir,DATA_DIR:w.dataDir,DECO_CLI:"1",MESH_ALLOW_LOCALHOST_LINKS:"1",DEV_LINK_SESSION_PATH:cN0(W,"session.json"),...w.baseUrl?{BASE_URL:w.baseUrl}:{}},stdio:["inherit",G?"inherit":"pipe",G?"inherit":"pipe"]});if(!G)dN0(F.stdout),dN0(F.stderr);let v=f||`http://localhost:${w.port}`;gu0(v),dP({name:"Vite",status:"ready",port:Number(u)});let B=5174,N=!$.localSandboxProvider?Promise.resolve(null):(async()=>{try{await tE1(Number(w.port),{intervalMs:500})}catch(A){return vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:`[link] gave up waiting for cluster on :${w.port}: ${A instanceof Error?A.message:String(A)}`}),null}let K=cN0(W,"session.json"),H=Date.now()+60000;while(!Mh6(K)){if(Date.now()>H)return vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:`[link] gave up waiting for dev-link session at ${K} after 60s \u2014 skipping link spawn. Sandbox will stay pending.`}),null;await new Promise((A)=>setTimeout(A,500))}let P=Bun.spawn(["bun","run","--cwd=apps/mesh","src/cli.ts","link","--no-tunnel","--port",String(B)],{cwd:Y,env:{...process.env,MESH_CLUSTER_URL:v,MESH_ALLOW_LOCALHOST_LINKS:"1",DATA_DIR:W,DECOCMS_HOME:W},stdio:["inherit",G?"inherit":"pipe",G?"inherit":"pipe"]});if(!G)dN0(P.stdout),dN0(P.stderr);return tE1(B,{intervalMs:500}).then(()=>{dP({name:"Sandbox",status:"ready",port:B})}).catch(()=>{}),P})(),O=async(K)=>{let H=await N.catch(()=>null);if(H)try{H.kill(K)}catch{}if(F.kill(K),await F.exited,H)try{await H.exited}catch{}if(Q.length>0){let{stopServices:P}=await Promise.resolve().then(() => (dJ0(),cJ0));await P(w.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(w.port),process:F}}var aE1=U(()=>{iE1();BG();nE1();IK4()});import{Box as pE1,Text as oE1}from"ink";import{jsx as RK4,jsxs as mN0}from"react/jsx-runtime";function kK4($){if(!$)return"not set";try{let u=new URL($);if(u.password)u.password="***";if(u.username&&u.username.length>3)u.username=u.username.slice(0,3)+"***";return u.pathname="/",u.search="",u.hash="",u.toString()}catch{if($.length<=10)return $;return $.slice(0,6)+"***"+$.slice(-4)}}function Vh6($,u){if(gh6.has($))return u?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(hh6.has($)){if(Array.isArray(u)){if(u.length===0)return{text:"not set",dimColor:!0};return{text:u.map((w)=>kK4(w)).join(", "),color:"cyan"}}let X=kK4(u);return X==="not set"?{text:X,dimColor:!0}:{text:X,color:"cyan"}}if(u===void 0||u===null||u==="")return{text:"not set",dimColor:!0};let f=String(u);if(f==="true")return{text:f,color:"green"};if(f==="false")return{text:f,color:"yellow"};try{return new URL(f),{text:f,color:"cyan"}}catch{return{text:f}}}function bh6($){return[{title:"Core",entries:[{key:"NODE_ENV",value:$.nodeEnv},{key:"PORT",value:$.port},{key:"BASE_URL",value:$.baseUrl??`http://localhost:${$.port}`},{key:"DATA_DIR",value:$.dataDir}]},{title:"Database",entries:[{key:"DATABASE_URL",value:$.databaseUrl},{key:"DATABASE_PG_SSL",value:$.databasePgSsl}]},{title:"Auth & Secrets",entries:[{key:"BETTER_AUTH_SECRET",value:$.betterAuthSecret},{key:"ENCRYPTION_KEY",value:$.encryptionKey},{key:"MESH_JWT_SECRET",value:$.meshJwtSecret},{key:"STUDIO_PROVISION_SECRET_KEY",value:$.studioProvisionSecretKey},{key:"DISABLE_RATE_LIMIT",value:$.disableRateLimit}]},{title:"Auth Providers",entries:[{key:"AUTH_EMAIL_PASSWORD_ENABLED",value:process.env.AUTH_EMAIL_PASSWORD_ENABLED??"true"},{key:"AUTH_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_GOOGLE_CLIENT_ID},{key:"AUTH_GITHUB_CLIENT_ID",value:!!process.env.AUTH_GITHUB_CLIENT_ID},{key:"AUTH_RESEND_API_KEY",value:!!process.env.AUTH_RESEND_API_KEY},{key:"AUTH_SENDGRID_API_KEY",value:!!process.env.AUTH_SENDGRID_API_KEY},{key:"AUTH_SSO_MS_CLIENT_ID",value:!!process.env.AUTH_SSO_MS_CLIENT_ID},{key:"AUTH_SSO_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_SSO_GOOGLE_CLIENT_ID},{key:"AUTH_MAGIC_LINK_ENABLED",value:process.env.AUTH_MAGIC_LINK_ENABLED==="true"},{key:"AUTH_EMAIL_OTP_ENABLED",value:process.env.AUTH_EMAIL_OTP_ENABLED==="true"}]},{title:"Observability",entries:[{key:"CLICKHOUSE_URL",value:$.clickhouseUrl},{key:"OTEL_SERVICE_NAME",value:$.otelServiceName}]},{title:"Event Bus & Networking",entries:[{key:"NATS_URL",value:$.natsUrls}]},{title:"Config Files",entries:[{key:"CONFIG_PATH",value:$.configPath}]},{title:"AI Gateway",entries:[{key:"DECO_AI_GATEWAY_ENABLED",value:$.aiGatewayEnabled},{key:"DECO_AI_GATEWAY_URL",value:$.aiGatewayUrl}]}]}function qK4({env:$}){let u=bh6($);return RK4(pE1,{flexDirection:"column",children:u.map((f)=>mN0(pE1,{flexDirection:"column",marginTop:1,children:[mN0(oE1,{dimColor:!0,children:[" ","\u2500\u2500 ",f.title," ","\u2500".repeat(Math.max(0,38-f.title.length))]}),f.entries.map(({key:X,value:J})=>{let w=Vh6(X,J);return mN0(pE1,{children:[mN0(oE1,{dimColor:!0,children:[" ",X.padEnd(36)]}),RK4(oE1,{color:w.color,dimColor:w.dimColor,children:w.text})]},X)})]},f.title))})}var gh6,hh6;var MK4=U(()=>{gh6=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),hh6=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var sE1;var CK4=U(()=>{sE1={name:"decocms",version:"2.344.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/mesh"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:'bun run migrate && concurrently "bun run dev:client" "bun run dev:server"',"dev:servers":'concurrently "bun run dev:client" "bun run dev:server"',"dev:client":"bun --bun vite dev","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts","build:client":"bun --bun vite build","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts","smoke:link":"bun run scripts/smoke-link.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.141","@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.77","@ai-sdk/google":"^3.0.73","@ai-sdk/openai":"^3.0.63","@anthropic-ai/sdk":"^0.96.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.17.6","@deco-cx/warp-node":"^0.3.23","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/ext-apps":"^1.7.1","@openrouter/ai-sdk-provider":"^2.9.0","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"3.13.24","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","ai-sdk-provider-claude-code":"^3.4.4","ai-sdk-provider-codex-cli":"^1.1.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12",nats:"^2.29.3","node-pty":"^1.0.0","posthog-js":"^1.371.1","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@ai-sdk/react":"^3.0.184","@better-auth/sso":"1.4.1","@daveyplate/better-auth-ui":"^3.2.7","@deco/ui":"workspace:*","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/vite-plugin":"workspace:*","@electric-sql/pglite":"^0.3.15","@floating-ui/react":"^0.27.16","@happy-dom/global-registrator":"^20.9.0","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@monaco-editor/react":"^4.7.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@playwright/test":"^1.58.2","@radix-ui/react-avatar":"^1.1.10","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.7","@radix-ui/react-select":"^2.2.6","@radix-ui/react-separator":"^1.1.7","@radix-ui/react-slot":"^1.2.3","@radix-ui/react-tabs":"^1.1.13","@rjsf/core":"^6.1.2","@rjsf/shadcn":"^6.1.2","@rjsf/utils":"^6.1.2","@rjsf/validator-ajv8":"^6.1.2","@tailwindcss/vite":"^4.1.17","@tanstack/react-query":"5.100.10","@tanstack/react-router":"1.169.2","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@tiptap/core":"3.20.2","@tiptap/extension-mention":"3.20.2","@tiptap/extension-placeholder":"3.20.2","@tiptap/pm":"3.20.2","@tiptap/react":"3.20.2","@tiptap/starter-kit":"3.20.2","@tiptap/suggestion":"3.20.2","@types/bun":"^1.3.1","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@untitledui/icons":"^0.0.19","@vercel/nft":"^1.1.1","@vitejs/plugin-react":"^5.1.0",ai:"^6.0.182","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.22","class-variance-authority":"^0.7.1",clsx:"^2.1.1",concurrently:"^9.2.1",croner:"^9.1.0","date-fns":"^4.1.0",degit:"^2.8.4",hono:"^4.10.7","input-otp":"^1.4.2",jose:"^6.0.11","kysely-pglite":"^0.6.1","lucide-react":"^0.468.0",marked:"^15.0.6","@decocms/sandbox":"workspace:*","mesh-plugin-workflows":"workspace:*",nanoid:"^5.1.6",pg:"^8.16.3",prettier:"^3.4.2","react-hook-form":"^7.66.0","react-markdown":"^10.1.0","react-resizable-panels":"^2.1.7","react-syntax-highlighter":"^15.6.1",recharts:"^3.6.0","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","sass-embedded":"^1.97.2",sonner:"^2.0.7","tailwind-merge":"^3.3.1",tailwindcss:"^4.1.17",typescript:"^5.9.3",vite:"^7.2.1","vite-tsconfig-paths":"^5.1.4",zod:"^4.0.0",zustand:"^5.0.9"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","mesh","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as a2,Text as kf}from"ink";import{Spinner as ih6}from"@inkjs/ui";import{useSyncExternalStore as yK4}from"react";import{jsx as P8,jsxs as iX}from"react/jsx-runtime";function nh6($,u){if(!$||!mh6.has($))return $;let f=eE1[u]??eE1[eE1.length-1];return $==="#875f00"?f[0]:f[1]}function gK4({status:$}){if($==="pending")return P8(ih6,{label:""});return P8(kf,{color:"green",children:"\u2713"})}function hK4({services:$,migrationsStatus:u,home:f,serverUrl:X,vibe:J}){let w=yK4(ZV1,DV1),E=yK4(UV1,BV1);return iX(a2,{flexDirection:"column",paddingBottom:1,children:[J?iX(a2,{flexDirection:"column",children:[w.map((Q,Y)=>{let Z=E[Y],W=Q.reduce((F,v)=>F+v.text.length,0),G=Math.max(0,dh6-W);return iX(a2,{flexDirection:"row",children:[Q.map((F,v)=>{let B=nh6(F.color,Y);return B?P8(kf,{color:B,children:F.text},v):P8(kf,{children:F.text},v)}),P8(kf,{children:" ".repeat(G+2)}),Z?.map((F,v)=>F.color?P8(kf,{color:F.color,children:F.char},v):P8(kf,{children:F.char},v))]},Y)}),iX(kf,{dimColor:!0,children:[" v",sE1.version]})]}):iX(a2,{flexDirection:"column",marginTop:1,children:[lh6.map((Q,Y)=>P8(kf,{color:ch6[Y],children:Q},Y)),iX(kf,{dimColor:!0,children:[" v",sE1.version]})]}),P8(a2,{marginBottom:1,children:P8(kf,{dimColor:!0,children:"\u2500".repeat(80)})}),P8(a2,{children:iX(kf,{dimColor:!0,children:["Home: ",f]})}),iX(a2,{gap:2,children:[$.map((Q)=>iX(a2,{gap:1,children:[iX(kf,{children:[Q.name," :",Q.port||"...."]}),P8(gK4,{status:Q.status})]},Q.name)),iX(a2,{gap:1,children:[P8(kf,{children:"Migrations"}),P8(gK4,{status:u})]})]}),P8(a2,{children:X?iX(kf,{children:["Open in browser: ",P8(kf,{color:"cyan",children:X})]}):P8(kf,{dimColor:!0,children:"Starting..."})}),iX(a2,{gap:2,children:[iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"K"})," ","toggle config"]}),iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"L"})," ","toggle log flow"]}),iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"V"})," ","toggle vibe ",J?"\u266A Nihilore \xB7 CC BY 4.0":""]}),J&&iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"N"})," ","skip song"]})]})]})}var lh6,ch6,eE1,dh6=30,mh6;var VK4=U(()=>{CK4();ar0();ua0();lh6=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ","\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591 \u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 "," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591 ","\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 "],ch6=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],eE1=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],mh6=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as th6}from"react";function rh6(){let $=process.stdout.rows||24,u=process.stdout.columns||80;if($!==nN0.rows||u!==nN0.columns)nN0={rows:$,columns:u};return nN0}function ah6($){return process.stdout.on("resize",$),()=>{process.stdout.off("resize",$)}}function bK4(){return th6(ah6,rh6)}var nN0;var xK4=U(()=>{nN0={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as ph6,Text as Vu0}from"ink";import{useSyncExternalStore as oh6}from"react";import{jsx as $Q1,jsxs as uQ1}from"react/jsx-runtime";function sh6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function iK4({logs:$,headerHeight:u}){let{rows:f}=bK4(),{logFlow:X}=oh6(Cu0,Mu0),J=Math.max(1,f-u-1),w=X?$:$.slice(-J);return $Q1(ph6,{flexDirection:"column",children:w.map((E,Q)=>{if(E.rawLine)return $Q1(Vu0,{dimColor:!0,children:E.rawLine},Q);let Y=E.duration<1000?`${E.duration}ms`:`${(E.duration/1000).toFixed(1)}s`;return uQ1(Vu0,{children:[uQ1(Vu0,{dimColor:!0,children:[E.method.padEnd(6)," ",E.path.padEnd(30)," "]}),$Q1(Vu0,{color:sh6(E.status),children:E.status}),uQ1(Vu0,{dimColor:!0,children:[" ",Y.padStart(8)]})]},Q)})})}var lK4=U(()=>{BG();xK4()});var fQ1={};Y1(fQ1,{App:()=>wV6});import{Box as eh6,Text as $V6,useInput as uV6}from"ink";import{useSyncExternalStore as fV6}from"react";import{jsx as tN0,jsxs as EV6}from"react/jsx-runtime";function wV6({home:$}){let u=fV6(Cu0,Mu0);return uV6((f)=>{if(f==="k"||f==="K")cE1();if(f==="l"||f==="L")dE1();if((f==="v"||f==="V")&&u.dataDir)wa0(u.dataDir),mE1();if((f==="n"||f==="N")&&u.vibe)Ja0()}),EV6(eh6,{flexDirection:"column",children:[tN0(hK4,{services:u.services,migrationsStatus:u.migrationsStatus,home:$,serverUrl:u.serverUrl,vibe:u.vibe}),u.viewMode==="config"?u.env?tN0(qK4,{env:u.env}):tN0($V6,{dimColor:!0,children:"Loading configuration..."}):tN0(iK4,{logs:u.logs,headerHeight:u.vibe?JV6:XV6})]})}var XV6=15,JV6=19;var XQ1=U(()=>{MK4();VK4();lK4();BG();Wl()});var mP=i((GV6)=>{GV6.HttpAuthLocation=void 0;(function($){$.HEADER="header",$.QUERY="query"})(GV6.HttpAuthLocation||(GV6.HttpAuthLocation={}));GV6.HttpApiKeyAuthLocation=void 0;(function($){$.HEADER="header",$.QUERY="query"})(GV6.HttpApiKeyAuthLocation||(GV6.HttpApiKeyAuthLocation={}));GV6.EndpointURLScheme=void 0;(function($){$.HTTP="http",$.HTTPS="https"})(GV6.EndpointURLScheme||(GV6.EndpointURLScheme={}));GV6.AlgorithmId=void 0;(function($){$.MD5="md5",$.CRC32="crc32",$.CRC32C="crc32c",$.SHA1="sha1",$.SHA256="sha256"})(GV6.AlgorithmId||(GV6.AlgorithmId={}));var QV6=($)=>{let u=[];if($.sha256!==void 0)u.push({algorithmId:()=>GV6.AlgorithmId.SHA256,checksumConstructor:()=>$.sha256});if($.md5!=null)u.push({algorithmId:()=>GV6.AlgorithmId.MD5,checksumConstructor:()=>$.md5});return{addChecksumAlgorithm(f){u.push(f)},checksumAlgorithms(){return u}}},YV6=($)=>{let u={};return $.checksumAlgorithms().forEach((f)=>{u[f.algorithmId()]=f.checksumConstructor()}),u},DV6=($)=>{return QV6($)},ZV6=($)=>{return YV6($)};GV6.FieldPosition=void 0;(function($){$[$.HEADER=0]="HEADER",$[$.TRAILER=1]="TRAILER"})(GV6.FieldPosition||(GV6.FieldPosition={}));var WV6="__smithy_context";GV6.IniSectionType=void 0;(function($){$.PROFILE="profile",$.SSO_SESSION="sso-session",$.SERVICES="services"})(GV6.IniSectionType||(GV6.IniSectionType={}));GV6.RequestHandlerProtocol=void 0;(function($){$.HTTP_0_9="http/0.9",$.HTTP_1_0="http/1.0",$.TDS_8_0="tds/8.0"})(GV6.RequestHandlerProtocol||(GV6.RequestHandlerProtocol={}));GV6.SMITHY_CONTEXT_KEY=WV6;GV6.getDefaultClientConfiguration=DV6;GV6.resolveDefaultRuntimeConfig=ZV6});var m5=i((HV6)=>{var UV6=mP(),NV6=($)=>{return{setHttpHandler(u){$.httpHandler=u},httpHandler(){return $.httpHandler},updateHttpClientConfig(u,f){$.httpHandler?.updateHttpClientConfig(u,f)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},OV6=($)=>{return{httpHandler:$.httpHandler()}};class cK4{name;kind;values;constructor({name:$,kind:u=UV6.FieldPosition.HEADER,values:f=[]}){this.name=$,this.kind=u,this.values=f}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((u)=>u!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}}class dK4{entries={};encoding;constructor({fields:$=[],encoding:u="utf-8"}){$.forEach(this.setField.bind(this)),this.encoding=u}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((u)=>u.kind===$)}}class rN0{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor($){this.method=$.method||"GET",this.hostname=$.hostname||"localhost",this.port=$.port,this.query=$.query||{},this.headers=$.headers||{},this.body=$.body,this.protocol=$.protocol?$.protocol.slice(-1)!==":"?`${$.protocol}:`:$.protocol:"https:",this.path=$.path?$.path.charAt(0)!=="/"?`/${$.path}`:$.path:"/",this.username=$.username,this.password=$.password,this.fragment=$.fragment}static clone($){let u=new rN0({...$,headers:{...$.headers}});if(u.query)u.query=zV6(u.query);return u}static isInstance($){if(!$)return!1;let u=$;return"method"in u&&"protocol"in u&&"hostname"in u&&"path"in u&&typeof u.query==="object"&&typeof u.headers==="object"}clone(){return rN0.clone(this)}}function zV6($){return Object.keys($).reduce((u,f)=>{let X=$[f];return{...u,[f]:Array.isArray(X)?[...X]:X}},{})}class mK4{statusCode;reason;headers;body;constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let u=$;return typeof u.statusCode==="number"&&typeof u.headers==="object"}}function KV6($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}HV6.Field=cK4;HV6.Fields=dK4;HV6.HttpRequest=rN0;HV6.HttpResponse=mK4;HV6.getHttpHandlerExtensionConfiguration=NV6;HV6.isValidHostname=KV6;HV6.resolveHttpHandlerRuntimeConfig=OV6});function SV6($){return(u)=>async(f)=>{let{request:X}=f;if($.expectContinueHeader!==!1&&nK4.HttpRequest.isInstance(X)&&X.body&&$.runtime==="node"&&$.requestHandler?.constructor?.name!=="FetchHttpHandler"){let J=!0;if(typeof $.expectContinueHeader==="number")try{J=(Number(X.headers?.["content-length"])??$.bodyLengthChecker?.(X.body)??1/0)>=$.expectContinueHeader}catch(w){}else J=!!$.expectContinueHeader;if(J)X.headers.Expect="100-continue"}return u({...f,request:X})}}var nK4,kV6,tK4=($)=>({applyToStack:(u)=>{u.add(SV6($),kV6)}});var rK4=U(()=>{nK4=D0(m5(),1);kV6={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var pY,aN0,nP,pN0,j3,aK4,xu0;var oY=U(()=>{pY={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},aN0=pY.WHEN_SUPPORTED,nP={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},pN0=pY.WHEN_SUPPORTED;(function($){$.MD5="MD5",$.CRC32="CRC32",$.CRC32C="CRC32C",$.CRC64NVME="CRC64NVME",$.SHA1="SHA1",$.SHA256="SHA256"})(j3||(j3={}));(function($){$.HEADER="header",$.TRAILER="trailer"})(aK4||(aK4={}));xu0=j3.CRC32});var Yz,pn=($,u,f,X)=>{if(!(u in $))return;let J=$[u].toUpperCase();if(!Object.values(f).includes(J))throw TypeError(`Cannot load ${X} '${u}'. Expected one of ${Object.values(f)}, got '${$[u]}'.`);return J};var ZQ1=U(()=>{(function($){$.ENV="env",$.CONFIG="shared config entry"})(Yz||(Yz={}))});var RV6="AWS_REQUEST_CHECKSUM_CALCULATION",qV6="request_checksum_calculation",pK4;var oK4=U(()=>{oY();ZQ1();pK4={environmentVariableSelector:($)=>pn($,RV6,pY,Yz.ENV),configFileSelector:($)=>pn($,qV6,pY,Yz.CONFIG),default:aN0}});var MV6="AWS_RESPONSE_CHECKSUM_VALIDATION",CV6="response_checksum_validation",sK4;var eK4=U(()=>{oY();ZQ1();sK4={environmentVariableSelector:($)=>pn($,MV6,nP,Yz.ENV),configFileSelector:($)=>pn($,CV6,nP,Yz.CONFIG),default:pN0}});var GQ1=i((dV6)=>{var yV6=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],gV6=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hV6=["TimeoutError","RequestTimeout","RequestTimeoutException"],VV6=[500,502,503,504],bV6=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],xV6=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],$H4=($)=>$?.$retryable!==void 0,iV6=($)=>yV6.includes($.name),uH4=($)=>$.$metadata?.clockSkewCorrected,fH4=($)=>{let u=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!($&&$ instanceof TypeError))return!1;return u.has($.message)},lV6=($)=>$.$metadata?.httpStatusCode===429||gV6.includes($.name)||$.$retryable?.throttling==!0,WQ1=($,u=0)=>$H4($)||uH4($)||$.name==="InvalidSignatureException"&&$.message?.includes("Signature expired")||hV6.includes($.name)||bV6.includes($?.code||"")||xV6.includes($?.code||"")||VV6.includes($.$metadata?.httpStatusCode||0)||fH4($)||XH4($)||$.cause!==void 0&&u<=10&&WQ1($.cause,u+1),cV6=($)=>{if($.$metadata?.httpStatusCode!==void 0){let u=$.$metadata.httpStatusCode;if(500<=u&&u<=599&&!WQ1($))return!0;return!1}return!1};function XH4($){return $.code==="ERR_HTTP2_STREAM_ERROR"&&$.message.includes("NGHTTP2_REFUSED_STREAM")}dV6.isBrowserNetworkError=fH4;dV6.isClockSkewCorrectedError=uH4;dV6.isClockSkewError=iV6;dV6.isNodeJsHttp2TransientError=XH4;dV6.isRetryableByTrait=$H4;dV6.isServerError=cV6;dV6.isThrottlingError=lV6;dV6.isTransientError=WQ1});var ZB=i((Qb6)=>{var eV6=GQ1();Qb6.RETRY_MODES=void 0;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(Qb6.RETRY_MODES||(Qb6.RETRY_MODES={}));var sN0=3,$b6=Qb6.RETRY_MODES.STANDARD;class eN0{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor($){this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate($){let u;this.updateMeasuredRate();let f=$;if(f?.errorType==="THROTTLING"||eV6.isThrottlingError(f?.error??$)){let w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),u=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),u=this.cubicSuccess(this.getCurrentTimeInSeconds());let J=Math.min(u,2*this.measuredTxRate);this.updateTokenBucketRate(J)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.availableTokens){let u=($-this.availableTokens)/this.fillRate*1000;await new Promise((f)=>eN0.setTimeoutFn(f,u))}this.availableTokens=this.availableTokens-$}refillTokenBucket(){let $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}let u=($-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+u),this.lastTimestamp=$}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let $=this.getCurrentTimeInSeconds(),u=Math.floor($*2)/2;if(this.requestCount++,u>this.lastTxRateBucket){let f=this.requestCount/(u-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=u}}getPrecise($){return parseFloat($.toFixed(8))}}var ub6=100,BQ1=20000,fb6=500,FQ1=500,Xb6=5,Jb6=10,JH4=1,wb6="amz-sdk-invocation-id",Eb6="amz-sdk-request";class lX{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return lX.v2026?50:100}static throttlingDelay(){return lX.v2026?1000:500}static cost(){return lX.v2026?14:5}static throttlingCost(){return lX.v2026?5:10}static modifiedCostType(){return lX.v2026?"THROTTLING":"TRANSIENT"}}class wH4{x=lX.delay();computeNextBackoffDelay($){let u=Math.random(),f=2,X=u*Math.min(this.x*2**$,BQ1);return Math.floor(X)}setDelayBase($){this.x=$}}class vQ1{delay;count;cost;longPoll;constructor($,u,f,X){this.delay=$,this.count=u,this.cost=f,this.longPoll=X}getRetryCount(){return this.count}getRetryDelay(){return Math.min(BQ1,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var oN0={incompatible:1,attempts:2,capacity:3};class iu0{mode=Qb6.RETRY_MODES.STANDARD;capacity=FQ1;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor($){if(typeof $==="number")this.maxAttemptsProvider=async()=>$;else if(typeof $==="function")this.maxAttemptsProvider=$;else if($&&typeof $==="object")this.maxAttemptsProvider=async()=>$.maxAttempts,this.baseDelay=$.baseDelay,this.retryBackoffStrategy=$.backoff;this.maxAttemptsProvider??=async()=>sN0,this.baseDelay??=lX.delay(),this.retryBackoffStrategy??=new wH4}async acquireInitialRetryToken($){return new vQ1(lX.delay(),0,void 0,lX.v2026&&$.includes(":longpoll"))}async refreshRetryTokenForRetry($,u){let f=await this.getMaxAttempts(),X=this.retryCode($,u,f),J=X===0,w=$.isLongPoll?.();if(J||w){let E=u.errorType;this.retryBackoffStrategy.setDelayBase(E==="THROTTLING"?lX.throttlingDelay():this.baseDelay);let Q=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Y=Q;if(u.retryAfterHint instanceof Date)Y=Math.max(Q,Math.min(u.retryAfterHint.getTime()-Date.now(),Q+5000));if(!J)throw Object.assign(Error("No retry token available"),{$backoff:lX.v2026&&X===oN0.capacity&&w?Y:0});else{let Z=this.getCapacityCost(E);return this.capacity-=Z,new vQ1(Y,$.getRetryCount()+1,Z,$.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess($){this.capacity=Math.min(FQ1,this.capacity+($.getRetryCost()??JH4))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${sN0}`),sN0}}retryCode($,u,f){let X=$.getRetryCount()+1,J=this.isRetryableError(u.errorType)?0:oN0.incompatible,w=X<f?0:oN0.attempts,E=this.capacity>=this.getCapacityCost(u.errorType)?0:oN0.capacity;return J||w||E}getCapacityCost($){return $===lX.modifiedCostType()?lX.throttlingCost():lX.cost()}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class EH4{mode=Qb6.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor($,u){let{rateLimiter:f}=u??{};this.rateLimiter=f??new eN0,this.standardRetryStrategy=u?new iu0({maxAttempts:typeof $==="number"?$:3,...u}):new iu0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,u){return this.rateLimiter.updateClientSendingRate(u),this.standardRetryStrategy.refreshRetryTokenForRetry($,u)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class QH4 extends iu0{computeNextBackoffDelay;constructor($,u=lX.delay()){super(typeof $==="function"?$:async()=>$);if(typeof u==="number")this.computeNextBackoffDelay=()=>u;else this.computeNextBackoffDelay=u}async refreshRetryTokenForRetry($,u){let f=await super.refreshRetryTokenForRetry($,u);return f.getRetryDelay=()=>this.computeNextBackoffDelay(f.getRetryCount()),f}}Qb6.AdaptiveRetryStrategy=EH4;Qb6.ConfiguredRetryStrategy=QH4;Qb6.DEFAULT_MAX_ATTEMPTS=sN0;Qb6.DEFAULT_RETRY_DELAY_BASE=ub6;Qb6.DEFAULT_RETRY_MODE=$b6;Qb6.DefaultRateLimiter=eN0;Qb6.INITIAL_RETRY_TOKENS=FQ1;Qb6.INVOCATION_ID_HEADER=wb6;Qb6.MAXIMUM_RETRY_DELAY=BQ1;Qb6.NO_RETRY_INCREMENT=JH4;Qb6.REQUEST_HEADER=Eb6;Qb6.RETRY_COST=Xb6;Qb6.Retry=lX;Qb6.StandardRetryStrategy=iu0;Qb6.THROTTLING_RETRY_DELAY_BASE=fb6;Qb6.TIMEOUT_RETRY_COST=Jb6});var Zf=i((qb6)=>{var Pb6=ZB(),UQ1={warningEmitted:!1},Lb6=($)=>{if($&&!UQ1.warningEmitted&&parseInt($.substring(1,$.indexOf(".")))<20)UQ1.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
75143
|
+
`);X=w.pop()??"";for(let E of w){let Q=SK4(E).replace(/^\[\d+\]\s*/,"").trim();if(!Q)continue;vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:Q})}}(async()=>{for(;;){let{done:w,value:E}=await u.read();if(w)break;X+=f.decode(E,{stream:!0}),J()}if(X.trim()){let w=SK4(X).replace(/^\[\d+\]\s*/,"").trim();if(w)vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:w})}})()}async function yh6($){let{vitePort:u,baseUrl:f,noTui:X}=$,J=await lN0(Number($.port)),{settings:w,services:E,managedServiceNames:Q}=await VN0({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let K of E)dP({name:K.name,status:"ready",port:K.port});hu0(w),yu0();let Y=cN0(import.meta.dir,"..","..","..","..",".."),Z=process.env.WORKTREE_SLUG??process.env.CONDUCTOR_WORKSPACE_NAME??"default",W=cN0(Ch6(),`decocms-dev-link-${Z}`),G=X===!0,F=Bun.spawn(["bun","run","--cwd=apps/mesh","dev:servers"],{cwd:Y,env:{...process.env,PORT:String(w.port),VITE_PORT:String(u),DATABASE_URL:w.databaseUrl,NATS_URL:w.natsUrls.join(","),NODE_ENV:w.nodeEnv,DECOCMS_LOCAL_MODE:String(w.localMode),DECOCMS_HOME:w.dataDir,DATA_DIR:w.dataDir,DECO_CLI:"1",MESH_ALLOW_LOCALHOST_LINKS:"1",DEV_LINK_SESSION_PATH:cN0(W,"session.json"),...w.baseUrl?{BASE_URL:w.baseUrl}:{}},stdio:["inherit",G?"inherit":"pipe",G?"inherit":"pipe"]});if(!G)dN0(F.stdout),dN0(F.stderr);let v=f||`http://localhost:${w.port}`;gu0(v),dP({name:"Vite",status:"ready",port:Number(u)});let B=5174,N=!$.localSandboxProvider?Promise.resolve(null):(async()=>{try{await tE1(Number(w.port),{intervalMs:500})}catch(A){return vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:`[link] gave up waiting for cluster on :${w.port}: ${A instanceof Error?A.message:String(A)}`}),null}let K=cN0(W,"session.json"),H=Date.now()+60000;while(!Mh6(K)){if(Date.now()>H)return vG({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:`[link] gave up waiting for dev-link session at ${K} after 60s \u2014 skipping link spawn. Sandbox will stay pending.`}),null;await new Promise((A)=>setTimeout(A,500))}let P=Bun.spawn(["bun","run","--cwd=apps/mesh","src/cli.ts","link","--no-tunnel","--port",String(B)],{cwd:Y,env:{...process.env,MESH_CLUSTER_URL:v,MESH_ALLOW_LOCALHOST_LINKS:"1",DATA_DIR:W,DECOCMS_HOME:W},stdio:["inherit",G?"inherit":"pipe",G?"inherit":"pipe"]});if(!G)dN0(P.stdout),dN0(P.stderr);return tE1(B,{intervalMs:500}).then(()=>{dP({name:"Sandbox",status:"ready",port:B})}).catch(()=>{}),P})(),O=async(K)=>{let H=await N.catch(()=>null);if(H)try{H.kill(K)}catch{}if(F.kill(K),await F.exited,H)try{await H.exited}catch{}if(Q.length>0){let{stopServices:P}=await Promise.resolve().then(() => (dJ0(),cJ0));await P(w.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(w.port),process:F}}var aE1=U(()=>{iE1();BG();nE1();IK4()});import{Box as pE1,Text as oE1}from"ink";import{jsx as RK4,jsxs as mN0}from"react/jsx-runtime";function kK4($){if(!$)return"not set";try{let u=new URL($);if(u.password)u.password="***";if(u.username&&u.username.length>3)u.username=u.username.slice(0,3)+"***";return u.pathname="/",u.search="",u.hash="",u.toString()}catch{if($.length<=10)return $;return $.slice(0,6)+"***"+$.slice(-4)}}function Vh6($,u){if(gh6.has($))return u?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(hh6.has($)){if(Array.isArray(u)){if(u.length===0)return{text:"not set",dimColor:!0};return{text:u.map((w)=>kK4(w)).join(", "),color:"cyan"}}let X=kK4(u);return X==="not set"?{text:X,dimColor:!0}:{text:X,color:"cyan"}}if(u===void 0||u===null||u==="")return{text:"not set",dimColor:!0};let f=String(u);if(f==="true")return{text:f,color:"green"};if(f==="false")return{text:f,color:"yellow"};try{return new URL(f),{text:f,color:"cyan"}}catch{return{text:f}}}function bh6($){return[{title:"Core",entries:[{key:"NODE_ENV",value:$.nodeEnv},{key:"PORT",value:$.port},{key:"BASE_URL",value:$.baseUrl??`http://localhost:${$.port}`},{key:"DATA_DIR",value:$.dataDir}]},{title:"Database",entries:[{key:"DATABASE_URL",value:$.databaseUrl},{key:"DATABASE_PG_SSL",value:$.databasePgSsl}]},{title:"Auth & Secrets",entries:[{key:"BETTER_AUTH_SECRET",value:$.betterAuthSecret},{key:"ENCRYPTION_KEY",value:$.encryptionKey},{key:"MESH_JWT_SECRET",value:$.meshJwtSecret},{key:"STUDIO_PROVISION_SECRET_KEY",value:$.studioProvisionSecretKey},{key:"DISABLE_RATE_LIMIT",value:$.disableRateLimit}]},{title:"Auth Providers",entries:[{key:"AUTH_EMAIL_PASSWORD_ENABLED",value:process.env.AUTH_EMAIL_PASSWORD_ENABLED??"true"},{key:"AUTH_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_GOOGLE_CLIENT_ID},{key:"AUTH_GITHUB_CLIENT_ID",value:!!process.env.AUTH_GITHUB_CLIENT_ID},{key:"AUTH_RESEND_API_KEY",value:!!process.env.AUTH_RESEND_API_KEY},{key:"AUTH_SENDGRID_API_KEY",value:!!process.env.AUTH_SENDGRID_API_KEY},{key:"AUTH_SSO_MS_CLIENT_ID",value:!!process.env.AUTH_SSO_MS_CLIENT_ID},{key:"AUTH_SSO_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_SSO_GOOGLE_CLIENT_ID},{key:"AUTH_MAGIC_LINK_ENABLED",value:process.env.AUTH_MAGIC_LINK_ENABLED==="true"},{key:"AUTH_EMAIL_OTP_ENABLED",value:process.env.AUTH_EMAIL_OTP_ENABLED==="true"}]},{title:"Observability",entries:[{key:"CLICKHOUSE_URL",value:$.clickhouseUrl},{key:"OTEL_SERVICE_NAME",value:$.otelServiceName}]},{title:"Event Bus & Networking",entries:[{key:"NATS_URL",value:$.natsUrls}]},{title:"Config Files",entries:[{key:"CONFIG_PATH",value:$.configPath}]},{title:"AI Gateway",entries:[{key:"DECO_AI_GATEWAY_ENABLED",value:$.aiGatewayEnabled},{key:"DECO_AI_GATEWAY_URL",value:$.aiGatewayUrl}]}]}function qK4({env:$}){let u=bh6($);return RK4(pE1,{flexDirection:"column",children:u.map((f)=>mN0(pE1,{flexDirection:"column",marginTop:1,children:[mN0(oE1,{dimColor:!0,children:[" ","\u2500\u2500 ",f.title," ","\u2500".repeat(Math.max(0,38-f.title.length))]}),f.entries.map(({key:X,value:J})=>{let w=Vh6(X,J);return mN0(pE1,{children:[mN0(oE1,{dimColor:!0,children:[" ",X.padEnd(36)]}),RK4(oE1,{color:w.color,dimColor:w.dimColor,children:w.text})]},X)})]},f.title))})}var gh6,hh6;var MK4=U(()=>{gh6=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),hh6=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var sE1;var CK4=U(()=>{sE1={name:"decocms",version:"2.344.1",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/mesh"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:'bun run migrate && concurrently "bun run dev:client" "bun run dev:server"',"dev:servers":'concurrently "bun run dev:client" "bun run dev:server"',"dev:client":"bun --bun vite dev","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts","build:client":"bun --bun vite build","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts","smoke:link":"bun run scripts/smoke-link.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.141","@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.77","@ai-sdk/google":"^3.0.73","@ai-sdk/openai":"^3.0.63","@anthropic-ai/sdk":"^0.96.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.17.6","@deco-cx/warp-node":"^0.3.23","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/ext-apps":"^1.7.1","@openrouter/ai-sdk-provider":"^2.9.0","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"3.13.24","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","ai-sdk-provider-claude-code":"^3.4.4","ai-sdk-provider-codex-cli":"^1.1.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12",nats:"^2.29.3","node-pty":"^1.0.0","posthog-js":"^1.371.1","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@ai-sdk/react":"^3.0.184","@better-auth/sso":"1.4.1","@daveyplate/better-auth-ui":"^3.2.7","@deco/ui":"workspace:*","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/vite-plugin":"workspace:*","@electric-sql/pglite":"^0.3.15","@floating-ui/react":"^0.27.16","@happy-dom/global-registrator":"^20.9.0","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@monaco-editor/react":"^4.7.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@playwright/test":"^1.58.2","@radix-ui/react-avatar":"^1.1.10","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.7","@radix-ui/react-select":"^2.2.6","@radix-ui/react-separator":"^1.1.7","@radix-ui/react-slot":"^1.2.3","@radix-ui/react-tabs":"^1.1.13","@rjsf/core":"^6.1.2","@rjsf/shadcn":"^6.1.2","@rjsf/utils":"^6.1.2","@rjsf/validator-ajv8":"^6.1.2","@tailwindcss/vite":"^4.1.17","@tanstack/react-query":"5.100.10","@tanstack/react-router":"1.169.2","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@tiptap/core":"3.20.2","@tiptap/extension-mention":"3.20.2","@tiptap/extension-placeholder":"3.20.2","@tiptap/pm":"3.20.2","@tiptap/react":"3.20.2","@tiptap/starter-kit":"3.20.2","@tiptap/suggestion":"3.20.2","@types/bun":"^1.3.1","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@untitledui/icons":"^0.0.19","@vercel/nft":"^1.1.1","@vitejs/plugin-react":"^5.1.0",ai:"^6.0.182","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.22","class-variance-authority":"^0.7.1",clsx:"^2.1.1",concurrently:"^9.2.1",croner:"^9.1.0","date-fns":"^4.1.0",degit:"^2.8.4",hono:"^4.10.7","input-otp":"^1.4.2",jose:"^6.0.11","kysely-pglite":"^0.6.1","lucide-react":"^0.468.0",marked:"^15.0.6","@decocms/sandbox":"workspace:*","mesh-plugin-workflows":"workspace:*",nanoid:"^5.1.6",pg:"^8.16.3",prettier:"^3.4.2","react-hook-form":"^7.66.0","react-markdown":"^10.1.0","react-resizable-panels":"^2.1.7","react-syntax-highlighter":"^15.6.1",recharts:"^3.6.0","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","sass-embedded":"^1.97.2",sonner:"^2.0.7","tailwind-merge":"^3.3.1",tailwindcss:"^4.1.17",typescript:"^5.9.3",vite:"^7.2.1","vite-tsconfig-paths":"^5.1.4",zod:"^4.0.0",zustand:"^5.0.9"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","mesh","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as a2,Text as kf}from"ink";import{Spinner as ih6}from"@inkjs/ui";import{useSyncExternalStore as yK4}from"react";import{jsx as P8,jsxs as iX}from"react/jsx-runtime";function nh6($,u){if(!$||!mh6.has($))return $;let f=eE1[u]??eE1[eE1.length-1];return $==="#875f00"?f[0]:f[1]}function gK4({status:$}){if($==="pending")return P8(ih6,{label:""});return P8(kf,{color:"green",children:"\u2713"})}function hK4({services:$,migrationsStatus:u,home:f,serverUrl:X,vibe:J}){let w=yK4(ZV1,DV1),E=yK4(UV1,BV1);return iX(a2,{flexDirection:"column",paddingBottom:1,children:[J?iX(a2,{flexDirection:"column",children:[w.map((Q,Y)=>{let Z=E[Y],W=Q.reduce((F,v)=>F+v.text.length,0),G=Math.max(0,dh6-W);return iX(a2,{flexDirection:"row",children:[Q.map((F,v)=>{let B=nh6(F.color,Y);return B?P8(kf,{color:B,children:F.text},v):P8(kf,{children:F.text},v)}),P8(kf,{children:" ".repeat(G+2)}),Z?.map((F,v)=>F.color?P8(kf,{color:F.color,children:F.char},v):P8(kf,{children:F.char},v))]},Y)}),iX(kf,{dimColor:!0,children:[" v",sE1.version]})]}):iX(a2,{flexDirection:"column",marginTop:1,children:[lh6.map((Q,Y)=>P8(kf,{color:ch6[Y],children:Q},Y)),iX(kf,{dimColor:!0,children:[" v",sE1.version]})]}),P8(a2,{marginBottom:1,children:P8(kf,{dimColor:!0,children:"\u2500".repeat(80)})}),P8(a2,{children:iX(kf,{dimColor:!0,children:["Home: ",f]})}),iX(a2,{gap:2,children:[$.map((Q)=>iX(a2,{gap:1,children:[iX(kf,{children:[Q.name," :",Q.port||"...."]}),P8(gK4,{status:Q.status})]},Q.name)),iX(a2,{gap:1,children:[P8(kf,{children:"Migrations"}),P8(gK4,{status:u})]})]}),P8(a2,{children:X?iX(kf,{children:["Open in browser: ",P8(kf,{color:"cyan",children:X})]}):P8(kf,{dimColor:!0,children:"Starting..."})}),iX(a2,{gap:2,children:[iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"K"})," ","toggle config"]}),iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"L"})," ","toggle log flow"]}),iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"V"})," ","toggle vibe ",J?"\u266A Nihilore \xB7 CC BY 4.0":""]}),J&&iX(kf,{dimColor:!0,children:[P8(kf,{bold:!0,dimColor:!0,children:"N"})," ","skip song"]})]})]})}var lh6,ch6,eE1,dh6=30,mh6;var VK4=U(()=>{CK4();ar0();ua0();lh6=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ","\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591 \u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 "," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591 ","\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 "],ch6=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],eE1=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],mh6=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as th6}from"react";function rh6(){let $=process.stdout.rows||24,u=process.stdout.columns||80;if($!==nN0.rows||u!==nN0.columns)nN0={rows:$,columns:u};return nN0}function ah6($){return process.stdout.on("resize",$),()=>{process.stdout.off("resize",$)}}function bK4(){return th6(ah6,rh6)}var nN0;var xK4=U(()=>{nN0={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as ph6,Text as Vu0}from"ink";import{useSyncExternalStore as oh6}from"react";import{jsx as $Q1,jsxs as uQ1}from"react/jsx-runtime";function sh6($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function iK4({logs:$,headerHeight:u}){let{rows:f}=bK4(),{logFlow:X}=oh6(Cu0,Mu0),J=Math.max(1,f-u-1),w=X?$:$.slice(-J);return $Q1(ph6,{flexDirection:"column",children:w.map((E,Q)=>{if(E.rawLine)return $Q1(Vu0,{dimColor:!0,children:E.rawLine},Q);let Y=E.duration<1000?`${E.duration}ms`:`${(E.duration/1000).toFixed(1)}s`;return uQ1(Vu0,{children:[uQ1(Vu0,{dimColor:!0,children:[E.method.padEnd(6)," ",E.path.padEnd(30)," "]}),$Q1(Vu0,{color:sh6(E.status),children:E.status}),uQ1(Vu0,{dimColor:!0,children:[" ",Y.padStart(8)]})]},Q)})})}var lK4=U(()=>{BG();xK4()});var fQ1={};Y1(fQ1,{App:()=>wV6});import{Box as eh6,Text as $V6,useInput as uV6}from"ink";import{useSyncExternalStore as fV6}from"react";import{jsx as tN0,jsxs as EV6}from"react/jsx-runtime";function wV6({home:$}){let u=fV6(Cu0,Mu0);return uV6((f)=>{if(f==="k"||f==="K")cE1();if(f==="l"||f==="L")dE1();if((f==="v"||f==="V")&&u.dataDir)wa0(u.dataDir),mE1();if((f==="n"||f==="N")&&u.vibe)Ja0()}),EV6(eh6,{flexDirection:"column",children:[tN0(hK4,{services:u.services,migrationsStatus:u.migrationsStatus,home:$,serverUrl:u.serverUrl,vibe:u.vibe}),u.viewMode==="config"?u.env?tN0(qK4,{env:u.env}):tN0($V6,{dimColor:!0,children:"Loading configuration..."}):tN0(iK4,{logs:u.logs,headerHeight:u.vibe?JV6:XV6})]})}var XV6=15,JV6=19;var XQ1=U(()=>{MK4();VK4();lK4();BG();Wl()});var mP=i((GV6)=>{GV6.HttpAuthLocation=void 0;(function($){$.HEADER="header",$.QUERY="query"})(GV6.HttpAuthLocation||(GV6.HttpAuthLocation={}));GV6.HttpApiKeyAuthLocation=void 0;(function($){$.HEADER="header",$.QUERY="query"})(GV6.HttpApiKeyAuthLocation||(GV6.HttpApiKeyAuthLocation={}));GV6.EndpointURLScheme=void 0;(function($){$.HTTP="http",$.HTTPS="https"})(GV6.EndpointURLScheme||(GV6.EndpointURLScheme={}));GV6.AlgorithmId=void 0;(function($){$.MD5="md5",$.CRC32="crc32",$.CRC32C="crc32c",$.SHA1="sha1",$.SHA256="sha256"})(GV6.AlgorithmId||(GV6.AlgorithmId={}));var QV6=($)=>{let u=[];if($.sha256!==void 0)u.push({algorithmId:()=>GV6.AlgorithmId.SHA256,checksumConstructor:()=>$.sha256});if($.md5!=null)u.push({algorithmId:()=>GV6.AlgorithmId.MD5,checksumConstructor:()=>$.md5});return{addChecksumAlgorithm(f){u.push(f)},checksumAlgorithms(){return u}}},YV6=($)=>{let u={};return $.checksumAlgorithms().forEach((f)=>{u[f.algorithmId()]=f.checksumConstructor()}),u},DV6=($)=>{return QV6($)},ZV6=($)=>{return YV6($)};GV6.FieldPosition=void 0;(function($){$[$.HEADER=0]="HEADER",$[$.TRAILER=1]="TRAILER"})(GV6.FieldPosition||(GV6.FieldPosition={}));var WV6="__smithy_context";GV6.IniSectionType=void 0;(function($){$.PROFILE="profile",$.SSO_SESSION="sso-session",$.SERVICES="services"})(GV6.IniSectionType||(GV6.IniSectionType={}));GV6.RequestHandlerProtocol=void 0;(function($){$.HTTP_0_9="http/0.9",$.HTTP_1_0="http/1.0",$.TDS_8_0="tds/8.0"})(GV6.RequestHandlerProtocol||(GV6.RequestHandlerProtocol={}));GV6.SMITHY_CONTEXT_KEY=WV6;GV6.getDefaultClientConfiguration=DV6;GV6.resolveDefaultRuntimeConfig=ZV6});var m5=i((HV6)=>{var UV6=mP(),NV6=($)=>{return{setHttpHandler(u){$.httpHandler=u},httpHandler(){return $.httpHandler},updateHttpClientConfig(u,f){$.httpHandler?.updateHttpClientConfig(u,f)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},OV6=($)=>{return{httpHandler:$.httpHandler()}};class cK4{name;kind;values;constructor({name:$,kind:u=UV6.FieldPosition.HEADER,values:f=[]}){this.name=$,this.kind=u,this.values=f}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((u)=>u!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}}class dK4{entries={};encoding;constructor({fields:$=[],encoding:u="utf-8"}){$.forEach(this.setField.bind(this)),this.encoding=u}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((u)=>u.kind===$)}}class rN0{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor($){this.method=$.method||"GET",this.hostname=$.hostname||"localhost",this.port=$.port,this.query=$.query||{},this.headers=$.headers||{},this.body=$.body,this.protocol=$.protocol?$.protocol.slice(-1)!==":"?`${$.protocol}:`:$.protocol:"https:",this.path=$.path?$.path.charAt(0)!=="/"?`/${$.path}`:$.path:"/",this.username=$.username,this.password=$.password,this.fragment=$.fragment}static clone($){let u=new rN0({...$,headers:{...$.headers}});if(u.query)u.query=zV6(u.query);return u}static isInstance($){if(!$)return!1;let u=$;return"method"in u&&"protocol"in u&&"hostname"in u&&"path"in u&&typeof u.query==="object"&&typeof u.headers==="object"}clone(){return rN0.clone(this)}}function zV6($){return Object.keys($).reduce((u,f)=>{let X=$[f];return{...u,[f]:Array.isArray(X)?[...X]:X}},{})}class mK4{statusCode;reason;headers;body;constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let u=$;return typeof u.statusCode==="number"&&typeof u.headers==="object"}}function KV6($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}HV6.Field=cK4;HV6.Fields=dK4;HV6.HttpRequest=rN0;HV6.HttpResponse=mK4;HV6.getHttpHandlerExtensionConfiguration=NV6;HV6.isValidHostname=KV6;HV6.resolveHttpHandlerRuntimeConfig=OV6});function SV6($){return(u)=>async(f)=>{let{request:X}=f;if($.expectContinueHeader!==!1&&nK4.HttpRequest.isInstance(X)&&X.body&&$.runtime==="node"&&$.requestHandler?.constructor?.name!=="FetchHttpHandler"){let J=!0;if(typeof $.expectContinueHeader==="number")try{J=(Number(X.headers?.["content-length"])??$.bodyLengthChecker?.(X.body)??1/0)>=$.expectContinueHeader}catch(w){}else J=!!$.expectContinueHeader;if(J)X.headers.Expect="100-continue"}return u({...f,request:X})}}var nK4,kV6,tK4=($)=>({applyToStack:(u)=>{u.add(SV6($),kV6)}});var rK4=U(()=>{nK4=D0(m5(),1);kV6={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var pY,aN0,nP,pN0,j3,aK4,xu0;var oY=U(()=>{pY={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},aN0=pY.WHEN_SUPPORTED,nP={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},pN0=pY.WHEN_SUPPORTED;(function($){$.MD5="MD5",$.CRC32="CRC32",$.CRC32C="CRC32C",$.CRC64NVME="CRC64NVME",$.SHA1="SHA1",$.SHA256="SHA256"})(j3||(j3={}));(function($){$.HEADER="header",$.TRAILER="trailer"})(aK4||(aK4={}));xu0=j3.CRC32});var Yz,pn=($,u,f,X)=>{if(!(u in $))return;let J=$[u].toUpperCase();if(!Object.values(f).includes(J))throw TypeError(`Cannot load ${X} '${u}'. Expected one of ${Object.values(f)}, got '${$[u]}'.`);return J};var ZQ1=U(()=>{(function($){$.ENV="env",$.CONFIG="shared config entry"})(Yz||(Yz={}))});var RV6="AWS_REQUEST_CHECKSUM_CALCULATION",qV6="request_checksum_calculation",pK4;var oK4=U(()=>{oY();ZQ1();pK4={environmentVariableSelector:($)=>pn($,RV6,pY,Yz.ENV),configFileSelector:($)=>pn($,qV6,pY,Yz.CONFIG),default:aN0}});var MV6="AWS_RESPONSE_CHECKSUM_VALIDATION",CV6="response_checksum_validation",sK4;var eK4=U(()=>{oY();ZQ1();sK4={environmentVariableSelector:($)=>pn($,MV6,nP,Yz.ENV),configFileSelector:($)=>pn($,CV6,nP,Yz.CONFIG),default:pN0}});var GQ1=i((dV6)=>{var yV6=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],gV6=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hV6=["TimeoutError","RequestTimeout","RequestTimeoutException"],VV6=[500,502,503,504],bV6=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],xV6=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],$H4=($)=>$?.$retryable!==void 0,iV6=($)=>yV6.includes($.name),uH4=($)=>$.$metadata?.clockSkewCorrected,fH4=($)=>{let u=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!($&&$ instanceof TypeError))return!1;return u.has($.message)},lV6=($)=>$.$metadata?.httpStatusCode===429||gV6.includes($.name)||$.$retryable?.throttling==!0,WQ1=($,u=0)=>$H4($)||uH4($)||$.name==="InvalidSignatureException"&&$.message?.includes("Signature expired")||hV6.includes($.name)||bV6.includes($?.code||"")||xV6.includes($?.code||"")||VV6.includes($.$metadata?.httpStatusCode||0)||fH4($)||XH4($)||$.cause!==void 0&&u<=10&&WQ1($.cause,u+1),cV6=($)=>{if($.$metadata?.httpStatusCode!==void 0){let u=$.$metadata.httpStatusCode;if(500<=u&&u<=599&&!WQ1($))return!0;return!1}return!1};function XH4($){return $.code==="ERR_HTTP2_STREAM_ERROR"&&$.message.includes("NGHTTP2_REFUSED_STREAM")}dV6.isBrowserNetworkError=fH4;dV6.isClockSkewCorrectedError=uH4;dV6.isClockSkewError=iV6;dV6.isNodeJsHttp2TransientError=XH4;dV6.isRetryableByTrait=$H4;dV6.isServerError=cV6;dV6.isThrottlingError=lV6;dV6.isTransientError=WQ1});var ZB=i((Qb6)=>{var eV6=GQ1();Qb6.RETRY_MODES=void 0;(function($){$.STANDARD="standard",$.ADAPTIVE="adaptive"})(Qb6.RETRY_MODES||(Qb6.RETRY_MODES={}));var sN0=3,$b6=Qb6.RETRY_MODES.STANDARD;class eN0{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor($){this.beta=$?.beta??0.7,this.minCapacity=$?.minCapacity??1,this.minFillRate=$?.minFillRate??0.5,this.scaleConstant=$?.scaleConstant??0.4,this.smooth=$?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate($){let u;this.updateMeasuredRate();let f=$;if(f?.errorType==="THROTTLING"||eV6.isThrottlingError(f?.error??$)){let w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),u=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),u=this.cubicSuccess(this.getCurrentTimeInSeconds());let J=Math.min(u,2*this.measuredTxRate);this.updateTokenBucketRate(J)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket($){if(!this.enabled)return;if(this.refillTokenBucket(),$>this.availableTokens){let u=($-this.availableTokens)/this.fillRate*1000;await new Promise((f)=>eN0.setTimeoutFn(f,u))}this.availableTokens=this.availableTokens-$}refillTokenBucket(){let $=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=$;return}let u=($-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+u),this.lastTimestamp=$}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle($){return this.getPrecise($*this.beta)}cubicSuccess($){return this.getPrecise(this.scaleConstant*Math.pow($-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate($){this.refillTokenBucket(),this.fillRate=Math.max($,this.minFillRate),this.maxCapacity=Math.max($,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let $=this.getCurrentTimeInSeconds(),u=Math.floor($*2)/2;if(this.requestCount++,u>this.lastTxRateBucket){let f=this.requestCount/(u-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=u}}getPrecise($){return parseFloat($.toFixed(8))}}var ub6=100,BQ1=20000,fb6=500,FQ1=500,Xb6=5,Jb6=10,JH4=1,wb6="amz-sdk-invocation-id",Eb6="amz-sdk-request";class lX{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return lX.v2026?50:100}static throttlingDelay(){return lX.v2026?1000:500}static cost(){return lX.v2026?14:5}static throttlingCost(){return lX.v2026?5:10}static modifiedCostType(){return lX.v2026?"THROTTLING":"TRANSIENT"}}class wH4{x=lX.delay();computeNextBackoffDelay($){let u=Math.random(),f=2,X=u*Math.min(this.x*2**$,BQ1);return Math.floor(X)}setDelayBase($){this.x=$}}class vQ1{delay;count;cost;longPoll;constructor($,u,f,X){this.delay=$,this.count=u,this.cost=f,this.longPoll=X}getRetryCount(){return this.count}getRetryDelay(){return Math.min(BQ1,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var oN0={incompatible:1,attempts:2,capacity:3};class iu0{mode=Qb6.RETRY_MODES.STANDARD;capacity=FQ1;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor($){if(typeof $==="number")this.maxAttemptsProvider=async()=>$;else if(typeof $==="function")this.maxAttemptsProvider=$;else if($&&typeof $==="object")this.maxAttemptsProvider=async()=>$.maxAttempts,this.baseDelay=$.baseDelay,this.retryBackoffStrategy=$.backoff;this.maxAttemptsProvider??=async()=>sN0,this.baseDelay??=lX.delay(),this.retryBackoffStrategy??=new wH4}async acquireInitialRetryToken($){return new vQ1(lX.delay(),0,void 0,lX.v2026&&$.includes(":longpoll"))}async refreshRetryTokenForRetry($,u){let f=await this.getMaxAttempts(),X=this.retryCode($,u,f),J=X===0,w=$.isLongPoll?.();if(J||w){let E=u.errorType;this.retryBackoffStrategy.setDelayBase(E==="THROTTLING"?lX.throttlingDelay():this.baseDelay);let Q=this.retryBackoffStrategy.computeNextBackoffDelay($.getRetryCount()),Y=Q;if(u.retryAfterHint instanceof Date)Y=Math.max(Q,Math.min(u.retryAfterHint.getTime()-Date.now(),Q+5000));if(!J)throw Object.assign(Error("No retry token available"),{$backoff:lX.v2026&&X===oN0.capacity&&w?Y:0});else{let Z=this.getCapacityCost(E);return this.capacity-=Z,new vQ1(Y,$.getRetryCount()+1,Z,$.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess($){this.capacity=Math.min(FQ1,this.capacity+($.getRetryCost()??JH4))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch($){return console.warn(`Max attempts provider could not resolve. Using default of ${sN0}`),sN0}}retryCode($,u,f){let X=$.getRetryCount()+1,J=this.isRetryableError(u.errorType)?0:oN0.incompatible,w=X<f?0:oN0.attempts,E=this.capacity>=this.getCapacityCost(u.errorType)?0:oN0.capacity;return J||w||E}getCapacityCost($){return $===lX.modifiedCostType()?lX.throttlingCost():lX.cost()}isRetryableError($){return $==="THROTTLING"||$==="TRANSIENT"}}class EH4{mode=Qb6.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor($,u){let{rateLimiter:f}=u??{};this.rateLimiter=f??new eN0,this.standardRetryStrategy=u?new iu0({maxAttempts:typeof $==="number"?$:3,...u}):new iu0($)}async acquireInitialRetryToken($){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken($)}async refreshRetryTokenForRetry($,u){return this.rateLimiter.updateClientSendingRate(u),this.standardRetryStrategy.refreshRetryTokenForRetry($,u)}recordSuccess($){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess($)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class QH4 extends iu0{computeNextBackoffDelay;constructor($,u=lX.delay()){super(typeof $==="function"?$:async()=>$);if(typeof u==="number")this.computeNextBackoffDelay=()=>u;else this.computeNextBackoffDelay=u}async refreshRetryTokenForRetry($,u){let f=await super.refreshRetryTokenForRetry($,u);return f.getRetryDelay=()=>this.computeNextBackoffDelay(f.getRetryCount()),f}}Qb6.AdaptiveRetryStrategy=EH4;Qb6.ConfiguredRetryStrategy=QH4;Qb6.DEFAULT_MAX_ATTEMPTS=sN0;Qb6.DEFAULT_RETRY_DELAY_BASE=ub6;Qb6.DEFAULT_RETRY_MODE=$b6;Qb6.DefaultRateLimiter=eN0;Qb6.INITIAL_RETRY_TOKENS=FQ1;Qb6.INVOCATION_ID_HEADER=wb6;Qb6.MAXIMUM_RETRY_DELAY=BQ1;Qb6.NO_RETRY_INCREMENT=JH4;Qb6.REQUEST_HEADER=Eb6;Qb6.RETRY_COST=Xb6;Qb6.Retry=lX;Qb6.StandardRetryStrategy=iu0;Qb6.THROTTLING_RETRY_DELAY_BASE=fb6;Qb6.TIMEOUT_RETRY_COST=Jb6});var Zf=i((qb6)=>{var Pb6=ZB(),UQ1={warningEmitted:!1},Lb6=($)=>{if($&&!UQ1.warningEmitted&&parseInt($.substring(1,$.indexOf(".")))<20)UQ1.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
75144
75144
|
no longer support Node.js ${$} in January 2026.
|
|
75145
75145
|
|
|
75146
75146
|
To continue receiving updates to AWS services, bug fixes, and security
|