@lobu/runtime-server 24.4.0 → 24.5.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/skills.json +2 -2
- package/dist/component.json +1 -1
- package/dist/connectors/postgres.ts +77 -48
- package/dist/dependencies.bun.lock +86 -117
- package/dist/owletto/dist/assets/_-CCWuGXtQ.js +2 -0
- package/dist/owletto/dist/assets/_-DOJW1D-I.js +3 -0
- package/dist/owletto/dist/assets/_agentId-CJhQbi6k.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DD4K1i6V.js +2 -0
- package/dist/owletto/dist/assets/_automationId-Cbd7B0mP.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-DFpPep9B.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-n3iSDT74.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-B1yGIGA9.js +2 -0
- package/dist/owletto/dist/assets/_eventId-B1H0-vD7.js +2 -0
- package/dist/owletto/dist/assets/_name-D30_V03t.js +2 -0
- package/dist/owletto/dist/assets/_owner-Be8O41u8.js +3 -0
- package/dist/owletto/dist/assets/_shape-C6YbloRh.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-BMPvvoOI.js +2 -0
- package/dist/owletto/dist/assets/_slug-Bc4YIEA2.js +2 -0
- package/dist/owletto/dist/assets/_view-aoFDwEld.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-DuNHc3cc.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-rJ7A1zNx.js +2 -0
- package/dist/owletto/dist/assets/accept-invitation-pUl-c1KQ.js +2 -0
- package/dist/owletto/dist/assets/activity-route-view-DN0ZEAzr.js +2 -0
- package/dist/owletto/dist/assets/{agent-card-controls-99mG6H5k.js → agent-card-controls-C5jNWgfq.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-kMmqQSrf.js → agent-client-setup-list-DbXtJTsO.js} +2 -2
- package/dist/owletto/dist/assets/agent-connect-pages-DcTuiSt9.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-CdA5vLr8.js +2 -0
- package/dist/owletto/dist/assets/agent-guardrails-route-BJyfalBY.js +2 -0
- package/dist/owletto/dist/assets/agent-list-row-rF5LH-3k.js +2 -0
- package/dist/owletto/dist/assets/{agent-loading-shells-Dnmb6W5Y.js → agent-loading-shells-ClY_O6lb.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-CbhXlbgY.js → agent-permissions-matrix-bP1Qihv7.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-V__2i6Vl.js → agent-skill-context-BAaGpvfS.js} +2 -2
- package/dist/owletto/dist/assets/agent-skills-route-Bv5luNdw.js +2 -0
- package/dist/owletto/dist/assets/agent-tab-intro-ednTs4WF.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-WNk2HapT.js +6 -0
- package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +2 -0
- package/dist/owletto/dist/assets/agents-DY2S2SGE.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-bPTjdVS1.js +2 -0
- package/dist/owletto/dist/assets/app._appId-DrL5H5lB.js +2 -0
- package/dist/owletto/dist/assets/assist-composer-ClfFEVx7.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-dFy1Huas.js +2 -0
- package/dist/owletto/dist/assets/automation-row-DCHM--aD.js +2 -0
- package/dist/owletto/dist/assets/automations-DY2S2SGE.js +2 -0
- package/dist/owletto/dist/assets/{calendar-DMq3Dtqy.js → calendar-Ck0yOLYu.js} +2 -2
- package/dist/owletto/dist/assets/{callback-B-CAz-bK.js → callback-DRABUOha.js} +2 -2
- package/dist/owletto/dist/assets/{card-SFtxv9f2.js → card-Bdi7VEwo.js} +2 -2
- package/dist/owletto/dist/assets/change-summary-PBoM6Asb.js +2 -0
- package/dist/owletto/dist/assets/{claim-DrxIRWKt.js → claim-CUIG1Oc-.js} +2 -2
- package/dist/owletto/dist/assets/{client-activity-scopes-boZOHuPW.js → client-activity-scopes-CXOWB5co.js} +2 -2
- package/dist/owletto/dist/assets/{client-rows-BJ2PxM4J.js → client-rows-36VnmgMK.js} +2 -2
- package/dist/owletto/dist/assets/{clients-C7Lnuc3S.js → clients-BJRcMk1A.js} +2 -2
- package/dist/owletto/dist/assets/code-editor-DNuRKde1.js +16 -0
- package/dist/owletto/dist/assets/connect-CMcEQWls.js +2 -0
- package/dist/owletto/dist/assets/connect-menu-C-B-1xGR.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-tGipxP5a.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-DSGU78eV.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-CPLbry8R.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-jSnGvzYs.js +2 -0
- package/dist/owletto/dist/assets/{connection-feed-detail-D7pnWaFB.js → connection-feed-detail-BIlkK0Pd.js} +2 -2
- package/dist/owletto/dist/assets/connection-q1bdnxCN.js +2 -0
- package/dist/owletto/dist/assets/{connections-browser-DDJQh8Na.js → connections-browser-V-3td9DB.js} +2 -2
- package/dist/owletto/dist/assets/{connector-boxes-DDX7Ebc4.js → connector-boxes-lFc-WP83.js} +2 -2
- package/dist/owletto/dist/assets/connector-page-shell-Cs1SjrYB.js +2 -0
- package/dist/owletto/dist/assets/connector-provenance-aJFeeRIC.js +2 -0
- package/dist/owletto/dist/assets/{connector-scope-lists-BibdzKl1.js → connector-scope-lists--vNdbOn0.js} +2 -2
- package/dist/owletto/dist/assets/connectors-BsvDMdsQ.js +2 -0
- package/dist/owletto/dist/assets/consent-DJV78pnz.js +2 -0
- package/dist/owletto/dist/assets/copy-button-DjMWgrBf.js +2 -0
- package/dist/owletto/dist/assets/{core.esm-CHnfRiEM.js → core.esm-CQzL3ObT.js} +3 -3
- package/dist/owletto/dist/assets/create-BmKx5vq3.js +2 -0
- package/dist/owletto/dist/assets/create-Rt0RbiD4.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-PEmSLMD6.js +3 -0
- package/dist/owletto/dist/assets/create-jBEuveV1.js +2 -0
- package/dist/owletto/dist/assets/create._connectorKey-DcxhYIYC.js +2 -0
- package/dist/owletto/dist/assets/device-Ba3RsIgb.js +2 -0
- package/dist/owletto/dist/assets/device-pin-tombstone-C79KIAIK.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-CIaoq9co.js +2 -0
- package/dist/owletto/dist/assets/{entity-avatar-HloBoalJ.js → entity-avatar-TVKjZxWQ.js} +2 -2
- package/dist/owletto/dist/assets/entity-options-daOOQo7O.js +2 -0
- package/dist/owletto/dist/assets/entity-page-BfJXvbxn.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-BLwH6qa7.js +2 -0
- package/dist/owletto/dist/assets/event-card-DVUB8my6.js +2 -0
- package/dist/owletto/dist/assets/event-detail-DkY95e5b.js +2 -0
- package/dist/owletto/dist/assets/{events-feed-BysC9HgU.js → events-feed-B9CZHI_P.js} +2 -2
- package/dist/owletto/dist/assets/filter-bar-wPaR12SS.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-BMiXl54z.js → full-page-spinner-BqmckkOf.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-Csusrok2.js +2 -0
- package/dist/owletto/dist/assets/identity-Dmg3STO8.js +2 -0
- package/dist/owletto/dist/assets/index--ZWegctR.js +2 -0
- package/dist/owletto/dist/assets/{index-CzoK57xp.js → index-B0kw2lFL.js} +2 -2
- package/dist/owletto/dist/assets/index-BKrdVwW9.js +2 -0
- package/dist/owletto/dist/assets/index-BUBcNNUY.js +2 -0
- package/dist/owletto/dist/assets/index-BUDr4-Yv.js +2 -0
- package/dist/owletto/dist/assets/index-BYPQWVwD.js +2 -0
- package/dist/owletto/dist/assets/index-BfpaPJPj.js +2 -0
- package/dist/owletto/dist/assets/index-BicNFLBW.js +2 -0
- package/dist/owletto/dist/assets/index-Bsdv5aks.js +2 -0
- package/dist/owletto/dist/assets/index-C186T2Rw.js +53 -0
- package/dist/owletto/dist/assets/index-CX0pJ9j9.js +2 -0
- package/dist/owletto/dist/assets/{index-B4wXJwQY.js → index-CsrT07TJ.js} +2 -2
- package/dist/owletto/dist/assets/index-DdBTTN3y.js +7899 -0
- package/dist/owletto/dist/assets/index-DdYWarql.css +1 -0
- package/dist/owletto/dist/assets/index-JYEIN8nM.js +2 -0
- package/dist/owletto/dist/assets/index-Vcq4gwWv.js +2 -0
- package/dist/owletto/dist/assets/{index-C-WaHj1Y.js → index-ijqrJaRB.js} +2 -2
- package/dist/owletto/dist/assets/{index-D4-uel59.js → index-ikp_mTsf.js} +2 -2
- package/dist/owletto/dist/assets/json-diff-BaLL4Fsu.js +14 -0
- package/dist/owletto/dist/assets/{list-skeleton-Bp4HNgJ9.js → list-skeleton-CXDLkYTg.js} +2 -2
- package/dist/owletto/dist/assets/login-u6LCgDYG.js +2 -0
- package/dist/owletto/dist/assets/{logout-DxmfsVKD.js → logout-JhmuWJEH.js} +2 -2
- package/dist/owletto/dist/assets/manage-gear-D8LMhehh.js +2 -0
- package/dist/owletto/dist/assets/{member-scope-gate-vp3FihBD.js → member-scope-gate-4FQ0aanZ.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-CNZJbCJC.js +74 -0
- package/dist/owletto/dist/assets/model-jL871x2J.js +2 -0
- package/dist/owletto/dist/assets/model-selector-CgU8SJMF.js +2 -0
- package/dist/owletto/dist/assets/models-jdemgIZk.js +2 -0
- package/dist/owletto/dist/assets/nav-pill-DrFkuyUQ.js +2 -0
- package/dist/owletto/dist/assets/new-CcJOd5aH.js +2 -0
- package/dist/owletto/dist/assets/{new-CvX8_gIb.js → new-DgE1pVV0.js} +2 -2
- package/dist/owletto/dist/assets/new-OWwrYckd.js +2 -0
- package/dist/owletto/dist/assets/organization-CKM_oFX3.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-D68BjguQ.js +2 -0
- package/dist/owletto/dist/assets/pending-seed-sml8Uf6e.js +2 -0
- package/dist/owletto/dist/assets/permissions-BvA9SATv.js +2 -0
- package/dist/owletto/dist/assets/{proposal-review-shell-B4CSiyLB.js → proposal-review-shell-D6KABxah.js} +2 -2
- package/dist/owletto/dist/assets/public-shell-ready-BIVCHQHe.js +2 -0
- package/dist/owletto/dist/assets/record-activity-C9gVBbF0.js +2 -0
- package/dist/owletto/dist/assets/{record-session-CWXnCVln.js → record-session-R-uHNuby.js} +2 -2
- package/dist/owletto/dist/assets/{renderer-7EGgTVX0.js → renderer-DXfJaCCa.js} +23 -23
- package/dist/owletto/dist/assets/{reset-password-CFUzxH7m.js → reset-password-Mx3baeNc.js} +2 -2
- package/dist/owletto/dist/assets/run-activity-link-CaIBSRQj.js +2 -0
- package/dist/owletto/dist/assets/run-initiator-BvzQJYW9.js +2 -0
- package/dist/owletto/dist/assets/{runs-BPtQBTRN.js → runs-fFJ1lPnw.js} +2 -2
- package/dist/owletto/dist/assets/runs-panel-DEnZHTa5.js +2 -0
- package/dist/owletto/dist/assets/runs-table-XGnxJl7S.js +2 -0
- package/dist/owletto/dist/assets/{schema-type-editor-panel-CAhOB648.js → schema-type-editor-panel-C0_9VcSs.js} +2 -2
- package/dist/owletto/dist/assets/settings-CP4PjMQA.js +2 -0
- package/dist/owletto/dist/assets/settings-CgaUJMHH.js +2 -0
- package/dist/owletto/dist/assets/skills-D-e_h3a9.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-Bh5F4C5K.js → source-record-panels-Bh0n4gGw.js} +2 -2
- package/dist/owletto/dist/assets/{status-dot-D3FoDRcc.js → status-dot-Cpq63I7p.js} +2 -2
- package/dist/owletto/dist/assets/{table-DFcJRNk7.js → table-BUqshjxa.js} +2 -2
- package/dist/owletto/dist/assets/{use-automations-BHoV0dLs.js → use-automations-BLNjxq2K.js} +2 -2
- package/dist/owletto/dist/assets/use-login-redirect-CmyQW7GT.js +2 -0
- package/dist/owletto/dist/assets/{use-mention-search-C3rWLuKm.js → use-mention-search-dn3ws1WB.js} +3 -3
- package/dist/owletto/dist/assets/use-scroll-sentinel-DRyBMueA.js +2 -0
- package/dist/owletto/dist/assets/view-param-filters-CER47Tlz.js +2 -0
- package/dist/owletto/dist/assets/{views-access-required-DHrDO333.js → views-access-required-C_b9itZ2.js} +2 -2
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +53989 -51632
- package/dist/server.bundle.mjs +5 -5
- package/dist/verify.mjs +1 -1
- package/npm-shrinkwrap.json +183 -217
- package/package.json +3 -4
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +8 -2
- package/vendor/connector-sdk/dist/reaction-sdk.d.ts +5 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/contracts/agent-settings.d.ts +61 -6
- package/vendor/core/dist/contracts/agent-settings.js +10 -7
- package/vendor/core/dist/contracts/tools/manage-agents.d.ts +473 -98
- package/vendor/core/dist/contracts/tools/manage-agents.js +111 -2
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +21 -18
- package/vendor/core/dist/contracts/tools/manage-automations.js +15 -15
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
- package/vendor/core/dist/contracts/tools/manage-inference-providers.d.ts +445 -0
- package/vendor/core/dist/contracts/tools/manage-inference-providers.js +133 -0
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +4 -4
- package/vendor/core/dist/contracts/tools/manage-views.js +5 -3
- package/vendor/core/dist/contracts/worker/device-automation.js +4 -2
- package/vendor/core/dist/error-report.d.ts +73 -0
- package/vendor/core/dist/error-report.js +346 -0
- package/vendor/core/dist/index.d.ts +3 -1
- package/vendor/core/dist/index.js +4 -1
- package/vendor/core/dist/logger.js +7 -4
- package/vendor/core/dist/otel-fetch.d.ts +19 -0
- package/vendor/core/dist/otel-fetch.js +96 -0
- package/vendor/core/dist/otel.d.ts +9 -0
- package/vendor/core/dist/otel.js +28 -7
- package/vendor/core/dist/reserved.d.ts +1 -1
- package/vendor/core/dist/reserved.js +6 -4
- package/vendor/core/dist/tool-result.d.ts +8 -0
- package/vendor/core/dist/tool-result.js +61 -0
- package/vendor/core/dist/utils/diagnostic-scrubber.js +1 -1
- package/vendor/core/dist/worker/auth.js +4 -0
- package/vendor/core/package.json +6 -1
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-DIK0ae_S.js +0 -2
- package/dist/owletto/dist/assets/_-gTbcArpS.js +0 -3
- package/dist/owletto/dist/assets/_agentId-DOmcJZfk.js +0 -2
- package/dist/owletto/dist/assets/_agentId-DW6wRCVC.js +0 -2
- package/dist/owletto/dist/assets/_automationId-B9IcDYBu.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-C6PmMPTA.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-BrJ8Pzze.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-BpJAeYYW.js +0 -2
- package/dist/owletto/dist/assets/_eventId-DarQJo0G.js +0 -2
- package/dist/owletto/dist/assets/_name-DtmNTcUm.js +0 -2
- package/dist/owletto/dist/assets/_owner-Db8at3hk.js +0 -3
- package/dist/owletto/dist/assets/_shape-6iFA8A86.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-CXkHn3Nl.js +0 -2
- package/dist/owletto/dist/assets/_slug-DBOuBLoX.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-DC27aIN9.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-DuYDieln.js +0 -2
- package/dist/owletto/dist/assets/accept-invitation-BbDCVvur.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-V4ftmSN7.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-B-NPTFs6.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-DfMTSIvj.js +0 -2
- package/dist/owletto/dist/assets/agent-guardrails-route-BvGgfd-h.js +0 -2
- package/dist/owletto/dist/assets/agent-skills-route-DFXr_bHp.js +0 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-DWzljvFb.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-DQIr20H-.js +0 -6
- package/dist/owletto/dist/assets/agents-CLbeiqTR.js +0 -2
- package/dist/owletto/dist/assets/agents-workbench-C8bTa2rv.js +0 -2
- package/dist/owletto/dist/assets/app._appId-Bsq40nak.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-C9Cgr5Zj.js +0 -2
- package/dist/owletto/dist/assets/automations-CLbeiqTR.js +0 -2
- package/dist/owletto/dist/assets/code-editor-rX0t1g5C.js +0 -16
- package/dist/owletto/dist/assets/connect-BcwgytDV.js +0 -2
- package/dist/owletto/dist/assets/connect-menu-BF-AlunU.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-sDypRDeN.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-C9OkW1tv.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-Dc6HYr55.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.index-C6qbqgwF.js +0 -2
- package/dist/owletto/dist/assets/connection-88YzIBK9.js +0 -2
- package/dist/owletto/dist/assets/connector-provenance-Th8ymGec.js +0 -2
- package/dist/owletto/dist/assets/connectors-BqwgLUUK.js +0 -2
- package/dist/owletto/dist/assets/consent-BR5U7dwb.js +0 -2
- package/dist/owletto/dist/assets/copy-button-2swYh4jb.js +0 -2
- package/dist/owletto/dist/assets/create-BsPVnRpG.js +0 -2
- package/dist/owletto/dist/assets/create-CVPYVOR5.js +0 -2
- package/dist/owletto/dist/assets/create-QFjmhOEU.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-DmCOFbRT.js +0 -3
- package/dist/owletto/dist/assets/create._connectorKey-DLDDVtLS.js +0 -2
- package/dist/owletto/dist/assets/cronstrue-CKwjNYgj.js +0 -2
- package/dist/owletto/dist/assets/device-CKup7kvB.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-xGhCTU5_.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-B1H_ivDT.js +0 -2
- package/dist/owletto/dist/assets/entity-options-BSW_EG0W.js +0 -2
- package/dist/owletto/dist/assets/entity-page-D-WDWrAe.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-BCBdFndu.js +0 -2
- package/dist/owletto/dist/assets/event-card-Mcxv56DG.js +0 -2
- package/dist/owletto/dist/assets/event-detail-DXifj49J.js +0 -2
- package/dist/owletto/dist/assets/filter-bar-BQm-ubB1.js +0 -2
- package/dist/owletto/dist/assets/guardrails-D7W80sJO.js +0 -2
- package/dist/owletto/dist/assets/identity-N0cAO9BR.js +0 -2
- package/dist/owletto/dist/assets/index-4gCDI7m4.js +0 -7950
- package/dist/owletto/dist/assets/index-BNaI5GpS.js +0 -2
- package/dist/owletto/dist/assets/index-BUUrHuJJ.js +0 -2
- package/dist/owletto/dist/assets/index-BqrvJmLh.js +0 -2
- package/dist/owletto/dist/assets/index-CnvQEA5V.js +0 -2
- package/dist/owletto/dist/assets/index-Cq7P2c_E.js +0 -2
- package/dist/owletto/dist/assets/index-D3omC3Us.js +0 -2
- package/dist/owletto/dist/assets/index-DDGdlQrt.css +0 -1
- package/dist/owletto/dist/assets/index-DFEW7hMg.js +0 -2
- package/dist/owletto/dist/assets/index-DVV-WWuT.js +0 -2
- package/dist/owletto/dist/assets/index-DduQ_e9q.js +0 -2
- package/dist/owletto/dist/assets/index-DutlI1d-.js +0 -2
- package/dist/owletto/dist/assets/index-wHFQv1aT.js +0 -12
- package/dist/owletto/dist/assets/json-diff-E5D-NGYT.js +0 -4
- package/dist/owletto/dist/assets/login-7F48UJGx.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-CfDmjhDl.js +0 -74
- package/dist/owletto/dist/assets/model-Dn40BUzs.js +0 -2
- package/dist/owletto/dist/assets/model-selector-88PJnyTq.js +0 -2
- package/dist/owletto/dist/assets/models-BBK_n2RP.js +0 -2
- package/dist/owletto/dist/assets/new-4ruWHLR5.js +0 -2
- package/dist/owletto/dist/assets/new-gMD1PHTL.js +0 -2
- package/dist/owletto/dist/assets/oauth-workspace-access-D9BNmyMY.js +0 -2
- package/dist/owletto/dist/assets/organization-BHcp5Pzg.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-0sa10jER.js +0 -2
- package/dist/owletto/dist/assets/permissions-hhxosugv.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-CsenJeXa.js +0 -2
- package/dist/owletto/dist/assets/record-activity-D7bRaMk2.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-Bj63_hb9.js +0 -2
- package/dist/owletto/dist/assets/settings-Dg6nxKyw.js +0 -2
- package/dist/owletto/dist/assets/settings-KJJ6WihO.js +0 -2
- package/dist/owletto/dist/assets/skills-ayt06_o2.js +0 -2
- package/dist/owletto/dist/assets/use-scroll-sentinel-Ct-jt7O0.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-mKoqDsaD.js +0 -2
- /package/vendor/@better-auth-kysely-adapter/{.bun-tag-abf95749a412716 → .bun-tag-654b3a002b271269} +0 -0
- /package/vendor/postgres/{.bun-tag-22d644c2873790db → .bun-tag-c81dacd34e959a7a} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Span, Tracer } from "@opentelemetry/api";
|
|
2
2
|
import { SpanKind, SpanStatusCode } from "@opentelemetry/api";
|
|
3
3
|
import type { SpanProcessor } from "@opentelemetry/sdk-trace-node";
|
|
4
|
+
import { type DescribeErrorOptions } from "./error-report";
|
|
4
5
|
export interface OtelConfig {
|
|
5
6
|
serviceName: string;
|
|
6
7
|
serviceVersion?: string;
|
|
@@ -21,6 +22,14 @@ export declare function getTracer(): Tracer | null;
|
|
|
21
22
|
export declare function shutdownTracing(timeoutMs?: number): Promise<void>;
|
|
22
23
|
export declare function flushTracing(): Promise<void>;
|
|
23
24
|
export declare function createSpan(name: string, attributes?: Record<string, string | number | boolean>, kind?: SpanKind): Span | null;
|
|
25
|
+
/**
|
|
26
|
+
* Mark a span failed and attach its grouped error report: exception type,
|
|
27
|
+
* parameterized message, frame-only stack, kind and fingerprint. The raw
|
|
28
|
+
* message is never recorded, because it can carry credentials or source data.
|
|
29
|
+
* `scope` defaults to the span's name; pass it when the span was not the
|
|
30
|
+
* reporting boundary.
|
|
31
|
+
*/
|
|
32
|
+
export declare function recordError(span: Span | null | undefined, error: unknown, options?: Partial<DescribeErrorOptions>): void;
|
|
24
33
|
export declare function withSpan<T>(name: string, fn: (span: Span | null) => Promise<T>, attributes?: Record<string, string | number | boolean>): Promise<T>;
|
|
25
34
|
export declare function getCurrentSpan(): Span | undefined;
|
|
26
35
|
/** Run `fn` with `span` active, or plainly when tracing produced no span. */
|
package/vendor/core/dist/otel.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.getTracer = getTracer;
|
|
|
6
6
|
exports.shutdownTracing = shutdownTracing;
|
|
7
7
|
exports.flushTracing = flushTracing;
|
|
8
8
|
exports.createSpan = createSpan;
|
|
9
|
+
exports.recordError = recordError;
|
|
9
10
|
exports.withSpan = withSpan;
|
|
10
11
|
exports.getCurrentSpan = getCurrentSpan;
|
|
11
12
|
exports.runInSpanContext = runInSpanContext;
|
|
@@ -16,7 +17,9 @@ exports.getTraceparent = getTraceparent;
|
|
|
16
17
|
const api_1 = require("@opentelemetry/api");
|
|
17
18
|
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function () { return api_1.SpanKind; } });
|
|
18
19
|
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return api_1.SpanStatusCode; } });
|
|
20
|
+
const error_report_1 = require("./error-report");
|
|
19
21
|
const logger_1 = require("./logger");
|
|
22
|
+
const otel_fetch_1 = require("./otel-fetch");
|
|
20
23
|
const trace_context_1 = require("./trace-context");
|
|
21
24
|
const logger = (0, logger_1.createLogger)("otel");
|
|
22
25
|
let provider = null;
|
|
@@ -91,6 +94,10 @@ function initTracing(config) {
|
|
|
91
94
|
// globally registered provider, so a later init would otherwise export
|
|
92
95
|
// into a provider this call does not own.
|
|
93
96
|
tracer = provider.getTracer(config.serviceName, config.serviceVersion);
|
|
97
|
+
(0, otel_fetch_1.instrumentFetch)({
|
|
98
|
+
tracer: () => tracer,
|
|
99
|
+
recordError: (span, error) => recordError(span, error, { kind: "dependency" }),
|
|
100
|
+
});
|
|
94
101
|
logger.info(useCustomProcessors
|
|
95
102
|
? `Tracing initialized: ${config.serviceName} (custom span processors)`
|
|
96
103
|
: `Tracing initialized: ${config.serviceName} -> ${config.otlpEndpoint}`);
|
|
@@ -140,6 +147,26 @@ function createSpan(name, attributes, kind = api_1.SpanKind.INTERNAL) {
|
|
|
140
147
|
});
|
|
141
148
|
return span;
|
|
142
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Mark a span failed and attach its grouped error report: exception type,
|
|
152
|
+
* parameterized message, frame-only stack, kind and fingerprint. The raw
|
|
153
|
+
* message is never recorded, because it can carry credentials or source data.
|
|
154
|
+
* `scope` defaults to the span's name; pass it when the span was not the
|
|
155
|
+
* reporting boundary.
|
|
156
|
+
*/
|
|
157
|
+
function recordError(span, error, options = {}) {
|
|
158
|
+
if (!span)
|
|
159
|
+
return;
|
|
160
|
+
const name = span.name;
|
|
161
|
+
const report = (0, error_report_1.describeError)(error, {
|
|
162
|
+
scope: options.scope ?? (typeof name === "string" ? name : "span"),
|
|
163
|
+
...(options.kind ? { kind: options.kind } : {}),
|
|
164
|
+
});
|
|
165
|
+
const attributes = (0, error_report_1.errorReportAttributes)(report);
|
|
166
|
+
span.setAttributes(attributes);
|
|
167
|
+
span.addEvent("exception", attributes);
|
|
168
|
+
span.setStatus({ code: api_1.SpanStatusCode.ERROR, message: report.message });
|
|
169
|
+
}
|
|
143
170
|
async function runInSpan(span, fn) {
|
|
144
171
|
try {
|
|
145
172
|
const result = await fn(span);
|
|
@@ -147,13 +174,7 @@ async function runInSpan(span, fn) {
|
|
|
147
174
|
return result;
|
|
148
175
|
}
|
|
149
176
|
catch (error) {
|
|
150
|
-
|
|
151
|
-
span.setStatus({
|
|
152
|
-
code: api_1.SpanStatusCode.ERROR,
|
|
153
|
-
message: error instanceof Error ? error.message : String(error),
|
|
154
|
-
});
|
|
155
|
-
span.recordException(error);
|
|
156
|
-
}
|
|
177
|
+
recordError(span, error);
|
|
157
178
|
throw error;
|
|
158
179
|
}
|
|
159
180
|
finally {
|
|
@@ -38,7 +38,7 @@ export declare const RESERVED_PATHS_SET: ReadonlySet<string>;
|
|
|
38
38
|
* product words that are not knowledge types. Create-time hygiene only — not
|
|
39
39
|
* hide/prune policy (that is `$` prefix only).
|
|
40
40
|
*/
|
|
41
|
-
export declare const RESERVED_ENTITY_TYPE_SLUGS: readonly ["activity", "agents", "connectors", "data", "memory", "members", "settings", "events", "automations", "connections", "sources", "environments", "infrastructure", "inference-providers", "devices", "entity-types", "recent", "chat", "-", "organization", "user", "automation", "content", "source", "connector"];
|
|
41
|
+
export declare const RESERVED_ENTITY_TYPE_SLUGS: readonly ["activity", "agents", "connectors", "data", "memory", "members", "settings", "events", "automations", "connections", "sources", "environments", "infrastructure", "inference-providers", "devices", "entity-types", "recent", "chat", "views", "-", "organization", "user", "automation", "content", "source", "connector"];
|
|
42
42
|
/**
|
|
43
43
|
* Whether a proposed entity-type slug is illegal for user/API create.
|
|
44
44
|
* `$…` is reserved for platform-named types ($member, $resource).
|
|
@@ -113,15 +113,17 @@ exports.RESERVED_ENTITY_TYPE_SLUGS = [
|
|
|
113
113
|
// Live /$owner/<segment> routes that are NOT owner-nav segments (so they are
|
|
114
114
|
// absent from OWNER_ROUTE_SEGMENTS). Entity pages render through the
|
|
115
115
|
// `/$owner/$` splat, which a static segment always outranks, so an entity
|
|
116
|
-
// type with one of these slugs is permanently shadowed: `recent`
|
|
117
|
-
// list page to /$owner/recent
|
|
118
|
-
//
|
|
119
|
-
// /$owner/
|
|
116
|
+
// type with one of these slugs is permanently shadowed: `recent` and `chat`
|
|
117
|
+
// lose their list page to the /$owner/recent and /$owner/chat index routes,
|
|
118
|
+
// while `entity-types` and `views` have no index route and instead lose
|
|
119
|
+
// every detail page to /$owner/entity-types/$slug and
|
|
120
|
+
// /$owner/views/$view. Create-time hygiene only — deliberately not added to
|
|
120
121
|
// OWNER_ROUTE_SEGMENTS, which also feeds the SPA's entity-splat routing
|
|
121
122
|
// guard and would break any existing entity type already using the slug.
|
|
122
123
|
"entity-types",
|
|
123
124
|
"recent",
|
|
124
125
|
"chat",
|
|
126
|
+
"views",
|
|
125
127
|
// The web host's view marker (`/<type>/-/views/<key>`): a type stored as `-`
|
|
126
128
|
// would make its own list page parse as a view path.
|
|
127
129
|
view_path_1.VIEW_PATH_MARKER,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Recognize accepted approvals without treating them as completed writes. */
|
|
2
|
+
export declare function isPendingToolApproval(value: unknown): boolean;
|
|
3
|
+
/** Interpret legacy application result values; protocol errors stay with their transport. */
|
|
4
|
+
export declare function getToolResultFailure(actionName: string, value: unknown): {
|
|
5
|
+
message: string;
|
|
6
|
+
result: Record<string, unknown>;
|
|
7
|
+
} | null;
|
|
8
|
+
//# sourceMappingURL=tool-result.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPendingToolApproval = isPendingToolApproval;
|
|
4
|
+
exports.getToolResultFailure = getToolResultFailure;
|
|
5
|
+
/** Recognize accepted approvals without treating them as completed writes. */
|
|
6
|
+
function isPendingToolApproval(value) {
|
|
7
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
8
|
+
return false;
|
|
9
|
+
const result = value;
|
|
10
|
+
return (result.status === "pending_approval" || result.approval_queued === true);
|
|
11
|
+
}
|
|
12
|
+
/** Interpret legacy application result values; protocol errors stay with their transport. */
|
|
13
|
+
function getToolResultFailure(actionName, value) {
|
|
14
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
15
|
+
return null;
|
|
16
|
+
const result = value;
|
|
17
|
+
const hasError = result.error !== undefined && result.error !== null;
|
|
18
|
+
const summary = result.summary &&
|
|
19
|
+
typeof result.summary === "object" &&
|
|
20
|
+
!Array.isArray(result.summary)
|
|
21
|
+
? result.summary
|
|
22
|
+
: null;
|
|
23
|
+
const allAggregateItemsFailed = typeof summary?.failed === "number" &&
|
|
24
|
+
summary.failed > 0 &&
|
|
25
|
+
summary.successful === 0;
|
|
26
|
+
// Some mutation policies return `success:false` while durably queueing an
|
|
27
|
+
// approval. That is a non-terminal accepted outcome, not a business failure;
|
|
28
|
+
// callers need its approval URL/run id to continue the workflow.
|
|
29
|
+
const acceptedForApproval = isPendingToolApproval(result);
|
|
30
|
+
const reportsFailure = !acceptedForApproval &&
|
|
31
|
+
(result.success === false ||
|
|
32
|
+
result.ok === false ||
|
|
33
|
+
result.status === "failed" ||
|
|
34
|
+
result.status === "error" ||
|
|
35
|
+
result.status === "timeout" ||
|
|
36
|
+
allAggregateItemsFailed);
|
|
37
|
+
if (!hasError && !reportsFailure)
|
|
38
|
+
return null;
|
|
39
|
+
const failedItem = Array.isArray(result.results)
|
|
40
|
+
? result.results.find((item) => item !== null &&
|
|
41
|
+
typeof item === "object" &&
|
|
42
|
+
!Array.isArray(item) &&
|
|
43
|
+
item.success === false)
|
|
44
|
+
: undefined;
|
|
45
|
+
const candidates = [
|
|
46
|
+
result.error,
|
|
47
|
+
result.error_message,
|
|
48
|
+
result.message,
|
|
49
|
+
result.reason,
|
|
50
|
+
failedItem?.error,
|
|
51
|
+
failedItem?.error_message,
|
|
52
|
+
failedItem?.message,
|
|
53
|
+
failedItem?.reason,
|
|
54
|
+
];
|
|
55
|
+
const message = candidates.find((candidate) => typeof candidate === "string" && candidate.trim().length > 0);
|
|
56
|
+
return {
|
|
57
|
+
message: message?.trim() ?? `Action '${actionName}' failed`,
|
|
58
|
+
result,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=tool-result.js.map
|
|
@@ -223,7 +223,7 @@ function isSecretObjectKey(key) {
|
|
|
223
223
|
* the value is a credential, so the whole value is replaced without
|
|
224
224
|
* inspection. Credential CONTAINERS (`hasCredentialSegment`) are deliberately
|
|
225
225
|
* excluded — their collapse rule depends on the value type (see the walk),
|
|
226
|
-
* and collapsing a map parent would destroy surviving key names
|
|
226
|
+
* and collapsing a map parent would destroy surviving key names an upstream
|
|
227
227
|
* connector pre-redacted.
|
|
228
228
|
*/
|
|
229
229
|
function isStrongSecretKey(key) {
|
|
@@ -112,6 +112,10 @@ function parsePositiveIntEnv(name, fallback, allowZero = false) {
|
|
|
112
112
|
* Verify and decrypt a worker authentication token
|
|
113
113
|
*/
|
|
114
114
|
function verifyToken(token, expectedKind) {
|
|
115
|
+
// Routes try a worker token before PAT/OAuth, so most bearers seen here are
|
|
116
|
+
// something else. Only a token in the worker envelope is a failed verify.
|
|
117
|
+
if (!looksLikeWorkerToken(token))
|
|
118
|
+
return null;
|
|
115
119
|
try {
|
|
116
120
|
const parsed = JSON.parse((0, encryption_1.decrypt)(token));
|
|
117
121
|
// Decrypted plaintext is attacker-influenced — `as` would coerce `null`,
|
package/vendor/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/core",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Core types and utilities for Lobu agent platform",
|
|
6
6
|
"repository": {
|
|
@@ -136,6 +136,11 @@
|
|
|
136
136
|
"import": "./dist/contracts/tools/view-content-hash.js",
|
|
137
137
|
"require": "./dist/contracts/tools/view-content-hash.js"
|
|
138
138
|
},
|
|
139
|
+
"./contracts/tools/manage-inference-providers": {
|
|
140
|
+
"types": "./dist/contracts/tools/manage-inference-providers.d.ts",
|
|
141
|
+
"import": "./dist/contracts/tools/manage-inference-providers.js",
|
|
142
|
+
"require": "./dist/contracts/tools/manage-inference-providers.js"
|
|
143
|
+
},
|
|
139
144
|
"./contracts/tools/manage-auth-profiles": {
|
|
140
145
|
"types": "./dist/contracts/tools/manage-auth-profiles.d.ts",
|
|
141
146
|
"import": "./dist/contracts/tools/manage-auth-profiles.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ce as t,w as m,j as e,cf as a,ap as s}from"./index-4gCDI7m4.js";import{A as n}from"./activity-route-view-V4ftmSN7.js";import"./record-activity-D7bRaMk2.js";import"./filter-bar-BQm-ubB1.js";import"./calendar-DMq3Dtqy.js";import"./connection-label-BobuYiAG.js";import"./runs-BPtQBTRN.js";import"./source-record-panels-Bh5F4C5K.js";import"./event-card-Mcxv56DG.js";import"./use-scroll-sentinel-Ct-jt7O0.js";import"./use-automations-BHoV0dLs.js";import"./clients-C7Lnuc3S.js";import"./renderer-7EGgTVX0.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./copy-button-2swYh4jb.js";import"./events-feed-BysC9HgU.js";import"./client-activity-scopes-boZOHuPW.js";import"./client-rows-BJ2PxM4J.js";import"./agent-loading-shells-Dnmb6W5Y.js";import"./member-scope-gate-vp3FihBD.js";import"./public-shell-ready-CsenJeXa.js";function z(){const{owner:o}=t.useParams(),r=m({select:p=>p.pathname}),i=t.useSearch();return e.jsx(n,{owner:o,search:i,entityScope:a(s(r,1)).path})}export{z as component};
|
|
2
|
-
//# sourceMappingURL=_-DIK0ae_S.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-D-WDWrAe.js","assets/index-4gCDI7m4.js","assets/index-DDGdlQrt.css","assets/record-activity-D7bRaMk2.js","assets/filter-bar-BQm-ubB1.js","assets/calendar-DMq3Dtqy.js","assets/connection-label-BobuYiAG.js","assets/runs-BPtQBTRN.js","assets/source-record-panels-Bh5F4C5K.js","assets/event-card-Mcxv56DG.js","assets/use-scroll-sentinel-Ct-jt7O0.js","assets/use-automations-BHoV0dLs.js","assets/clients-C7Lnuc3S.js","assets/renderer-7EGgTVX0.js","assets/table-DFcJRNk7.js","assets/card-SFtxv9f2.js","assets/json-diff-E5D-NGYT.js","assets/index-wHFQv1aT.js","assets/copy-button-2swYh4jb.js","assets/events-feed-BysC9HgU.js","assets/client-activity-scopes-boZOHuPW.js","assets/client-rows-BJ2PxM4J.js","assets/agent-loading-shells-Dnmb6W5Y.js","assets/member-scope-gate-vp3FihBD.js","assets/views-access-required-DHrDO333.js","assets/record-session-CWXnCVln.js","assets/entity-avatar-HloBoalJ.js","assets/view-param-filters-mKoqDsaD.js","assets/app-bridge-C4nPtae3.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{an as p,w as x,ao as y,ap as j,aq as P,ar as g,o as R,s as f,j as e,r as v,as as w,m as E,_ as S}from"./index-4gCDI7m4.js";import{P as r}from"./public-shell-ready-CsenJeXa.js";const _=E(async()=>({default:(await S(async()=>{const{EntityPage:a}=await import("./entity-page-D-WDWrAe.js");return{EntityPage:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]))).EntityPage}));function c(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(w,{})})}function L(){const{owner:a}=p.useParams(),l=x({select:m=>m.pathname}),s=y(j(l)),d=s?.viewKey,{path:u}=P(a,s?.entityPath),{data:t,isLoading:n,error:o}=g(u,{slug:a},{includeBootstrap:!0}),{session:h,isReady:i}=R();return f({active:!n&&i&&!h&&(!!o||!t),owner:a}),n||!i&&!t?e.jsx(c,{}):o||!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(v.Suspense,{fallback:e.jsx(c,{}),children:e.jsx(_,{namespace:t.workspace,path:t.path,entity:t.entity,viewKey:d})})]})}export{L as component};
|
|
3
|
-
//# sourceMappingURL=_-gTbcArpS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v as L,go as w,r as u,gp as C,j as n,h as D,cq as S,o as E,au as P,bd as M,b4 as N,bm as R,cI as O,gq as $,gr as q,by as B,E as Q}from"./index-4gCDI7m4.js";import{L as z,A as F}from"./agent-thread-DQIr20H-.js";import{A as H,C as U}from"./agent-loading-shells-Dnmb6W5Y.js";import"./app-bridge-C4nPtae3.js";import"./use-mention-search-C3rWLuKm.js";import"./index-wHFQv1aT.js";import"./use-automations-BHoV0dLs.js";import"./event-card-Mcxv56DG.js";import"./use-scroll-sentinel-Ct-jt7O0.js";import"./clients-C7Lnuc3S.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./json-diff-E5D-NGYT.js";import"./copy-button-2swYh4jb.js";import"./events-feed-BysC9HgU.js";import"./client-activity-scopes-boZOHuPW.js";import"./client-rows-BJ2PxM4J.js";function W({owner:e,agent:s,threadId:t,afterMessagesContent:d,className:r,initialDraft:h,newChatRequested:f=!1,preventAutoNavigate:p}){const o=L(),i=s.agentId,{data:a=[]}=w(i,{orgSlug:e}),[l,x]=u.useState(()=>C()),[g,A]=u.useState(null);u.useEffect(()=>{!f||t||(x(C()),A(null),o({to:".",search:(m=>{const{new:b,...y}=m;return y}),replace:!0}))},[f,t,o]);const v=u.useMemo(()=>!g||a.some(m=>m.id===g.id)?a:[g,...a],[a,g]),c=t??l,T=!t||!v.some(m=>m.id===t),j=u.useCallback(()=>{if(v.some(b=>b.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const m=S(e,i,c);o({...m,replace:!0})},[v,c,o,e,i]),k=u.useCallback(()=>{T&&!p&&j()},[T,j,p]);return n.jsx("div",{className:D("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(z,{agentId:i,workspaceSlug:e,thread:c,loadHistory:!!t,onFirstUserMessage:k,initialDraft:h,children:n.jsx(F,{afterMessagesContent:d})},`${i}:${c}`)})})}function _({owner:e,agentId:s,threadId:t,initialDraft:d,newChatRequested:r,afterMessagesContent:h,preventAutoNavigate:f}){const{isAuthenticated:p}=E(),{isMember:o,isLoading:i}=P(),a=p&&o,{data:l=[],isLoading:x}=M({enabled:a}),g=s??null,A=l.find(c=>c.agentId===g)??null;return a&&x||i?n.jsx(H,{}):A?n.jsx(W,{owner:e,agent:A,threadId:t,initialDraft:d,newChatRequested:r,afterMessagesContent:h,preventAutoNavigate:f,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(N,{icon:R,title:"Agent not found",description:"This agent may have been removed."})}function G(e){return[...e].sort((s,t)=>t.updatedAt-s.updatedAt)[0]}function J({owner:e,agentId:s,threadId:t,initialDraft:d,forceComposer:r=!1,newChatRequested:h=!1,afterMessagesContent:f,preventAutoNavigate:p}){const o=L(),{data:i=[],isLoading:a}=O($(e,s,{strict:!1})),l=u.useMemo(()=>G(i),[i]);return u.useEffect(()=>{if(t||r||a||!l)return;const x=S(e,s,l.id);o({...x,replace:!0})},[s,a,l,o,e,t,r]),!t&&!r&&(a||l)?n.jsx(U,{}):n.jsx(_,{owner:e,agentId:s,threadId:t,initialDraft:d,newChatRequested:h,afterMessagesContent:f,preventAutoNavigate:p})}function ft(){const{owner:e,agentId:s}=q.useParams(),{threadId:t}=B({strict:!1}),{new:d,prompt:r}=Q({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 pt-2.5 pb-4 lg:px-6 lg:pb-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(J,{owner:e,agentId:s,threadId:t,initialDraft:r,forceComposer:!t,newChatRequested:!!d})})})}export{ft as component};
|
|
2
|
-
//# sourceMappingURL=_agentId-DOmcJZfk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{he as r,j as e}from"./index-4gCDI7m4.js";import{A as n}from"./agents-workbench-C8bTa2rv.js";import"./agent-editor-form-DfMTSIvj.js";import"./model-selector-88PJnyTq.js";import"./proposal-review-shell-B4CSiyLB.js";import"./runs-BPtQBTRN.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-DW6wRCVC.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v as A,t as b,ar as k,o as L,au as C,j as t,gl as R,L as d,gm as _,bm as $,S as B,B as p,bk as D,h5 as u,aA as S}from"./index-4gCDI7m4.js";import{A as y}from"./automation-detail-content-C9Cgr5Zj.js";import{b as O}from"./use-automations-BHoV0dLs.js";import"./create-automation-form-DmCOFbRT.js";import"./cronstrue-CKwjNYgj.js";import"./entity-options-BSW_EG0W.js";import"./connection-label-BobuYiAG.js";import"./model-selector-88PJnyTq.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-rX0t1g5C.js";import"./index-wHFQv1aT.js";import"./use-mention-search-C3rWLuKm.js";import"./proposal-review-shell-B4CSiyLB.js";import"./runs-BPtQBTRN.js";import"./events-feed-BysC9HgU.js";import"./event-card-Mcxv56DG.js";import"./use-scroll-sentinel-Ct-jt7O0.js";import"./clients-C7Lnuc3S.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./json-diff-E5D-NGYT.js";import"./copy-button-2swYh4jb.js";import"./client-activity-scopes-boZOHuPW.js";import"./client-rows-BJ2PxM4J.js";function P({owner:a,automationId:o,view:s,runId:e}){const n=A(),{orgContext:x,hasOrgContext:g}=b(),{data:h,isLoading:r}=k(`/${a}`,x),{isAuthenticated:v}=L(),{isLoading:m}=C(),f=h?.workspace?.id??"",j=v?!g||r||m:r||m,i=O(o,void 0,f).data?.automation,c=i?.automation_name??"Automation",w=()=>void n({to:"/$owner/automations",params:{owner:a}}),l=()=>void n({to:"/$owner/automations/$automationId",params:{owner:a,automationId:o},search:{view:"activity",run_id:void 0}}),N=!e&&s==="definition";return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 pt-2.5 pb-8 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.jsx(R,{crumbs:[t.jsx(d,{to:"/$owner/automations",params:{owner:a},className:_,children:"Automations"},"automations")],current:e?"Review change":c}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("div",{className:"flex min-w-0 items-center gap-2",children:t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx($,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),j&&!i?t.jsx(B,{className:"h-5 w-40"}):e?"Review change":c]})}),e?null:N?t.jsx(p,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:l,children:"Done"}):t.jsx(p,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs(d,{to:"/$owner/automations/$automationId",params:{owner:a,automationId:o},search:{view:"definition",run_id:void 0},children:[t.jsx(D,{className:"h-3.5 w-3.5"}),"Edit"]})})]}),t.jsx(y,{owner:a,agentId:i?.managed_agent_id??null,automationId:o,view:s,runId:e,onDone:e?w:l})]})})}function ct(){const{owner:a,automationId:o}=u.useParams(),s=u.useSearch();return t.jsx(S,{owner:a,children:()=>t.jsx(P,{owner:a,automationId:o,view:s.view,runId:s.run_id})})}export{ct as component};
|
|
2
|
-
//# sourceMappingURL=_automationId-B9IcDYBu.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{iv as L,j as e,aA as G,v as U,aH as X,aI as Y,cw as z,cX as J,S as A,B as Q,L as p,aK as Z,ia as K,ib as ee,aY as ne,gm as h,fW as se,gk as ae,ba as oe,hO as te,gl as ie,hq as R,aS as ce,F as re}from"./index-4gCDI7m4.js";import{R as de,c as me,C as le}from"./device-pin-tombstone-xGhCTU5_.js";import{a as pe}from"./connector-provenance-Th8ymGec.js";import{f as ue,C as he,F as xe,a as fe,b as ve,A as je,c as Ce}from"./connection-feed-detail-D7pnWaFB.js";import{S as Ne,g as De}from"./runs-panel-Bj63_hb9.js";import{c as ge}from"./connection-label-BobuYiAG.js";import"./connector-scope-lists-BibdzKl1.js";import"./status-dot-D3FoDRcc.js";import"./entity-options-BSW_EG0W.js";import"./event-card-Mcxv56DG.js";import"./use-scroll-sentinel-Ct-jt7O0.js";import"./use-automations-BHoV0dLs.js";import"./clients-C7Lnuc3S.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./copy-button-2swYh4jb.js";import"./feed-event-kinds-BYuZCoU4.js";import"./runs-BPtQBTRN.js";import"./filter-bar-BQm-ubB1.js";function Xe(){const{owner:m,connectorKey:n,connectionId:v}=L.useParams(),{addFeed:o,feedId:c,settings:x,auth_result:t}=L.useSearch();return e.jsx(G,{owner:m,children:l=>e.jsx($e,{organizationId:l.organizationId,ownerSlug:l.ownerSlug,isWorkspaceLoading:l.isWorkspaceLoading,connectorKey:n,connectionId:Number(v),showAddFeed:o===!0,feedId:c,openSettings:x===!0,authResult:t})})}function $e({organizationId:m,ownerSlug:n,isWorkspaceLoading:v,connectorKey:o,connectionId:c,showAddFeed:x,feedId:t,openSettings:l,authResult:E}){const y=U(),{data:B=[]}=X(),{data:M=[],isLoading:P,isError:j,refetch:W}=Y(m??"",{connectorKey:o,connectionIds:[c]}),{data:g=[]}=z(m??""),{data:O=[],isLoading:S,isError:T,refetch:H}=J(t?c:null),s=M.find(i=>i.id===c),a=g.find(i=>i.key===o),r=t?O.find(i=>i.id===t):null;if(v||P||t&&S||!m)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||t&&T)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsxs("p",{children:["Could not load this ",j?"connection":"feed","."]}),e.jsx(Q,{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:o},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",a?.name??o]})]});const $=ge({...s,connector_name:s.connector_name??a?.name??null}),C=!t&&!x,V=()=>void y({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(c)},search:{},replace:!0});let u,f=$,k,w,N;t?r?(f=ue(r,a),r.store==="channel_messages"?(u=e.jsx(he,{feed:r,hideHeader:!0}),N="chat channel"):(k=e.jsx(xe,{feed:r,ownerSlug:n}),w=e.jsx(fe,{feed:r}),u=e.jsx(ve,{feed:r,connectorDef:a,ownerSlug:n}))):(u=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),f="Feed"):x&&(u=e.jsx(je,{onClose:V,organizationId:m,connections:[s],connectorDefinitions:g}),f="Add feed",N=Ce);const d=B.find(i=>i.id===s.device_worker_id&&Z(i,n)),F=d?K(d):void 0,D=F?ee(n,F,ne()):void 0,b=[e.jsx(p,{to:"/$owner/connectors",params:{owner:n},className:h,children:"Connectors"},"connectors"),...d&&D?[e.jsx(p,{to:"/$owner/connectors/app/$appId",params:{owner:n,appId:D.id},className:h,children:D.name},"app"),e.jsx(p,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},className:h,children:se(d)},"device")]:[e.jsx(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:o},search:{},className:h,children:a?.name??o},"connector")]];C||b.push(e.jsx(p,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(c)},search:{},className:h,children:$},"connection"));const _=C?me(s):null,q=N??_??void 0,I=e.jsx(ae,{breadcrumb:e.jsx(ie,{crumbs:b}),icon:a?e.jsx(oe,{icon:a.icon,name:a.name,faviconDomain:a.favicon_domain??te(a.auth_schema)}):null,title:f,status:k??e.jsx(Ne,{status:De(s.status),showDot:!0,children:s.status}),meta:w,caption:q,captionTone:_?"error":"muted"});return C?d&&a&&ce(a)?e.jsx(re,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},search:{connection:s.id,settings:l||void 0},hash:`connection-${s.id}`,replace:!0}):e.jsxs(R,{header:I,children:[e.jsx(pe,{connectorDef:a,connectorKey:o,ownerSlug:n,deviceWorkerId:s.device_worker_id,deviceLabel:s.device_label}),e.jsx(le,{embedded:!0,connection:s,connectorDef:a,ownerSlug:n,openSettings:l,authResult:E},s.id)]}):e.jsx(R,{header:I,children:e.jsx("div",{className:"mt-0",children:u})})}export{Xe as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey._connectionId-C6PmMPTA.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aE as Pe,aF as Se,aG as De,aQ as le,aN as ee,hp as Ye,fY as Qe,j as e,hq as se,B as j,L as B,aP as oe,gk as te,gl as ne,gm as U,hr as Ze,a5 as Je,hs as J,r as m,ht as be,hu as Ee,cH as es,hv as Ce,bT as M,hw as ke,H as w,bz as ss,bA as ts,bB as ns,bC as as,bD as rs,hl as is,I as S,bK as q,aa as z,A as we,hx as ls,hy as os,bo as _e,hz as cs,be as ce,hA as ds,hB as us,hC as Fe,hD as Be,hE as Le,d9 as Re,V as _,W as ae,hF as ms,fG as hs,hG as xs,em as Ke,S as k,fZ as T,v as H,hH as ps,dx as js,dz as fs,dy as gs,hI as G,hJ as vs,aA as Ns,u as de,f$ as ue,hK as ys,aT as bs,hL as Cs,hM as ks,fX as ws,aD as Ae,aC as As,aI as $s,b6 as Ps,aL as F,hN as Oe,bb as Ie,ba as me,b7 as Ss,h as Ds,hO as Es}from"./index-4gCDI7m4.js";import{C as _s,A as Fs}from"./connect-menu-BF-AlunU.js";import{C as Bs,A as Me,a as Ue}from"./connections-browser-DDJQh8Na.js";import{C as Ls}from"./connector-provenance-Th8ymGec.js";import{u as Rs}from"./runs-BPtQBTRN.js";import"./connection-label-BobuYiAG.js";import"./status-dot-D3FoDRcc.js";function Ks({ownerSlug:s,familyKind:t,familyId:a}){const n=t==="inference",l=Pe({enabled:n}),d=Se({enabled:n}),u=De({enabled:!n}),c=n?l:u,o=n?d.data?.find(r=>r.slug===a)?.displayName??a:le(a),p=(n?(l.data??[]).filter(r=>r.kind===a).map(r=>({key:`${ee}${r.slug}`,name:r.displayName||r.slug,status:[r.isDefault?"Default":null,r.status].filter(Boolean).join(" · ")})):(u.data?.sandboxes??[]).filter(r=>r.providerKind===a).map(r=>({key:`${Ye}${r.id}`,name:r.name,status:r.connected?"Connected":"Needs credentials"}))).map(r=>({id:r.key,name:r.name,description:r.status,tone:null,link:Qe({to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:r.key},search:{}})})),h=`${n?ee:oe}${a}`;return e.jsx(se,{header:e.jsx(te,{title:o,breadcrumb:e.jsx(ne,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:s},className:U,children:"Connectors"},"connectors")]})}),children:e.jsx(Bs,{entries:p,isLoading:c.isLoading,isError:c.isError,onRetry:()=>void c.refetch(),action:n?e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:h},search:{addAccount:!0},children:"Add connection"})}):e.jsx(Me,{ownerSlug:s,connectorKey:h})})})}function Os({catalog:s,initialProvider:t,initialSlug:a,allowOAuth:n=!0,initialModel:l,onDone:d}){const u=Ze(),c=Je(),o=s.find(i=>i.slug===t)??s[0],p=n&&o&&J(o)?"oauth":"api-key",[h,r]=m.useState(o?.slug??""),[g,b]=m.useState(a??o?.slug??""),[x,N]=m.useState(o?.displayName??""),[v,A]=m.useState(o?.baseUrl??""),[E,$]=m.useState(l??o?.defaultModel??""),[D,V]=m.useState(""),[X,K]=m.useState(o?.apiKeyPlaceholder??""),[W,O]=m.useState(p),[L,Y]=m.useState(""),[C,re]=m.useState(null),[I,R]=m.useState(!1),[he,xe]=m.useState(!1),f=s.find(i=>i.slug===h),Q=be(f?.modalities??[]),pe=n&&!!f&&J(f),je=f?Ee(f):!1,fe=pe&&W==="oauth",ge=je&&!fe,P=es().slug,Z=m.useCallback(()=>{xe(!0),c.invalidateQueries({queryKey:["inference-providers"]})},[c]),Te=m.useCallback(()=>{c.invalidateQueries({queryKey:["inference-providers"]}),d()},[c,d]),ze=m.useCallback(async()=>{if(!(!P||!f)){R(!0);try{const i=await Ce(P,f.slug);if(i.mode!=="redirect")throw new Error("Unexpected sign-in mode");window.open(i.authorizeUrl,"_blank","noreferrer")}catch(i){M.error(i instanceof Error?i.message:"Failed to start sign-in")}finally{R(!1)}}},[P,f]),Ve=m.useCallback(async()=>{if(!(!P||!f||!L.trim())){R(!0);try{const i=await ke(P,f.slug,{code:L.trim()});if(i.status!=="success")throw new Error(i.error||"Sign-in not complete");Z(),M.success(`Signed in with ${f.displayName}`)}catch(i){M.error(i instanceof Error?i.message:"Failed to complete sign-in")}finally{R(!1)}}},[P,f,L,Z]),We=m.useCallback(async()=>{if(!(!P||!f)){R(!0);try{const i=await Ce(P,f.slug);if(i.mode!=="device")throw new Error("Unexpected sign-in mode");re({userCode:i.userCode,deviceAuthId:i.deviceAuthId,verificationUrl:i.verificationUrl}),window.open(i.verificationUrl,"_blank","noreferrer")}catch(i){M.error(i instanceof Error?i.message:"Failed to start sign-in")}finally{R(!1)}}},[P,f]),qe=m.useCallback(async()=>{if(!(!P||!f||!C)){R(!0);try{const i=await ke(P,f.slug,{deviceAuthId:C.deviceAuthId,userCode:C.userCode});if(i.status==="success"){Z(),M.success(`Signed in with ${f.displayName}`);return}re(y=>y&&{...y,message:i.error||"Waiting for approval..."})}catch(i){M.error(i instanceof Error?i.message:"Failed to check status")}finally{R(!1)}}},[P,f,C,Z]),Ge=f?.supportedAuthTypes.includes("device-code")??!1,He=i=>{r(i);const y=s.find(ie=>ie.slug===i);y&&(b(y.slug),N(y.displayName),A(y.baseUrl),$(y.slug===t&&l?l:y.defaultModel??""),K(y.apiKeyPlaceholder),O(n&&J(y)?"oauth":"api-key"),Y(""),re(null),xe(!1))},ve=/^[a-z0-9][a-z0-9-]*$/.test(g),Ne=ve&&ge&&D.trim().length>0&&!u.isPending,Xe=i=>{if(i.preventDefault(),!Ne)return;const y={};v.trim()&&(y.base_url=v.trim()),E.trim()&&(y.model=E.trim());const ie=Object.keys(y).length>0?{text:y}:void 0;u.mutate({slug:g.trim(),kind:h,displayName:x.trim()||void 0,apiKey:D.trim(),capabilities:ie},{onSuccess:()=>d()})},ye=!!(t&&s.some(i=>i.slug===t));return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:ye&&f?`Connect ${f.displayName}`:"Add an inference provider"}),e.jsxs("form",{onSubmit:Xe,className:"grid max-w-md gap-3",children:[ye&&f?e.jsx("p",{className:"text-xs text-muted-foreground",children:Q.length>0?`Serves text, plus ${Q.join(", ").toLowerCase()}.`:"Serves text (chat)."}):e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"ip-provider",children:"Provider"}),e.jsxs(ss,{value:h,onValueChange:He,children:[e.jsx(ts,{id:"ip-provider",className:"w-full",children:e.jsx(ns,{})}),e.jsx(as,{children:s.map(i=>{const y=be(i.modalities);return e.jsx(rs,{value:i.slug,children:e.jsxs("span",{className:"flex items-center gap-2",children:[i.iconUrl?e.jsx("img",{src:i.iconUrl,alt:"",className:"h-4 w-4 shrink-0 rounded-sm",loading:"lazy"}):e.jsx(is,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),i.displayName,y.length>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",y.join(", ")]}):null]})},i.slug)})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:Q.length>0?`Serves text, plus ${Q.join(", ").toLowerCase()}.`:"Serves text (chat)."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"ip-display",children:"Name"}),e.jsx(S,{id:"ip-display",placeholder:"Friendly name",value:x,onChange:i=>N(i.target.value)})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"ip-slug",children:["Slug ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"ip-slug",placeholder:"my-provider",value:g,onChange:i=>b(i.target.value),autoComplete:"off",required:!0}),g&&!ve?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."})]}),pe&&je?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{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:W==="oauth"?"secondary":"ghost",onClick:()=>O("oauth"),children:"Sign in"}),e.jsx(j,{type:"button",size:"sm",variant:W==="api-key"?"secondary":"ghost",onClick:()=>O("api-key"),children:"API key"})]})]}):null,ge?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"ip-base-url",children:"Base URL"}),e.jsx(S,{id:"ip-base-url",placeholder:"https://api.example.com/v1",value:v,onChange:i=>A(i.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(w,{htmlFor:"ip-model",children:"Default model"}),e.jsx(S,{id:"ip-model",placeholder:"gpt-4o-mini",value:E,onChange:i=>$(i.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(w,{htmlFor:"ip-key",children:["API key ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"ip-key",type:"password",placeholder:X||void 0,value:D,onChange:i=>V(i.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(q,{onCancel:d,children:e.jsx(j,{type:"submit",disabled:!Ne,children:u.isPending?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Creating..."]}):"Create provider"})})]}):fe?e.jsxs("div",{className:"grid gap-3",children:[he?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Signed in with ",f?.displayName??"provider",". This covers your agents in this org."]}):Ge?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void We(),disabled:I||!P,children:C?"Get a new code":"Get device code"}),C?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"ip-device-code",children:"Device code"}),e.jsx(S,{id:"ip-device-code",readOnly:!0,value:C.userCode}),e.jsx(j,{type:"button",variant:"default",className:"justify-self-start",asChild:!0,children:e.jsxs("a",{href:C.verificationUrl,target:"_blank",rel:"noreferrer",children:["Open ",f?.displayName??"provider"," to approve",e.jsx(we,{className:"h-4 w-4"})]})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:C.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 qe(),disabled:I,children:I?"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 ze(),disabled:I||!P,children:["Sign in with ",f?.displayName??"provider",e.jsx(we,{className:"h-4 w-4"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:"ip-oauth-code",children:"Paste code#state"}),e.jsx(S,{id:"ip-oauth-code",placeholder:"code#state",value:L,onChange:i=>Y(i.target.value),autoComplete:"off"})]}),e.jsx(j,{type:"button",className:"justify-self-start",onClick:()=>void Ve(),disabled:I||!L.trim(),children:I?"Finishing...":"Finish sign-in"})]}),e.jsx(q,{onCancel:d,children:e.jsx(j,{type:"button",onClick:Te,disabled:!he,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(q,{onCancel:d})]})]})]})}const Is={text:"Text",image:"Image",stt:"Speech-to-text",tts:"Text-to-speech"};function Ms({provider:s,catalog:t,autoOpenEdit:a}){const n=ls(),[l,d]=m.useState(a?"edit":null),u=os(s.kind,t);m.useEffect(()=>{a&&d("edit")},[a]);const o=(t.find(r=>r.slug===s.kind)?.modalities??["text"]).filter(r=>r!=="text"),p=u&&o.length>0,h=r=>d(g=>g===r?null:r);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 ${_e(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"}),p?e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>h("capabilities"),children:"Configure"}):null,e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>h("edit"),children:"Edit"})]})]}),l==="edit"?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsx(Ts,{provider:s,supportsUpstreamConfig:u,onDone:()=>d(null)})}):null,l==="capabilities"&&p?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."})]}),o.map(r=>e.jsx(zs,{providerSlug:s.slug,modality:r,block:s.capabilities[r]??{}},r))]})}):null]})}function Us({provider:s,onDeleted:t}){const a=cs(),[n,l]=m.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:()=>l(!1)}),children:[a.isPending?e.jsx(z,{size:"md",className:"mr-1.5"}):null,"Confirm delete"]}),e.jsx(j,{variant:"ghost",size:"sm",disabled:a.isPending,onClick:()=>l(!1),children:"Cancel"})]}):e.jsxs(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",disabled:a.isPending,onClick:()=>l(!0),children:[e.jsx(ce,{className:"mr-1.5 h-3.5 w-3.5"}),"Delete provider"]})})]})}function Ts({provider:s,supportsUpstreamConfig:t,onDone:a}){const n=ds(),l=us(),d=Fe(),[u,c]=m.useState(s.displayName??""),[o,p]=m.useState(""),h=s.capabilities.text??{},[r,g]=m.useState(h.base_url??""),[b,x]=m.useState(h.model??""),[N,v]=m.useState(null),A=u.trim().length>0&&u.trim()!==(s.displayName??""),E=t&&o.trim().length>0,$=r.trim()!==(h.base_url??""),D=b.trim()!==(h.model??""),V=t&&($||D),X={base_url:r.trim()||void 0,model:b.trim()||void 0,models_endpoint:h.models_endpoint},K=Be(X),W=t&&V&&Le(K),O=n.isPending||l.isPending||d.isPending,L=(A||E||V)&&!W&&!O,Y=async C=>{if(C.preventDefault(),!!L){v(null);try{await Promise.all([A?n.mutateAsync({providerSlug:s.slug,displayName:u.trim()}):Promise.resolve(),V?d.mutateAsync({providerSlug:s.slug,modality:"text",block:X}):Promise.resolve(),E?l.mutateAsync({providerSlug:s.slug,value:o.trim()}):Promise.resolve()]),a()}catch{v("Some changes could not be saved. Review the fields and try again.")}}};return e.jsxs("form",{onSubmit:Y,className:"grid max-w-md gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:`edit-name-${s.slug}`,children:"Name"}),e.jsx(S,{id:`edit-name-${s.slug}`,value:u,onChange:C=>c(C.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(w,{htmlFor:`edit-base-${s.slug}`,children:"Base URL"}),e.jsx(S,{id:`edit-base-${s.slug}`,placeholder:"https://api.example.com/v1",value:r,onChange:C=>g(C.target.value),autoComplete:"off"}),K.base_url?e.jsx("p",{className:"text-xs text-destructive",children:K.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:`edit-model-${s.slug}`,children:"Default model"}),e.jsx(S,{id:`edit-model-${s.slug}`,placeholder:"gpt-4o-mini",value:b,onChange:C=>x(C.target.value),autoComplete:"off"}),K.model?e.jsx("p",{className:"text-xs text-destructive",children:K.model}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:`edit-key-${s.slug}`,children:"New API key"}),e.jsx(S,{id:`edit-key-${s.slug}`,type:"password",value:o,onChange:C=>p(C.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,N?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:N}):null,e.jsx(q,{onCancel:a,children:e.jsx(j,{type:"submit",disabled:!L,children:O?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]})}function zs({providerSlug:s,modality:t,block:a}){const n=Fe(),[l,d]=m.useState(!1),[u,c]=m.useState(a.base_url??""),[o,p]=m.useState(a.model??""),[h,r]=m.useState(a.models_endpoint??""),[g,b]=m.useState(!!a.models_endpoint),x=!!(a.base_url||a.model||a.models_endpoint),N={base_url:u.trim()||void 0,model:o.trim()||void 0,models_endpoint:h.trim()||void 0},v=Be(N),A=Le(v),E=()=>{A||n.mutate({providerSlug:s,modality:t,block:N})};return e.jsxs("div",{className:Re,children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-left",onClick:()=>d($=>!$),children:[e.jsx("span",{className:"text-sm font-medium",children:Is[t]}),x?e.jsx(_,{variant:"outline",children:"Custom"}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Static"})]}),l?e.jsxs("div",{className:"grid gap-3 border-t px-3 py-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:`base-${s}-${t}`,children:"Base URL"}),e.jsx(S,{id:`base-${s}-${t}`,placeholder:"https://api.example.com/v1",value:u,onChange:$=>c($.target.value),autoComplete:"off"}),v.base_url?e.jsx("p",{className:"text-xs text-destructive",children:v.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:`model-${s}-${t}`,children:"Model"}),e.jsx(S,{id:`model-${s}-${t}`,placeholder:"gpt-4o-mini",value:o,onChange:$=>p($.target.value),autoComplete:"off"}),v.model?e.jsx("p",{className:"text-xs text-destructive",children:v.model}):null]}),g?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(w,{htmlFor:`endpoint-${s}-${t}`,children:"Models endpoint"}),e.jsx(S,{id:`endpoint-${s}-${t}`,placeholder:"/v1/models",value:h,onChange:$=>r($.target.value),autoComplete:"off"}),v.models_endpoint?e.jsx("p",{className:"text-xs text-destructive",children:v.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:()=>b(!0),children:"Advanced"}),e.jsx(q,{onCancel:()=>d(!1),children:e.jsx(j,{size:"sm",disabled:A||n.isPending,onClick:E,children:n.isPending?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]}):null]})}function Vs({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(qs,{kind:s.providerKind}),e.jsx("span",{className:"text-sm font-medium",children:s.name}),e.jsx(_,{variant:"secondary",className:"h-4 px-1.5 py-0 text-[10px] uppercase tracking-wide",children:s.providerKind}),s.connected?e.jsx(_,{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(_,{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(ae,{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 Ws({sandbox:s,onDeleted:t}){const a=ms(),[n,l]=m.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(ce,{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(z,{}):"Delete permanently"}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>l(!1),children:"Cancel"})]}):e.jsx(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>l(!0),children:"Delete sandbox"})]})})}function qs({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(hs,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):e.jsx(xs,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}const Gs={data:!1,chat:!1,actions:!1,audience:!1,inference:!0,runtime:!1},Hs={data:!1,chat:!1,actions:!1,audience:!1,inference:!1,runtime:!0};function jt(){const{owner:s,connectorKey:t}=G.useParams(),{instances:a}=G.useSearch(),{kind:n,id:l}=vs(t);return e.jsx(Ns,{owner:s,children:({ownerSlug:d,organizationId:u,isWorkspaceLoading:c})=>{if(a&&(n==="inference"||n==="sandbox-provider"))return e.jsx(Ks,{ownerSlug:d,familyKind:n,familyId:l});switch(n){case"inference":return e.jsx(Qs,{ownerSlug:d,providerSlug:l});case"sandbox":return e.jsx(Ys,{ownerSlug:d,sandboxId:l});case"sandbox-provider":return e.jsx(Xs,{ownerSlug:d,providerKind:l});default:return e.jsx(st,{ownerSlug:d,organizationId:u,isWorkspaceLoading:c,connectorKey:t})}}})}function Xs({ownerSlug:s,providerKind:t}){const a=H();return m.useEffect(()=>{a({to:"/$owner/connectors/create/$connectorKey",params:{owner:s,connectorKey:`${oe}${t}`},replace:!0})},[a,s,t]),null}function Ys({ownerSlug:s,sandboxId:t}){const a=H(),{data:n,isLoading:l,isError:d,refetch:u}=De(),c=n?.sandboxes.find(p=>p.id===t)??null;if(l)return e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"h-6 w-6 rounded"}),e.jsx(k,{className:"h-5 w-40"})]}),e.jsx(k,{className:"h-24 w-full rounded-lg"})]});if(d)return e.jsx(F,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this instance."}),e.jsx(j,{variant:"outline",onClick:()=>void u(),children:"Retry"})]})});if(!c)return e.jsxs(F,{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 o=c.name||le(c.providerKind);return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(se,{header:e.jsx(te,{breadcrumb:e.jsx(ne,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:s},className:U,children:"Connectors"},"connectors"),e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${oe}${c.providerKind}`},search:{instances:!0},className:U,children:le(c.providerKind)},"family")]}),icon:e.jsx(me,{name:o,faviconDomain:Ss(c.providerKind)}),title:o,badge:e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"secondary",children:c.providerKind}),c.connected?e.jsx(_,{className:"border-transparent bg-emerald-500/10 text-emerald-500",children:"Connected"}):e.jsx(_,{variant:"destructive",children:"No credential"})]}),status:e.jsx(Ie,{facets:Hs})}),children:[e.jsx(Vs,{sandbox:c}),e.jsx(T,{title:"Settings",muted:!0,children:e.jsx(Ws,{sandbox:c,onDeleted:()=>void a({to:"/$owner/connectors",params:{owner:s}})})})]})})}function Qs({ownerSlug:s,providerSlug:t}){const a=H(),{model:n,reason:l,agentId:d,addAccount:u}=G.useSearch(),{data:c=[],isLoading:o,isError:p,refetch:h}=Pe(),r=Se(),{data:g=[],isLoading:b}=r,x=u?null:c.find(D=>D.slug===t)??null,N=g.find(D=>D.slug===(x?.kind??t))??null;if(o||b)return e.jsx("div",{children:e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"h-6 w-6 rounded"}),e.jsx(k,{className:"h-5 w-40"})]}),e.jsx(k,{className:"h-16 w-full rounded-lg"}),e.jsx(k,{className:"h-24 w-full rounded-lg"}),e.jsx(k,{className:"h-32 w-full rounded-lg"})]})});if(p)return e.jsx(F,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this account."}),e.jsx(j,{variant:"outline",onClick:()=>void h(),children:"Retry"})]})});if(!x&&!N&&!r.isError)return e.jsxs(F,{className:"space-y-3",children:[e.jsx(Oe,{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 v=x?x.displayName||x.slug:N?.displayName||t,A=x!==null,E=l?e.jsx(et,{agentId:d,model:n,providerName:v}):n?e.jsx(Js,{providerName:v,model:n,isConnected:A}):null,$=e.jsx(te,{breadcrumb:e.jsx(ne,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:s},className:U,children:"Connectors"},"connectors"),...x?[e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${ee}${x.kind}`},search:{instances:!0},className:U,children:N?.displayName??x.kind},"family")]:[]]}),icon:e.jsx(me,{iconUrl:N?.iconUrl,name:v}),title:v,badge:x?e.jsxs(e.Fragment,{children:[x.isDefault?e.jsx(_,{variant:"secondary",children:"Default"}):null,x.status?e.jsx(_,{variant:"outline",children:x.status}):null,x.hasCustomUpstream?e.jsx(_,{variant:"outline",children:"Custom upstream"}):null]}):null,status:e.jsx(Ie,{facets:Gs})});return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(se,{header:$,children:[E,e.jsx("div",{className:"space-y-6",children:x?e.jsx(Ms,{provider:x,catalog:g,autoOpenEdit:!!n}):e.jsx(Zs,{ownerSlug:s,providerSlug:t,existingSlugs:c.map(D=>D.slug),catalog:g,catalogError:r.isError?r.error:null,model:n})}),x?e.jsx(T,{title:"Settings",muted:!0,children:e.jsx(Us,{provider:x,onDeleted:()=>void a({to:"/$owner/connectors",params:{owner:s}})})}):null]})})}function Zs({ownerSlug:s,providerSlug:t,existingSlugs:a,catalog:n,catalogError:l,model:d}){const u=H(),c=n.find(h=>h.slug===t),o=a.includes(t)&&!!c&&J(c);let p=t;for(let h=2;a.includes(p);h++)p=`${t}-${h}`;return l?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(ae,{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:l instanceof Error?l.message:"Check the workspace URL and try again."})]})]})}):e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[o&&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(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${ee}${t}`},search:{},children:"Open existing connection"})})]}),(!o||c&&Ee(c))&&e.jsx(Os,{catalog:n,initialProvider:t,initialSlug:p,allowOAuth:!o,initialModel:d?.includes("/")?d.split("/").slice(1).join("/"):d,onDone:()=>void u({to:"/$owner/connectors",params:{owner:s}})},`${n.length}:${t}`)]})}function Js({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(ae,{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 et({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(ae,{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 st({ownerSlug:s,organizationId:t,isWorkspaceLoading:a,connectorKey:n}){const{data:l=[],isLoading:d,isError:u,refetch:c}=As(t??""),{data:o=[],isLoading:p,isError:h,refetch:r}=$s(t??"",{connectorKey:n}),{setup:g}=G.useSearch(),b=G.useNavigate(),x=m.useMemo(()=>l.find(A=>A.key===n),[l,n]),N=m.useMemo(()=>Ps(n,l,{name:o[0]?.connector_name??n}),[n,l,o]);if(a||d)return e.jsx("div",{children:e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"h-6 w-6 rounded"}),e.jsx(k,{className:"h-5 w-40"})]}),e.jsx(k,{className:"h-16 w-full rounded-lg"}),e.jsx(k,{className:"h-24 w-full rounded-lg"}),e.jsx(k,{className:"h-32 w-full rounded-lg"})]})});if(u||h)return e.jsx(F,{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:()=>{c(),r()},children:"Retry"})]})});const v=x?e.jsx(nt,{connector:x,ownerSlug:s,organizationId:t??void 0,connectionCount:o.length}):e.jsxs("div",{className:"space-y-3",children:[e.jsx(Oe,{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.",o.length>0?" Existing connections keep working.":""]})]});return e.jsx("div",{className:"flex flex-1 flex-col",children:x&&t?e.jsx(tt,{hero:v,connector:x,organizationId:t,ownerSlug:s,connectorKey:n,connections:o,isLoading:p,openNewApp:g==="oauth_app",onNewAppHandled:()=>void b({search:A=>({...A,setup:void 0}),replace:!0})}):e.jsxs(F,{className:"space-y-6",children:[v,o.length>0&&!p?e.jsx(Ue,{section:!0,connections:o,ownerSlug:s,connectorKey:n}):p?e.jsx(k,{className:"h-8 w-40"}):e.jsx("div",{children:e.jsx(Me,{ownerSlug:s,connectorKey:n})})]})})}function tt({hero:s,connector:t,organizationId:a,ownerSlug:n,connectorKey:l,connections:d,isLoading:u,openNewApp:c,onNewAppHandled:o}){const{isAdmin:p,isLoading:h}=Ke(a),r=(t.operations_summary?.total??0)>0,g=e.jsx(_s,{connector:t,organizationId:a,ownerSlug:n,connections:d,openNewApp:c,onNewAppHandled:o});return e.jsxs(se,{header:s,children:[u?e.jsx(k,{className:"h-8 w-40"}):d.length>0?e.jsx(Ue,{section:!0,connections:d,connector:t,ownerSlug:n,connectorKey:l,action:g}):g,e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:auto-cols-fr sm:grid-flow-col",children:[e.jsx(ot,{connector:t,organizationId:a,ownerSlug:n}),r&&h?e.jsx(k,{className:"h-20 w-full rounded-lg"}):r&&p?e.jsx(lt,{connector:t,organizationId:a,ownerSlug:n}):r&&!p?e.jsx(T,{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,!u&&d.length>0?e.jsx(it,{connectorKey:l,organizationId:a,ownerSlug:n}):null]}),e.jsx(at,{connector:t,organizationId:a,ownerSlug:n})]})}function nt({connector:s,ownerSlug:t,organizationId:a,connectionCount:n}){return e.jsx(te,{breadcrumb:e.jsx(ne,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:t},className:U,children:"Connectors"},"connectors")]}),icon:e.jsx(me,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??Es(s.auth_schema),className:"h-10 w-10"}),title:s.name,badge:e.jsxs(e.Fragment,{children:[e.jsx(Ls,{connectorDef:s,ownerSlug:t}),a?e.jsx(rt,{connector:s,organizationId:a,ownerSlug:t,connectionCount:n}):null]}),caption:s.description})}function at({connector:s,organizationId:t,ownerSlug:a}){const n=ys(s.auth_schema),l=bs(s.auth_schema),d=Cs(s.auth_schema),u=ks(s.auth_schema),c=n.some(N=>N.type==="env_keys"),o=n.some(N=>N.type==="browser"),p=l.some(N=>N.type==="interactive"),h=!!(d||u||c||o),r=ws(s),{data:g=[]}=Ae(t,{connectorKey:s.key,profileKind:"env"}),{data:b=[]}=Ae(t,{profileKind:"browser_session",connectorKey:s.key});return c&&g.length>0||o&&b.length>0||!h&&(r||p)?e.jsxs("div",{className:"space-y-6",children:[c&&g.length>0?e.jsx($e,{profiles:g,type:"env"}):null,o&&b.length>0?e.jsx($e,{profiles:b,type:"browser_session"}):null,h?null:r?e.jsx(T,{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(B,{to:"/$owner/connectors",params:{owner:a},search:{},children:"View devices"})})]})}):p?e.jsx(T,{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."]})}):null]}):null}function rt({connector:s,organizationId:t,ownerSlug:a,connectionCount:n}){const l=H(),{isAdmin:d}=Ke(t),u=ps(),[c,o]=m.useState(null),p=s.installed!==!1;if(!d||!p)return null;const h=n>0,r=u.isPending,g=()=>{o(null),u.mutate({connector_key:s.key},{onSuccess:()=>{l({to:"/$owner/connectors",params:{owner:a}})},onError:b=>{o(b instanceof Error?b.message:"Failed to remove connector")}})};return e.jsxs(js,{onOpenChange:()=>o(null),children:[e.jsx(fs,{asChild:!0,children:e.jsx(j,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive","aria-label":"Remove connector",title:"Remove connector",children:e.jsx(ce,{className:"h-3.5 w-3.5"})})}),e.jsxs(gs,{align:"start",className:"space-y-3",children:[e.jsxs("p",{className:"text-sm font-medium",children:["Remove ",s.name,"?"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Archives it in this workspace. Existing synced data stays in memory."}),h?e.jsxs("p",{className:"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,c?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:c}):null,e.jsxs(j,{variant:"destructive",size:"sm",disabled:r||h,onClick:g,children:[r?e.jsx(z,{size:"md",className:"mr-1.5"}):null,"Remove connector"]})]})]})}function it({connectorKey:s,organizationId:t,ownerSlug:a}){const n=de(),{data:l,isLoading:d}=Rs({connectorKey:s},{runTypes:void 0,status:void 0},a);if(d)return e.jsx(k,{className:"h-[62px] w-full rounded-lg"});const u=l?.pages[0],c=u?.total??0,o=u?.runs[0]?.created_at;return e.jsx(ue,{title:"Runs",summary:c===0?"No runs yet":`${c.toLocaleString()} ${c===1?"run":"runs"}${o?` · last ${_e(o)}`:""}`,onOpen:()=>n?.open({href:"",title:"Runs",connectorPanel:{section:"runs",connectorKey:s,organizationId:t,ownerSlug:a}})})}function lt({connector:s,organizationId:t,ownerSlug:a}){const n=de();return e.jsx(ue,{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 $e({profiles:s,type:t}){const a=t==="env"?"Credentials":"Browser sessions";return e.jsx(T,{title:a,children:e.jsx("div",{className:"space-y-2",children:s.map(n=>e.jsxs("div",{className:Ds(Re,"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(Fs,{status:n.status})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.slug})]},n.slug))})})}function ot({connector:s,organizationId:t,ownerSlug:a}){const n=de(),l=Object.keys(s.feeds_schema??{}).length;return l?e.jsx(ue,{title:"Feeds",summary:`${l} ${l===1?"feed type":"feed types"}`,onOpen:()=>n?.open({href:"",title:"Feeds",connectorPanel:{section:"feeds",connectorKey:s.key,organizationId:t,ownerSlug:a}})}):null}export{tt as ConnectorDetailShell,rt as ConnectorRemoveButton,jt as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey.index-BrJ8Pzze.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,cu as j,h as m,iX as h,iY as p,iZ as d,i_ as u,i$ as w,r as M,au as C,aI as k,j0 as z}from"./index-4gCDI7m4.js";import{A as N}from"./agent-loading-shells-Dnmb6W5Y.js";import{s as b,R as y,A as I}from"./agent-thread-DQIr20H-.js";import"./app-bridge-C4nPtae3.js";import"./use-mention-search-C3rWLuKm.js";import"./index-wHFQv1aT.js";import"./use-automations-BHoV0dLs.js";import"./event-card-Mcxv56DG.js";import"./use-scroll-sentinel-Ct-jt7O0.js";import"./clients-C7Lnuc3S.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./json-diff-E5D-NGYT.js";import"./copy-button-2swYh4jb.js";import"./events-feed-BysC9HgU.js";import"./client-activity-scopes-boZOHuPW.js";import"./client-rows-BJ2PxM4J.js";const O={discord:{hex:`#${u.hex}`,path:u.path},gchat:{hex:`#${d.hex}`,path:d.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:`#${p.hex}`,path:p.path},whatsapp:{hex:`#${h.hex}`,path:h.path}};function T({platform:s,className:a}){const t=s?O[s]:null;return t?"imgSrc"in t?e.jsx("img",{src:t.imgSrc,alt:"","aria-hidden":"true",className:m("rounded-sm",a),loading:"lazy"}):e.jsx("svg",{viewBox:t.viewBox??"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:a,style:{color:t.hex},children:e.jsx("path",{d:t.path})}):e.jsx(j,{className:m("text-muted-foreground",a),"aria-hidden":"true"})}const L={slack:"Slack",telegram:"Telegram",whatsapp:"WhatsApp",discord:"Discord",web:"Web"};function R(s,a,t){return s==="slack"&&t?.teamId&&a?`https://app.slack.com/client/${t.teamId}/${a}`:null}function S({owner:s,agentId:a,conversationId:t}){const{data:n=[],isLoading:x}=w(a,t,{orgSlug:s}),i=M.useMemo(()=>n.map(o=>b(o,{showToolCalls:!0})).filter(o=>o!==null),[n]),[r,g]=t.split(":"),l=L[r]??"the source app",{org:f}=C(),{data:v=[]}=k(f?.id??"",{connectorKey:r}),A=v[0]?.config?.chatMetadata,c=R(r,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:x?e.jsx(N,{readOnly:!0}):i.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:i,children:e.jsx(I,{readOnly:!0})}),c?e.jsxs("a",{href:c,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:r,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 ",l,"."]}),e.jsxs("span",{className:"ml-auto shrink-0 whitespace-nowrap font-medium text-foreground",children:["Open ",l," →"]})]}):null]})})}function e2(){const{owner:s,agentId:a,conversationId:t}=z.useParams();return e.jsx(S,{owner:s,agentId:a,conversationId:t})}export{e2 as component};
|
|
2
|
-
//# sourceMappingURL=_conversationId-BpJAeYYW.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E as u,v,j as r,aA as x,ca as d,cb as f,cc as h,by as w,cd as j}from"./index-4gCDI7m4.js";import{E}from"./event-detail-DXifj49J.js";import"./events-feed-BysC9HgU.js";import"./event-card-Mcxv56DG.js";import"./use-scroll-sentinel-Ct-jt7O0.js";import"./use-automations-BHoV0dLs.js";import"./clients-C7Lnuc3S.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./copy-button-2swYh4jb.js";import"./client-activity-scopes-boZOHuPW.js";import"./client-rows-BJ2PxM4J.js";import"./view-param-filters-mKoqDsaD.js";import"./app-bridge-C4nPtae3.js";import"./filter-bar-BQm-ubB1.js";function P({owner:e,eventId:t,viewKey:s}){const o=u({strict:!1}),p=v(),m=(i,a)=>r.jsx(E,{owner:a,organizationId:i,eventId:t,viewKey:s,params:s?f(o):{},onParamsChange:(n,l,c)=>void p({to:d(a,t,n),search:l,replace:c?.replace??!0}),fullBleed:!0},`${a}/${t}`);return r.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 pt-2.5 pb-8 lg:px-6",children:e==="me"?m(null,e):r.jsx(x,{owner:e,children:({organizationId:i,ownerSlug:a})=>i?m(i,a):r.jsx("div",{className:"mx-auto h-40 w-full max-w-3xl animate-pulse rounded-md bg-muted/40"})})})}function q(){const{owner:e,eventId:t}=h.useParams(),s=w({from:"/$owner/events/$eventId/-/views/$viewKey",shouldThrow:!1}),o=j(t);return o===null?null:r.jsx(P,{owner:e,eventId:o,viewKey:s?.viewKey})}export{q as component};
|
|
2
|
-
//# sourceMappingURL=_eventId-DarQJo0G.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{iW as a,j as e}from"./index-4gCDI7m4.js";import{b as i}from"./agent-guardrails-route-BvGgfd-h.js";import"./model-selector-88PJnyTq.js";import"./agent-subpage-shell-DWzljvFb.js";import"./table-DFcJRNk7.js";import"./agent-loading-shells-Dnmb6W5Y.js";import"./agent-card-controls-99mG6H5k.js";function x(){const{owner:t,agentId:r,name:o}=a.useParams();return e.jsx(i,{owner:t,agentId:r,name:o})}export{x as component};
|
|
2
|
-
//# sourceMappingURL=_name-DtmNTcUm.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peek-pane-content-0sa10jER.js","assets/index-4gCDI7m4.js","assets/index-DDGdlQrt.css","assets/automation-detail-content-C9Cgr5Zj.js","assets/create-automation-form-DmCOFbRT.js","assets/cronstrue-CKwjNYgj.js","assets/entity-options-BSW_EG0W.js","assets/connection-label-BobuYiAG.js","assets/use-automations-BHoV0dLs.js","assets/model-selector-88PJnyTq.js","assets/skill-editor-D_W3QlRz.js","assets/code-editor-rX0t1g5C.js","assets/index-wHFQv1aT.js","assets/use-mention-search-C3rWLuKm.js","assets/proposal-review-shell-B4CSiyLB.js","assets/runs-BPtQBTRN.js","assets/events-feed-BysC9HgU.js","assets/event-card-Mcxv56DG.js","assets/use-scroll-sentinel-Ct-jt7O0.js","assets/clients-C7Lnuc3S.js","assets/renderer-7EGgTVX0.js","assets/calendar-DMq3Dtqy.js","assets/table-DFcJRNk7.js","assets/card-SFtxv9f2.js","assets/json-diff-E5D-NGYT.js","assets/copy-button-2swYh4jb.js","assets/client-activity-scopes-boZOHuPW.js","assets/client-rows-BJ2PxM4J.js","assets/agent-loading-shells-Dnmb6W5Y.js","assets/agent-thread-DQIr20H-.js","assets/app-bridge-C4nPtae3.js","assets/connection-feed-detail-D7pnWaFB.js","assets/runs-panel-Bj63_hb9.js","assets/filter-bar-BQm-ubB1.js","assets/feed-event-kinds-BYuZCoU4.js","assets/connect-menu-BF-AlunU.js","assets/connections-browser-DDJQh8Na.js","assets/status-dot-D3FoDRcc.js","assets/connector-scope-lists-BibdzKl1.js","assets/source-record-panels-Bh5F4C5K.js","assets/schema-type-editor-panel-CAhOB648.js","assets/entity-type-page-BCBdFndu.js","assets/event-detail-DXifj49J.js","assets/view-param-filters-mKoqDsaD.js","assets/views-access-required-DHrDO333.js","assets/record-session-CWXnCVln.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{p as x,j as e,r as u,C as b,L as g,u as w,a as k,b as v,c as y,D as j,d as N,e as P,f as R,g as _,h as I,i as E,k as D,B as f,l as S,A,X as C,m as L,_ as z,S as h,R as O,n as T,o as B,q as W,s as $,N as H,O as K}from"./index-4gCDI7m4.js";import{R as U}from"./record-session-CWXnCVln.js";function p({item:s}){const n=s.href?x(s.href):null;if(!n)return null;const t=n.owner,i=n.kind==="automation"?n.automationId:s.sourceAttribution?.automation_id??null,o=s.sourceAttribution,a=[{label:t,to:"/$owner",params:{owner:t}}];return o?.agent_id&&o.agent_name&&a.push({label:o.agent_name,to:"/$owner/agents/$agentId/settings",params:{owner:t,agentId:o.agent_id}}),i!=null&&a.push({label:o?.automation_name??"Automation",to:"/$owner/automations/$automationId",params:{owner:t,automationId:String(i)}}),(n.kind==="memory"||n.kind==="automation")&&"runId"in n&&n.runId!=null?a.push({label:"Run details"}):n.kind==="event"?a.push({label:"Event details"}):n.kind==="memory"&&"contentIds"in n&&a.push({label:"Details"}),a.length<2?null:e.jsx("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 shrink-0 items-center gap-1 overflow-x-auto border-b border-border px-3 py-1.5 text-xs text-muted-foreground",children:a.map((r,l)=>{const c=l===a.length-1,d=e.jsx("span",{className:c?"truncate font-medium text-foreground":"whitespace-nowrap",children:r.label});return e.jsxs(u.Fragment,{children:[l>0?e.jsx(b,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}):null,r.to&&!c?e.jsx(g,{to:r.to,params:r.params,className:"whitespace-nowrap transition-colors hover:text-foreground",children:r.label}):d]},r.to??r.label)})})}const V=L(async()=>({default:(await z(async()=>{const{PeekPaneContent:s}=await import("./peek-pane-content-0sa10jER.js");return{PeekPaneContent:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]))).PeekPaneContent}));function q(){return e.jsxs("div",{"data-testid":"peek-pane-body-loading",className:"space-y-3 p-4",children:[e.jsx(h,{className:"h-5 w-2/3"}),e.jsx(h,{className:"h-4 w-full"}),e.jsx(h,{className:"h-24 w-full rounded-lg"})]})}const F=460,G=480;function M({children:s}){const n=u.useRef(null),t=w(),i=k(),o=v(n,F+G),a=!i&&o&&t?.item!=null;return e.jsxs("div",{ref:n,className:"relative flex min-h-0 flex-1 flex-row",children:[e.jsx("div",{inert:a,className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:s}),e.jsx(Q,{covers:a})]})}function Q({covers:s=!1}){const n=w(),t=k();return n?.item?e.jsx(J,{item:n.item,onClose:n.close,onBack:n.back,isNarrow:t,covers:s}):null}function X(s){const n=s.href?x(s.href):null,t=n?.kind==="record-view"?n.viewKey:null,i=n?.kind==="entity-type"?n:null,o=i?.typeSlug??null,a=E({slug:t?n?.owner:void 0}),{data:r}=D(o?n?.owner??null:null),l=o?r?.find(c=>c.slug===o)?.name:void 0;return t&&a.data?.find(c=>c.key===t)?.name||l&&(i?.view==="activity"?`${l} activity`:l)||s.title}function J({item:s,onClose:n,onBack:t,isNarrow:i,covers:o}){const a=s.href?y(s.href):null,r=X(s);u.useEffect(()=>{if(i)return;const d=m=>{m.key==="Escape"&&(m.preventDefault(),n())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[n,i]);const l=d=>e.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-1 border-b border-border px-3",children:[t||d?e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Back",onClick:t??n,children:e.jsx(S,{className:"h-4 w-4"})}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:r}),a?e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Open full page",asChild:!0,children:e.jsx(g,{to:a.pathname,search:a.search??{},onClick:n,children:e.jsx(A,{className:"h-4 w-4"})})}):null,e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Close preview",onClick:n,children:e.jsx(C,{className:"h-4 w-4"})})]}),c=e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx(u.Suspense,{fallback:e.jsx(q,{}),children:e.jsx(V,{item:s})})});return i?e.jsx(j,{open:!0,onOpenChange:d=>{d||n()},children:e.jsxs(N,{children:[e.jsx(P,{className:"fixed inset-0 z-40 bg-black/60 data-[state=open]:animate-in data-[state=open]:fade-in-0"}),e.jsxs(R,{"aria-describedby":void 0,className:"fixed inset-y-0 right-0 z-50 flex w-full max-w-[460px] flex-col border-l border-border bg-background outline-none data-[state=open]:animate-in data-[state=open]:slide-in-from-right",children:[e.jsx(_,{className:"sr-only",children:r}),l(!0),e.jsx(p,{item:s}),c]})]})}):e.jsxs("aside",{className:I("flex flex-col border-l border-border bg-background",o?"absolute inset-0 z-30 w-full":"w-[460px] max-w-[45vw] shrink-0"),children:[l(!1),e.jsx(p,{item:s}),c]})}function ee(){const{owner:s}=O.useParams(),{data:n,isLoading:t,error:i}=T(s==="me"?null:s,{slug:s}),{session:o,isReady:a}=B(),r=W(i)&&!n?.workspace;return $({active:!t&&!r&&a&&!o&&!n?.workspace,owner:s})?null:e.jsx(H,{children:e.jsx(U,{children:e.jsx(M,{children:e.jsx(K,{})})})})}export{ee as component};
|
|
3
|
-
//# sourceMappingURL=_owner-Db8at3hk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{iK as p,j as m,bx as i}from"./index-4gCDI7m4.js";import{M as e}from"./memory-browse-page-CfDmjhDl.js";import"./public-shell-ready-CsenJeXa.js";import"./connector-boxes-DDX7Ebc4.js";import"./connection-label-BobuYiAG.js";import"./connections-browser-DDJQh8Na.js";import"./status-dot-D3FoDRcc.js";import"./connector-scope-lists-BibdzKl1.js";import"./use-automations-BHoV0dLs.js";import"./model-Dn40BUzs.js";import"./cronstrue-CKwjNYgj.js";import"./feed-event-kinds-BYuZCoU4.js";import"./schema-type-editor-panel-CAhOB648.js";import"./entity-type-page-BCBdFndu.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./code-editor-rX0t1g5C.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./entity-avatar-HloBoalJ.js";import"./filter-bar-BQm-ubB1.js";import"./core.esm-CHnfRiEM.js";import"./view-param-filters-mKoqDsaD.js";import"./app-bridge-C4nPtae3.js";import"./member-scope-gate-vp3FihBD.js";function A(){const{owner:t,entityType:o,shape:r}=p.useParams();return m.jsx(e,{ownerSlug:t,typeScope:i(o),create:!1,shape:r})}export{A as component};
|
|
2
|
-
//# sourceMappingURL=_shape-6iFA8A86.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{iU as r,j as e}from"./index-4gCDI7m4.js";import{b as m}from"./agent-skills-route-DFXr_bHp.js";import"./agent-skill-context-V__2i6Vl.js";import"./core.esm-CHnfRiEM.js";import"./skill-editor-D_W3QlRz.js";import"./agent-subpage-shell-DWzljvFb.js";import"./agent-loading-shells-Dnmb6W5Y.js";import"./agent-card-controls-99mG6H5k.js";function c(){const{owner:t,agentId:o,skillKey:i}=r.useParams();return e.jsx(m,{owner:t,agentId:o,skillKey:i})}export{c as component};
|
|
2
|
-
//# sourceMappingURL=_skillKey-CXkHn3Nl.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gj as m,t as d,v as x,fL as y,f1 as c,j as t,bJ as g}from"./index-4gCDI7m4.js";import{E as u}from"./entity-type-page-BCBdFndu.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./code-editor-rX0t1g5C.js";function b(){const{owner:a,slug:n}=m.useParams(),{orgContext:s}=d(),o=x(),{data:i=[],isLoading:p}=y(s),e=i.find(l=>l.slug===n)??null,r=e?c(e):!1;return t.jsx("div",{className:"flex flex-1 flex-col gap-4 px-4 pt-2.5 pb-8 lg:px-6",children:t.jsx("div",{className:"max-w-3xl",children:p?t.jsx(g,{label:"entity type",variant:"panel"}):e?t.jsx(u,{entityType:e,orgContext:s,hideDelete:r,onClose:()=>{o({to:"/$owner/data",params:{owner:a}})}}):t.jsx("div",{className:"text-sm text-muted-foreground",children:"Entity type not found."})})})}export{b as component};
|
|
2
|
-
//# sourceMappingURL=_slug-DBOuBLoX.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{iR as t,j as m}from"./index-4gCDI7m4.js";import{M as i}from"./memory-browse-page-CfDmjhDl.js";import"./public-shell-ready-CsenJeXa.js";import"./connector-boxes-DDX7Ebc4.js";import"./connection-label-BobuYiAG.js";import"./connections-browser-DDJQh8Na.js";import"./status-dot-D3FoDRcc.js";import"./connector-scope-lists-BibdzKl1.js";import"./use-automations-BHoV0dLs.js";import"./model-Dn40BUzs.js";import"./cronstrue-CKwjNYgj.js";import"./feed-event-kinds-BYuZCoU4.js";import"./schema-type-editor-panel-CAhOB648.js";import"./entity-type-page-BCBdFndu.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./code-editor-rX0t1g5C.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./entity-avatar-HloBoalJ.js";import"./filter-bar-BQm-ubB1.js";import"./core.esm-CHnfRiEM.js";import"./view-param-filters-mKoqDsaD.js";import"./app-bridge-C4nPtae3.js";import"./member-scope-gate-vp3FihBD.js";function k(){const{owner:o,viewKey:r}=t.useParams();return m.jsx(i,{ownerSlug:o,create:!1,viewKey:r})}export{k as component};
|
|
2
|
-
//# sourceMappingURL=_viewKey-DC27aIN9.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j1 as p,j as i,bx as m}from"./index-4gCDI7m4.js";import{M as e}from"./memory-browse-page-CfDmjhDl.js";import"./public-shell-ready-CsenJeXa.js";import"./connector-boxes-DDX7Ebc4.js";import"./connection-label-BobuYiAG.js";import"./connections-browser-DDJQh8Na.js";import"./status-dot-D3FoDRcc.js";import"./connector-scope-lists-BibdzKl1.js";import"./use-automations-BHoV0dLs.js";import"./model-Dn40BUzs.js";import"./cronstrue-CKwjNYgj.js";import"./feed-event-kinds-BYuZCoU4.js";import"./schema-type-editor-panel-CAhOB648.js";import"./entity-type-page-BCBdFndu.js";import"./json-diff-E5D-NGYT.js";import"./index-wHFQv1aT.js";import"./code-editor-rX0t1g5C.js";import"./renderer-7EGgTVX0.js";import"./calendar-DMq3Dtqy.js";import"./table-DFcJRNk7.js";import"./card-SFtxv9f2.js";import"./entity-avatar-HloBoalJ.js";import"./filter-bar-BQm-ubB1.js";import"./core.esm-CHnfRiEM.js";import"./view-param-filters-mKoqDsaD.js";import"./app-bridge-C4nPtae3.js";import"./member-scope-gate-vp3FihBD.js";function z(){const{owner:t,entityType:o,viewKey:r}=p.useParams();return i.jsx(e,{ownerSlug:t,typeScope:m(o),create:!1,viewKey:r})}export{z as component};
|
|
2
|
-
//# sourceMappingURL=_viewKey-DuYDieln.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as l,ai as u,r as c,Q as m,j as e,aj as d,ak as h,al as f,a5 as v,am as x,ag as g}from"./index-4gCDI7m4.js";import{F as p}from"./full-page-spinner-BMiXl54z.js";function j({alt:t="",...n}){return e.jsx("img",{alt:t,...n,referrerPolicy:"no-referrer"})}function w({children:t}){const n=v(),a=async i=>{await n.invalidateQueries({queryKey:["organizations"]}),i()};return e.jsx(x,{authClient:g,navigate:i=>{a(()=>{window.location.href=i})},replace:i=>{a(()=>window.location.replace(i))},Link:({href:i,children:s,className:r})=>e.jsx("a",{href:i,className:r,children:s}),basePath:"/auth",redirectTo:"/",magicLink:!0,social:{providers:[]},avatar:{Image:j},children:t})}function y(){const{session:t,sessionResult:n}=l(),{invitationId:a}=u.useSearch(),i=c.useRef(!1);return c.useEffect(()=>{n.isPending||t||!a||i.current||(i.current=!0,(async()=>{let s=null;try{const o=await fetch(`${m}/api/invitation-preview?id=${encodeURIComponent(a)}`,{credentials:"omit"});o.ok&&(s=await o.json())}catch{}const r=new URL("/auth/login",window.location.origin);r.searchParams.set("callbackUrl",`/auth/accept-invitation?invitationId=${encodeURIComponent(a)}`),s&&(r.searchParams.set("loginHint",s.email),r.searchParams.set("invitationOrg",s.organizationName)),window.location.href=r.toString()})())},[t,n.isPending,a]),t&&!a?e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md text-center",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"mx-auto mb-6 h-8 w-auto"}),e.jsx(d,{className:"mx-auto h-10 w-10 text-destructive mb-4"}),e.jsx("h1",{className:"text-xl font-semibold",children:"Invitation not found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"This invitation link is missing its ID. Ask the person who invited you to resend it."})]})}):t?e.jsxs("div",{className:"min-h-[calc(100vh-3.5rem)] flex flex-col items-center justify-center gap-6 p-4",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"h-8 w-auto"}),e.jsx(w,{children:e.jsx(h,{children:e.jsx(f,{})})})]}):e.jsx(p,{className:"min-h-[calc(100vh-3.5rem)]"})}export{y as component};
|
|
2
|
-
//# sourceMappingURL=accept-invitation-BbDCVvur.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as at,au as H,cg as C,bx as R,ch as W,r as y,v as V,ar as it,ci as ot,j as t,bJ as D,b4 as A,cj as ct,ck as z,cl as lt,cm as U,B as _,L as g,cn as G,co as rt,bq as dt,bt as ut,bd as mt,cp as xt,cq as ht,cr as L,cs as pt,ct as K,cu as q,cv as Y,bj as J,cw as ft,aI as gt,cx as vt,h as Z,cy as jt,cz as bt,cA as Q,cB as wt,u as yt,cC as kt,cD as Nt,c as X,cE as It,cF as $t,cG as _t,aA as At}from"./index-4gCDI7m4.js";import{R as Et,E as Rt,S as Ct,N as P,M as Lt}from"./record-activity-D7bRaMk2.js";import{M as Mt}from"./member-scope-gate-vp3FihBD.js";import{u as St}from"./client-activity-scopes-boZOHuPW.js";import{a as Tt}from"./client-rows-BJ2PxM4J.js";import{P as Pt}from"./public-shell-ready-CsenJeXa.js";function Ft({organizationId:s,ownerSlug:n,typeScope:c,entityScope:i,attentionOnly:l=!1}){const{orgContext:r}=at(),{isMember:o,isLoading:a}=H(),p=o&&!!s,{attentionItems:e,isError:u}=C(n),d=c?R(c):void 0,m=!i&&!d,{feeds:x,rows:f,pageRows:v}=W(s,e),N=y.useMemo(()=>new Set(v.flatMap(({item:T})=>T.approvalRunId!=null?[T.approvalRunId]:[])),[v]),E=V(),I=()=>void E({to:"/$owner",params:{owner:n},search:{attention:"1"}}),{data:b,isLoading:h,error:k}=it(i?`/${n}/${ot(i)}`:`/${n}`,r),w=i?b?.entity:void 0,j=(i?w?.entity_type??R(i.split("/").at(-2)??""):d)==="$member",et=i!=null&&!h&&(k!=null||b?.entity==null),$=i?void 0:b?.counts,nt=$?$.connections>0||$.agents>0:!1,st=p&&!a&&!h&&$!=null&&!nt,S=i&&h?t.jsx(D,{label:"Loading record…"}):et?t.jsx(A,{icon:ct,title:"Record not found",description:"It may have been deleted, or it may live in a workspace you can't access."}):l&&m?t.jsx(Ot,{owner:n,items:f,isError:u}):w?t.jsx(Et,{ownerSlug:n,entity:w,organizationId:s}):t.jsx(Rt,{organizationId:s,ownerSlug:n,hideSourceFilter:!0,scopedEntityTypes:d?[d]:void 0,pinned:m&&(v.length>0||x.length>0)?{rows:t.jsx(z,{owner:n,organizationId:s,feeds:x,rows:v}),hiddenApprovalRunIds:N}:void 0,onShowNotifications:m?I:void 0,emptyState:st?t.jsx(Ht,{ownerSlug:n}):void 0});return t.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4",children:j?t.jsx(Mt,{children:S}):S})}function Ot({owner:s,items:n,isError:c}){const i=V();return t.jsxs("section",{"aria-label":"Notifications",className:"space-y-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2.5",children:[t.jsx("span",{className:"mr-auto text-sm text-muted-foreground tabular-nums",children:n.length>0?`${n.length} ${n.length===1?"notification":"notifications"}`:null}),t.jsx(Bt,{owner:s}),t.jsx(Ct,{value:P.value,withNotifications:!0,onChange:l=>{if(l===P.value)return;const[r,o]=l.split("-");i({to:"/$owner",params:{owner:s},search:lt({sortBy:r,sortOrder:o})})}})]}),c?t.jsx("p",{className:"px-3 text-sm text-destructive",children:"Could not load notifications."}):n.length===0?t.jsx(A,{icon:U,title:"All caught up",description:"Nothing needs you right now.",children:t.jsx(_,{asChild:!0,variant:"outline",className:"mt-4",children:t.jsx(g,{to:"/$owner",params:{owner:s},children:"See all activity"})})}):t.jsx(G,{owner:s,rows:n})]})}function Bt({owner:s}){const{visibleUnreadIds:n,markVisibleRead:c,bulkPending:i}=C(s);return n.length===0?null:t.jsxs(_,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground",disabled:i,onClick:()=>void c(),children:[t.jsx(U,{className:"mr-1.5 h-3.5 w-3.5"}),"Mark all as read"]})}function Ht({ownerSlug:s}){return t.jsx("div",{className:"px-6",children:t.jsx(A,{icon:rt,title:"Nothing to catch up on — yet",description:"No notifications here. Add a connector to bring in data, or bring your agent to Lobu and give it something to work with.",children:t.jsxs("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:[t.jsx(_,{asChild:!0,children:t.jsxs(g,{to:"/$owner/connectors/create",params:{owner:s},children:[t.jsx(dt,{className:"mr-2 h-4 w-4"}),"Add a connector"]})}),t.jsx(_,{asChild:!0,variant:"outline",children:t.jsxs(g,{to:"/$owner/agents",params:{owner:s},children:[t.jsx(ut,{className:"mr-2 h-4 w-4"}),"Connect agent"]})})]})})})}const F=12,Wt=5e3;function Vt(s,n){const c=!!s&&!!n.organizationId&&(n.enabled??!0),i=mt({enabled:c}),{data:l}=i,r=l??[],o=y.useMemo(()=>r.map(x=>x.agentId),[r]),{threads:a,isLoading:p,isError:e}=xt(s,o,{enabled:c&&o.length>0,limit:F}),u=St({enabled:c,limit:F,excludeCommandClients:!1,organizationId:n.organizationId,refetchInterval:x=>x?Wt:!1}),d=n.organizationId?u.data:void 0;return{items:y.useMemo(()=>[...a.map(x=>({kind:"conversation",at:x.updatedAt,thread:x})),...(d??[]).map(x=>({kind:"mcp",at:x.lastCallAt,conversation:x}))].sort((x,f)=>f.at-x.at),[d,a]),agents:r,isLoading:c&&(i.isLoading||p||u.isLoading),isError:i.isError||e||u.isError}}function Dt(s){return s==="attention"?{attention:"1"}:s==="all"?{}:{tab:s}}function zt(s,n,c,i=[]){const l=new Map(i.map(e=>[e.id,e])),r=new Map;for(const e of[...n.filter(u=>u.kind==="notification"),...c])r.set(e.notification_id!=null?`n:${e.notification_id}`:e.id,e);const o=new Set([...r.values()].flatMap(e=>e.run_id!=null?[e.run_id]:[])),a=new Map,p=new Set(n.flatMap(e=>e.kind==="automation_due"&&e.run_id!=null?[e.run_id]:[]));for(const e of[...n.filter(u=>u.kind!=="notification"&&(u.kind==="automation_due"||u.run_id==null||!p.has(u.run_id))&&(u.run_id==null||!o.has(u.run_id))),...r.values()])a.set(e.id,e);return[...a.values()].map(e=>{const u=e.connection_id!=null?l.get(e.connection_id):void 0,d={...e,platform:e.platform||u?.connector_key,connection_name:e.connection_name||u?.display_name},m=e.kind==="notification"?"notification":e.kind==="sync"?"feed":e.kind==="automation_run"||e.kind==="automation_due"?"automation":"run",x=m==="automation"&&e.automation_id!=null?`automation:${e.automation_id}`:(m==="feed"||m==="run")&&e.connection_id!=null?`connection:${e.connection_id}`:null;return{id:e.id,at:new Date(e.at).getTime(),title:e.title,detail:e.kind==="run"&&e.status&&!L(e.status)?e.status:e.body||e.status,kind:m,subject:x,subjectLabel:e.automation_name||d.connection_name||e.title,href:m!=="notification"&&e.run_id!=null?m==="automation"&&e.automation_id!=null?`/${s}/automations/${e.automation_id}?run_id=${e.run_id}`:`/${s}/events?run_ids=${e.run_id}`:e.href,card:e,source:d}})}function Ut(s,n,c){return n.map(i=>{if(i.kind==="mcp"){const e=i.conversation,u=s==="me"||e.organizationId==null?"/me/events":`/${s}/agents/connected/${encodeURIComponent(e.clientId)}/activity`,d=new URLSearchParams({mcp_activity_id:e.activityId});return(s==="me"||e.organizationId==null)&&d.set("client_ids",e.clientId),{id:`client:${e.clientId}:${e.activityId}`,at:i.at,title:Tt(e),detail:`${e.clientName||"Connected app"} · ${e.callCount} ${e.callCount===1?"call":"calls"}${e.isLive?" · Active":""}`,href:`${u}?${d}`,kind:"session",subject:`client:${e.clientId}`,subjectLabel:e.clientName||"Connected app",source:{client_id:e.clientId,client_name:e.clientName}}}const l=i.thread,r=c.get(l.agentId)||"Agent",o=l.platform||"web",a=ht(s,l.agentId,l.id),p=o==="web"?Object.entries(a.params).reduce((e,[u,d])=>e.replace(`$${u}`,encodeURIComponent(d)),a.to):`/${s}/agents/${encodeURIComponent(l.agentId)}/conversations/${encodeURIComponent(l.conversationId??l.id)}`;return{id:`thread:${l.agentId}:${l.id}`,at:i.at,title:l.title||"Conversation",detail:`${r} · ${o==="web"?"Chat":o}${l.isRunning?" · Active":""}`,href:p,kind:"session",subject:`agent:${l.agentId}`,subjectLabel:r,source:{agent_id:l.agentId,agent_name:r,platform:o==="web"?null:o}}})}function Gt(s){const n=new Map;for(const c of[...s].sort((i,l)=>l.at-i.at||i.id.localeCompare(l.id))){const i=new Date(c.at),l=`${i.getFullYear()}-${i.getMonth()}-${i.getDate()}`,r=c.subject?`${c.kind}:${c.subject}:${l}`:c.id,o=n.get(r)??{key:r,entries:[]};o.entries.push(c),n.set(r,o)}return[...n.values()]}const O=[{view:"all",label:"Activity",icon:pt},{view:"attention",label:"Needs attention",icon:K},{view:"sessions",label:"Sessions",icon:q},{view:"feeds",label:"Feeds",icon:Y},{view:"automations",label:"Automations",icon:J}];function Kt({owner:s,view:n,organizationId:c}){const{isMember:i,isPublic:l,isLoading:r}=H(s),o=l&&!i&&!r,a=o&&(n==="attention"||n==="sessions")?"all":n,p=o?O.filter(h=>h.view!=="attention"&&h.view!=="sessions"):O,{data:e=[]}=ft(c),{data:u=[]}=gt(a==="all"||a==="feeds"||a==="automations"?c:null),d=C(o?null:s),m=W(o?null:c,d.attentionItems),x=a==="all"&&(m.feeds.length>0||m.pageRows.length>0),f=Vt(s,{organizationId:c,enabled:!o&&(a==="all"||a==="sessions")}),v=vt(a==="attention"||a==="sessions"?null:s,{limit:50,aggregate:!1,includeRuns:!0,includeNotifications:!1,kinds:a==="feeds"?["sync"]:a==="automations"?["automation","automation_due"]:void 0}),N=y.useMemo(()=>{const h=new Map(f.agents.map(j=>[j.agentId,j.name])),k=a==="all"||a==="sessions"?Ut(s,f.items,h):[],w=a==="attention"?[]:zt(s,[...v.data??[],...a==="all"?d.notificationCards:[]],a==="all"?d.attentionCards:[],u),M=new Set(a==="all"?m.pageRows.map(({item:j})=>j.id):[]);return Gt([...w,...k].filter(j=>!M.has(j.id)))},[s,m.pageRows,a,f.agents,f.items,v.data,u,d.attentionCards,d.notificationCards]),E=c==null||(a==="attention"?d.isLoading:a!=="sessions"&&v.isLoading||(a==="all"||a==="sessions")&&f.isLoading||a==="all"&&d.isLoading),I=a==="attention"?d.isError:a!=="sessions"&&v.isError||(a==="all"||a==="sessions")&&f.isError||a==="all"&&d.isError,b=a==="attention"?d.attentionItems.length===0:N.length===0&&!x;return t.jsxs("section",{"aria-label":"Home activity",className:"flex min-w-0 flex-col gap-4",children:[t.jsx("nav",{"aria-label":"Activity views",className:"flex flex-wrap items-center gap-1.5",children:p.map(({view:h,label:k,icon:w})=>t.jsxs(g,{to:"/$owner",params:{owner:s},search:Dt(h),activeOptions:{exact:!0},"aria-current":a===h?"page":void 0,className:Z("inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium transition-colors",a===h?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[t.jsx(w,{"aria-hidden":"true",className:"size-3.5"}),k,h==="attention"&&d.attentionItems.length>0?t.jsx("span",{className:"text-xs tabular-nums",children:d.attentionItems.length}):null]},h))}),a==="attention"?t.jsx(jt,{owner:s}):null,I?t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Some activity could not be loaded. Refresh to try again."}):null,E&&b?t.jsx(D,{label:"activity"}):b?I?null:t.jsx(A,{icon:bt,title:a==="attention"?"All caught up":o?"No public activity":"No recent activity",description:a==="attention"?"Nothing needs you right now.":o?"Runs on this workspace's public connections show up here.":"New activity will appear here as your agents, apps, and feeds work."}):a==="attention"?t.jsx(G,{owner:s,rows:m.rows}):t.jsxs(t.Fragment,{children:[x?t.jsx("div",{className:"space-y-1",children:t.jsx(z,{owner:s,organizationId:c,feeds:m.feeds,rows:m.pageRows})}):null,t.jsx("ul",{className:"divide-y divide-border/60",children:N.map(h=>t.jsx("li",{children:t.jsx(qt,{owner:s,group:h,connectorDefinitions:e})},h.key))})]}),!b&&a!=="attention"?t.jsxs("div",{className:"flex flex-wrap gap-4 pt-2 text-xs text-muted-foreground",children:[o&&a==="all"?t.jsx(g,{to:"/$owner/data",params:{owner:s},children:"Browse memory"}):null,a==="all"||a==="feeds"?t.jsx(g,{to:"/$owner/connectors",params:{owner:s},children:"Browse feeds"}):null,a==="all"||a==="automations"?t.jsx(g,{to:"/$owner/automations",params:{owner:s},children:"Automation history"}):null,a==="sessions"?t.jsx(g,{to:"/$owner/agents",params:{owner:s},children:"Browse agents and apps"}):null]}):null]})}function qt({owner:s,group:n,connectorDefinitions:c}){const[i,l]=y.useState(!1),r=y.useId(),o=n.entries[0];if(n.entries.length===1)return t.jsx(B,{owner:s,entry:o,connectorDefinitions:c});const a=n.entries.filter(e=>L(e.card?.status??"")).length,p=o.kind==="session"?"sessions":o.kind==="feed"?"syncs":o.kind==="run"?"operations":"runs";return t.jsxs("div",{children:[t.jsxs("button",{type:"button","aria-expanded":i,"aria-controls":r,onClick:()=>l(!i),className:"flex w-full items-center gap-3 rounded-md px-2 py-3 text-left hover:bg-accent/60",children:[t.jsx(tt,{entry:o,connectorDefinitions:c}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm font-medium",children:o.subjectLabel}),t.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[n.entries.length," recent ",p,a>0?t.jsxs("span",{className:"text-destructive",children:[" · ",a," failed"]}):null,o.kind==="session"?null:` · ${o.detail??""}`]})]}),t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Q(o.at)}),t.jsx(wt,{"aria-hidden":!0,className:Z("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",i&&"rotate-180")})]}),t.jsxs("ul",{id:r,hidden:!i,className:"ml-4 border-l pl-3",children:[i?n.entries.map(e=>t.jsx("li",{children:t.jsx(B,{owner:s,entry:e,connectorDefinitions:c})},e.id)):null,i&&o.card?.href?t.jsx("li",{children:t.jsx(Yt,{entry:o})}):null]})]})}function Yt({entry:s}){const n=X(s.card?.href??"");return t.jsx(g,{to:n.pathname,search:n.search,className:"inline-block px-2 py-2 text-xs text-muted-foreground hover:text-foreground",children:s.kind==="automation"?"View Automation history":"View connection history"})}function tt({entry:s,connectorDefinitions:n}){const c=s.kind==="session"?q:s.kind==="feed"?Y:s.kind==="automation"?J:It;return t.jsx("span",{"aria-hidden":!0,className:"flex h-5 w-5 shrink-0 items-center justify-center",children:t.jsx($t,{source:s.source,connectorDefinitions:n,label:s.subjectLabel,fallback:t.jsx(c,{className:"h-4 w-4 text-muted-foreground"})})})}function B({owner:s,entry:n,connectorDefinitions:c}){const i=yt();if(n.kind==="notification"&&n.card)return t.jsx(kt,{owner:s,item:Nt({...n.card,...n.source})});const l=t.jsxs(t.Fragment,{children:[t.jsx(tt,{entry:n,connectorDefinitions:c}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm font-medium",children:n.title}),t.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[L(n.card?.status??"")?t.jsx(K,{"aria-label":"Failed",className:"h-3 w-3 shrink-0 text-destructive"}):null,t.jsx("span",{className:"truncate",children:n.detail})]})]}),t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Q(n.at)})]}),r="flex w-full items-center gap-3 rounded-md px-2 py-3 text-left hover:bg-accent/60";if(!n.href)return t.jsx("div",{className:r,children:l});const o=X(n.href);return t.jsx(g,{to:o.pathname,search:o.search,className:r,onClick:a=>{!i||!n.card||n.kind==="session"||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.button!==0||(a.preventDefault(),i.open({href:n.href??"",title:n.title,runId:n.card.run_id??void 0,body:n.card.body,createdAt:n.card.at,owner:s,sourceAttribution:n.source??n.card}))},children:l})}function ne({owner:s,search:n,entityScope:c,home:i=!1}){const l=typeof n.type=="string"&&n.type.trim()?R(n.type.trim()):void 0,r=typeof n.tab=="string"?n.tab:"events",o=r==="sessions"||r==="feeds"||r==="automations"?r:"events",a=String(n.attention)==="1",p=Object.entries(n).some(([e,u])=>(_t.includes(e)||e.startsWith("clf_"))&&u!=null&&u!=="");return t.jsxs("div",{className:"flex flex-1 flex-col gap-6 px-4 pt-2.5 pb-8 lg:px-6",children:[t.jsx(Pt,{}),t.jsx(At,{owner:s,children:e=>t.jsx(Lt,{organizationId:e.organizationId,isWorkspaceLoading:e.isWorkspaceLoading,children:t.jsx("div",{className:"mx-auto flex min-h-0 w-full min-w-0 max-w-3xl flex-1 flex-col",children:(i||o!=="events")&&!p&&!l&&!c?t.jsx(Kt,{owner:e.ownerSlug,organizationId:e.organizationId,view:a?"attention":o==="events"?"all":o}):t.jsx(Ft,{organizationId:e.organizationId,ownerSlug:e.ownerSlug,typeScope:l,entityScope:c,attentionOnly:a})})})})]})}export{ne as A};
|
|
2
|
-
//# sourceMappingURL=activity-route-view-V4ftmSN7.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Q as w,j as e,aL as y,gk as v,b5 as L,gl as k,L as h,gm as P,n as S,r as R,hq as _,fZ as o,B as j,A as b,bu as N}from"./index-4gCDI7m4.js";import{A as I,f as M,b as $,F as C}from"./agent-client-setup-list-kMmqQSrf.js";import{C as m}from"./copy-button-2swYh4jb.js";import{u as B}from"./clients-C7Lnuc3S.js";import{g as T,c as E}from"./client-rows-BJ2PxM4J.js";const O="app.lobu.ai";function U(s,a){const n=a?`/mcp/${a}`:"/mcp";if(!s)return`http://localhost:8787${n}`;try{const r=new URL(s);return r.hostname===O&&(r.hostname="lobu.ai"),r.pathname=n,r.toString()}catch{return`${s}${n}`}}function F(s){return U(w,s)}const p="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-2.5 pb-8 lg:px-6";function D(s,a){return`flex items-center gap-3 px-3 py-2.5 text-left text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground ${s===a-1?"":"border-b"}`}function A({owner:s}){return e.jsx(k,{crumbs:[e.jsx(h,{to:"/$owner/agents",params:{owner:s},className:P,children:"Agents"},"agents")]})}function K({owner:s}){return e.jsx("div",{className:p,children:e.jsxs(y,{className:"flex flex-1 flex-col gap-6",children:[e.jsx(v,{breadcrumb:e.jsx(A,{owner:s}),icon:e.jsx(L.agents.icon,{className:"h-6 w-6"}),title:"Connect an agent",caption:"Choose the agent you already use. Install directly where supported, or copy a setup prompt into the agent."}),e.jsx(I,{owner:s})]})})}function Q({owner:s,clientId:a}){const n=M(a),{data:r}=S(s,{slug:s}),{data:u=[]}=B(null,{refetchInterval:2500}),l=R.useMemo(()=>T(u).filter(t=>t.connected),[u]);if(!n)return e.jsx("div",{className:p,children:e.jsxs(y,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"There is no agent client by that name."}),e.jsx(h,{to:"/$owner/agents/connect",params:{owner:s},className:"text-sm text-primary hover:underline",children:"Back to agent clients"})]})});const c=F(s),d=$({workspaceName:r?.workspace?.name??s,owner:s,mcpUrl:c,clientLabel:n.id==="other"?void 0:n.label,terminalLogin:n.terminalLogin}),x=n.setupMode==="agent-prompt",g=x?d:n.installText?.(c)??d;return e.jsx("div",{className:p,children:e.jsxs(_,{header:e.jsx(v,{breadcrumb:e.jsx(A,{owner:s}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(N,{name:n.label})}),title:n.label,caption:n.description}),children:[e.jsx(o,{title:"Set up",children:e.jsxs("div",{className:"space-y-4",children:[(()=>{const t=n.installLink?.(c);return t?e.jsx("div",{children:e.jsx(j,{asChild:!0,children:e.jsxs("a",{href:t.href,target:"_blank",rel:"noreferrer",children:[t.label,e.jsx(b,{className:"ml-1.5 h-3.5 w-3.5"})]})})}):null})(),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:n.installTitle}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border bg-muted/40 p-2.5",children:[e.jsx("pre",{className:"min-w-0 flex-1 overflow-x-auto whitespace-pre-wrap font-mono text-xs leading-relaxed",children:g}),e.jsx(m,{text:g,label:x?"Copy setup prompt":"Copy"})]})]}),e.jsx("ol",{className:"space-y-1 text-xs text-muted-foreground",children:n.steps(c).map((t,i)=>e.jsxs("li",{children:[i+1,". ",t]},t))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[x?null:e.jsx(m,{text:d,label:"Copy setup prompt"}),n.guideLinks.map(t=>e.jsx(j,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 text-xs",children:e.jsxs("a",{href:t.href,target:"_blank",rel:"noreferrer",children:[t.label,e.jsx(b,{className:"ml-1.5 h-3.5 w-3.5"})]})},t.href))]})]})}),e.jsx(o,{title:"First prompts",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"After setup, start a new chat with Lobu enabled and try one of these."}),e.jsx("div",{className:"overflow-hidden rounded-lg border",children:C.map((t,i)=>{const f=n.promptUrl?.(t);return e.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 ${i===C.length-1?"":"border-b"}`,children:[f?e.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:"min-w-0 flex-1 text-sm hover:underline",children:t}):e.jsx("p",{className:"min-w-0 flex-1 text-sm",children:t}),e.jsx(m,{text:t,label:"prompt",iconOnly:!0})]},t)})})]})}),e.jsx(o,{title:"Connected agents",count:l.length>0?String(l.length):void 0,children:l.length===0?e.jsx("div",{className:"rounded-lg border border-dashed px-3 py-2.5 text-xs text-muted-foreground",children:"Nothing yet. Finish setup and make an authenticated Lobu MCP request; the agent appears here automatically."}):e.jsx("div",{className:"overflow-hidden rounded-lg border",children:l.map((t,i)=>e.jsxs(h,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:t.clientId},className:D(i,l.length),children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(N,{name:t.title})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:E(t)})]})]},t.key))})}),e.jsx(o,{title:"Manual MCP details",children:e.jsxs("dl",{className:"grid grid-cols-[5rem_1fr] gap-x-3 gap-y-1 rounded-lg border bg-muted/40 p-3 text-xs",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Name"}),e.jsx("dd",{className:"font-mono",children:"lobu"}),e.jsx("dt",{className:"text-muted-foreground",children:"MCP URL"}),e.jsx("dd",{className:"break-all font-mono",children:c})]})})]})})}export{K as A,Q as a};
|
|
2
|
-
//# sourceMappingURL=agent-connect-pages-B-NPTFs6.js.map
|