@lobu/runtime-server 22.0.0 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalogs/connectors.json +1448 -212
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +15 -2
- package/dist/connectors/google_gmail.ts +1 -0
- package/dist/connectors/jira-helpers.ts +313 -0
- package/dist/connectors/jira.ts +29 -221
- package/dist/connectors/linkedin-browser-script.ts +13 -0
- package/dist/connectors/linkedin-draft-page.js +104 -0
- package/dist/connectors/linkedin-drafts.ts +73 -0
- package/dist/connectors/linkedin-identity.ts +32 -0
- package/dist/connectors/linkedin-inbox-adapter.js +1182 -0
- package/dist/connectors/linkedin-inbox.ts +156 -0
- package/dist/connectors/linkedin-like.ts +114 -0
- package/dist/connectors/linkedin-takeout.ts +577 -0
- package/dist/connectors/linkedin.ts +4017 -0
- package/dist/connectors/reddit.ts +92 -20
- package/dist/connectors/slack.ts +1 -0
- package/dist/connectors/takeout-utils.ts +240 -0
- package/dist/connectors/tiktok-inbox-page.js +9 -9
- package/dist/connectors/tiktok-web-page.js +21 -15
- package/dist/connectors/tiktok_web.ts +63 -30
- package/dist/connectors/whatsapp-web-adapter.js +104 -574
- package/dist/connectors/whatsapp-web-helpers.ts +30 -444
- package/dist/connectors/whatsapp-web-identity.ts +20 -6
- package/dist/connectors/whatsapp_web.ts +46 -646
- package/dist/connectors/x-dm-adapter.js +556 -0
- package/dist/connectors/x-identity.ts +33 -2
- package/dist/connectors/x.ts +266 -120
- package/dist/db/migrations/20261017120000_drop_feeds_kind_virtual.sql +26 -0
- package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -0
- package/dist/db/migrations/20261019120000_retire_identities_of_deleted_entities.sql +21 -0
- package/dist/db/migrations/20261020120000_entities_live_metadata_domain.sql +66 -0
- package/dist/db/migrations/20261020130000_agents_starters.sql +14 -0
- package/dist/db/migrations/20261020140000_view_attachments_by_page.sql +71 -0
- package/dist/dependencies.bun.lock +78 -75
- package/dist/guest.bundle.js +650 -448
- package/dist/owletto/dist/assets/_-CC8cTmRg.js +3 -0
- package/dist/owletto/dist/assets/_-ksFp4zVf.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DWUFSrVp.js +2 -0
- package/dist/owletto/dist/assets/_agentId-MENLoohA.js +2 -0
- package/dist/owletto/dist/assets/_automationId-BnHqdXOC.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CefXIqy2.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-C1QPGf9E.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-DinuPCUp.js +2 -0
- package/dist/owletto/dist/assets/{_deploymentId-BQfYN1U2.js → _deploymentId-BeyzVjRm.js} +2 -2
- package/dist/owletto/dist/assets/_eventId-3L_qeL_l.js +2 -0
- package/dist/owletto/dist/assets/_name-Dgedji78.js +2 -0
- package/dist/owletto/dist/assets/_owner-DbrKma4e.js +3 -0
- package/dist/owletto/dist/assets/_shape-DtVfRFz_.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-CqLHzm7L.js +2 -0
- package/dist/owletto/dist/assets/_slug-ndDr_CUg.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-3CH5w8mr.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-DHQY9A8u.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-D3OgJG4i.js → accept-invitation-CRKbM2Xy.js} +2 -2
- package/dist/owletto/dist/assets/activity-route-view-CFLNukhD.js +2 -0
- package/dist/owletto/dist/assets/{agent-card-controls-DzRs4Ix9.js → agent-card-controls-Be1Okb2C.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-B2SvH7xD.js → agent-client-setup-list-BA8dU_C6.js} +2 -2
- package/dist/owletto/dist/assets/agent-connect-pages-CAV-yXus.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-Bi6WvYX-.js +2 -0
- package/dist/owletto/dist/assets/{agent-guardrails-route-BaV1VpDh.js → agent-guardrails-route-DMOjG1D4.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-CtZJM2Gc.js → agent-loading-shells-De_2d8Lr.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-Ds48KFK9.js → agent-permissions-matrix-gZWl6mAe.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-DPk5r08w.js → agent-skill-context-JLaTamGR.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skills-route-DYpB5H1J.js → agent-skills-route-DcK41PWj.js} +2 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-BBJoyTuC.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-Buz3naVF.js +6 -0
- package/dist/owletto/dist/assets/agents-C-ReckCa.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-CqaKGggb.js +2 -0
- package/dist/owletto/dist/assets/app._appId-Cl1fTuIt.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-BMLL4lxO.js +2 -0
- package/dist/owletto/dist/assets/automations-C-ReckCa.js +2 -0
- package/dist/owletto/dist/assets/callback-DTKKsfkz.js +2 -0
- package/dist/owletto/dist/assets/{card-DIF8SF9b.js → card-yU0TmNRH.js} +2 -2
- package/dist/owletto/dist/assets/{claim-DELEa-gH.js → claim-DJfTvlT2.js} +2 -2
- package/dist/owletto/dist/assets/client-rows--FrZfJol.js +2 -0
- package/dist/owletto/dist/assets/{clients-CpG676mg.js → clients-L4K1UT8c.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-V27Z4o3P.js → code-editor-U54Gwjit.js} +2 -2
- package/dist/owletto/dist/assets/connect-4zqtnDHb.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-Dj0SqgbE.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-sgtocSvf.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-DTpSW1Xy.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-h9X5H1x8.js +2 -0
- package/dist/owletto/dist/assets/{connection-DySpRE9x.js → connection-ByvKkyFm.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-C_D68j6d.js → connection-feed-detail-DWM9lTao.js} +2 -2
- package/dist/owletto/dist/assets/connections-browser-CEwYrYqt.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-CNXtzYg5.js → connector-provenance-BocTm__v.js} +2 -2
- package/dist/owletto/dist/assets/connector-scope-lists-OYDOydtz.js +2 -0
- package/dist/owletto/dist/assets/connectors-CyZpcE5f.js +2 -0
- package/dist/owletto/dist/assets/{consent-BVzxrAO9.js → consent-DdfINrVp.js} +2 -2
- package/dist/owletto/dist/assets/{conversations-table-DfZGICl7.js → conversations-table-BSznfdYt.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-DiTpULFl.js → core.esm-Dr7tcIB-.js} +2 -2
- package/dist/owletto/dist/assets/create-CBGwASon.js +2 -0
- package/dist/owletto/dist/assets/create-Cf5hp6Z8.js +2 -0
- package/dist/owletto/dist/assets/create-CwThQtd3.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-9T5WnoUs.js +3 -0
- package/dist/owletto/dist/assets/create._connectorKey-sNHQHNpg.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-DPXl0qA2.js → cronstrue-BWFEyy_P.js} +2 -2
- package/dist/owletto/dist/assets/deployments-DHh9dyzv.js +2 -0
- package/dist/owletto/dist/assets/{deployments-body-D6TAWs_6.js → deployments-body-2xKS8gRo.js} +2 -2
- package/dist/owletto/dist/assets/{deployments-DCQdFdwG.js → deployments-wG_8QzOF.js} +2 -2
- package/dist/owletto/dist/assets/{device-CntqYW65.js → device-6z-xgsoW.js} +2 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-Cwq88RMU.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-BDerBfD9.js +2 -0
- package/dist/owletto/dist/assets/entity-avatar-Cc1CuI-0.js +2 -0
- package/dist/owletto/dist/assets/entity-options-DHdMC1Lx.js +2 -0
- package/dist/owletto/dist/assets/entity-page--OkXmlNP.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-89RoK_-P.js +2 -0
- package/dist/owletto/dist/assets/event-detail-D4YZRtrA.js +2 -0
- package/dist/owletto/dist/assets/events-feed-DsrkV2ix.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-B1_QUpg_.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-KpV2FS2u.js → full-page-spinner-Cqih-8IW.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-B8Rs1be3.js +2 -0
- package/dist/owletto/dist/assets/identity-B0nH4yiC.js +2 -0
- package/dist/owletto/dist/assets/index-4TSkcsth.js +2 -0
- package/dist/owletto/dist/assets/index-BSH07yVD.css +1 -0
- package/dist/owletto/dist/assets/index-BgkhXElB.js +2 -0
- package/dist/owletto/dist/assets/index-CoW4Bz3w.js +2 -0
- package/dist/owletto/dist/assets/index-Codw-Qqi.js +2 -0
- package/dist/owletto/dist/assets/{index-BNh2cidi.js → index-DAOyXG1X.js} +2 -2
- package/dist/owletto/dist/assets/{index-BEvyBdOU.js → index-DKPwCasf.js} +2 -2
- package/dist/owletto/dist/assets/index-DMyXd3bJ.js +2 -0
- package/dist/owletto/dist/assets/index-DYCqXaMf.js +7950 -0
- package/dist/owletto/dist/assets/index-DYYZLcJ0.js +2 -0
- package/dist/owletto/dist/assets/index-DYzWV5_z.js +2 -0
- package/dist/owletto/dist/assets/index-Da6CrGEu.js +2 -0
- package/dist/owletto/dist/assets/{index-DCdkwg9H.js → index-DfyDUpuI.js} +2 -2
- package/dist/owletto/dist/assets/index-DneshLbf.js +2 -0
- package/dist/owletto/dist/assets/index-TgRS2v_F.js +2 -0
- package/dist/owletto/dist/assets/{index-BJXkc60S.js → index-ZNlrDc_f.js} +2 -2
- package/dist/owletto/dist/assets/{json-diff-D_Ym3Uku.js → json-diff-DFvYINBT.js} +3 -3
- package/dist/owletto/dist/assets/{list-skeleton-Bl0OS39L.js → list-skeleton-DFsEqLU1.js} +2 -2
- package/dist/owletto/dist/assets/login-DO0j-AYr.js +2 -0
- package/dist/owletto/dist/assets/{logout-DUccApuZ.js → logout-BmNwoAf7.js} +2 -2
- package/dist/owletto/dist/assets/member-scope-gate-B2LrMWBU.js +2 -0
- package/dist/owletto/dist/assets/memory-browse-page-Cjpl8EbB.js +103 -0
- package/dist/owletto/dist/assets/{model-selector-CB1BDvlW.js → model-selector-TQcA93xm.js} +2 -2
- package/dist/owletto/dist/assets/models-D7aED5Sa.js +2 -0
- package/dist/owletto/dist/assets/new-BMrFy5Qa.js +2 -0
- package/dist/owletto/dist/assets/{new-B5UsLiy6.js → new-ByBhteWA.js} +2 -2
- package/dist/owletto/dist/assets/new-DWp3deoW.js +2 -0
- package/dist/owletto/dist/assets/{oauth-workspace-access-PGyTnW2K.js → oauth-workspace-access-D_5uESuz.js} +2 -2
- package/dist/owletto/dist/assets/{organization-BH8PYlVu.js → organization-DTFoYP4V.js} +2 -2
- package/dist/owletto/dist/assets/peek-pane-content-DF5iGC3c.js +2 -0
- package/dist/owletto/dist/assets/{permissions-CwN_YP3u.js → permissions-C_auqxfP.js} +2 -2
- package/dist/owletto/dist/assets/proposal-review-shell-DsNiavG_.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-B2NUI89V.js +2 -0
- package/dist/owletto/dist/assets/{recent-DqdZE_TI.js → recent-3d99S2IE.js} +2 -2
- package/dist/owletto/dist/assets/record-activity-C9KfBkXb.js +2 -0
- package/dist/owletto/dist/assets/record-field-peek-BBZcRuGT.js +2 -0
- package/dist/owletto/dist/assets/record-session-BizRugWs.js +2 -0
- package/dist/owletto/dist/assets/{reset-password-DAvBYkiI.js → reset-password-DqfcSn8M.js} +2 -2
- package/dist/owletto/dist/assets/runs-panel-T1ZxTVz6.js +2 -0
- package/dist/owletto/dist/assets/runs-table-D_8QlCCN.js +2 -0
- package/dist/owletto/dist/assets/schema-value-normalization-CylKX3PK.js +97 -0
- package/dist/owletto/dist/assets/settings-B_ClYztB.js +2 -0
- package/dist/owletto/dist/assets/settings-DgX1-xo7.js +2 -0
- package/dist/owletto/dist/assets/skills-Drw5tcZw.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-CRIPMWfN.js → source-record-panels-Cg249m1S.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-DqEykWl_.js → use-mention-search-BYbFvHbJ.js} +2 -2
- package/dist/owletto/dist/assets/view-param-filters-DMSqkN2J.js +2 -0
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +14031 -12680
- package/npm-shrinkwrap.json +329 -313
- package/package.json +6 -5
- package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
- package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
- package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
- package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
- package/vendor/connector-sdk/dist/connector-types.d.ts +10 -0
- package/vendor/connector-sdk/dist/index.d.ts +3 -0
- package/vendor/connector-sdk/dist/index.js +2 -0
- package/vendor/connector-sdk/package.json +9 -1
- package/vendor/core/dist/agent-policy.js +0 -3
- package/vendor/core/dist/agent-tooling.d.ts +1 -1
- package/vendor/core/dist/agent-tooling.js +3 -1
- package/vendor/core/dist/capabilities.d.ts +1 -1
- package/vendor/core/dist/capabilities.js +0 -1
- package/vendor/core/dist/connector-query-errors.d.ts +32 -0
- package/vendor/core/dist/connector-query-errors.js +41 -1
- package/vendor/core/dist/contracts/agent-settings.d.ts +6 -2
- package/vendor/core/dist/contracts/agent-settings.js +12 -1
- package/vendor/core/dist/contracts/tools/manage-conversations.js +2 -2
- package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +53 -234
- package/vendor/core/dist/contracts/tools/manage-views.js +50 -76
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +5 -8
- package/vendor/core/dist/contracts/tools/view-attach.js +14 -31
- package/vendor/core/dist/contracts/tools/view-definition.d.ts +21 -0
- package/vendor/core/dist/contracts/tools/view-definition.js +165 -0
- package/vendor/core/dist/contracts/worker/protocol.d.ts +47 -133
- package/vendor/core/dist/contracts/worker/protocol.js +33 -62
- package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
- package/vendor/core/dist/device-pin-tombstones.js +57 -0
- package/vendor/core/dist/index.d.ts +3 -2
- package/vendor/core/dist/index.js +3 -1
- package/vendor/core/dist/logger.js +10 -25
- package/vendor/core/dist/suggestions.d.ts +15 -2
- package/vendor/core/dist/suggestions.js +48 -3
- package/vendor/core/dist/types.d.ts +26 -0
- package/vendor/core/dist/types.js +5 -0
- package/vendor/core/dist/utils/diagnostic-scrubber.js +258 -21
- package/vendor/core/dist/worker/wire.d.ts +0 -10
- package/vendor/core/package.json +16 -10
- package/vendor/postgres/cf/src/connection.js +18 -0
- package/vendor/postgres/cjs/src/connection.js +18 -0
- package/vendor/postgres/src/connection.js +18 -0
- package/vendor/views/dist/api.d.ts +71 -17
- package/vendor/views/dist/api.js +200 -35
- package/vendor/views/dist/bridge.d.ts +3 -0
- package/vendor/views/dist/bridge.js +9 -1
- package/vendor/views/dist/components.d.ts +170 -0
- package/vendor/views/dist/components.js +361 -0
- package/vendor/views/dist/index.d.ts +1 -1
- package/vendor/views/package.json +11 -1
- package/dist/owletto/dist/assets/_-CEPl6gU4.js +0 -3
- package/dist/owletto/dist/assets/_-C_zNZben.js +0 -2
- package/dist/owletto/dist/assets/_agentId-CBC_SadO.js +0 -2
- package/dist/owletto/dist/assets/_agentId-QQW91cHX.js +0 -2
- package/dist/owletto/dist/assets/_automationId-YTTNksw6.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-fK0h7RAp.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-C7TPS598.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-CEhxlTIo.js +0 -2
- package/dist/owletto/dist/assets/_eventId-Cl8GSdjg.js +0 -2
- package/dist/owletto/dist/assets/_name-t3oBJ6Zf.js +0 -2
- package/dist/owletto/dist/assets/_owner-cUtGHqSw.js +0 -3
- package/dist/owletto/dist/assets/_shape-bo2lMVCu.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-Dwm4Q4wI.js +0 -2
- package/dist/owletto/dist/assets/_slug-CU1PuHB9.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-Bh6E_NxA.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-D4jKl-Zf.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-DQglkhXU.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-B6uKvT_X.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-oUnIYHd7.js +0 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-B3K_jPYR.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-C8UaUTWc.js +0 -6
- package/dist/owletto/dist/assets/agents-F4mGI2oF.js +0 -2
- package/dist/owletto/dist/assets/agents-workbench-CMyk4PI7.js +0 -2
- package/dist/owletto/dist/assets/app._appId-DH1Qutz6.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-CEDNboId.js +0 -2
- package/dist/owletto/dist/assets/automations-F4mGI2oF.js +0 -2
- package/dist/owletto/dist/assets/callback-CU-hb8JB.js +0 -2
- package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +0 -2
- package/dist/owletto/dist/assets/connect-B2YL6qIK.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-B6LDmDRV.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-D_HaKoI1.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-DQWcUqKM.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.index-BC3R303A.js +0 -2
- package/dist/owletto/dist/assets/connections-browser-Cnv2iBbZ.js +0 -2
- package/dist/owletto/dist/assets/connector-scope-lists-BKDetNDc.js +0 -2
- package/dist/owletto/dist/assets/connectors-BJnk1z_2.js +0 -2
- package/dist/owletto/dist/assets/create-CUqO6Kfk.js +0 -2
- package/dist/owletto/dist/assets/create-JRFM8mMf.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-_4vUkrls.js +0 -3
- package/dist/owletto/dist/assets/create-iHcxV0xd.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-CCYLEicg.js +0 -2
- package/dist/owletto/dist/assets/deployments-ihkhK1zV.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-Bz4JHHMK.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-D4plO3GM.js +0 -2
- package/dist/owletto/dist/assets/entity-options-UJs64GdQ.js +0 -2
- package/dist/owletto/dist/assets/entity-page-Djz6T50J.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-OznRag6A.js +0 -2
- package/dist/owletto/dist/assets/event-detail-04qOUGIP.js +0 -2
- package/dist/owletto/dist/assets/events-feed-fucGZSJR.js +0 -2
- package/dist/owletto/dist/assets/filter-editors-DCQgGLyR.js +0 -2
- package/dist/owletto/dist/assets/guardrails-molekzAF.js +0 -2
- package/dist/owletto/dist/assets/identity-BJcaG66g.js +0 -2
- package/dist/owletto/dist/assets/index-B04ON9Jv.js +0 -2
- package/dist/owletto/dist/assets/index-BLEcy9-T.css +0 -1
- package/dist/owletto/dist/assets/index-BOsK-K-2.js +0 -2
- package/dist/owletto/dist/assets/index-BOzuAbvi.js +0 -2
- package/dist/owletto/dist/assets/index-Bk1x7A67.js +0 -2
- package/dist/owletto/dist/assets/index-CFnx5huL.js +0 -2
- package/dist/owletto/dist/assets/index-D3s8rhG9.js +0 -2
- package/dist/owletto/dist/assets/index-Dbd1jusf.js +0 -2
- package/dist/owletto/dist/assets/index-DqZuqC08.js +0 -2
- package/dist/owletto/dist/assets/index-Dr-Xg_xO.js +0 -2
- package/dist/owletto/dist/assets/index-KPOvMVa-.js +0 -2
- package/dist/owletto/dist/assets/index-_oPeVpL_.js +0 -7950
- package/dist/owletto/dist/assets/login-QHdxqX-4.js +0 -2
- package/dist/owletto/dist/assets/member-scope-gate-CFbrq1by.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-IrIXuZTF.js +0 -103
- package/dist/owletto/dist/assets/models-DnMb3n-Z.js +0 -2
- package/dist/owletto/dist/assets/new-BWo8_Pms.js +0 -2
- package/dist/owletto/dist/assets/new-DpmDXmFI.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-B2AFNTzP.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-DKKGu4Ww.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-7KYnww6e.js +0 -2
- package/dist/owletto/dist/assets/record-activity-CvgZyCmw.js +0 -2
- package/dist/owletto/dist/assets/renderer-BL6VcwQH.js +0 -97
- package/dist/owletto/dist/assets/runs-BWtc5rmc.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-BO3h5RkS.js +0 -2
- package/dist/owletto/dist/assets/runs-table-DxIiqrSk.js +0 -2
- package/dist/owletto/dist/assets/settings-4Ev-0iNL.js +0 -2
- package/dist/owletto/dist/assets/settings-Crxlwps-.js +0 -2
- package/dist/owletto/dist/assets/skills-D0X430X8.js +0 -2
- package/dist/owletto/dist/assets/status-dot-C5KDvvm9.js +0 -2
- package/dist/owletto/dist/assets/tabs-B4Er9hJj.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-Cylutoy1.js +0 -2
- package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
- package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
- /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { resolveViewHref, useHost } from "./api.js";
|
|
4
|
+
const FONT_STACK = 'var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif)';
|
|
5
|
+
const INK = {
|
|
6
|
+
color: "var(--fg, #0a0a0a)",
|
|
7
|
+
fontFamily: FONT_STACK,
|
|
8
|
+
fontSize: 13,
|
|
9
|
+
lineHeight: 1.45,
|
|
10
|
+
};
|
|
11
|
+
/** Section container: title row, optional description and action slot. */
|
|
12
|
+
export function Card({ title, description, actions, children }) {
|
|
13
|
+
return (_jsxs("section", { style: {
|
|
14
|
+
...INK,
|
|
15
|
+
border: "1px solid var(--border, #e5e7eb)",
|
|
16
|
+
borderRadius: "var(--radius-lg, 8px)",
|
|
17
|
+
padding: "12px 14px",
|
|
18
|
+
background: "transparent",
|
|
19
|
+
}, children: [(title || actions) && (_jsxs("header", { style: {
|
|
20
|
+
display: "flex",
|
|
21
|
+
alignItems: "baseline",
|
|
22
|
+
justifyContent: "space-between",
|
|
23
|
+
gap: 12,
|
|
24
|
+
marginBottom: description || children ? 4 : 0,
|
|
25
|
+
}, children: [title && (_jsx("h3", { style: { margin: 0, fontSize: 14, fontWeight: 600 }, children: title })), actions] })), description && (_jsx("p", { style: { margin: "0 0 8px", color: "var(--muted, #6b7280)" }, children: description })), children] }));
|
|
26
|
+
}
|
|
27
|
+
const CELL = {
|
|
28
|
+
padding: "6px 8px",
|
|
29
|
+
borderBottom: "1px solid var(--border, #e5e7eb)",
|
|
30
|
+
textAlign: "left",
|
|
31
|
+
verticalAlign: "top",
|
|
32
|
+
overflowWrap: "anywhere",
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Server-driven table. The view owns state (page/sort live in `useParams`,
|
|
36
|
+
* rows come from `useQuery`); the table only renders and reports intent.
|
|
37
|
+
* Pass query loading/error state explicitly; render TruncatedNotice beside
|
|
38
|
+
* the table when the query reports partial results.
|
|
39
|
+
*/
|
|
40
|
+
export function DataTable({ columns, rows, keyOf, loading = false, error = null, onRetry, emptyText = "No rows.", sort, onSort, pagination, caption, }) {
|
|
41
|
+
const labelId = useId();
|
|
42
|
+
const pageCount = pagination && pagination.total != null
|
|
43
|
+
? Math.max(1, Math.ceil(pagination.total / pagination.pageSize))
|
|
44
|
+
: null;
|
|
45
|
+
return (_jsxs("div", { style: INK, children: [caption && (_jsx("p", { id: labelId, style: { margin: "0 0 6px", color: "var(--muted, #6b7280)" }, children: caption })), _jsx("div", { style: { overflowX: "auto" }, children: _jsxs("table", { "aria-labelledby": caption ? labelId : undefined, style: { borderCollapse: "collapse", width: "100%" }, children: [_jsx("thead", { children: _jsx("tr", { children: columns.map((col) => (_jsx("th", { "aria-sort": sort?.key === col.key
|
|
46
|
+
? sort.dir === "asc"
|
|
47
|
+
? "ascending"
|
|
48
|
+
: "descending"
|
|
49
|
+
: undefined, style: {
|
|
50
|
+
...CELL,
|
|
51
|
+
fontWeight: 600,
|
|
52
|
+
whiteSpace: "nowrap",
|
|
53
|
+
textAlign: col.align ?? "left",
|
|
54
|
+
}, children: col.sortable && onSort ? (_jsxs("button", { type: "button", onClick: () => onSort(col.key), title: `Sort by ${col.header}`, style: {
|
|
55
|
+
border: 0,
|
|
56
|
+
padding: 0,
|
|
57
|
+
background: "transparent",
|
|
58
|
+
font: "inherit",
|
|
59
|
+
cursor: "pointer",
|
|
60
|
+
color: "var(--accent, #2563eb)",
|
|
61
|
+
}, children: [col.header, sort?.key === col.key
|
|
62
|
+
? sort.dir === "asc"
|
|
63
|
+
? " ▲"
|
|
64
|
+
: " ▼"
|
|
65
|
+
: ""] })) : (col.header) }, col.key))) }) }), _jsx("tbody", { children: rows.map((row, i) => (_jsx("tr", { children: columns.map((col) => (_jsx("td", { style: { ...CELL, textAlign: col.align ?? "left" }, children: col.render
|
|
66
|
+
? col.render(row)
|
|
67
|
+
: String(row[col.key] ?? "") }, col.key))) }, keyOf(row, i)))) })] }) }), loading && _jsx(LoadingState, { text: "Loading rows\u2026" }), error && !loading && _jsx(ErrorState, { message: error, onRetry: onRetry }), !loading && !error && rows.length === 0 && (_jsx(EmptyState, { title: emptyText })), pagination &&
|
|
68
|
+
(pageCount == null || pageCount > 1 || pagination.page > 1) && (_jsxs("nav", { "aria-label": "Table pages", style: {
|
|
69
|
+
display: "flex",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
gap: 8,
|
|
72
|
+
marginTop: 8,
|
|
73
|
+
}, children: [_jsx(PageButton, { disabled: pagination.page <= 1, onClick: () => pagination.onPage(pagination.page - 1), label: "Previous page" }), _jsxs("span", { style: { color: "var(--muted, #6b7280)" }, children: ["Page ", pagination.page, pageCount != null ? ` of ${pageCount}` : ""] }), _jsx(PageButton, { disabled: pageCount == null
|
|
74
|
+
? rows.length < pagination.pageSize
|
|
75
|
+
: pagination.page >= pageCount, onClick: () => pagination.onPage(pagination.page + 1), label: "Next page" })] }))] }));
|
|
76
|
+
}
|
|
77
|
+
function PageButton({ disabled, onClick, label, }) {
|
|
78
|
+
return (_jsx("button", { type: "button", disabled: disabled, onClick: onClick, "aria-label": label, style: {
|
|
79
|
+
cursor: disabled ? "default" : "pointer",
|
|
80
|
+
opacity: disabled ? 0.45 : 1,
|
|
81
|
+
border: "1px solid var(--border, #e5e7eb)",
|
|
82
|
+
borderRadius: "var(--radius, 6px)",
|
|
83
|
+
background: "transparent",
|
|
84
|
+
color: "var(--fg, #0a0a0a)",
|
|
85
|
+
padding: "2px 10px",
|
|
86
|
+
font: "inherit",
|
|
87
|
+
}, children: label === "Previous page" ? "‹ Prev" : "Next ›" }));
|
|
88
|
+
}
|
|
89
|
+
/* ------------------------------------------------------------------ */
|
|
90
|
+
/* Filters */
|
|
91
|
+
/* ------------------------------------------------------------------ */
|
|
92
|
+
/** Layout row for filter controls; wrap `SearchField`/`SelectField`. */
|
|
93
|
+
export function FilterBar({ children }) {
|
|
94
|
+
return (_jsx("search", { style: {
|
|
95
|
+
display: "flex",
|
|
96
|
+
flexWrap: "wrap",
|
|
97
|
+
alignItems: "end",
|
|
98
|
+
gap: 8,
|
|
99
|
+
marginBottom: 8,
|
|
100
|
+
}, children: children }));
|
|
101
|
+
}
|
|
102
|
+
const FIELD_LABEL = {
|
|
103
|
+
display: "block",
|
|
104
|
+
fontSize: 12,
|
|
105
|
+
color: "var(--muted, #6b7280)",
|
|
106
|
+
marginBottom: 2,
|
|
107
|
+
};
|
|
108
|
+
const FIELD_BOX = {
|
|
109
|
+
border: "1px solid var(--border, #e5e7eb)",
|
|
110
|
+
borderRadius: "var(--radius, 6px)",
|
|
111
|
+
background: "transparent",
|
|
112
|
+
color: "var(--fg, #0a0a0a)",
|
|
113
|
+
padding: "4px 8px",
|
|
114
|
+
font: "inherit",
|
|
115
|
+
maxWidth: "100%",
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Controlled search box. The view owns the value (usually a `useParams`
|
|
119
|
+
* entry); pushing every keystroke into params re-renders the whole view, so
|
|
120
|
+
* debounce at the call site when the backing query is expensive.
|
|
121
|
+
*/
|
|
122
|
+
export function SearchField({ label = "Search", value, onChange, placeholder = "", }) {
|
|
123
|
+
const id = useId();
|
|
124
|
+
return (_jsxs("label", { style: { ...INK, display: "block" }, children: [_jsx("span", { style: FIELD_LABEL, children: label }), _jsx("input", { id: id, type: "search", value: value, placeholder: placeholder, onChange: (e) => onChange(e.target.value), style: { ...FIELD_BOX, minWidth: 180 } })] }));
|
|
125
|
+
}
|
|
126
|
+
/** Controlled select. `value === ""` means "no filter". */
|
|
127
|
+
export function SelectField({ label, value, options, onChange, }) {
|
|
128
|
+
const id = useId();
|
|
129
|
+
return (_jsxs("label", { style: { ...INK, display: "block" }, children: [_jsx("span", { style: FIELD_LABEL, children: label }), _jsxs("select", { id: id, value: value, onChange: (e) => onChange(e.target.value), style: FIELD_BOX, children: [_jsx("option", { value: "", children: "All" }), options.map((o) => (_jsx("option", { value: o.value, children: o.label }, o.value)))] })] }));
|
|
130
|
+
}
|
|
131
|
+
const CHART_BAR = "var(--accent, #2563eb)";
|
|
132
|
+
const CHART_GRID = "var(--border, #e5e7eb)";
|
|
133
|
+
const CHART_TEXT = "var(--muted, #6b7280)";
|
|
134
|
+
function niceMax(value) {
|
|
135
|
+
if (!Number.isFinite(value) || value <= 0)
|
|
136
|
+
return 1;
|
|
137
|
+
const power = 10 ** Math.floor(Math.log10(value));
|
|
138
|
+
const scaled = value / power;
|
|
139
|
+
const nice = scaled <= 1 ? 1 : scaled <= 2 ? 2 : scaled <= 5 ? 5 : 10;
|
|
140
|
+
return nice * power;
|
|
141
|
+
}
|
|
142
|
+
const CHART_FALLBACK_WIDTH = 320;
|
|
143
|
+
/** Width of the chart's own box, so the SVG draws at its real size instead of
|
|
144
|
+
* letterboxing a fixed viewBox inside a wider card. */
|
|
145
|
+
function useChartWidth() {
|
|
146
|
+
const ref = useRef(null);
|
|
147
|
+
const [width, setWidth] = useState(CHART_FALLBACK_WIDTH);
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
const el = ref.current;
|
|
150
|
+
if (!el || typeof ResizeObserver === "undefined")
|
|
151
|
+
return;
|
|
152
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
153
|
+
const next = Math.round(entry.contentRect.width);
|
|
154
|
+
if (next > 0)
|
|
155
|
+
setWidth(next);
|
|
156
|
+
});
|
|
157
|
+
observer.observe(el);
|
|
158
|
+
return () => observer.disconnect();
|
|
159
|
+
}, []);
|
|
160
|
+
return [ref, width];
|
|
161
|
+
}
|
|
162
|
+
function ChartFrame({ title, width, height, frameRef, children, labelledBy, }) {
|
|
163
|
+
return (_jsxs("figure", { ref: frameRef, style: { ...INK, margin: 0 }, children: [title && (_jsx("figcaption", { id: labelledBy, style: { fontWeight: 600, marginBottom: 4 }, children: title })), _jsx("svg", { role: "img", "aria-labelledby": title ? labelledBy : undefined, "aria-label": title ? undefined : "Chart", viewBox: `0 0 ${width} ${height}`, width: "100%", height: height, style: { display: "block" }, children: children })] }));
|
|
164
|
+
}
|
|
165
|
+
/** Vertical bars. Values must already be aggregated — views cannot aggregate history. */
|
|
166
|
+
export function BarChart({ data, title, height = 180, formatValue = (v) => String(v), }) {
|
|
167
|
+
const id = useId();
|
|
168
|
+
const [frameRef, width] = useChartWidth();
|
|
169
|
+
const max = niceMax(Math.max(0, ...data.map((d) => d.value)));
|
|
170
|
+
const min = Math.min(0, ...data.map((d) => d.value));
|
|
171
|
+
const padL = 44;
|
|
172
|
+
const padB = 22;
|
|
173
|
+
const padT = 6;
|
|
174
|
+
const w = width - padL - 8;
|
|
175
|
+
const h = height - padT - padB;
|
|
176
|
+
const y = (value) => padT + h - ((value - min) / (max - min)) * h;
|
|
177
|
+
const zero = y(0);
|
|
178
|
+
const slot = data.length > 0 ? w / data.length : w;
|
|
179
|
+
const bw = Math.max(2, Math.min(28, slot * 0.6));
|
|
180
|
+
return (_jsxs(ChartFrame, { title: title, width: width, height: height, frameRef: frameRef, labelledBy: id, children: [_jsx("line", { x1: padL, y1: padT, x2: padL, y2: padT + h, stroke: CHART_GRID }), _jsx("line", { x1: padL, y1: zero, x2: padL + w, y2: zero, stroke: CHART_GRID }), _jsx("text", { x: padL - 4, y: padT + 8, textAnchor: "end", fontSize: 9, fill: CHART_TEXT, children: formatValue(max) }), _jsx("text", { x: padL - 4, y: padT + h, textAnchor: "end", fontSize: 9, fill: CHART_TEXT, children: formatValue(min) }), data.map((d, i) => {
|
|
181
|
+
const bh = Math.abs(y(d.value) - zero);
|
|
182
|
+
const x = padL + i * slot + (slot - bw) / 2;
|
|
183
|
+
const top = Math.min(y(d.value), zero);
|
|
184
|
+
return (
|
|
185
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Stateless marks allow repeated labels at different positions.
|
|
186
|
+
_jsxs("g", { children: [_jsx("title", { children: `${d.label}: ${formatValue(d.value)}` }), _jsx("rect", { x: x, y: top, width: bw, height: bh, fill: d.color ?? CHART_BAR, rx: 2 }), _jsx("text", { x: x + bw / 2, y: padT + h + 12, textAnchor: "middle", fontSize: 9, fill: CHART_TEXT, children: d.label.length > 10 ? `${d.label.slice(0, 9)}…` : d.label })] }, `${d.label}-${i}`));
|
|
187
|
+
})] }));
|
|
188
|
+
}
|
|
189
|
+
/** Y-axis bounds for a line: include zero by default; `auto` fits the data's
|
|
190
|
+
* own range, for a series whose movement is small next to its level. */
|
|
191
|
+
function lineBounds(values, baseline) {
|
|
192
|
+
if (baseline === "zero" || values.length === 0) {
|
|
193
|
+
return {
|
|
194
|
+
min: Math.min(0, ...values),
|
|
195
|
+
max: niceMax(Math.max(0, ...values)),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
const lo = Math.min(...values);
|
|
199
|
+
const hi = Math.max(...values);
|
|
200
|
+
const pad = (hi - lo) * 0.1 || Math.abs(hi) * 0.05 || 1;
|
|
201
|
+
return { min: lo - pad, max: hi + pad };
|
|
202
|
+
}
|
|
203
|
+
/** The end points sit on the plot's edges, so a centred label there spills
|
|
204
|
+
* past the frame; anchor the first and last labels inward instead. */
|
|
205
|
+
function edgeAnchor(i, count) {
|
|
206
|
+
if (count < 2)
|
|
207
|
+
return "middle";
|
|
208
|
+
if (i === 0)
|
|
209
|
+
return "start";
|
|
210
|
+
return i === count - 1 ? "end" : "middle";
|
|
211
|
+
}
|
|
212
|
+
/** Single-series line over ordered labels. */
|
|
213
|
+
export function LineChart({ data, title, height = 180, baseline = "zero", formatValue = (v) => String(v), }) {
|
|
214
|
+
const id = useId();
|
|
215
|
+
const [frameRef, width] = useChartWidth();
|
|
216
|
+
const values = data.map((d) => d.value);
|
|
217
|
+
const { min, max } = lineBounds(values, baseline);
|
|
218
|
+
const padL = 44;
|
|
219
|
+
const padB = 22;
|
|
220
|
+
const padT = 6;
|
|
221
|
+
const w = width - padL - 8;
|
|
222
|
+
const h = height - padT - padB;
|
|
223
|
+
const span = max - min || 1;
|
|
224
|
+
const x = (i) => data.length < 2 ? padL + w / 2 : padL + (i / (data.length - 1)) * w;
|
|
225
|
+
const y = (v) => padT + h - ((v - min) / span) * h;
|
|
226
|
+
const points = data.map((d, i) => `${x(i)},${y(d.value)}`).join(" ");
|
|
227
|
+
return (_jsxs(ChartFrame, { title: title, width: width, height: height, frameRef: frameRef, labelledBy: id, children: [_jsx("line", { x1: padL, y1: padT, x2: padL, y2: padT + h, stroke: CHART_GRID }), _jsx("line", { x1: padL, y1: padT + h, x2: padL + w, y2: padT + h, stroke: CHART_GRID }), _jsx("text", { x: padL - 4, y: padT + 8, textAnchor: "end", fontSize: 9, fill: CHART_TEXT, children: formatValue(max) }), min !== 0 && (_jsx("text", { x: padL - 4, y: padT + h, textAnchor: "end", fontSize: 9, fill: CHART_TEXT, children: formatValue(min) })), data.length > 0 && (_jsx("polyline", { points: points, fill: "none", stroke: CHART_BAR, strokeWidth: 2, strokeLinejoin: "round" })), data.map((d, i) => (
|
|
228
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Stateless marks allow repeated labels at different positions.
|
|
229
|
+
_jsxs("g", { children: [_jsx("title", { children: `${d.label}: ${formatValue(d.value)}` }), _jsx("circle", { cx: x(i), cy: y(d.value), r: 2.5, fill: CHART_BAR }), data.length <= 8 && (_jsx("text", { x: x(i), y: padT + h + 12, textAnchor: edgeAnchor(i, data.length), fontSize: 9, fill: CHART_TEXT, children: d.label.length > 10 ? `${d.label.slice(0, 9)}…` : d.label }))] }, `${d.label}-${i}`)))] }));
|
|
230
|
+
}
|
|
231
|
+
/** Pie with legend. Cap slices upstream (query limit); the chart renders what it gets. */
|
|
232
|
+
export function PieChart({ data, title, size = 180, formatValue = (v) => String(v), }) {
|
|
233
|
+
const id = useId();
|
|
234
|
+
const total = data.reduce((s, d) => s + (d.value > 0 ? d.value : 0), 0);
|
|
235
|
+
const palette = [
|
|
236
|
+
"#2563eb",
|
|
237
|
+
"#16a34a",
|
|
238
|
+
"#d97706",
|
|
239
|
+
"#dc2626",
|
|
240
|
+
"#7c3aed",
|
|
241
|
+
"#0891b2",
|
|
242
|
+
"#db2777",
|
|
243
|
+
"#65a30d",
|
|
244
|
+
];
|
|
245
|
+
const r = Math.max(0, Math.min(70, size / 2 - 2));
|
|
246
|
+
const cx = 80;
|
|
247
|
+
const cy = size / 2;
|
|
248
|
+
let angle = -Math.PI / 2;
|
|
249
|
+
const slices = data.map((d, i) => {
|
|
250
|
+
const frac = total > 0 ? Math.max(0, d.value) / total : 0;
|
|
251
|
+
const a0 = angle;
|
|
252
|
+
angle += frac * Math.PI * 2;
|
|
253
|
+
const large = frac > 0.5 ? 1 : 0;
|
|
254
|
+
const x0 = cx + r * Math.cos(a0);
|
|
255
|
+
const y0 = cy + r * Math.sin(a0);
|
|
256
|
+
const x1 = cx + r * Math.cos(angle);
|
|
257
|
+
const y1 = cy + r * Math.sin(angle);
|
|
258
|
+
return {
|
|
259
|
+
d,
|
|
260
|
+
i,
|
|
261
|
+
frac,
|
|
262
|
+
path: `M ${cx} ${cy} L ${x0} ${y0} A ${r} ${r} 0 ${large} 1 ${x1} ${y1} Z`,
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
return (_jsxs("figure", { style: { ...INK, margin: 0 }, children: [title && (_jsx("figcaption", { id: id, style: { fontWeight: 600, marginBottom: 4 }, children: title })), _jsxs("div", { style: {
|
|
266
|
+
display: "flex",
|
|
267
|
+
flexWrap: "wrap",
|
|
268
|
+
alignItems: "center",
|
|
269
|
+
gap: 12,
|
|
270
|
+
}, children: [_jsx("svg", { role: "img", "aria-labelledby": title ? id : undefined, "aria-label": title ? undefined : "Pie chart", viewBox: `0 0 160 ${size}`, width: 160, height: size, style: { flexShrink: 0 }, children: total === 0 ? (_jsx("circle", { cx: cx, cy: cy, r: r, fill: "none", stroke: CHART_GRID })) : (slices.map((s) => s.frac === 1 ? (_jsx("circle", { cx: cx, cy: cy, r: r, fill: s.d.color ?? palette[s.i % palette.length], children: _jsx("title", { children: `${s.d.label}: ${formatValue(s.d.value)}` }) }, s.i)) : (_jsx("path", { d: s.path, fill: s.d.color ?? palette[s.i % palette.length], children: _jsx("title", { children: `${s.d.label}: ${formatValue(s.d.value)}` }) }, s.i)))) }), _jsx("ul", { style: { margin: 0, padding: 0, listStyle: "none" }, children: data.map((d, i) => (_jsxs("li", { style: {
|
|
271
|
+
display: "flex",
|
|
272
|
+
alignItems: "center",
|
|
273
|
+
gap: 6,
|
|
274
|
+
marginBottom: 2,
|
|
275
|
+
}, children: [_jsx("span", { "aria-hidden": "true", style: {
|
|
276
|
+
width: 10,
|
|
277
|
+
height: 10,
|
|
278
|
+
borderRadius: 2,
|
|
279
|
+
background: d.color ?? palette[i % palette.length],
|
|
280
|
+
flexShrink: 0,
|
|
281
|
+
} }), _jsxs("span", { children: [d.label, ": ", formatValue(d.value)] })] }, `${d.label}-${i}`))) })] })] }));
|
|
282
|
+
}
|
|
283
|
+
/** Single-series inline trend. Purely presentational — no axes. */
|
|
284
|
+
export function Sparkline({ values, width = 120, height = 32, label, }) {
|
|
285
|
+
const max = Math.max(0, ...values);
|
|
286
|
+
const min = Math.min(0, ...values);
|
|
287
|
+
const span = max - min || 1;
|
|
288
|
+
const x = (i) => values.length < 2 ? width / 2 : (i / (values.length - 1)) * width;
|
|
289
|
+
const y = (v) => height - 2 - ((v - min) / span) * (height - 4);
|
|
290
|
+
return (_jsxs("svg", { role: "img", "aria-label": label ?? "Trend", viewBox: `0 0 ${width} ${height}`, width: width, height: height, style: { display: "block" }, children: [values.length === 1 && (_jsx("circle", { cx: x(0), cy: y(values[0]), r: 1.5, fill: CHART_BAR })), values.length > 1 && (_jsx("polyline", { points: values.map((v, i) => `${x(i)},${y(v)}`).join(" "), fill: "none", stroke: CHART_BAR, strokeWidth: 1.5, strokeLinejoin: "round" }))] }));
|
|
291
|
+
}
|
|
292
|
+
/* ------------------------------------------------------------------ */
|
|
293
|
+
/* Link */
|
|
294
|
+
/* ------------------------------------------------------------------ */
|
|
295
|
+
/**
|
|
296
|
+
* A link the host opens: `href="deal/acme-renewal"` opens that record
|
|
297
|
+
* (relative links resolve against the workspace root, see
|
|
298
|
+
* `useHost().openLink`), a full URL opens a new tab. The sandboxed frame
|
|
299
|
+
* cannot navigate itself, so every click goes through the host, modifier
|
|
300
|
+
* clicks included; the anchor still shows the resolved address on hover.
|
|
301
|
+
*/
|
|
302
|
+
export function Link({ href, children, }) {
|
|
303
|
+
const { openLink } = useHost();
|
|
304
|
+
const open = (event) => {
|
|
305
|
+
event.preventDefault();
|
|
306
|
+
openLink(href).catch((error) => console.error("[lobu-views] link not opened", error));
|
|
307
|
+
};
|
|
308
|
+
return (_jsx("a", { href: resolveViewHref(href), onClick: open, onAuxClick: (event) => {
|
|
309
|
+
if (event.button === 1)
|
|
310
|
+
open(event);
|
|
311
|
+
}, style: { color: "var(--accent, #2563eb)", textDecoration: "none" }, children: children }));
|
|
312
|
+
}
|
|
313
|
+
/* ------------------------------------------------------------------ */
|
|
314
|
+
/* Query states — render `useQuery` honestly */
|
|
315
|
+
/* ------------------------------------------------------------------ */
|
|
316
|
+
export function LoadingState({ text = "Loading…" }) {
|
|
317
|
+
return (_jsx("p", { role: "status", style: { ...INK, color: "var(--muted, #6b7280)" }, children: text }));
|
|
318
|
+
}
|
|
319
|
+
export function EmptyState({ title, hint }) {
|
|
320
|
+
return (_jsxs("div", { style: { ...INK, color: "var(--muted, #6b7280)" }, children: [_jsx("p", { style: { margin: "4px 0" }, children: title }), hint && _jsx("p", { style: { margin: "0 0 4px", fontSize: 12 }, children: hint })] }));
|
|
321
|
+
}
|
|
322
|
+
export function ErrorState({ message, errorCode, onRetry, }) {
|
|
323
|
+
return (_jsxs("div", { role: "alert", style: {
|
|
324
|
+
...INK,
|
|
325
|
+
border: "1px solid var(--border, #e5e7eb)",
|
|
326
|
+
borderRadius: "var(--radius, 6px)",
|
|
327
|
+
padding: "8px 10px",
|
|
328
|
+
}, children: [_jsx("p", { style: { margin: "0 0 4px" }, children: message }), errorCode && (_jsxs("p", { style: {
|
|
329
|
+
margin: "0 0 4px",
|
|
330
|
+
fontSize: 12,
|
|
331
|
+
color: "var(--muted, #6b7280)",
|
|
332
|
+
}, children: ["Code: ", errorCode] })), onRetry && (_jsx("button", { type: "button", onClick: onRetry, style: {
|
|
333
|
+
cursor: "pointer",
|
|
334
|
+
border: "1px solid var(--border, #e5e7eb)",
|
|
335
|
+
borderRadius: "var(--radius, 6px)",
|
|
336
|
+
background: "transparent",
|
|
337
|
+
color: "var(--fg, #0a0a0a)",
|
|
338
|
+
padding: "2px 10px",
|
|
339
|
+
font: "inherit",
|
|
340
|
+
}, children: "Retry" }))] }));
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Honest cap notice: the server answered, but not wholly (`query_sql` 500-row
|
|
344
|
+
* ceiling, `query_sdk` oversized return). Rendered data is partial by
|
|
345
|
+
* construction — narrow the query instead of treating it as complete.
|
|
346
|
+
*/
|
|
347
|
+
export function TruncatedNotice({ shown, total, }) {
|
|
348
|
+
return (_jsxs("p", { style: { ...INK, color: "var(--muted, #6b7280)", fontSize: 12 }, children: ["Showing ", shown, total != null ? ` of ${total}` : "", " rows \u2014 refine filters to see the rest."] }));
|
|
349
|
+
}
|
|
350
|
+
/** Format large counts compactly (1.2K, 3.4M). Plain numbers pass through. */
|
|
351
|
+
export function formatCompact(value) {
|
|
352
|
+
if (!Number.isFinite(value))
|
|
353
|
+
return String(value);
|
|
354
|
+
const abs = Math.abs(value);
|
|
355
|
+
if (abs >= 1_000_000)
|
|
356
|
+
return `${(value / 1_000_000).toFixed(1)}M`;
|
|
357
|
+
if (abs >= 1_000)
|
|
358
|
+
return `${(value / 1_000).toFixed(1)}K`;
|
|
359
|
+
return String(value);
|
|
360
|
+
}
|
|
361
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -9,5 +9,5 @@ export type { AttributeFilter, CollectionSelection, } from "@lobu/core/contracts
|
|
|
9
9
|
export { ViewBridge } from "./bridge.js";
|
|
10
10
|
export type { BridgeOptions, HostContext, ToolResult, ViewHandoff, } from "./bridge.js";
|
|
11
11
|
export { coerceParams, defaultsFor, defineView, escapeLiteral, mintInteractionId, mountView, Provider, sql, tool, useAction, useHost, useParams, useQuery, useScope, } from "./api.js";
|
|
12
|
-
export type { ActionResult, Attachment, MountOptions, ParamDef, Params, ParamValue, QueryState, Scope, SqlQuery, ToolQuery, ViewDefinition, } from "./api.js";
|
|
12
|
+
export type { ActionResult, Attachment, Container, DisplayMode, MountOptions, ParamDef, Params, ParamValue, QueryOptions, QueryState, Scope, SqlQuery, ToolQuery, ViewDefinition, } from "./api.js";
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/views",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "Authoring runtime for Lobu views — React modules rendered in the sandboxed MCP Apps frame",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
17
|
}
|
|
18
|
+
},
|
|
19
|
+
"./components": {
|
|
20
|
+
"import": {
|
|
21
|
+
"types": "./dist/components.d.ts",
|
|
22
|
+
"default": "./dist/components.js"
|
|
23
|
+
},
|
|
24
|
+
"require": {
|
|
25
|
+
"types": "./dist/components.d.ts",
|
|
26
|
+
"default": "./dist/components.js"
|
|
27
|
+
}
|
|
18
28
|
}
|
|
19
29
|
},
|
|
20
30
|
"files": [
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-Djz6T50J.js","assets/index-_oPeVpL_.js","assets/index-BLEcy9-T.css","assets/record-activity-CvgZyCmw.js","assets/filter-editors-DCQgGLyR.js","assets/connection-label-BobuYiAG.js","assets/runs-BWtc5rmc.js","assets/source-record-panels-CRIPMWfN.js","assets/events-feed-fucGZSJR.js","assets/conversations-table-DfZGICl7.js","assets/renderer-BL6VcwQH.js","assets/card-DIF8SF9b.js","assets/clients-CpG676mg.js","assets/client-rows-EJSKR6z1.js","assets/agent-loading-shells-CtZJM2Gc.js","assets/member-scope-gate-CFbrq1by.js","assets/tabs-B4Er9hJj.js","assets/view-param-filters-Cylutoy1.js","assets/app-bridge-BCm4muqj.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{ak as x,al as m,am as p,an as y,g as j,h as g,j as e,r as P,ao as R,l as f,_ as v}from"./index-_oPeVpL_.js";import{P as r}from"./public-shell-ready-7KYnww6e.js";const E=f(async()=>({default:(await v(async()=>{const{EntityPage:s}=await import("./entity-page-Djz6T50J.js");return{EntityPage:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))).EntityPage}));function l(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(R,{})})}function S(){const{owner:s,_splat:c}=x.useParams(),a=m(c||""),d=a?.viewKey,{path:u}=p(s,a?.entityPath),{data:t,isLoading:n,error:i}=y(u,{slug:s},{includeBootstrap:!0}),{session:h,isReady:o}=j();return g({active:!n&&o&&!h&&(!!i||!t),owner:s}),n||!o&&!t?e.jsx(l,{}):i||!t||!t.entity?e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsx(P.Suspense,{fallback:e.jsx(l,{}),children:e.jsx(E,{namespace:t.workspace,path:t.path,entity:t.entity,viewKey:d})})]})}export{S as component};
|
|
3
|
-
//# sourceMappingURL=_-CEPl6gU4.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c1 as t,j as p,c2 as m}from"./index-_oPeVpL_.js";import{A as e}from"./activity-route-view-DQglkhXU.js";import"./record-activity-CvgZyCmw.js";import"./filter-editors-DCQgGLyR.js";import"./connection-label-BobuYiAG.js";import"./runs-BWtc5rmc.js";import"./source-record-panels-CRIPMWfN.js";import"./events-feed-fucGZSJR.js";import"./conversations-table-DfZGICl7.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./clients-CpG676mg.js";import"./client-rows-EJSKR6z1.js";import"./agent-loading-shells-CtZJM2Gc.js";import"./member-scope-gate-CFbrq1by.js";import"./public-shell-ready-7KYnww6e.js";function E(){const{owner:o,_splat:r}=t.useParams(),i=t.useSearch();return p.jsx(e,{owner:o,search:i,attentionLens:!1,entityScope:m(r||"").path})}export{E as component};
|
|
2
|
-
//# sourceMappingURL=_-C_zNZben.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m as S,fP as P,r as u,fQ as L,j as n,P as w,fR as b,g as D,t as R,aZ as E,aQ as M,ba as N,cc as O,fS as Q,fT as $,bm as B,v as z}from"./index-_oPeVpL_.js";import{L as F,A as H}from"./agent-thread-C8UaUTWc.js";import{A as U,C as W}from"./agent-loading-shells-CtZJM2Gc.js";import"./app-bridge-BCm4muqj.js";import"./use-mention-search-DqEykWl_.js";import"./index-Vcq4gwWv.js";import"./events-feed-fucGZSJR.js";import"./conversations-table-DfZGICl7.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./clients-CpG676mg.js";function Z({owner:t,agent:s,threadId:e,afterMessagesContent:d,className:r,initialDraft:p,newChatRequested:m=!1,preventAutoNavigate:h}){const o=S(),i=s.agentId,{data:a=[]}=P(i,{orgSlug:t}),[l,x]=u.useState(()=>L()),[g,A]=u.useState(null);u.useEffect(()=>{!m||e||(x(L()),A(null),o({to:".",search:(f=>{const{new:C,...k}=f;return k}),replace:!0}))},[m,e,o]);const v=u.useMemo(()=>!g||a.some(f=>f.id===g.id)?a:[g,...a],[a,g]),c=e??l,T=!e||!v.some(f=>f.id===e),j=u.useCallback(()=>{if(v.some(C=>C.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const f=b(t,i,c);o({...f,replace:!0})},[v,c,o,t,i]),y=u.useCallback(()=>{T&&!h&&j()},[T,j,h]);return n.jsx("div",{className:w("flex min-h-0 flex-1 flex-col",r),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(F,{agentId:i,workspaceSlug:t,thread:c,loadHistory:!!e,onFirstUserMessage:y,initialDraft:p,children:n.jsx(H,{afterMessagesContent:d})},`${i}:${c}`)})})}function _({owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:r,afterMessagesContent:p,preventAutoNavigate:m}){const{isAuthenticated:h}=D(),{isMember:o,isLoading:i}=R(),a=h&&o,{data:l=[],isLoading:x}=E({enabled:a}),g=s??null,A=l.find(c=>c.agentId===g)??null;return a&&x||i?n.jsx(U,{}):A?n.jsx(Z,{owner:t,agent:A,threadId:e,initialDraft:d,newChatRequested:r,afterMessagesContent:p,preventAutoNavigate:m,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(M,{icon:N,title:"Agent not found",description:"This agent may have been removed."})}function q(t){return[...t].sort((s,e)=>e.updatedAt-s.updatedAt)[0]}function G({owner:t,agentId:s,threadId:e,initialDraft:d,forceComposer:r=!1,newChatRequested:p=!1,afterMessagesContent:m,preventAutoNavigate:h}){const o=S(),{data:i=[],isLoading:a}=O(Q(t,s,{strict:!1})),l=u.useMemo(()=>q(i),[i]);return u.useEffect(()=>{if(e||r||a||!l)return;const x=b(t,s,l.id);o({...x,replace:!0})},[s,a,l,o,t,e,r]),!e&&!r&&(a||l)?n.jsx(W,{}):n.jsx(_,{owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:p,afterMessagesContent:m,preventAutoNavigate:h})}function ie(){const{owner:t,agentId:s}=$.useParams(),{threadId:e}=B({strict:!1}),{new:d,prompt:r}=z({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-4 lg:px-6 lg:py-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(G,{owner:t,agentId:s,threadId:e,initialDraft:r,forceComposer:!e,newChatRequested:!!d})})})}export{ie as component};
|
|
2
|
-
//# sourceMappingURL=_agentId-CBC_SadO.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gP as r,j as e}from"./index-_oPeVpL_.js";import{A as n}from"./agents-workbench-CMyk4PI7.js";import"./agent-editor-form-oUnIYHd7.js";import"./model-selector-CB1BDvlW.js";import"./proposal-review-shell-DKKGu4Ww.js";import"./runs-BWtc5rmc.js";function c(){const{owner:o,agentId:t}=r.useParams();return e.jsx(n,{owner:o,agentId:t})}export{c as component};
|
|
2
|
-
//# sourceMappingURL=_agentId-QQW91cHX.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m as N,k,an as A,g as L,t as C,dG as b,j as t,B as n,gj as y,ba as R,S as _,L as $,b8 as D,gG as u,ah as O}from"./index-_oPeVpL_.js";import{A as z}from"./automation-detail-content-CEDNboId.js";import"./create-automation-form-_4vUkrls.js";import"./cronstrue-DPXl0qA2.js";import"./entity-options-UJs64GdQ.js";import"./connection-label-BobuYiAG.js";import"./model-selector-CB1BDvlW.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-V27Z4o3P.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./use-mention-search-DqEykWl_.js";import"./proposal-review-shell-DKKGu4Ww.js";import"./runs-BWtc5rmc.js";import"./json-diff-D_Ym3Uku.js";import"./deployments-DCQdFdwG.js";import"./events-feed-fucGZSJR.js";import"./conversations-table-DfZGICl7.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./clients-CpG676mg.js";function P({owner:a,automationId:e,view:o,runId:s}){const r=N(),{orgContext:p,hasOrgContext:x}=k(),{data:g,isLoading:m}=A(`/${a}`,p),{isAuthenticated:h}=L(),{isLoading:c}=C(),f=g?.workspace?.id??"",v=h?!x||m||c:m||c,i=b(e,void 0,f).data?.automation,j=i?.automation_name??"Automation",d=()=>void r({to:"/$owner/automations",params:{owner:a}}),l=()=>void r({to:"/$owner/automations/$automationId",params:{owner:a,automationId:e},search:{view:"activity",run_id:void 0}}),w=!s&&o==="definition";return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:t.jsxs("div",{className:"mx-auto flex w-full min-w-0 max-w-3xl flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsxs(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 text-muted-foreground hover:text-foreground",onClick:d,children:[t.jsx(y,{className:"h-3.5 w-3.5"}),"Automations"]}),t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx(R,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),v&&!i?t.jsx(_,{className:"h-5 w-40"}):s?"Review change":j]})]}),s?null:w?t.jsx(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:l,children:"Done"}):t.jsx(n,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs($,{to:"/$owner/automations/$automationId",params:{owner:a,automationId:e},search:{view:"definition",run_id:void 0},children:[t.jsx(D,{className:"h-3.5 w-3.5"}),"Edit"]})})]}),t.jsx(z,{owner:a,agentId:i?.managed_agent_id??null,automationId:e,view:o,runId:s,onDone:s?d:l})]})})}function ot(){const{owner:a,automationId:e}=u.useParams(),o=u.useSearch();return t.jsx(O,{owner:a,children:()=>t.jsx(P,{owner:a,automationId:e,view:o.view,runId:o.run_id})})}export{ot as component};
|
|
2
|
-
//# sourceMappingURL=_automationId-YTTNksw6.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ia as I,j as e,ah as z,m as U,az as X,cN as q,cL as J,ct as Q,S as A,B as Y,L as p,aA as Z,hW as K,hX as ee,aO as ne,fN as u,hR as se,fL as ae,aV as te,hG as oe,fM as ce,h3 as R,aI as ie,w as re}from"./index-_oPeVpL_.js";import{R as de,c as le,C as me}from"./device-pin-tombstone-Bz4JHHMK.js";import{a as pe}from"./connector-provenance-CNXtzYg5.js";import{f as he,C as ue,F as xe,a as fe,b as ve,A as je,c as Ce}from"./connection-feed-detail-C_D68j6d.js";import{S as Ne,g as De}from"./runs-table-DxIiqrSk.js";import{c as $e}from"./connection-label-BobuYiAG.js";import"./runs-panel-BO3h5RkS.js";import"./runs-BWtc5rmc.js";import"./filter-editors-DCQgGLyR.js";import"./connector-scope-lists-BKDetNDc.js";import"./status-dot-C5KDvvm9.js";import"./entity-options-UJs64GdQ.js";function Me(){const{owner:l,connectorKey:n,connectionId:v}=I.useParams(),{addFeed:t,feedId:i,settings:x,auth_result:o}=I.useSearch();return e.jsx(z,{owner:l,children:m=>e.jsx(ge,{organizationId:m.organizationId,ownerSlug:m.ownerSlug,isWorkspaceLoading:m.isWorkspaceLoading,connectorKey:n,connectionId:Number(v),showAddFeed:t===!0,feedId:i,openSettings:x===!0,authResult:o})})}function ge({organizationId:l,ownerSlug:n,isWorkspaceLoading:v,connectorKey:t,connectionId:i,showAddFeed:x,feedId:o,openSettings:m,authResult:E}){const y=U(),{data:B=[]}=X(),{data:M=[],isLoading:T,isError:j,refetch:W}=q(l??"",{connectorKey:t,connectionIds:[i]}),{data:$=[]}=J(l??""),{data:O=[],isLoading:P,isError:S,refetch:H}=Q(o?i:null),s=M.find(c=>c.id===i),a=$.find(c=>c.key===t),r=o?O.find(c=>c.id===o):null;if(v||T||o&&P||!l)return e.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[e.jsx(A,{className:"h-7 w-56"}),e.jsx(A,{className:"h-4 w-24"})]}),e.jsx(de,{})]});if(j||o&&S)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsxs("p",{children:["Could not load this ",j?"connection":"feed","."]}),e.jsx(Y,{variant:"outline",size:"sm",onClick:()=>void(j?W():H()),children:"Retry"})]});if(!s)return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found."}),e.jsxs(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:t},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",a?.name??t]})]});const g=$e({...s,connector_name:s.connector_name??a?.name??null}),C=!o&&!x,V=()=>void y({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:t,connectionId:String(i)},search:{},replace:!0});let h,f=g,w,_,N;o?r?(f=he(r,a),r.store==="channel_messages"?(h=e.jsx(ue,{feed:r,hideHeader:!0}),N="chat channel"):(w=e.jsx(xe,{feed:r,ownerSlug:n}),_=e.jsx(fe,{feed:r}),h=e.jsx(ve,{feed:r,connectorDef:a,ownerSlug:n}))):(h=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),f="Feed"):x&&(h=e.jsx(je,{onClose:V,organizationId:l,connections:[s],connectorDefinitions:$}),f="Add feed",N=Ce);const d=B.find(c=>c.id===s.device_worker_id&&Z(c,n)),k=d?K(d):void 0,D=k?ee(n,k,ne()):void 0,F=[e.jsx(p,{to:"/$owner/connectors",params:{owner:n},className:u,children:"Connectors"},"connectors"),...d&&D?[e.jsx(p,{to:"/$owner/connectors/app/$appId",params:{owner:n,appId:D.id},className:u,children:D.name},"app"),e.jsx(p,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},className:u,children:se(d)},"device")]:[e.jsx(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:t},search:{},className:u,children:a?.name??t},"connector")]];C||F.push(e.jsx(p,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:t,connectionId:String(i)},search:{},className:u,children:g},"connection"));const L=C?le(s):null,G=N??L??void 0,b=e.jsx(ae,{breadcrumb:e.jsx(ce,{crumbs:F}),icon:a?e.jsx(te,{icon:a.icon,name:a.name,faviconDomain:a.favicon_domain??oe(a.auth_schema)}):null,title:f,status:w??e.jsx(Ne,{status:De(s.status),showDot:!0,children:s.status}),meta:_,caption:G,captionTone:L?"error":"muted"});return C?d&&a&&ie(a)?e.jsx(re,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},search:{connection:s.id,settings:m||void 0},hash:`connection-${s.id}`,replace:!0}):e.jsxs(R,{header:b,children:[e.jsx(pe,{connectorDef:a,connectorKey:t,ownerSlug:n,deviceWorkerId:s.device_worker_id,deviceLabel:s.device_label}),e.jsx(me,{embedded:!0,connection:s,connectorDef:a,ownerSlug:n,openSettings:m,authResult:E},s.id)]}):e.jsx(R,{header:b,children:e.jsx("div",{className:"mt-0",children:h})})}export{Me as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey._connectionId-fK0h7RAp.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aw as $e,ax as De,ay as Ee,aG as me,aD as ae,h1 as ls,h2 as os,j as e,h3 as le,B as j,L as K,aF as he,fL as oe,fM as ce,fN as G,h4 as cs,Z as ds,h5 as te,r as p,h6 as we,h7 as Fe,cb as us,h8 as Ae,bH as Y,h9 as _e,y as P,bn as Le,bo as Re,bp as Oe,bq as Be,br as Ke,gW as ms,I as F,by as H,a1 as V,A as Se,ha as hs,hb as xs,bc as ps,hc as fs,a_ as xe,hd as js,he as gs,hf as Ue,hg as Ie,hh as ze,ae as ne,M as U,b7 as de,hi as vs,eW as ys,hj as Ns,eq as Z,hk as bs,S as D,hl as B,g as Cs,hm as ks,hn as ws,ho as As,hp as _s,hq as Ss,hr as Ps,hs as $s,ht as Ds,bP as se,hu as Es,hv as Fs,bO as Ls,dL as Rs,gD as Os,P as re,dM as Bs,bS as Ks,cy as Me,hw as Q,hx as Us,ah as Is,hy as Te,av as ie,u as qe,hz as Ve,aJ as zs,hA as We,hB as Ms,hC as Ye,hD as Ts,dN as qs,au as Vs,cN as Ws,aR as Ys,aB as M,hE as Ge,m as X,aW as Xe,aV as pe,aS as Gs,hF as Xs,hG as Hs}from"./index-_oPeVpL_.js";import{C as Qs,a as He}from"./connections-browser-Cnv2iBbZ.js";import{C as Zs}from"./connector-provenance-CNXtzYg5.js";import{R as Js}from"./runs-panel-BO3h5RkS.js";import"./status-dot-C5KDvvm9.js";import"./connection-label-BobuYiAG.js";import"./runs-BWtc5rmc.js";import"./filter-editors-DCQgGLyR.js";import"./runs-table-DxIiqrSk.js";function et({ownerSlug:s,familyKind:t,familyId:a}){const n=t==="inference",r=$e({enabled:n}),i=De({enabled:n}),h=Ee({enabled:!n}),o=n?r:h,l=n?i.data?.find(c=>c.slug===a)?.displayName??a:me(a),x=(n?(r.data??[]).filter(c=>c.kind===a).map(c=>({key:`${ae}${c.slug}`,name:c.displayName||c.slug,status:[c.isDefault?"Default":null,c.status].filter(Boolean).join(" · ")})):(h.data?.sandboxes??[]).filter(c=>c.providerKind===a).map(c=>({key:`${ls}${c.id}`,name:c.name,status:c.connected?"Connected":"Needs credentials"}))).map(c=>({id:c.key,name:c.name,description:c.status,tone:null,link:os({to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:c.key},search:{}})})),u=`${n?ae:he}${a}`;return e.jsx(le,{header:e.jsx(oe,{title:l,breadcrumb:e.jsx(ce,{crumbs:[e.jsx(K,{to:"/$owner/connectors",params:{owner:s},className:G,children:"Connectors"},"connectors")]})}),children:e.jsx(Qs,{entries:x,isLoading:o.isLoading,isError:o.isError,onRetry:()=>void o.refetch(),action:e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:n?e.jsx(K,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:u},search:{addAccount:!0},children:"Add connection"}):e.jsx(K,{to:"/$owner/connectors/create/$connectorKey",params:{owner:s,connectorKey:u},children:"Add connection"})})})})}function st({catalog:s,initialProvider:t,initialSlug:a,allowOAuth:n=!0,initialModel:r,onDone:i}){const h=cs(),o=ds(),l=s.find(d=>d.slug===t)??s[0],x=n&&l&&te(l)?"oauth":"api-key",[u,c]=p.useState(l?.slug??""),[g,N]=p.useState(a??l?.slug??""),[m,y]=p.useState(l?.displayName??""),[b,$]=p.useState(l?.baseUrl??""),[w,k]=p.useState(r??l?.defaultModel??""),[E,_]=p.useState(""),[z,R]=p.useState(l?.apiKeyPlaceholder??""),[I,O]=p.useState(x),[v,f]=p.useState(""),[A,W]=p.useState(null),[T,q]=p.useState(!1),[fe,je]=p.useState(!1),C=s.find(d=>d.slug===u),J=we(C?.modalities??[]),ge=n&&!!C&&te(C),ve=C?Fe(C):!1,ye=ge&&I==="oauth",Ne=ve&&!ye,L=us().slug,ee=p.useCallback(()=>{je(!0),o.invalidateQueries({queryKey:["inference-providers"]})},[o]),Je=p.useCallback(()=>{o.invalidateQueries({queryKey:["inference-providers"]}),i()},[o,i]),es=p.useCallback(async()=>{if(!(!L||!C)){q(!0);try{const d=await Ae(L,C.slug);if(d.mode!=="redirect")throw new Error("Unexpected sign-in mode");window.open(d.authorizeUrl,"_blank","noreferrer")}catch(d){Y.error(d instanceof Error?d.message:"Failed to start sign-in")}finally{q(!1)}}},[L,C]),ss=p.useCallback(async()=>{if(!(!L||!C||!v.trim())){q(!0);try{const d=await _e(L,C.slug,{code:v.trim()});if(d.status!=="success")throw new Error(d.error||"Sign-in not complete");ee(),Y.success(`Signed in with ${C.displayName}`)}catch(d){Y.error(d instanceof Error?d.message:"Failed to complete sign-in")}finally{q(!1)}}},[L,C,v,ee]),ts=p.useCallback(async()=>{if(!(!L||!C)){q(!0);try{const d=await Ae(L,C.slug);if(d.mode!=="device")throw new Error("Unexpected sign-in mode");W({userCode:d.userCode,deviceAuthId:d.deviceAuthId,verificationUrl:d.verificationUrl}),window.open(d.verificationUrl,"_blank","noreferrer")}catch(d){Y.error(d instanceof Error?d.message:"Failed to start sign-in")}finally{q(!1)}}},[L,C]),as=p.useCallback(async()=>{if(!(!L||!C||!A)){q(!0);try{const d=await _e(L,C.slug,{deviceAuthId:A.deviceAuthId,userCode:A.userCode});if(d.status==="success"){ee(),Y.success(`Signed in with ${C.displayName}`);return}W(S=>S&&{...S,message:d.error||"Waiting for approval..."})}catch(d){Y.error(d instanceof Error?d.message:"Failed to check status")}finally{q(!1)}}},[L,C,A,ee]),ns=C?.supportedAuthTypes.includes("device-code")??!1,rs=d=>{c(d);const S=s.find(ue=>ue.slug===d);S&&(N(S.slug),y(S.displayName),$(S.baseUrl),k(S.slug===t&&r?r:S.defaultModel??""),R(S.apiKeyPlaceholder),O(n&&te(S)?"oauth":"api-key"),f(""),W(null),je(!1))},be=/^[a-z0-9][a-z0-9-]*$/.test(g),Ce=be&&Ne&&E.trim().length>0&&!h.isPending,is=d=>{if(d.preventDefault(),!Ce)return;const S={};b.trim()&&(S.base_url=b.trim()),w.trim()&&(S.model=w.trim());const ue=Object.keys(S).length>0?{text:S}:void 0;h.mutate({slug:g.trim(),kind:u,displayName:m.trim()||void 0,apiKey:E.trim(),capabilities:ue},{onSuccess:()=>i()})},ke=!!(t&&s.some(d=>d.slug===t));return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:ke&&C?`Connect ${C.displayName}`:"Add an inference provider"}),e.jsxs("form",{onSubmit:is,className:"grid max-w-md gap-3",children:[ke&&C?e.jsx("p",{className:"text-xs text-muted-foreground",children:J.length>0?`Serves text, plus ${J.join(", ").toLowerCase()}.`:"Serves text (chat)."}):e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:"ip-provider",children:"Provider"}),e.jsxs(Le,{value:u,onValueChange:rs,children:[e.jsx(Re,{id:"ip-provider",className:"w-full",children:e.jsx(Oe,{})}),e.jsx(Be,{children:s.map(d=>{const S=we(d.modalities);return e.jsx(Ke,{value:d.slug,children:e.jsxs("span",{className:"flex items-center gap-2",children:[d.iconUrl?e.jsx("img",{src:d.iconUrl,alt:"",className:"h-4 w-4 shrink-0 rounded-sm",loading:"lazy"}):e.jsx(ms,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),d.displayName,S.length>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",S.join(", ")]}):null]})},d.slug)})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:J.length>0?`Serves text, plus ${J.join(", ").toLowerCase()}.`:"Serves text (chat)."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:"ip-display",children:"Name"}),e.jsx(F,{id:"ip-display",placeholder:"Friendly name",value:m,onChange:d=>y(d.target.value)})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(P,{htmlFor:"ip-slug",children:["Slug ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(F,{id:"ip-slug",placeholder:"my-provider",value:g,onChange:d=>N(d.target.value),autoComplete:"off",required:!0}),g&&!be?e.jsx("p",{className:"text-xs text-destructive",children:"Lowercase letters, numbers, and hyphens only."}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"A stable identifier agents reference this provider by."})]}),ge&&ve?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{children:"Auth method"}),e.jsxs("div",{className:"inline-flex w-fit rounded-md border border-border p-1",children:[e.jsx(j,{type:"button",size:"sm",variant:I==="oauth"?"secondary":"ghost",onClick:()=>O("oauth"),children:"Sign in"}),e.jsx(j,{type:"button",size:"sm",variant:I==="api-key"?"secondary":"ghost",onClick:()=>O("api-key"),children:"API key"})]})]}):null,Ne?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:"ip-base-url",children:"Base URL"}),e.jsx(F,{id:"ip-base-url",placeholder:"https://api.example.com/v1",value:b,onChange:d=>$(d.target.value),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Override the upstream URL — e.g. a self-hosted vLLM, Azure, or LiteLLM endpoint."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:"ip-model",children:"Default model"}),e.jsx(F,{id:"ip-model",placeholder:"gpt-4o-mini",value:w,onChange:d=>k(d.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(P,{htmlFor:"ip-key",children:["API key ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(F,{id:"ip-key",type:"password",placeholder:z||void 0,value:E,onChange:d=>_(d.target.value),autoComplete:"off",required:!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Stored encrypted in the vault. It's never shown again — rotate it here if it changes."})]}),e.jsx(H,{onCancel:i,children:e.jsx(j,{type:"submit",disabled:!Ce,children:h.isPending?e.jsxs(e.Fragment,{children:[e.jsx(V,{size:"lg",className:"mr-2"}),"Creating..."]}):"Create provider"})})]}):ye?e.jsxs("div",{className:"grid gap-3",children:[fe?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Signed in with ",C?.displayName??"provider",". This covers your agents in this org."]}):ns?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void ts(),disabled:T||!L,children:A?"Get a new code":"Get device code"}),A?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:"ip-device-code",children:"Device code"}),e.jsx(F,{id:"ip-device-code",readOnly:!0,value:A.userCode}),e.jsx(j,{type:"button",variant:"default",className:"justify-self-start",asChild:!0,children:e.jsxs("a",{href:A.verificationUrl,target:"_blank",rel:"noreferrer",children:["Open ",C?.displayName??"provider"," to approve",e.jsx(Se,{className:"h-4 w-4"})]})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:A.message||"We opened the approval page. Enter the code above if asked, approve, then check status."}),e.jsx(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void as(),disabled:T,children:T?"Checking...":"Check status"})]}):null]}):e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void es(),disabled:T||!L,children:["Sign in with ",C?.displayName??"provider",e.jsx(Se,{className:"h-4 w-4"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:"ip-oauth-code",children:"Paste code#state"}),e.jsx(F,{id:"ip-oauth-code",placeholder:"code#state",value:v,onChange:d=>f(d.target.value),autoComplete:"off"})]}),e.jsx(j,{type:"button",className:"justify-self-start",onClick:()=>void ss(),disabled:T||!v.trim(),children:T?"Finishing...":"Finish sign-in"})]}),e.jsx(H,{onCancel:i,children:e.jsx(j,{type:"button",onClick:Je,disabled:!fe,children:"Done"})})]}):e.jsxs("div",{className:"grid gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This provider cannot be added from the catalog yet."}),e.jsx(H,{onCancel:i})]})]})]})}const tt={text:"Text",image:"Image",stt:"Speech-to-text",tts:"Text-to-speech"};function at({provider:s,catalog:t,autoOpenEdit:a}){const n=hs(),[r,i]=p.useState(a?"edit":null),h=xs(s.kind,t);p.useEffect(()=>{a&&i("edit")},[a]);const l=(t.find(c=>c.slug===s.kind)?.modalities??["text"]).filter(c=>c!=="text"),x=h&&l.length>0,u=c=>i(g=>g===c?null:c);return e.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:"Credential"}),e.jsxs("p",{className:"truncate text-[11px] text-muted-foreground",children:[s.slug,s.createdAt?` · created ${ps(s.createdAt)}`:""]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.isDefault?null:e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",disabled:n.isPending,onClick:()=>n.mutate({providerSlug:s.slug}),children:"Set as default"}),x?e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>u("capabilities"),children:"Configure"}):null,e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>u("edit"),children:"Edit"})]})]}),r==="edit"?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsx(rt,{provider:s,supportsUpstreamConfig:h,onDone:()=>i(null)})}):null,r==="capabilities"&&x?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Other modalities (optional)"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"This provider's text base URL and model are set under Edit. Only set these if you want a modality routed to a different endpoint — otherwise it uses the provider's defaults."})]}),l.map(c=>e.jsx(it,{providerSlug:s.slug,modality:c,block:s.capabilities[c]??{}},c))]})}):null]})}function nt({provider:s,onDeleted:t}){const a=fs(),[n,r]=p.useState(!1);return e.jsxs("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Delete provider"}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Removes ",s.displayName||s.slug," and its stored key from this workspace. Agents referencing it will need another connected provider before they can run."]}),e.jsx("div",{className:"mt-3",children:n?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(j,{variant:"destructive",size:"sm",disabled:a.isPending,onClick:()=>a.mutate({providerSlug:s.slug},{onSuccess:t,onSettled:()=>r(!1)}),children:[a.isPending?e.jsx(V,{size:"md",className:"mr-1.5"}):null,"Confirm delete"]}),e.jsx(j,{variant:"ghost",size:"sm",disabled:a.isPending,onClick:()=>r(!1),children:"Cancel"})]}):e.jsxs(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",disabled:a.isPending,onClick:()=>r(!0),children:[e.jsx(xe,{className:"mr-1.5 h-3.5 w-3.5"}),"Delete provider"]})})]})}function rt({provider:s,supportsUpstreamConfig:t,onDone:a}){const n=js(),r=gs(),i=Ue(),[h,o]=p.useState(s.displayName??""),[l,x]=p.useState(""),u=s.capabilities.text??{},[c,g]=p.useState(u.base_url??""),[N,m]=p.useState(u.model??""),[y,b]=p.useState(null),$=h.trim().length>0&&h.trim()!==(s.displayName??""),w=t&&l.trim().length>0,k=c.trim()!==(u.base_url??""),E=N.trim()!==(u.model??""),_=t&&(k||E),z={base_url:c.trim()||void 0,model:N.trim()||void 0,models_endpoint:u.models_endpoint},R=Ie(z),I=t&&_&&ze(R),O=n.isPending||r.isPending||i.isPending,v=($||w||_)&&!I&&!O,f=async A=>{if(A.preventDefault(),!!v){b(null);try{await Promise.all([$?n.mutateAsync({providerSlug:s.slug,displayName:h.trim()}):Promise.resolve(),_?i.mutateAsync({providerSlug:s.slug,modality:"text",block:z}):Promise.resolve(),w?r.mutateAsync({providerSlug:s.slug,value:l.trim()}):Promise.resolve()]),a()}catch{b("Some changes could not be saved. Review the fields and try again.")}}};return e.jsxs("form",{onSubmit:f,className:"grid max-w-md gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`edit-name-${s.slug}`,children:"Name"}),e.jsx(F,{id:`edit-name-${s.slug}`,value:h,onChange:A=>o(A.target.value),placeholder:s.slug}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["The slug (",e.jsx("code",{children:s.slug}),") is fixed — agents reference it."]})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`edit-base-${s.slug}`,children:"Base URL"}),e.jsx(F,{id:`edit-base-${s.slug}`,placeholder:"https://api.example.com/v1",value:c,onChange:A=>g(A.target.value),autoComplete:"off"}),R.base_url?e.jsx("p",{className:"text-xs text-destructive",children:R.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`edit-model-${s.slug}`,children:"Default model"}),e.jsx(F,{id:`edit-model-${s.slug}`,placeholder:"gpt-4o-mini",value:N,onChange:A=>m(A.target.value),autoComplete:"off"}),R.model?e.jsx("p",{className:"text-xs text-destructive",children:R.model}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`edit-key-${s.slug}`,children:"New API key"}),e.jsx(F,{id:`edit-key-${s.slug}`,type:"password",value:l,onChange:A=>x(A.target.value),autoComplete:"off",placeholder:"Leave blank to keep the current key"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter a value only to replace the stored key. The old key is discarded."})]})]}):null,y?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:y}):null,e.jsx(H,{onCancel:a,children:e.jsx(j,{type:"submit",disabled:!v,children:O?e.jsxs(e.Fragment,{children:[e.jsx(V,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]})}function it({providerSlug:s,modality:t,block:a}){const n=Ue(),[r,i]=p.useState(!1),[h,o]=p.useState(a.base_url??""),[l,x]=p.useState(a.model??""),[u,c]=p.useState(a.models_endpoint??""),[g,N]=p.useState(!!a.models_endpoint),m=!!(a.base_url||a.model||a.models_endpoint),y={base_url:h.trim()||void 0,model:l.trim()||void 0,models_endpoint:u.trim()||void 0},b=Ie(y),$=ze(b),w=()=>{$||n.mutate({providerSlug:s,modality:t,block:y})};return e.jsxs("div",{className:ne,children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-left",onClick:()=>i(k=>!k),children:[e.jsx("span",{className:"text-sm font-medium",children:tt[t]}),m?e.jsx(U,{variant:"outline",children:"Custom"}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Static"})]}),r?e.jsxs("div",{className:"grid gap-3 border-t px-3 py-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`base-${s}-${t}`,children:"Base URL"}),e.jsx(F,{id:`base-${s}-${t}`,placeholder:"https://api.example.com/v1",value:h,onChange:k=>o(k.target.value),autoComplete:"off"}),b.base_url?e.jsx("p",{className:"text-xs text-destructive",children:b.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`model-${s}-${t}`,children:"Model"}),e.jsx(F,{id:`model-${s}-${t}`,placeholder:"gpt-4o-mini",value:l,onChange:k=>x(k.target.value),autoComplete:"off"}),b.model?e.jsx("p",{className:"text-xs text-destructive",children:b.model}):null]}),g?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(P,{htmlFor:`endpoint-${s}-${t}`,children:"Models endpoint"}),e.jsx(F,{id:`endpoint-${s}-${t}`,placeholder:"/v1/models",value:u,onChange:k=>c(k.target.value),autoComplete:"off"}),b.models_endpoint?e.jsx("p",{className:"text-xs text-destructive",children:b.models_endpoint}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"Path used to list this modality's models (e.g. /v1/models)."})]}):e.jsx("button",{type:"button",className:"justify-self-start text-xs text-muted-foreground hover:text-foreground",onClick:()=>N(!0),children:"Advanced"}),e.jsx(H,{onCancel:()=>i(!1),children:e.jsx(j,{size:"sm",disabled:$||n.isPending,onClick:w,children:n.isPending?e.jsxs(e.Fragment,{children:[e.jsx(V,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]}):null]})}function lt({sandbox:s}){const t=Object.entries(s.details??{});return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(ct,{kind:s.providerKind}),e.jsx("span",{className:"text-sm font-medium",children:s.name}),e.jsx(U,{variant:"secondary",className:"h-4 px-1.5 py-0 text-[10px] uppercase tracking-wide",children:s.providerKind}),s.connected?e.jsx(U,{className:"h-4 border-transparent bg-emerald-500/10 px-1.5 py-0 text-[10px] uppercase tracking-wide text-emerald-500",children:"Connected"}):e.jsx(U,{variant:"destructive",className:"h-4 border-transparent bg-destructive/10 px-1.5 py-0 text-[10px] uppercase tracking-wide text-destructive",children:"No credential"})]}),t.length>0?e.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:t.map(([a,n])=>`${a}: ${n}`).join(" | ")}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Remote sandbox agents execute in instead of the built-in local runtime."}),s.connected?null:e.jsxs("div",{className:"flex gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:[e.jsx(de,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("p",{children:"This sandbox has no vault credential. Delete it and re-add the provider with a valid key, or set the credential via the API."})]})]})})}function ot({sandbox:s,onDeleted:t}){const a=vs(),[n,r]=p.useState(!1);return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"rounded-lg border border-destructive/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(xe,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Remove sandbox"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Agents pinned to this runtime fall back to the built-in local sandbox."})]})]}),n?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{variant:"destructive",size:"sm",disabled:a.isPending,onClick:()=>a.mutate({id:s.id},{onSuccess:t}),children:a.isPending?e.jsx(V,{}):"Delete permanently"}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>r(!1),children:"Cancel"})]}):e.jsx(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>r(!0),children:"Delete sandbox"})]})})}function ct({kind:s}){return s==="vercel"?e.jsxs("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 shrink-0 fill-foreground","aria-hidden":!0,children:[e.jsx("title",{children:"Vercel"}),e.jsx("path",{d:"M12 3 22 20H2L12 3Z"})]}):s==="builtin"?e.jsx(ys,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):e.jsx(Ns,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}const dt={data:!1,chat:!1,actions:!1,audience:!1,inference:!0,runtime:!1},ut={data:!1,chat:!1,actions:!1,audience:!1,inference:!1,runtime:!0};function It(){const{owner:s,connectorKey:t}=Q.useParams(),{instances:a}=Q.useSearch(),{kind:n,id:r}=Us(t);return e.jsx(Is,{owner:s,children:({ownerSlug:i,organizationId:h,isWorkspaceLoading:o})=>{if(a&&(n==="inference"||n==="sandbox-provider"))return e.jsx(et,{ownerSlug:i,familyKind:n,familyId:r});switch(n){case"inference":return e.jsx(xt,{ownerSlug:i,providerSlug:r});case"sandbox":return e.jsx(ht,{ownerSlug:i,sandboxId:r});case"sandbox-provider":return e.jsx(mt,{ownerSlug:i,providerKind:r});default:return e.jsx(gt,{ownerSlug:i,organizationId:h,isWorkspaceLoading:o,connectorKey:t})}}})}function mt({ownerSlug:s,providerKind:t}){const a=X();return p.useEffect(()=>{a({to:"/$owner/connectors/create/$connectorKey",params:{owner:s,connectorKey:`${he}${t}`},replace:!0})},[a,s,t]),null}function ht({ownerSlug:s,sandboxId:t}){const a=X(),{data:n,isLoading:r,isError:i,refetch:h}=Ee(),o=n?.sandboxes.find(x=>x.id===t)??null;if(r)return e.jsxs(M,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(D,{className:"h-6 w-6 rounded"}),e.jsx(D,{className:"h-5 w-40"})]}),e.jsx(D,{className:"h-24 w-full rounded-lg"})]});if(i)return e.jsx(M,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this instance."}),e.jsx(j,{variant:"outline",onClick:()=>void h(),children:"Retry"})]})});if(!o)return e.jsxs(M,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This sandbox isn't in this workspace, so its details aren't available."}),e.jsx(j,{variant:"outline",size:"sm",onClick:()=>void a({to:"/$owner/connectors",params:{owner:s}}),children:"Back to connectors"})]});const l=o.name||me(o.providerKind);return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(le,{header:e.jsx(oe,{breadcrumb:e.jsx(ce,{crumbs:[e.jsx(K,{to:"/$owner/connectors",params:{owner:s},className:G,children:"Connectors"},"connectors"),e.jsx(K,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${he}${o.providerKind}`},search:{instances:!0},className:G,children:me(o.providerKind)},"family")]}),icon:e.jsx(pe,{name:l,faviconDomain:Gs(o.providerKind)}),title:l,badge:e.jsxs(e.Fragment,{children:[e.jsx(U,{variant:"secondary",children:o.providerKind}),o.connected?e.jsx(U,{className:"border-transparent bg-emerald-500/10 text-emerald-500",children:"Connected"}):e.jsx(U,{variant:"destructive",children:"No credential"})]}),status:e.jsx(Xe,{facets:ut})}),children:[e.jsx(lt,{sandbox:o}),e.jsx(B,{title:"Settings",muted:!0,children:e.jsx(ot,{sandbox:o,onDeleted:()=>void a({to:"/$owner/connectors",params:{owner:s}})})})]})})}function xt({ownerSlug:s,providerSlug:t}){const a=X(),{model:n,reason:r,agentId:i,addAccount:h}=Q.useSearch(),{data:o=[],isLoading:l,isError:x,refetch:u}=$e(),c=De(),{data:g=[],isLoading:N}=c,m=h?null:o.find(E=>E.slug===t)??null,y=g.find(E=>E.slug===(m?.kind??t))??null;if(l||N)return e.jsx("div",{children:e.jsxs(M,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(D,{className:"h-6 w-6 rounded"}),e.jsx(D,{className:"h-5 w-40"})]}),e.jsx(D,{className:"h-16 w-full rounded-lg"}),e.jsx(D,{className:"h-24 w-full rounded-lg"}),e.jsx(D,{className:"h-32 w-full rounded-lg"})]})});if(x)return e.jsx(M,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this account."}),e.jsx(j,{variant:"outline",onClick:()=>void u(),children:"Retry"})]})});if(!m&&!y&&!c.isError)return e.jsxs(M,{className:"space-y-3",children:[e.jsx(Ge,{connector:{key:t,name:t},showDescription:!1,className:"gap-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector isn't installed in this workspace, so its details aren't available."})]});const b=m?m.displayName||m.slug:y?.displayName||t,$=m!==null,w=r?e.jsx(jt,{agentId:i,model:n,providerName:b}):n?e.jsx(ft,{providerName:b,model:n,isConnected:$}):null,k=e.jsx(oe,{breadcrumb:e.jsx(ce,{crumbs:[e.jsx(K,{to:"/$owner/connectors",params:{owner:s},className:G,children:"Connectors"},"connectors"),...m?[e.jsx(K,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${ae}${m.kind}`},search:{instances:!0},className:G,children:y?.displayName??m.kind},"family")]:[]]}),icon:e.jsx(pe,{iconUrl:y?.iconUrl,name:b}),title:b,badge:m?e.jsxs(e.Fragment,{children:[m.isDefault?e.jsx(U,{variant:"secondary",children:"Default"}):null,m.status?e.jsx(U,{variant:"outline",children:m.status}):null,m.hasCustomUpstream?e.jsx(U,{variant:"outline",children:"Custom upstream"}):null]}):null,status:e.jsx(Xe,{facets:dt})});return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(le,{header:k,children:[w,e.jsx("div",{className:"space-y-6",children:m?e.jsx(at,{provider:m,catalog:g,autoOpenEdit:!!n}):e.jsx(pt,{ownerSlug:s,providerSlug:t,existingSlugs:o.map(E=>E.slug),catalog:g,catalogError:c.isError?c.error:null,model:n})}),m?e.jsx(B,{title:"Settings",muted:!0,children:e.jsx(nt,{provider:m,onDeleted:()=>void a({to:"/$owner/connectors",params:{owner:s}})})}):null]})})}function pt({ownerSlug:s,providerSlug:t,existingSlugs:a,catalog:n,catalogError:r,model:i}){const h=X(),o=n.find(u=>u.slug===t),l=a.includes(t)&&!!o&&te(o);let x=t;for(let u=2;a.includes(x);u++)x=`${t}-${u}`;return r?e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(de,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Failed to load provider catalog."}),e.jsx("p",{className:"mt-1 text-xs",children:r instanceof Error?r.message:"Check the workspace URL and try again."})]})]})}):e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[l&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"Subscription sign-in is managed on the existing connection."}),e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(K,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${ae}${t}`},search:{},children:"Open existing connection"})})]}),(!l||o&&Fe(o))&&e.jsx(st,{catalog:n,initialProvider:t,initialSlug:x,allowOAuth:!l,initialModel:i?.includes("/")?i.split("/").slice(1).join("/"):i,onDone:()=>void h({to:"/$owner/connectors",params:{owner:s}})},`${n.length}:${t}`)]})}function ft({providerName:s,model:t,isConnected:a}){return e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(de,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("p",{children:["Review ",e.jsx("strong",{children:s})," for model"," ",e.jsx("strong",{children:t}),"."," ",a?"Its edit controls are open.":"It is not connected yet; add it to continue."]})]})})}function jt({agentId:s,model:t,providerName:a}){return e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(de,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:"This agent needs a model provider before it can reply."}),e.jsxs("p",{children:[s?e.jsxs("span",{children:["Agent ",e.jsx("strong",{children:s})," is"," "]}):null,"configured to use ",t?e.jsx("strong",{children:t}):"a model"," ","from ",e.jsx("strong",{children:a}),", but that provider is not ready in this workspace."]}),e.jsx("p",{children:"Connect the provider below, then retry the message."})]})]})})}function gt({ownerSlug:s,organizationId:t,isWorkspaceLoading:a,connectorKey:n}){const{data:r=[],isLoading:i,isError:h,refetch:o}=Vs(t??""),{data:l=[],isLoading:x,isError:u,refetch:c}=Ws(t??"",{connectorKey:n}),g=p.useMemo(()=>r.find(y=>y.key===n),[r,n]),N=p.useMemo(()=>Ys(n,r,{name:l[0]?.connector_name??n}),[n,r,l]);if(a||i)return e.jsx("div",{children:e.jsxs(M,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(D,{className:"h-6 w-6 rounded"}),e.jsx(D,{className:"h-5 w-40"})]}),e.jsx(D,{className:"h-16 w-full rounded-lg"}),e.jsx(D,{className:"h-24 w-full rounded-lg"}),e.jsx(D,{className:"h-32 w-full rounded-lg"})]})});if(h||u)return e.jsx(M,{children:e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsx("p",{children:"Could not load this connector."}),e.jsx(j,{variant:"outline",onClick:()=>{o(),c()},children:"Retry"})]})});const m=g?e.jsx(yt,{connector:g,ownerSlug:s}):e.jsxs("div",{className:"space-y-3",children:[e.jsx(Ge,{connector:N,showDescription:!1,className:"gap-2"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This connector isn't installed in this workspace, so its details aren't available.",l.length>0?" Existing connections keep working.":""]})]});return e.jsx("div",{className:"flex flex-1 flex-col",children:g&&t?e.jsx(vt,{hero:m,connector:g,organizationId:t,ownerSlug:s,connectorKey:n,connections:l,isLoading:x,refetchConnections:c}):e.jsxs(M,{className:"space-y-6",children:[m,l.length>0&&!x?e.jsx(He,{section:!0,connections:l,ownerSlug:s,connectorKey:n}):e.jsx(Qe,{organizationId:t??"",ownerSlug:s,connectorKey:n,connections:l,isLoading:x})]})})}function vt({hero:s,connector:t,organizationId:a,ownerSlug:n,connectorKey:r,connections:i,isLoading:h,refetchConnections:o}){const{isAdmin:l,isLoading:x}=Z(a),u=(t.operations_summary?.total??0)>0;return e.jsxs(le,{header:s,children:[e.jsx(bs,{organizationId:a,connectorKey:r}),e.jsx(At,{connector:t,organizationId:a,ownerSlug:n,connectorKey:r,connections:i,isLoading:h,refetchConnections:o}),i.length>0?e.jsx(He,{section:!0,connections:i,connector:t,ownerSlug:n,connectorKey:r}):null,e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:auto-cols-fr sm:grid-flow-col",children:[e.jsx(St,{connector:t,organizationId:a,ownerSlug:n}),u&&x?e.jsx(D,{className:"h-20 w-full rounded-lg"}):u&&l?e.jsx(Ct,{connector:t,organizationId:a,ownerSlug:n}):u&&!l?e.jsx(B,{title:"Actions",muted:!0,children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Only workspace admins can view and configure connector actions."})}):null]}),e.jsx(Nt,{connector:t,organizationId:a,ownerSlug:n,connectionCount:i.length}),!h&&i.length>0?e.jsx(B,{title:"Recent activity",children:e.jsx(Js,{scope:{connectorKey:r},ownerSlug:n})}):null]})}function yt({connector:s,ownerSlug:t}){return e.jsx(oe,{breadcrumb:e.jsx(ce,{crumbs:[e.jsx(K,{to:"/$owner/connectors",params:{owner:t},className:G,children:"Connectors"},"connectors")]}),icon:e.jsx(pe,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??Hs(s.auth_schema),className:"h-10 w-10"}),title:s.name,badge:e.jsx(Zs,{connectorDef:s,ownerSlug:t}),caption:s.description})}function Nt({connector:s,organizationId:t,ownerSlug:a,connectionCount:n}){const r=Te(s.auth_schema),i=zs(s.auth_schema),h=r.find(w=>w.type==="oauth"),o=We(s.auth_schema),l=r.some(w=>w.type==="env_keys"),x=r.some(w=>w.type==="browser"),u=i.some(w=>w.type==="interactive"),c=!!(h||o||l||x),g=Ms(s),{isAdmin:N}=Z(t),{data:m=[]}=ie(t,{connectorKey:s.key,profileKind:"env"}),{data:y=[]}=ie(t,{profileKind:"browser_session",connectorKey:s.key}),b=N&&s.installed!==!1;return!!(h||o)||l&&m.length>0||x&&y.length>0||!c||b?e.jsxs("div",{className:"space-y-6",children:[h?e.jsx(kt,{connector:s,organizationId:t,oauthMethod:h}):null,o?e.jsx(B,{title:"App installation",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install the ",s.name," app to create or repair the workspace connection."]}),e.jsx(Ye,{organizationId:t,connectorKey:s.key,provider:o.provider,providerLabel:s.name,installShape:o.installShape,variant:"outline"})]})}):null,l&&m.length>0?e.jsx(Pe,{profiles:m,type:"env"}):null,x&&y.length>0?e.jsx(Pe,{profiles:y,type:"browser_session"}):null,c?null:g?e.jsx(B,{title:"Device runtime",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.name," runs on a linked device — there are no workspace credentials to configure here. Pair a device, then create a connection pinned to it."]}),e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(K,{to:"/$owner/connectors",params:{owner:a},search:{},children:"View devices"})})]})}):u?e.jsx(B,{title:"Authentication",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.name," pairs when you create a connection — there is no workspace-level credential to configure here."]})}):e.jsx(B,{title:"Authentication",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector doesn't need workspace credentials. Create a connection above to get started."})}),e.jsx(bt,{connector:s,organizationId:t,ownerSlug:a,connectionCount:n})]}):null}function bt({connector:s,organizationId:t,ownerSlug:a,connectionCount:n}){const r=X(),{isAdmin:i}=Z(t),h=Xs(),[o,l]=p.useState(!1),[x,u]=p.useState(null),c=s.installed!==!1;if(!i||!c)return null;const g=n>0,N=h.isPending,m=()=>{u(null),h.mutate({connector_key:s.key},{onSuccess:()=>{r({to:"/$owner/connectors",params:{owner:a}})},onError:y=>{u(y instanceof Error?y.message:"Failed to remove connector"),l(!1)}})};return e.jsxs("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Remove connector"}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Archives ",s.name," in this workspace. Existing synced data stays in memory."]}),g?e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Delete"," ",e.jsxs("span",{className:"font-medium text-foreground",children:[n," connection",n===1?"":"s"]})," ","first — uninstall is blocked while any connection still references this connector."]}):null,x?e.jsx("p",{className:"mt-2 rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:x}):null,e.jsx("div",{className:"mt-3",children:o?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(j,{variant:"destructive",size:"sm",disabled:N,onClick:m,children:[N?e.jsx(V,{size:"md",className:"mr-1.5"}):null,"Confirm remove"]}),e.jsx(j,{variant:"ghost",size:"sm",disabled:N,onClick:()=>l(!1),children:"Cancel"})]}):e.jsxs(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",disabled:N||g,onClick:()=>l(!0),children:[e.jsx(xe,{className:"mr-1.5 h-3.5 w-3.5"}),"Remove connector"]})})]})}function Ct({connector:s,organizationId:t,ownerSlug:a}){const n=qe();return e.jsx(Ve,{title:"Actions",summary:`${s.operations_summary?.total??0} actions · organization policies`,onOpen:()=>n?.open({href:"",title:"Actions",connectorPanel:{section:"actions",connectorKey:s.key,organizationId:t,ownerSlug:a}})})}function kt({connector:s,organizationId:t,oauthMethod:a}){const{isAdmin:n,isLoading:r}=Z(t),{setup:i}=Q.useSearch(),h=Q.useNavigate(),{data:o=[],refetch:l,isLoading:x,isError:u}=ie(t,{connectorKey:s.key,provider:a.provider}),c=o.filter(g=>g.profile_kind==="oauth_app");return r||x?e.jsx(D,{className:"h-28 w-full"}):u?e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not load OAuth apps. Reload the page to try again."}):e.jsx(wt,{connector:s,oauthMethod:a,appProfiles:c,isAdmin:n,initialOpen:i==="oauth_app",onClose:()=>{i==="oauth_app"&&h({search:g=>({...g,setup:void 0}),hash:"",replace:!0})},refetchProfiles:l})}function wt({initialOpen:s=!1,onClose:t,connector:a,oauthMethod:n,appProfiles:r,isAdmin:i,refetchProfiles:h}){const o=$s(),l=Ds(),[x,u]=se(a.key,s&&i),[c,g]=p.useState(!1);p.useEffect(()=>{s&&i&&u(!0)},[s,i,u]);const N=`${Es()}/connect/oauth/callback`,[m,y]=se(a.key,`${a.name} OAuth App`),[b,$]=se(a.key,""),[w,k]=se(a.key,null),E=Fs(n),_=Ls(`${a.key}:${x}`,Rs(E),E),{values:z,setValues:R}=_,I=r.find(v=>v.is_default_for_connector&&v.connector_key===a.key),O=()=>{_.canSubmit&&(k(null),o.mutate({connector_key:a.key,profile_kind:"oauth_app",display_name:m.trim()||`${a.name} OAuth App`,slug:b.trim()||void 0,credentials:$t(qs(z))},{onSuccess:v=>{const f=v.auth_profile?.slug;f&&!I&&l.mutate({connector_key:a.key,auth_profile_slug:f}),u(!1),t?.(),y(`${a.name} OAuth App`),$(""),h()},onError:v=>{k(v instanceof Error?v.message:"Failed to add OAuth app")}}))};return e.jsxs(B,{id:"connector-oauth-apps",title:`${Pt(n.provider)} app configuration`,action:i&&!x?e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>u(!0),children:[e.jsx(Me,{className:"size-3.5"}),"Add OAuth app"]}):null,children:[i&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(P,{children:"OAuth callback URL"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:N}),e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(N).then(()=>g(!0)).catch(()=>k("Could not copy the callback URL. Select and copy it above."))},children:[e.jsx(Os,{className:"mr-1.5 h-3.5 w-3.5"}),c?"Copied":"Copy callback URL"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Register this exact URL in your provider’s app settings before saving the client configuration."})]}),r.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No app configured on this server. Choose a managed option if available, or add your own app here."}):e.jsx("div",{className:"space-y-2",children:r.map(v=>e.jsxs("div",{className:re(ne,"flex flex-wrap items-center gap-3 p-3"),children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:v.display_name}),v.is_default_for_connector&&v.connector_key===a.key?e.jsx(U,{variant:"secondary",className:"text-[10px]",children:"Default"}):null,e.jsx(Ze,{status:v.status})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:v.slug})]}),i&&!v.is_default_for_connector&&v.connector_key===a.key&&v.status==="active"?e.jsx(j,{variant:"outline",size:"sm",disabled:l.isPending,onClick:()=>l.mutate({connector_key:a.key,auth_profile_slug:v.slug}),children:"Set default"}):null]},v.slug))}),i&&x?e.jsxs("div",{className:re(ne,"space-y-3 p-3"),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(P,{htmlFor:"oauth-app-name",children:"Display name"}),e.jsx(F,{id:"oauth-app-name",value:m,onChange:v=>y(v.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(P,{htmlFor:"oauth-app-slug",children:"Slug"}),e.jsx(F,{id:"oauth-app-slug",placeholder:"optional",value:b,onChange:v=>$(v.target.value)})]}),e.jsx(Bs,{schema:_.revision??void 0,values:z,onValuesChange:R,fieldIdPrefix:"oauth-app-"}),e.jsx(Ks,{visible:_.hasConflict,onReload:_.reset}),w?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:w}):null,e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(j,{variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>{u(!1),t?.()},children:"Cancel"}),e.jsxs(j,{size:"sm",disabled:o.isPending||!_.canSubmit,onClick:O,children:[o.isPending?e.jsx(V,{size:"md",className:"mr-1.5"}):null,"Save OAuth app"]})]})]}):null]})}function At({connector:s,organizationId:t,ownerSlug:a,connectorKey:n,connections:r,isLoading:i,refetchConnections:h}){const l=Te(s.auth_schema).find(N=>N.type==="oauth"),{data:x=[],refetch:u,isLoading:c,isError:g}=ie(t,{connectorKey:s.key,provider:l?.provider});if(l){if(g)return e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not load accounts. Reload the page to try again."});const N=x.filter(y=>y.profile_kind==="oauth_app"),m=x.filter(y=>y.profile_kind==="oauth_account");return e.jsx(_t,{connector:s,organizationId:t,oauthMethod:l,appProfiles:N,accounts:m,connections:r,isLoading:i||c,refetchProfiles:u,refetchConnections:h})}return e.jsx(Qe,{connector:s,organizationId:t,ownerSlug:a,connectorKey:n,connections:r,isLoading:i})}function _t({connector:s,organizationId:t,oauthMethod:a,appProfiles:n,accounts:r,connections:i,isLoading:h,refetchProfiles:o,refetchConnections:l}){const{session:x}=Cs(),{isAdmin:u,isLoading:c}=Z(t),g=ks(),N=ws(),m=As(),[y,b]=p.useState(""),[$,w]=p.useState([]),k=n.filter(f=>f.status==="active"),E=k.find(f=>f.is_default_for_connector&&f.connector_key===s.key),_=(u?k.find(f=>f.slug===y):void 0)??E??(u&&k.length===1?k[0]:void 0),z=new Set(i.map(f=>f.auth_profile_slug)),R=r.filter(f=>f.created_by===x?.user?.id),I=R.filter(f=>!z.has(f.slug)),O=!i.some(f=>f.created_by===x?.user?.id)&&R.length===0;if(h||c||!x?.user?.id||!O&&I.length===0&&!m.error&&!m.continueUrl)return null;const v=f=>m.begin(async()=>{const A=await g.mutateAsync({connector_key:s.key,app_auth_profile_slug:f,requested_scopes:Ts(a,$)});return o(),l(),A});return e.jsxs(B,{title:O?"Connect your account":"Your accounts",children:[O&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your own account to grant access. Your connection is private to you."}),u&&k.length>1?e.jsxs("div",{className:"space-y-1",children:[e.jsx(P,{children:"App used for this account"}),e.jsxs(Le,{value:_?.slug??"",onValueChange:b,children:[e.jsx(Re,{"aria-label":"App used for this account",children:e.jsx(Oe,{placeholder:"Choose an OAuth app"})}),e.jsx(Be,{children:k.map(f=>e.jsxs(Ke,{value:f.slug,children:[f.display_name,f.is_default_for_connector&&f.connector_key===s.key?" (workspace default)":""]},f.slug))})]})]}):_?e.jsxs("p",{className:"text-sm",children:["App: ",_.display_name,_.is_default_for_connector&&_.connector_key===s.key?" (workspace default)":""]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:u?"Configure an OAuth app below, then connect your account.":"Ask an administrator to configure and set the workspace-default OAuth app."}),_&&e.jsx(_s,{requiredScopes:Ps(a),optionalScopes:Ss(a),selectedOptionalScopes:$,onToggleOptionalScope:(f,A)=>w(W=>A?[...new Set([...W,f])]:W.filter(T=>T!==f))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(j,{size:"sm",disabled:!_||m.pending,onClick:()=>{_&&v(_.slug)},children:"Connect account"}),u&&e.jsx(j,{asChild:!0,size:"sm",variant:"outline",children:e.jsx("a",{href:"#connector-oauth-apps",children:"Manage app"})})]})]}),I.map(f=>e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 py-2",children:[e.jsx("span",{className:"text-sm",children:f.display_name}),e.jsx(j,{variant:"outline",size:"sm",disabled:m.pending,onClick:()=>void m.begin(()=>f.status==="active"?g.mutateAsync({connector_key:s.key,auth_profile_slug:f.slug}):N.mutateAsync({auth_profile_slug:f.slug})),children:f.status==="active"?"Use this account":"Reconnect"})]},f.slug)),m.error&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:m.error}),m.continueUrl&&e.jsx("a",{href:m.continueUrl,target:"_blank",rel:"noreferrer",className:"text-sm underline",children:"Continue authorization in your browser"})]})}function Pe({profiles:s,type:t}){const a=t==="env"?"Credentials":"Browser sessions";return e.jsx(B,{title:a,children:e.jsx("div",{className:"space-y-2",children:s.map(n=>e.jsxs("div",{className:re(ne,"p-3"),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:n.display_name}),e.jsx(Ze,{status:n.status})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.slug})]},n.slug))})})}function St({connector:s,organizationId:t,ownerSlug:a}){const n=qe(),r=Object.keys(s.feeds_schema??{}).length;return r?e.jsx(Ve,{title:"Feeds",summary:`${r} ${r===1?"feed type":"feed types"}`,onOpen:()=>n?.open({href:"",title:"Feeds",connectorPanel:{section:"feeds",connectorKey:s.key,organizationId:t,ownerSlug:a}})}):null}function Qe({connector:s,organizationId:t,ownerSlug:a,connectorKey:n,connections:r,isLoading:i}){const h=X(),o=We(s?.auth_schema);if(i)return e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{className:"h-4 w-24"}),e.jsx(D,{className:"h-16 w-full rounded-lg"})]});if(r.length===0){const l=s&&o?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(Ye,{organizationId:t,connectorKey:n,provider:o.provider,providerLabel:s.name,installShape:o.installShape,size:"default",label:`Install ${s.name}`}),e.jsx(j,{asChild:!0,variant:"outline",children:e.jsx(K,{to:"/$owner/connectors/create/$connectorKey",params:{owner:a,connectorKey:n},children:"Use your own app"})})]}):e.jsxs(j,{size:"default",onClick:()=>h({to:"/$owner/connectors/create/$connectorKey",params:{owner:a,connectorKey:n}}),children:[e.jsx(Me,{className:"mr-1.5 h-4 w-4"}),"Create connection"]});return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:l})}return null}function Ze({status:s}){const t=s==="active"?"text-green-500":s==="error"||s==="revoked"?"text-destructive":"text-amber-500";return e.jsxs("span",{className:re("text-xs",t),children:["· ",s]})}function Pt(s){return s.charAt(0).toUpperCase()+s.slice(1)}function $t(s){const t={};for(const[a,n]of Object.entries(s))typeof n=="string"&&n.trim()?t[a]=n.trim():(typeof n=="number"||typeof n=="boolean")&&(t[a]=String(n));return t}export{vt as ConnectorDetailShell,_t as OAuthAccountsSection,wt as OAuthAppProfilesSection,It as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey.index-C7TPS598.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,dW as M,P as h,iD as w,r as j,t as z,cN as C,iE as N}from"./index-_oPeVpL_.js";import{A as k}from"./agent-loading-shells-CtZJM2Gc.js";import{s as b,R as y,A as L}from"./agent-thread-C8UaUTWc.js";import"./app-bridge-BCm4muqj.js";import"./use-mention-search-DqEykWl_.js";import"./index-Vcq4gwWv.js";import"./events-feed-fucGZSJR.js";import"./conversations-table-DfZGICl7.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./clients-CpG676mg.js";const m={path:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",hex:"5865F2"},p={path:"M1.637 0C.733 0 0 .733 0 1.637v16.5c0 .904.733 1.636 1.637 1.636h3.955v3.323c0 .804.97 1.207 1.539.638l3.963-3.96h11.27c.903 0 1.636-.733 1.636-1.637V5.592L18.408 0Zm3.955 5.592h12.816v8.59H8.455l-2.863 2.863Z",hex:"34A853"},d={path:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",hex:"26A5E4"},x={path:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",hex:"25D366"},O={discord:{hex:`#${m.hex}`,path:m.path},gchat:{hex:`#${p.hex}`,path:p.path},slack:{hex:"#4A154B",path:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},teams:{imgSrc:"https://www.google.com/s2/favicons?domain=teams.microsoft.com&sz=64"},telegram:{hex:`#${d.hex}`,path:d.path},whatsapp:{hex:`#${x.hex}`,path:x.path}};function T({platform:s,className:t}){const a=s?O[s]:null;return a?"imgSrc"in a?e.jsx("img",{src:a.imgSrc,alt:"","aria-hidden":"true",className:h("rounded-sm",t),loading:"lazy"}):e.jsx("svg",{viewBox:a.viewBox??"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:t,style:{color:a.hex},children:e.jsx("path",{d:a.path})}):e.jsx(M,{className:h("text-muted-foreground",t),"aria-hidden":"true"})}const I={slack:"Slack",telegram:"Telegram",whatsapp:"WhatsApp",discord:"Discord",web:"Web"};function P(s,t,a){return s==="slack"&&a?.teamId&&t?`https://app.slack.com/client/${a.teamId}/${t}`:null}function R({owner:s,agentId:t,conversationId:a}){const{data:n=[],isLoading:u}=w(t,a,{orgSlug:s}),c=j.useMemo(()=>n.map(r=>b(r,{showToolCalls:!0})).filter(r=>r!==null),[n]),[o,g]=a.split(":"),i=I[o]??"the source app",{org:f}=z(),{data:v=[]}=C(f?.id??"",{connectorKey:o}),A=v[0]?.config?.chatMetadata,l=P(o,g,A);return e.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col pb-6",children:u?e.jsx(k,{readOnly:!0}):c.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No messages in this conversation."}):e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsx(y,{messages:c,children:e.jsx(L,{readOnly:!0})}),l?e.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"mt-4 flex items-center gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3 text-sm transition-colors hover:bg-muted",children:[e.jsx(T,{platform:o,className:"size-5 shrink-0"}),e.jsxs("span",{className:"text-muted-foreground",children:["This is a read-only copy. Continue the conversation with this agent in ",i,"."]}),e.jsxs("span",{className:"ml-auto shrink-0 whitespace-nowrap font-medium text-foreground",children:["Open ",i," →"]})]}):null]})})}function q(){const{owner:s,agentId:t,conversationId:a}=N.useParams();return e.jsx(R,{owner:s,agentId:t,conversationId:a})}export{q as component};
|
|
2
|
-
//# sourceMappingURL=_conversationId-CEhxlTIo.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v as u,m as v,j as t,ah as x,bZ as d,b_ as f,b$ as h,bm as w,c0 as j}from"./index-_oPeVpL_.js";import{E as P}from"./event-detail-04qOUGIP.js";import"./events-feed-fucGZSJR.js";import"./conversations-table-DfZGICl7.js";import"./renderer-BL6VcwQH.js";import"./card-DIF8SF9b.js";import"./clients-CpG676mg.js";import"./view-param-filters-Cylutoy1.js";import"./app-bridge-BCm4muqj.js";import"./filter-editors-DCQgGLyR.js";function g({owner:e,eventId:a,viewKey:r}){const o=u({strict:!1}),i=v(),m=(n,s)=>t.jsx(P,{owner:s,organizationId:n,eventId:a,viewKey:r,params:r?f(o):{},onParamsChange:(l,p,c)=>void i({to:d(s,a,l),search:p,replace:c?.replace??!0}),fullBleed:!0},`${s}/${a}`);return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:e==="me"?m(null,e):t.jsx(x,{owner:e,children:({organizationId:n,ownerSlug:s})=>n?m(n,s):t.jsx("div",{className:"mx-auto h-40 w-full max-w-3xl animate-pulse rounded-md bg-muted/40"})})})}function D(){const{owner:e,eventId:a}=h.useParams(),r=w({from:"/$owner/events/$eventId/-/views/$viewKey",shouldThrow:!1}),o=j(a);return o===null?null:t.jsx(g,{owner:e,eventId:o,viewKey:r?.viewKey})}export{D as component};
|
|
2
|
-
//# sourceMappingURL=_eventId-Cl8GSdjg.js.map
|