@lobu/runtime-server 24.11.0 → 24.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalogs/connectors.json +1113 -107
- package/dist/catalogs/skills.json +2 -2
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +2 -2
- package/dist/connectors/chat-transport-actions.ts +50 -0
- package/dist/connectors/discord.ts +2 -0
- package/dist/connectors/gchat.ts +2 -0
- package/dist/connectors/github.ts +4 -4
- package/dist/connectors/google_drive.ts +20 -0
- package/dist/connectors/google_gmail.ts +49 -8
- package/dist/connectors/herdr.ts +1 -1
- package/dist/connectors/imessage.ts +1 -0
- package/dist/connectors/linkedin-browser-script.ts +11 -0
- package/dist/connectors/linkedin-draft-page.js +24 -8
- package/dist/connectors/linkedin-inbox-adapter.js +209 -19
- package/dist/connectors/linkedin-inbox.ts +152 -4
- package/dist/connectors/linkedin-network.ts +788 -0
- package/dist/connectors/linkedin-search.ts +1284 -0
- package/dist/connectors/linkedin.ts +892 -27
- package/dist/connectors/microsoft_outlook.ts +57 -19
- package/dist/connectors/rss.ts +179 -33
- package/dist/connectors/slack.ts +2 -0
- package/dist/connectors/source-file-attachment.ts +46 -0
- package/dist/connectors/teams.ts +2 -0
- package/dist/connectors/telegram.ts +2 -0
- package/dist/connectors/tiktok_web.ts +1 -1
- package/dist/connectors/whatsapp.ts +2 -0
- package/dist/connectors/whatsapp_web.ts +3 -3
- package/dist/connectors/x-dm-adapter.js +8 -10
- package/dist/connectors/x.ts +8 -9
- package/dist/db/migrations/20261115040000_account_two_factor.sql +20 -0
- package/dist/db/migrations/20261115120000_events_unbound_tool_audit_without_bridge.sql +40 -0
- package/dist/db/migrations/20261115120001_events_unbound_tool_audit_validate.sql +19 -0
- package/dist/db/migrations/20261115120002_drop_events_linked_org_ids.sql +119 -0
- package/dist/db/migrations/20261115130000_entities_retired_type_idx.sql +34 -0
- package/dist/db/migrations/20261115140000_entity_identities_personal_owner_idx.sql +34 -0
- package/dist/db/migrations/20261117090000_write_policy_kind_note.sql +65 -0
- package/dist/db/migrations/20261117120000_app_policy_principal.sql +48 -0
- package/dist/db/migrations/20261117170000_personal_org_connector_auto_policy_backfill.sql +57 -0
- package/dist/db/migrations/20261117190000_org_slug_reserved_paths.sql +29 -0
- package/dist/db/migrations/20261118120000_workspace_view_top_level_paths.sql +69 -0
- package/dist/db/migrations/preconditions/20261117190000_org_slug_reserved_paths.sql +14 -0
- package/dist/db/migrations/preconditions/20261118120000_workspace_view_top_level_paths.sql +21 -0
- package/dist/dependencies.bun.lock +51 -46
- package/dist/guest.bundle.js +11 -2
- package/dist/owletto/dist/assets/_-BC9j6MkU.js +2 -0
- package/dist/owletto/dist/assets/_-Z1u1cIe6.js +3 -0
- package/dist/owletto/dist/assets/_agentId-B-TFq9TP.js +2 -0
- package/dist/owletto/dist/assets/{_agentId-CGScf8z_.js → _agentId-BGatZWsd.js} +2 -2
- package/dist/owletto/dist/assets/_automationId-CMUrWPvr.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CUoAoP0_.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-Bs49QGGH.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-CszP1den.js +2 -0
- package/dist/owletto/dist/assets/_eventId-C0AZUBnD.js +2 -0
- package/dist/owletto/dist/assets/_owner-B4ydA75k.js +3 -0
- package/dist/owletto/dist/assets/_shape-C4-ikE70.js +2 -0
- package/dist/owletto/dist/assets/_slug-DE5J3KVu.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-Dkcd8JQC.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-BKeIzZXE.js → accept-invitation-DmrQQu_W.js} +2 -2
- package/dist/owletto/dist/assets/{activity-route-location-sLvKaSCa.js → activity-route-location-Bec6fW-t.js} +2 -2
- package/dist/owletto/dist/assets/activity-route-view-DCSNBKZU.js +2 -0
- package/dist/owletto/dist/assets/agent-client-connections-xvabPpi6.js +4 -0
- package/dist/owletto/dist/assets/agent-connect-pages-DDPtkcmq.js +6 -0
- package/dist/owletto/dist/assets/{agent-editor-form-DVFyyMyd.js → agent-editor-form-BrhQbHZg.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-BLNHIy-r.js → agent-loading-shells-D3y98xuO.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-UBKRR5vs.js → agent-permissions-matrix-jQJjSa9i.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-fqedKd0D.js → agent-skill-context-CCcknBYE.js} +2 -2
- package/dist/owletto/dist/assets/{agent-subpage-shell-BUCoY2Nf.js → agent-subpage-shell-6f_53cSf.js} +2 -2
- package/dist/owletto/dist/assets/agent-thread-v_lSSnJi.js +6 -0
- package/dist/owletto/dist/assets/{app._appId-ByIypCL9.js → app._appId-CKWzZ2ic.js} +2 -2
- package/dist/owletto/dist/assets/assist-composer-Q9ZJjAta.js +2 -0
- package/dist/owletto/dist/assets/automation-run-now-Dl0MKx3N.js +2 -0
- package/dist/owletto/dist/assets/{callback-Pz5uS-k7.js → callback-Bentv78L.js} +2 -2
- package/dist/owletto/dist/assets/{card-CAPpY9P5.js → card-C4oPCVh6.js} +2 -2
- package/dist/owletto/dist/assets/{claim-DgWWK0KI.js → claim-B3C4qIi2.js} +2 -2
- package/dist/owletto/dist/assets/client-activity-scopes-DqaFEyir.js +2 -0
- package/dist/owletto/dist/assets/{client-rows-Dd5YV8vn.js → client-rows-rse9thnk.js} +2 -2
- package/dist/owletto/dist/assets/{clients-Bf7ZgGro.js → clients-BhPMbxHi.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-z1Sy_hiX.js → code-editor-CTdKUDPY.js} +2 -2
- package/dist/owletto/dist/assets/connect-D8o7HBlo.js +2 -0
- package/dist/owletto/dist/assets/connect-menu-D5EZvSHb.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-Dbagcg9L.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-DALW9S2K.js +2 -0
- package/dist/owletto/dist/assets/connection-DyxzSqVE.js +2 -0
- package/dist/owletto/dist/assets/connection-feed-detail-LqpxUCdy.js +2 -0
- package/dist/owletto/dist/assets/{connector-page-shell-an3SYLim.js → connector-page-shell-DZjKv9zQ.js} +2 -2
- package/dist/owletto/dist/assets/{connector-provenance-mSZCOud-.js → connector-provenance-DtTJn1Nk.js} +2 -2
- package/dist/owletto/dist/assets/connectors-BVl-AR33.js +2 -0
- package/dist/owletto/dist/assets/{consent-1ulwyJ3k.js → consent-XCqsHLxS.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-Ctg_pXLe.js → core.esm-B1du4Zwy.js} +3 -3
- package/dist/owletto/dist/assets/create-BYKCtGL4.js +2 -0
- package/dist/owletto/dist/assets/create-D6Mmuxcq.js +2 -0
- package/dist/owletto/dist/assets/{create-CGuoqPh8.js → create-GHTb6wKX.js} +2 -2
- package/dist/owletto/dist/assets/{create-automation-form-CD6jSlWL.js → create-automation-form-CTiy_S9G.js} +3 -3
- package/dist/owletto/dist/assets/create._connectorKey-DMH97KkK.js +2 -0
- package/dist/owletto/dist/assets/custom-guardrail-edits-DZy66ucV.js +2 -0
- package/dist/owletto/dist/assets/definition-comparison-C2mPfIMD.js +2 -0
- package/dist/owletto/dist/assets/detail-page-skeleton-DNBL7nyk.js +2 -0
- package/dist/owletto/dist/assets/device-CwP1PY8q.js +2 -0
- package/dist/owletto/dist/assets/{device-pin-tombstone-Dkj7hrBE.js → device-pin-tombstone-DYTt7kU5.js} +2 -2
- package/dist/owletto/dist/assets/device._deviceId-DZ2kqI4Y.js +2 -0
- package/dist/owletto/dist/assets/{entity-options-D4t-NAcg.js → entity-options-D9K_5Lcs.js} +2 -2
- package/dist/owletto/dist/assets/entity-page-DggKXrcE.js +2 -0
- package/dist/owletto/dist/assets/entity-pages-C6M6yKFf.js +2 -0
- package/dist/owletto/dist/assets/{entity-schema-graph-Cq96SJ3c.js → entity-schema-graph-B255NKjF.js} +2 -2
- package/dist/owletto/dist/assets/entity-type-page-CGBAP2wt.js +2 -0
- package/dist/owletto/dist/assets/event-attachments-D8Z8uwv9.js +2 -0
- package/dist/owletto/dist/assets/event-detail-CgG3pDLA.js +2 -0
- package/dist/owletto/dist/assets/events-feed-ClhEywwV.js +2 -0
- package/dist/owletto/dist/assets/{filter-editors-DGVl9U4D.js → filter-editors-D_Sfn0dv.js} +3 -3
- package/dist/owletto/dist/assets/{full-page-spinner-CtVlF8GQ.js → full-page-spinner-C1clibUY.js} +2 -2
- package/dist/owletto/dist/assets/{index-CK5GDX4B.js → index-04B26s6E.js} +2 -2
- package/dist/owletto/dist/assets/index-2HrEO-nl.js +2 -0
- package/dist/owletto/dist/assets/index-BU3k9wpw.js +2 -0
- package/dist/owletto/dist/assets/{index-DvuJ_S_o.js → index-BXHqp23o.js} +2 -2
- package/dist/owletto/dist/assets/index-BdLRUDIR.js +2 -0
- package/dist/owletto/dist/assets/index-C2FrGwYN.js +2 -0
- package/dist/owletto/dist/assets/index-CB9wGfUm.js +2 -0
- package/dist/owletto/dist/assets/index-Caihaftb.js +2 -0
- package/dist/owletto/dist/assets/index-CwH59DJV.js +2 -0
- package/dist/owletto/dist/assets/index-DB2lVKuV.js +7908 -0
- package/dist/owletto/dist/assets/{index-DbjbHlDe.js → index-DTvJRjrM.js} +2 -2
- package/dist/owletto/dist/assets/index-SF2ni1Rs.css +1 -0
- package/dist/owletto/dist/assets/{index-BifR-LE9.js → index-mSrdbx3C.js} +9 -9
- package/dist/owletto/dist/assets/index-uFn-Ilrx.js +2 -0
- package/dist/owletto/dist/assets/{json-diff-OjtREegr.js → json-diff-Ce6YAXzY.js} +2 -2
- package/dist/owletto/dist/assets/{list-skeleton-CH0qQBYk.js → list-skeleton-DLPBTnbR.js} +2 -2
- package/dist/owletto/dist/assets/login-DeWlvogD.js +2 -0
- package/dist/owletto/dist/assets/{logout-DfdgOLoM.js → logout-CJY0ceN9.js} +2 -2
- package/dist/owletto/dist/assets/{member-scope-gate-Cxg2zGQT.js → member-scope-gate-CBPMprXu.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-D5kj1RaR.js +74 -0
- package/dist/owletto/dist/assets/{model-selector-D2OpDkwH.js → model-selector-CjkBPpjN.js} +2 -2
- package/dist/owletto/dist/assets/new-BKrNkOQD.js +2 -0
- package/dist/owletto/dist/assets/new-BetiMuDq.js +2 -0
- package/dist/owletto/dist/assets/new-dk_-eXqU.js +2 -0
- package/dist/owletto/dist/assets/new-efN--4Wx.js +2 -0
- package/dist/owletto/dist/assets/organization-C3rpwx_d.js +2 -0
- package/dist/owletto/dist/assets/pdf-document--AN-oCKj.css +1 -0
- package/dist/owletto/dist/assets/pdf-document-2W1q0sRA.js +56 -0
- package/dist/owletto/dist/assets/pdf.worker.min-CIqJB0yW.mjs +28 -0
- package/dist/owletto/dist/assets/peek-pane-content-ChsBWO0P.js +3 -0
- package/dist/owletto/dist/assets/{pending-seed-BBACroge.js → pending-seed-CTKYdA4X.js} +2 -2
- package/dist/owletto/dist/assets/proposal-review-shell-EyGWEYwQ.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-_KWdfzEM.js +2 -0
- package/dist/owletto/dist/assets/record-session-D27VNxP_.js +2 -0
- package/dist/owletto/dist/assets/{renderer-CTKNMcXP.js → renderer-B8yZ5lql.js} +34 -33
- package/dist/owletto/dist/assets/{reset-password-DKBEneyR.js → reset-password-BGVJIh2I.js} +2 -2
- package/dist/owletto/dist/assets/run-initiator-C0sur8lU.js +2 -0
- package/dist/owletto/dist/assets/runs-list-CJOFMgpk.js +2 -0
- package/dist/owletto/dist/assets/schema-value-DDNHANGs.js +3 -0
- package/dist/owletto/dist/assets/{scoped-feed-bar-DNFL0sYX.js → scoped-feed-bar-BTv9mPcR.js} +2 -2
- package/dist/owletto/dist/assets/settings-Ponr5XbS.js +3 -0
- package/dist/owletto/dist/assets/{status-variants-SzXYYedJ.js → status-variants-mLqVhg5O.js} +2 -2
- package/dist/owletto/dist/assets/subDays-BGA_fkig.js +2 -0
- package/dist/owletto/dist/assets/two-factor-pqoxGSgL.js +2 -0
- package/dist/owletto/dist/assets/{use-automations-DfBtVzGa.js → use-automations-DcdlmVuX.js} +2 -2
- package/dist/owletto/dist/assets/{use-login-redirect-BDiS3eyl.js → use-login-redirect-D7HW5Ed6.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-khySpz_V.js → use-mention-search-BniE-K2d.js} +3 -3
- package/dist/owletto/dist/assets/view-card-Cg6PeEiV.js +2 -0
- package/dist/owletto/dist/assets/view-param-filters-CvrKw0mZ.js +2 -0
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +5766 -2999
- package/npm-shrinkwrap.json +195 -172
- package/package.json +2 -1
- package/vendor/connector-sdk/dist/connector-types.d.ts +20 -0
- package/vendor/connector-sdk/dist/define-connector.js +2 -0
- package/vendor/connector-sdk/dist/extension-dom-scrape.d.ts +2 -0
- package/vendor/connector-sdk/dist/extension-dom-scrape.js +5 -0
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +20 -0
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/contracts/entity-reference.d.ts +2 -0
- package/vendor/core/dist/contracts/entity-reference.js +4 -3
- package/vendor/core/dist/contracts/tools/entity-list-sort.d.ts +18 -0
- package/vendor/core/dist/contracts/tools/entity-list-sort.js +64 -0
- package/vendor/core/dist/contracts/tools/manage-agents.d.ts +1 -1
- package/vendor/core/dist/contracts/tools/manage-agents.js +3 -3
- package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +4 -0
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +4 -0
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +4 -0
- package/vendor/core/dist/contracts/tools/manage-entity.js +11 -1
- package/vendor/core/dist/contracts/tools/manage-operations.d.ts +29 -3
- package/vendor/core/dist/contracts/tools/manage-operations.js +24 -2
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +36 -0
- package/vendor/core/dist/contracts/tools/manage-views.js +15 -2
- package/vendor/core/dist/contracts/tools/view-definition.js +7 -2
- package/vendor/core/dist/contracts/tools/view-host.js +5 -0
- package/vendor/core/dist/contracts/tools/view-path.d.ts +8 -1
- package/vendor/core/dist/contracts/tools/view-path.js +11 -1
- package/vendor/core/dist/reserved.d.ts +7 -1
- package/vendor/core/dist/reserved.js +17 -0
- package/vendor/core/package.json +6 -1
- package/vendor/views/dist/api.d.ts +19 -3
- package/vendor/views/dist/api.js +53 -5
- package/vendor/views/dist/components.d.ts +7 -0
- package/vendor/views/dist/components.js +223 -2
- package/vendor/views/dist/embed.js +13 -2
- package/vendor/views/dist/live-gate.d.ts +34 -0
- package/vendor/views/dist/live-gate.js +100 -0
- package/vendor/views/dist/native.d.ts +43 -1
- package/vendor/views/dist/native.js +1 -0
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-BDMUN9XZ.js +0 -2
- package/dist/owletto/dist/assets/_-CF5X4ANe.js +0 -3
- package/dist/owletto/dist/assets/_agentId-EQU2aUP0.js +0 -2
- package/dist/owletto/dist/assets/_automationId-PXZ33jsF.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-DcI29kGy.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-Cr2NDJWX.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-CnmLYlVS.js +0 -2
- package/dist/owletto/dist/assets/_eventId-w5sDz5oa.js +0 -2
- package/dist/owletto/dist/assets/_owner-CkOZR4n0.js +0 -3
- package/dist/owletto/dist/assets/_shape-C_FmSf9G.js +0 -2
- package/dist/owletto/dist/assets/_slug-COPpRXLt.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-BVdJiilV.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-mxxpqjtC.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-msesKUwn.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-DVq9nAR7.js +0 -4
- package/dist/owletto/dist/assets/agent-thread-Cqf9ITrT.js +0 -6
- package/dist/owletto/dist/assets/assist-composer-kG_heHXo.js +0 -2
- package/dist/owletto/dist/assets/automation-run-now-C5XTS00o.js +0 -2
- package/dist/owletto/dist/assets/client-activity-scopes-Aqdo6Pdr.js +0 -2
- package/dist/owletto/dist/assets/connect-BFNp1y_s.js +0 -2
- package/dist/owletto/dist/assets/connect-menu-BWrAhMqO.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-CSPfwYIN.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-CuOeHafK.js +0 -2
- package/dist/owletto/dist/assets/connection-CVeHmDLs.js +0 -2
- package/dist/owletto/dist/assets/connection-feed-detail-BYo7zdVD.js +0 -2
- package/dist/owletto/dist/assets/connectors-DBEM9QQz.js +0 -2
- package/dist/owletto/dist/assets/copy-button-Xhh7ZnjO.js +0 -2
- package/dist/owletto/dist/assets/create-Ccb5R-S4.js +0 -2
- package/dist/owletto/dist/assets/create-DmhbacIa.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-CZsAqj1p.js +0 -2
- package/dist/owletto/dist/assets/custom-guardrail-edits-Ce_BwiwD.js +0 -2
- package/dist/owletto/dist/assets/definition-comparison-D_qP25jR.js +0 -2
- package/dist/owletto/dist/assets/detail-page-skeleton-CPAfZLG0.js +0 -2
- package/dist/owletto/dist/assets/device-DDl5XKvt.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-bNhTcops.js +0 -2
- package/dist/owletto/dist/assets/dynamic-schema-form-CRyUchXo.js +0 -2
- package/dist/owletto/dist/assets/entity-page-BOOL_vy3.js +0 -2
- package/dist/owletto/dist/assets/entity-pages-_nuesgnp.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-CkCSbkBx.js +0 -2
- package/dist/owletto/dist/assets/event-detail-DUvlqn9b.js +0 -2
- package/dist/owletto/dist/assets/events-feed-DcKTkJVe.js +0 -2
- package/dist/owletto/dist/assets/index-BUlkNJzX.js +0 -2
- package/dist/owletto/dist/assets/index-BoqrvLHQ.js +0 -7906
- package/dist/owletto/dist/assets/index-CA9mW_ZM.js +0 -2
- package/dist/owletto/dist/assets/index-CH0GzG4i.js +0 -2
- package/dist/owletto/dist/assets/index-CtI5Eomq.js +0 -2
- package/dist/owletto/dist/assets/index-DmtQ0bds.js +0 -2
- package/dist/owletto/dist/assets/index-Du_J8hnx.js +0 -2
- package/dist/owletto/dist/assets/index-Pae_f9LM.css +0 -1
- package/dist/owletto/dist/assets/index-XETZnN7L.js +0 -2
- package/dist/owletto/dist/assets/login-DG0b9uSC.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-qEDQ9Z18.js +0 -74
- package/dist/owletto/dist/assets/missing-view-xT0B-f5z.js +0 -2
- package/dist/owletto/dist/assets/needs-you-list-3uMsWcDv.js +0 -2
- package/dist/owletto/dist/assets/new-AdGV6a8R.js +0 -2
- package/dist/owletto/dist/assets/new-BdtIhBpo.js +0 -2
- package/dist/owletto/dist/assets/new-BjGwX6s6.js +0 -2
- package/dist/owletto/dist/assets/new-D-iMjV74.js +0 -2
- package/dist/owletto/dist/assets/organization-qaIpEiQg.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-CEsDVScl.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-C8ZfIAYn.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-K2R8iXSI.js +0 -2
- package/dist/owletto/dist/assets/record-session-BrM9cdXu.js +0 -2
- package/dist/owletto/dist/assets/run-initiator-BKSgI1o0.js +0 -2
- package/dist/owletto/dist/assets/runs-k2NpbZm8.js +0 -2
- package/dist/owletto/dist/assets/runs-list-DUXRMkWN.js +0 -2
- package/dist/owletto/dist/assets/schema-value-wjqGxXhv.js +0 -3
- package/dist/owletto/dist/assets/settings-V0m5Om5j.js +0 -2
- package/dist/owletto/dist/assets/source-record-panels-BMut9YIA.js +0 -2
- package/dist/owletto/dist/assets/subDays-9s9OEl5t.js +0 -2
- package/dist/owletto/dist/assets/table-ZuYMOjVR.js +0 -2
- package/dist/owletto/dist/assets/view-card-DiHWlypr.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-DGKxSr7r.js +0 -2
- package/dist/owletto/dist/assets/views-access-required-HA-PiOwA.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=reset-password-
|
|
1
|
+
import{ag as v,r as a,j as e,L as h,ah as j,a5 as y,ai as N}from"./index-DB2lVKuV.js";import{C as k,a as C,b as S,c as L}from"./card-C4oPCVh6.js";function R(){const{token:n,error:x}=v.useSearch(),[o,p]=a.useState(""),[i,f]=a.useState(""),[d,s]=a.useState(null),[l,c]=a.useState(!1),[u,g]=a.useState(!1),w=async t=>{if(t.preventDefault(),!n){s("This reset link is invalid or expired.");return}if(o.length<8){s("Password must be at least 8 characters.");return}if(o!==i){s("Passwords do not match.");return}c(!0),s(null);try{const r=await j(`${y}/api/auth/reset-password`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:n,newPassword:o})});if(!r.ok)throw await N(r);g(!0)}catch(r){s(r instanceof Error?r.message:"Failed to reset password")}finally{c(!1)}},b=!n||x==="INVALID_TOKEN",m={callbackUrl:void 0,mode:void 0,error:void 0,errorDescription:void 0,loginHint:void 0,invitationOrg:void 0,intent:void 0};return e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-md p-8",children:[e.jsx("img",{src:"/lobu-logo.svg",alt:"Lobu",className:"mx-auto mb-6 h-8 w-auto"}),e.jsxs(k,{children:[e.jsx(C,{children:e.jsx(S,{asChild:!0,children:e.jsx("h1",{className:"text-center text-2xl",children:"Reset your password"})})}),e.jsx(L,{children:b&&!u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-destructive",children:"This reset link is invalid or expired."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Back to sign in"})]}):u?e.jsxs("div",{className:"mt-6 space-y-4 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your password has been reset successfully."}),e.jsx(h,{to:"/auth/login",search:m,className:"text-sm text-primary hover:underline",children:"Continue to sign in"})]}):e.jsxs("form",{onSubmit:w,className:"mt-6 space-y-4",children:[d&&e.jsx("div",{className:"p-3 text-sm text-destructive bg-destructive/10 rounded-lg",children:d}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"new-password",className:"block text-sm font-medium",children:"New password"}),e.jsx("input",{id:"new-password",type:"password",value:o,onChange:t=>p(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium",children:"Confirm new password"}),e.jsx("input",{id:"confirm-password",type:"password",value:i,onChange:t=>f(t.target.value),minLength:8,required:!0,className:"mt-1 block h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),e.jsx("button",{type:"submit",disabled:l,className:"flex h-10 w-full items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:l?"Resetting password...":"Reset password"})]})})]})]})})}export{R as component};
|
|
2
|
+
//# sourceMappingURL=reset-password-BGVJIh2I.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{gh as M,gi as k,gj as w,g6 as L,r as h,j as s,n as j,bk as S,ew as A,an as C,B as I,ek as R,P as D,cT as E,L as _,fp as T}from"./index-DB2lVKuV.js";import{a as F}from"./list-skeleton-DLPBTnbR.js";import{s as O}from"./subDays-BGA_fkig.js";import{u as Y}from"./use-automations-DcdlmVuX.js";import{u as z}from"./clients-BhPMbxHi.js";function B(e,n){return M(w(e,e),k(e))}function V(e,n){return L(w(e,e),k(e))}function q(e,n){return L(w(e,e),O(k(e),1))}function U({onIntersect:e,onLeave:n,enabled:t,rootMargin:r="400px"}){const a=h.useRef(null),o=h.useRef(e);o.current=e;const u=h.useRef(n);return u.current=n,h.useEffect(()=>{const c=a.current;if(!c||!t)return;const f=new IntersectionObserver(l=>{l[0]?.isIntersecting?o.current():u.current?.()},{rootMargin:r});return f.observe(c),()=>f.disconnect()},[t,r]),a}function W({groupByDate:e=!0}){return s.jsx("div",{role:"status","aria-label":"Loading activity","aria-busy":"true",children:s.jsxs("div",{"aria-hidden":"true",children:[e?s.jsx("div",{className:"px-3 pb-2",children:s.jsx(j,{className:"h-4 w-28 rounded-none"})}):null,["first","second","third","fourth","fifth"].map(n=>s.jsxs("div",{className:"flex items-start gap-3 px-3 py-3",children:[s.jsx(j,{className:"h-8 w-8 shrink-0 rounded-none"}),s.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[s.jsx(j,{className:"h-4 w-3/5 max-w-sm rounded-none"}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(j,{className:"h-3 w-20 rounded-none"}),s.jsx(j,{className:"h-3 w-12 rounded-none"})]})]})]},n))]})})}function $(e){if(e==null||e==="")return null;const n=new Date(e);return Number.isNaN(n.getTime())?null:R(n,"d MMMM yyyy")}function X(e){if(e==null||e==="")return null;const n=new Date(e);return Number.isNaN(n.getTime())?null:V(n)?"Today":q(n)?"Yesterday":R(n,B(n)?"d MMM":"d MMM yyyy")}function G({items:e}){const n=[];for(const t of e){const r=X(t.occurredAt)??"Undated",a=n.at(-1);a?.day===r?a.items.push(t):n.push({day:r,items:[t]})}return s.jsx(s.Fragment,{children:n.map(({day:t,items:r},a)=>s.jsxs("section",{"aria-label":t,className:"min-w-0",children:[s.jsx("div",{className:a===0?"px-1 pb-1.5":"px-1 pt-4 pb-1.5",children:s.jsx("h2",{className:"text-sm font-semibold",children:t})}),s.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:r.map(o=>s.jsx("li",{children:o.content},o.key))})]},`${t}:${a}`))})}const H=3;function ne({items:e,isLoading:n,emptyState:t,hasNextPage:r,isFetching:a,isFetchingNextPage:o,onLoadMore:u,autoLoadMore:c=!0,groupByDate:f=!0,rows:l=!1}){const[g,x]=h.useState(0),N=g>=H,b=U({onIntersect:()=>{x(i=>i+1),u()},onLeave:()=>x(0),enabled:c&&r&&!a&&!N}),y=()=>{x(0),u()};return n&&e.length===0?l?s.jsx("div",{role:"status","aria-label":"Loading activity",className:"divide-y overflow-hidden rounded-lg border",children:[0,1,2,3].map(i=>s.jsx(F,{},i))}):s.jsx(W,{groupByDate:f}):s.jsxs("div",{children:[e.length===0?r?null:t!==void 0?t:s.jsx(S,{icon:A,title:"Nothing here yet",description:"No events match this view."}):l?s.jsx(G,{items:e}):e.map((i,m)=>{const p=$(i.occurredAt),v=m>0?$(e[m-1].occurredAt):null;return s.jsxs(h.Fragment,{children:[f&&p&&p!==v&&s.jsx("p",{className:"px-3 pb-2 pt-4 text-xs text-muted-foreground first:pt-0",children:p}),s.jsx("div",{className:"mb-1",children:i.content})]},i.key)}),s.jsx("div",{ref:b,className:"h-1"}),o?s.jsx("div",{role:"status","aria-label":"Loading earlier activity",className:"flex justify-center py-3",children:s.jsx(C,{className:"text-muted-foreground"})}):r?c?N?s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(I,{variant:"link",size:"sm",className:"h-auto p-0 text-xs font-normal text-muted-foreground",disabled:a,onClick:y,children:"Show earlier activity"})}):null:s.jsx(I,{size:"sm",variant:"outline",className:l?"mt-3":void 0,disabled:a,onClick:y,children:"Load more"}):null]})}function J(e,n,t){return e?.kind==="agent_session"&&e.agent_id?e.client_id?`${e.agent_id} via ${e.client_id}`:e.agent_id:e?.kind==="user"?"a person":n==="agent"?"an agent":t?`Automation ${t}`:"an Automation"}function se({ownerSlug:e,initiator:n,clientName:t,fallback:r}){const a=n?.client_id??t,{allOrgs:o,isAuthenticated:u}=D(),c=u&&o?.some(d=>d.slug===e),l=z(void 0,{ownerSlug:e,enabled:!!(a&&c)}).data?.find(d=>d.id===a)?.title,g=c?o.find(d=>d.slug===e)?.id:void 0,x=n?.kind==="automation"&&n.automation_id?String(n.automation_id):void 0,b=Y(x?g:void 0,void 0,{includeDetails:!1}).data?.find(d=>d.automation_id===x)?.name,{members:y}=E(n?.kind==="user"&&n.user_id?g:void 0),i=y.find(d=>d.userId===n?.user_id)?.user.name,m=n&&n.kind!=="user"?b??J(n,void 0,n.automation_id===void 0?void 0:String(n.automation_id)):i??r,p="font-medium text-foreground",v=`${p} underline-offset-4 hover:underline`;return n?.kind==="automation"&&n.automation_id?s.jsx(_,{to:"/$owner/automations/$automationId",params:{owner:e,automationId:String(n.automation_id)},search:{view:"definition",run_id:void 0},className:v,children:m}):n?.kind==="agent_session"&&n.agent_id?s.jsx(_,{to:"/$owner/agents/$agentId",params:{owner:e,agentId:String(n.agent_id)},className:v,children:m}):a?s.jsxs(_,{to:"/$owner/agents/connected/$clientId",params:{owner:e,clientId:a},className:`${v} inline-flex items-center gap-1 align-middle`,children:[s.jsx(T,{name:l??t??a}),l??m]}):s.jsx("span",{className:p,children:m})}export{W as E,se as R,ne as a,B as b,V as i,J as p};
|
|
2
|
+
//# sourceMappingURL=run-initiator-C0sur8lU.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as t,B as k,L as v,dA as B,i as p,fH as F,fI as D,fJ as M,hb as A,hc as I,u as P,hd as f,he as E,bn as y,bs as w,eN as K,r as x,aM as N,aN as b,aP as C,fF as V,au as z,an as O,hf as J,hg as U,hh as _,bo as q,C as G,ek as H}from"./index-DB2lVKuV.js";import{R as Q,a as W}from"./run-initiator-C0sur8lU.js";function X(e,s){switch(s.kind){case"connection":return I(e,s.id);case"feed":return A(e,s.id);case"run":return{to:"/$owner/events",params:{owner:e},search:{run_ids:String(s.id)}}}}function Y({ownerSlug:e,scope:s,variant:n="outline",iconOnly:a=!1,label:l,className:r,title:i}){const c=X(e,s),o=i??l??"View in memory",u=t.jsx(k,{asChild:!0,variant:n,size:a?"icon":"sm",className:p(a&&"h-7 w-7",r),children:t.jsxs(v,{to:c.to,params:c.params,search:c.search,children:[t.jsx(B,{className:p("h-3.5 w-3.5",!a&&"mr-1.5")}),!a&&(l??"View in memory")]})});return a?t.jsxs(F,{children:[t.jsx(D,{asChild:!0,children:u}),t.jsx(M,{children:o})]}):u}function Z({status:e}){return e==="completed"?t.jsx(V,{className:"h-4 w-4 text-green-500"}):e==="failed"?t.jsx(z,{className:"h-4 w-4 text-destructive"}):e==="running"?t.jsx(O,{className:"text-blue-500"}):t.jsx(J,{className:"h-4 w-4 text-muted-foreground"})}const ee={completed:"Completed",failed:"Failed",running:"Running",pending:"Queued",claimed:"Starting",timeout:"Timed out",cancelled:"Cancelled"};function $(e){const s=e.split("_").join(" ");return s.charAt(0).toUpperCase()+s.slice(1)}function te({error:e}){const[s,n]=x.useState(!1);return e.length<=80?t.jsx("span",{className:"text-destructive",children:e}):t.jsxs(N,{open:s,onOpenChange:n,children:[t.jsx(b,{asChild:!0,children:t.jsx("button",{type:"button",className:"text-left text-destructive hover:underline",children:e})}),t.jsx(C,{className:"max-h-64 w-96 overflow-auto",children:t.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs text-destructive",children:e})})]})}function se({checkpoint:e}){return t.jsxs(N,{children:[t.jsx(b,{asChild:!0,children:t.jsx(k,{variant:"ghost",size:"icon",title:"Checkpoint","aria-label":"Checkpoint",className:"size-8 shrink-0 text-muted-foreground hover:text-foreground",children:t.jsx(U,{className:"h-4 w-4","aria-hidden":"true"})})}),t.jsx(C,{className:"max-h-64 w-80 overflow-auto",children:t.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs",children:JSON.stringify(e,null,2)})})]})}function R(e){if(e.initiator_kind)return{kind:e.initiator_kind,...e.initiator_ref};if(e.automation_id)return{kind:"automation",automation_id:e.automation_id};if(e.created_by_user_id)return{kind:"user",user_id:e.created_by_user_id}}function ne({run:e,ownerSlug:s}){const n=R(e);return n?n.kind==="system"?t.jsx(t.Fragment,{children:"by the system"}):t.jsxs(t.Fragment,{children:["by"," ",t.jsx(Q,{ownerSlug:s,initiator:n,clientName:void 0,fallback:"a person"})]}):null}function ie({parts:e}){return t.jsx(t.Fragment,{children:e.map(([s,n],a)=>t.jsxs(x.Fragment,{children:[a>0?" · ":"",n]},s))})}function j(e,s){return[e.run_type?$(e.run_type):"Run",s.connection?e.connection_display_name:null,s.feed?e.feed_display_name??e.feed_key:null].filter(Boolean).join(" · ")}const ae=3;function g(e,s){const n=f(e.created_at);return e.status==="completed"&&n!=null?`${j(e,s)}|${H(n,"yyyy-MM-dd")}`:null}function re(e,s){const n=new Map;for(const r of e){const i=g(r,s);i&&n.set(i,[...n.get(i)??[],r])}const a=[],l=new Set;for(const r of e){const i=g(r,s),c=i?n.get(i):void 0;!i||!c||c.length<ae?a.push({kind:"run",run:r}):l.has(i)||(l.add(i),a.push({kind:"group",name:j(r,s),runs:c}))}return a}function oe({name:e,runs:s,ownerSlug:n,columns:a}){const[l,r]=x.useState(!1),i=f(s[0].created_at),c=f(s[s.length-1].created_at),o=Date.now(),u=s.reduce((m,T)=>m+(T.items_collected??0),0),h=c!=null?_(c,o):null,d=i!=null?_(i,o):null,S=h&&d&&h!==d?`${h}–${d}`:d;return t.jsxs("div",{children:[t.jsx("button",{type:"button","aria-expanded":l,onClick:()=>r(m=>!m),className:p(w,"rounded-lg transition-colors hover:bg-accent/40"),children:t.jsx(y,{mark:t.jsx(G,{"aria-hidden":"true",className:p("h-4 w-4 text-muted-foreground transition-transform",l&&"rotate-90")}),name:e,details:t.jsx(q,{parts:[`${s.length} runs`,S,"all completed",u>0?`${u} ${u===1?"item":"items"}`:null]}),at:i})}),l?t.jsx("div",{className:"ml-6 border-l pl-2",children:s.map(m=>t.jsx("div",{className:"mb-1",children:t.jsx(L,{run:m,ownerSlug:n,columns:a})},m.id))}):null]})}function L({run:e,title:s,ownerSlug:n,columns:a={}}){const l=P(),r=f(e.created_at),i=f(e.completed_at),c=r!=null&&i!=null?Math.round((i-r)/1e3):null,o=s??j(e,a),u=a.startedBy&&R(e)?t.jsx(ne,{run:e,ownerSlug:n}):null,h=[["status",ee[e.status]??$(e.status)],e.error_message?["error",t.jsx(te,{error:e.error_message},"error")]:null,e.items_collected!=null&&(e.run_type==="sync"||e.items_collected>0)?["items",`${e.items_collected} ${e.items_collected===1?"item":"items"}`]:null,c!=null?["duration",E(c)]:null,u?["by",u]:null,e.connector_version?["version",`v${e.connector_version}`]:null,["id",`#${e.id}`]].filter(d=>d!==null);return t.jsxs("article",{"aria-label":`Run #${e.id}`,title:K(e.created_at),className:"group relative flex items-center rounded-lg transition-colors hover:bg-accent/40",children:[t.jsx("div",{className:p(w,"min-w-0 flex-1"),children:t.jsx(y,{mark:t.jsx(Z,{status:e.status}),name:t.jsx(v,{to:"/$owner/events",params:{owner:n},search:{run_ids:String(e.id)},"aria-label":`${o} · Run #${e.id}`,className:"hover:underline",onClick:d=>{!l||d.button!==0||d.metaKey||d.ctrlKey||d.shiftKey||d.altKey||(d.preventDefault(),l.open({href:e.run_type==="automation"&&e.automation_id!=null?`/${n}/automations/${e.automation_id}?view=activity&run_id=${e.id}`:`/${n}/events?run_ids=${e.id}`,title:`Run #${e.id}`,runId:e.id}))},children:o}),tone:e.status==="failed"||e.status==="timeout"?"destructive":null,details:t.jsx(ie,{parts:h}),at:r,atClassName:"group-hover:invisible group-focus-within:invisible"})}),t.jsxs("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 items-center gap-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100",children:[e.checkpoint?t.jsx(se,{checkpoint:e.checkpoint}):null,t.jsx(Y,{ownerSlug:n,scope:{kind:"run",id:e.id},variant:"ghost",iconOnly:!0,title:"View events from this run"})]})]})}function de({runs:e,ownerSlug:s,columns:n={},emptyState:a,hasNextPage:l=!1,isFetching:r=!1,isFetchingNextPage:i=!1,onLoadMore:c=()=>{}}){return t.jsx(W,{items:re(e,n).map(o=>o.kind==="run"?{key:String(o.run.id),occurredAt:o.run.created_at,content:t.jsx(L,{run:o.run,ownerSlug:s,columns:n})}:{key:`group:${o.runs[0].id}`,occurredAt:o.runs[0].created_at,content:t.jsx(oe,{name:o.name,runs:o.runs,ownerSlug:s,columns:n})}),isLoading:!1,emptyState:a,hasNextPage:l,isFetching:r,isFetchingNextPage:i,onLoadMore:c})}export{L as R,Y as V,de as a};
|
|
2
|
+
//# sourceMappingURL=runs-list-CJOFMgpk.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{j as i,i as w,L as A,gM as $,gN as L,gO as D}from"./index-DB2lVKuV.js";const O=/^\d{4}-\d{2}-\d{2}(?:[tT ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,U=/^\d{4}-\d{2}-\d{2}$/;function E(t){return O.test(t)}function S(t){if(!/^https?:\/\//i.test(t))return!1;try{const r=new URL(t);return r.protocol==="http:"||r.protocol==="https:"}catch{return!1}}function N(t){return t.replace(/[-_]/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function g(t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",notation:t>=1e3?"compact":"standard",maximumFractionDigits:t>=1e9?1:0}).format(t)}function p(t){return new Intl.NumberFormat("en-US",{maximumFractionDigits:Number.isInteger(t)?0:2}).format(t)}function b(t){const r=new Date(U.test(t)?`${t}T00:00:00`:t);return Number.isNaN(r.getTime())?t:r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function h(t){try{const r=new URL(t),n=r.hostname.replace(/^www\./i,""),e=r.pathname&&r.pathname!=="/"?r.pathname.replace(/\/$/,""):"";return`${n}${e}`}catch{return t}}function a(t){return t==null?"":typeof t=="string"?t:typeof t=="number"||typeof t=="boolean"?String(d(t)):Array.isArray(t)?t.some(r=>typeof r=="object"&&r!==null)?t.map((r,n)=>`${n+1}. ${a(r)}`).join(`
|
|
2
|
+
`):JSON.stringify(t):typeof t=="object"?Object.entries(t).filter(([,n])=>n!=null&&n!=="").map(([n,e])=>`${N(n)}: ${a(e)}`).join("; "):JSON.stringify(t)}function d(t,r){if(t==null)return"";if(typeof t=="boolean")return t?"Yes":"No";if(typeof t=="number")return r==="currency"?g(t):r===void 0||r==="text"?String(t):p(t);if(typeof t!="string")return a(t);switch(r){case"currency":return g(Number(t));case"date":return b(t);case"url":return h(t);case"enum":return N(t);case"number":return p(Number(t));case"auto":return S(t)?h(t):E(t)?b(t):t;default:return t}}function T(t){return t==null?null:typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):null}function V(t,r){return typeof t!="string"||!t.startsWith("@")||t.length===1?null:{action:t.slice(1),value:T(r)}}function k(t){return i.jsx("a",{...t})}function x(t){return t?t["x-currency"]||t.format==="currency"?"currency":t.format==="uri"||t.format==="url"?"url":t.enum?.length?"enum":t.type==="number"||t.type==="integer"?"number":t.type==="boolean"?"boolean":"auto":"auto"}function j(t){return t==null||t===""||Array.isArray(t)&&t.length===0}function I(t){return Array.isArray(t)&&t.some(r=>typeof r=="object"&&r!==null)}function C(t,r,n){const e=L(r,t);return e!==void 0?e:typeof t=="string"&&(r?.format==="date"||r?.format==="date-time")?D(t,r.format==="date-time"):d(t,n)}function y(t,r){return!r||t===null||typeof t!="object"?t:Array.isArray(t)?t.map(n=>y(n,r.items)):Object.fromEntries(Object.entries(t).filter(([n])=>!$(r.properties?.[n])).map(([n,e])=>[n,y(e,r.properties?.[n])]))}function l({value:t,prop:r,format:n,resolveLink:e,className:m}){const s=String(t),o=e?.(s);if(o)return i.jsx(A,{to:o.to,className:"text-primary hover:underline",onClick:f=>f.stopPropagation(),children:o.label});const u=typeof t=="string"&&S(t),c=n==="url"&&!u?s:C(t,r,n);return u?i.jsx(k,{href:t,target:"_blank",rel:"noreferrer",className:"text-primary hover:underline [overflow-wrap:anywhere]",onClick:f=>f.stopPropagation(),children:c}):i.jsx("span",{className:m,children:c})}function P({value:t,prop:r,format:n,resolveLink:e,empty:m="-",className:s}){if(j(t))return i.jsx("span",{className:"text-muted-foreground",children:m});if(I(t)){const o=t.length;return i.jsxs("span",{className:s,children:[o," ",o===1?"item":"items"]})}if(Array.isArray(t)){const o=t.filter(c=>!j(c)),u=r?.items??r;return i.jsx("span",{className:w("inline-flex flex-wrap gap-x-1",s),children:o.map((c,f)=>i.jsxs("span",{children:[i.jsx(l,{value:c,prop:u,format:n??x(u),resolveLink:e}),f<o.length-1&&","]},`${f}:${String(c)}`))})}return typeof t=="object"?i.jsx("span",{className:s,children:d(y(t,r))}):i.jsx(l,{value:t,prop:r,format:n??x(r),resolveLink:e,className:s})}export{P as S,d as f,S as i,V as t};
|
|
3
|
+
//# sourceMappingURL=schema-value-DDNHANGs.js.map
|
package/dist/owletto/dist/assets/{scoped-feed-bar-DNFL0sYX.js → scoped-feed-bar-BTv9mPcR.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as t,L as m,A as u,
|
|
2
|
-
//# sourceMappingURL=scoped-feed-bar-
|
|
1
|
+
import{j as t,L as m,A as u,o as p,cW as x,x as f,r as h,ed as v}from"./index-DB2lVKuV.js";import{e as g,f as c,c as j}from"./event-kind-options-fHAIXu24.js";import{o as b,F as N,b as y}from"./filter-editors-D_Sfn0dv.js";const F="h-8 rounded-md border border-input bg-muted text-sm";function E(i,{platforms:e}={}){const{isMember:o}=p(),n=o?i:null,{data:r=[]}=x(n),{data:a=[]}=f(n?{organizationId:n}:void 0);return h.useMemo(()=>j({connectors:r,entityTypes:a,selectedPlatforms:e}),[r,a,e])}function L({owner:i,organizationId:e,activitySearch:o,kinds:n,onKindsChange:r,platforms:a}){const l=n??[],s=l.length>0?{semantic_types:l.join(",")}:{};return t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[r?t.jsx(O,{organizationId:e,kinds:l,onKindsChange:r,platforms:a}):t.jsx("span",{className:"flex-1"}),t.jsxs(m,{to:"/$owner/events",params:{owner:i},search:{...o,...s},className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:["Open in Activity",t.jsx(u,{"aria-hidden":"true",className:"h-3.5 w-3.5"})]})]})}function O({organizationId:i,kinds:e,onKindsChange:o,platforms:n}){const r=E(i,{platforms:n}),a={key:"kind",label:"Event kind",icon:t.jsx(v,{className:"h-4 w-4"}),editor:b({searchPlaceholder:"Search event kinds...",emptyText:"No event kinds found",options:g(r,e).map(s=>({value:s,label:c(s)})),selected:e,multiple:!0,onSelect:s=>o(e.includes(s)?e.filter(d=>d!==s):[...e,s])})},l=e.length>0?[{id:"kind",label:"Kind",value:e.length<=2?e.map(c).join(", "):`${e.length} kinds`,title:e.map(c).join(", "),onRemove:()=>o([])}]:[];return t.jsxs(t.Fragment,{children:[t.jsx(N,{label:"Feed filters",menu:!1,fields:[a],chips:l,className:"flex-1"}),t.jsx(y,{fields:[a],triggerClassName:F})]})}export{L as S};
|
|
2
|
+
//# sourceMappingURL=scoped-feed-bar-BTv9mPcR.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{z as $,r as c,y as z,E as S,av as U,F as v,j as e,B as o,aw as I,ax as F,ay as A,az as L,aA as T,$ as C,a0 as R,ac as q,aB as B,H,L as E,U as Q,aC as K,aD as Y}from"./index-DB2lVKuV.js";import{F as M}from"./full-page-spinner-C1clibUY.js";function _({userId:x}){const t=$(),n=["account-passkeys",x],g=c.useId(),[r,b]=c.useState(null),[f,l]=c.useState(""),[k,N]=c.useState(!1),w=typeof window.PublicKeyCredential<"u"&&window.isSecureContext,u=z({queryKey:n,queryFn:async()=>{const s=await v.passkey.listUserPasskeys();if(s.error)throw new Error(s.error.message||"Could not load passkeys. Try again.");return s.data??[]}}),m=S({mutationFn:U}),h=S({mutationFn:async s=>{const y=s.kind==="add"?await v.passkey.addPasskey({name:f.trim()}):s.kind==="rename"?await v.passkey.updatePasskey({id:s.id,name:f.trim()}):await v.passkey.deletePasskey({id:s.id});if(!y||y.error){const i=y?.error,j=i&&"code"in i?i.code:void 0;throw N(j==="SESSION_NOT_FRESH"||j==="UNAUTHORIZED"),new Error(i?.message||"Passkey setup was not completed. You can try again.")}},onSuccess:async()=>{await t.invalidateQueries({queryKey:n}),b(null),l("")}}),d=h.isPending||m.isPending;function p(s){h.reset(),m.reset(),N(!1),l(s.kind==="rename"?s.name:""),b(s)}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"max-w-prose space-y-1",children:[e.jsx("h3",{className:"font-medium",children:"Passkeys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign in using your device’s fingerprint, face recognition, PIN, or security key."})]}),e.jsx(o,{variant:"outline",disabled:!w||d,onClick:()=>p({kind:"add"}),children:"Add passkey"})]}),!w&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"To add a passkey, open Lobu in a browser that supports passkeys over a secure connection."}),u.isPending&&e.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading passkeys…"}),u.isError&&e.jsxs("div",{role:"alert",className:"space-y-2 text-sm",children:[e.jsx("p",{children:u.error.message}),e.jsx(o,{variant:"outline",size:"sm",onClick:()=>void u.refetch(),children:"Try again"})]}),u.data?.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No passkeys registered yet."}),u.data&&u.data.length>0&&e.jsx("ul",{className:"divide-y divide-border",children:u.data.map(s=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-3 py-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"break-words font-medium",children:s.name||"Unnamed passkey"}),s.createdAt&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Added ",new Date(s.createdAt).toLocaleDateString()]})]}),e.jsxs("div",{className:"flex shrink-0 gap-2",children:[e.jsx(o,{variant:"ghost",size:"sm",disabled:d,"aria-label":`Rename ${s.name||"Unnamed passkey"}`,onClick:()=>p({kind:"rename",id:s.id,name:s.name||""}),children:"Rename"}),e.jsx(o,{variant:"ghost",size:"sm",disabled:d,"aria-label":`Remove ${s.name||"Unnamed passkey"}`,onClick:()=>p({kind:"remove",id:s.id,name:s.name||"Unnamed passkey"}),children:"Remove"})]})]},s.id))}),e.jsx(I,{open:r!==null,onOpenChange:s=>{!s&&!d&&(b(null),h.reset(),l(""))},children:e.jsxs(F,{onInteractOutside:s=>{d&&s.preventDefault()},onEscapeKeyDown:s=>{d&&s.preventDefault()},children:[e.jsxs(A,{children:[e.jsx(L,{children:r?.kind==="remove"?"Remove passkey?":r?.kind==="rename"?"Rename passkey":"Add a passkey"}),e.jsx(T,{children:r?.kind==="remove"?`“${r.name}” will no longer work for sign-in. Make sure you can sign in with another method.`:r?.kind==="rename"?"Choose a name that helps you recognize this passkey.":"Give your passkey a name, then follow your browser’s instructions to register it."})]}),e.jsxs("form",{className:"space-y-4",onSubmit:s=>{s.preventDefault(),r&&!d&&h.mutate(r)},children:[r?.kind!=="remove"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:g,children:"Passkey name"}),e.jsx(R,{id:g,value:f,onChange:s=>l(s.target.value),maxLength:100,autoComplete:"off",required:!0,disabled:d})]}),h.isError&&e.jsxs("div",{role:"alert",className:"space-y-2 text-sm text-destructive",children:[e.jsx("p",{children:h.error.message}),k&&e.jsx(o,{type:"button",variant:"outline",disabled:m.isPending,onClick:()=>m.mutate(),children:m.isPending?"Signing out…":"Sign out and sign in again"})]}),m.isError&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:m.error.message}),e.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[e.jsx(o,{type:"button",variant:"outline",disabled:d,onClick:()=>{b(null),l(""),h.reset()},children:"Cancel"}),e.jsx(o,{type:"submit",variant:r?.kind==="remove"?"destructive":"default",disabled:d||r?.kind!=="remove"&&!f.trim(),children:h.isPending?r?.kind==="add"?"Waiting for your device…":"Saving…":r?.kind==="remove"?"Remove passkey":r?.kind==="rename"?"Save name":"Create passkey"})]})]})]})})]})}function G({enabled:x}){const[t,n]=c.useState(null),[g,r]=c.useState(""),[b,f]=c.useState(""),[l,k]=c.useState(null),[N,w]=c.useState([]),[u,m]=c.useState(!1),[h,d]=c.useState(!1),p=c.useId(),s=S({mutationFn:U}),y=S({mutationFn:async()=>{const a=t==="enable"?await v.twoFactor.enable({password:g}):t==="disable"?await v.twoFactor.disable({password:g}):t==="regenerate"?await v.twoFactor.generateBackupCodes({password:g}):await v.twoFactor.verifyTotp({code:b,trustDevice:!1});if(a.error)throw d("code"in a.error&&(a.error.code==="SESSION_NOT_FRESH"||a.error.code==="UNAUTHORIZED")),new Error(a.error.message||"Could not update two-factor authentication. Try again.");r(""),t==="enable"&&a.data&&"totpURI"in a.data&&"backupCodes"in a.data?(k({totpURI:a.data.totpURI,backupCodes:a.data.backupCodes}),n("verify")):t==="regenerate"&&a.data&&"backupCodes"in a.data?(w(a.data.backupCodes),n("codes")):t==="verify"&&l?(w(l.backupCodes),k(null),f(""),n("codes")):j()}}),i=y.isPending||s.isPending;function j(){n(null),r(""),f(""),k(null),w([]),m(!1),d(!1),y.reset(),s.reset()}function D(a){j(),n(a)}const O=t==="disable"?"Disable two-factor authentication?":t==="regenerate"?"Replace recovery codes?":t==="verify"?"Connect your authenticator":t==="codes"?"Save your recovery codes":"Enable two-factor authentication";return e.jsxs("div",{className:"space-y-3 border-b border-border pb-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"max-w-prose space-y-1",children:[e.jsx("h3",{className:"font-medium",children:"Authenticator app"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:x?"Enabled. You’ll need an authenticator or recovery code when signing in.":"Add a six-digit code from your authenticator app to protect your account."})]}),e.jsx(o,{variant:"outline",disabled:i,onClick:()=>D(x?"disable":"enable"),children:x?"Disable":"Set up authenticator"})]}),x&&e.jsx(o,{variant:"outline",size:"sm",disabled:i,onClick:()=>D("regenerate"),children:"Generate new recovery codes"}),e.jsx(I,{open:t!==null,onOpenChange:a=>{!a&&!i&&j()},children:e.jsxs(F,{className:"max-h-[90dvh] overflow-y-auto",onInteractOutside:a=>{i&&a.preventDefault()},onEscapeKeyDown:a=>{i&&a.preventDefault()},children:[e.jsxs(A,{children:[e.jsx(L,{children:O}),e.jsx(T,{children:t==="disable"?"Your authenticator will no longer be required at sign-in.":t==="regenerate"?"Your existing recovery codes will stop working. Save the replacement codes before closing.":t==="verify"?"Scan the QR code, then enter a code from the app. Protection starts after verification.":t==="codes"?"Keep these codes somewhere safe, away from your authenticator. Each works once. They won’t be shown again.":"Confirm your password if your account has one, then connect an authenticator app."})]}),t==="codes"?e.jsxs("div",{className:"space-y-4",children:[e.jsx("ul",{className:"grid grid-cols-2 gap-2 rounded-md border border-border p-3 font-mono text-sm",children:N.map(a=>e.jsx("li",{children:a},a))}),e.jsx(o,{type:"button",variant:"outline",onClick:()=>{const a=URL.createObjectURL(new Blob([N.join(`
|
|
2
|
+
`)],{type:"text/plain"})),P=document.createElement("a");P.href=a,P.download="lobu-recovery-codes.txt",P.click(),setTimeout(()=>URL.revokeObjectURL(a),0)},children:"Download codes"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{id:`${p}-saved`,checked:u,onCheckedChange:a=>m(a===!0)}),e.jsx(C,{htmlFor:`${p}-saved`,children:"I saved my recovery codes"})]}),e.jsx(o,{type:"button",disabled:!u,onClick:j,children:"Done"})]}):e.jsxs("form",{className:"space-y-4",onSubmit:a=>{a.preventDefault(),i||y.mutate()},children:[t==="verify"&&l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center rounded-md bg-white p-4",children:e.jsx(B,{value:l.totpURI,size:192,level:"M","aria-label":"Authenticator setup QR code"})}),e.jsxs("details",{className:"text-sm",children:[e.jsx("summary",{className:"cursor-pointer",children:"Enter setup key manually"}),e.jsx("code",{className:"mt-2 block break-all rounded-md bg-muted p-3",children:new URL(l.totpURI).searchParams.get("secret")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:`${p}-code`,children:"Authenticator code"}),e.jsx(R,{id:`${p}-code`,value:b,onChange:a=>f(a.target.value),inputMode:"numeric",autoComplete:"one-time-code",pattern:"[0-9]{6}",minLength:6,maxLength:6,required:!0,disabled:i})]})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{htmlFor:`${p}-password`,children:"Password (if set)"}),e.jsx(R,{id:`${p}-password`,type:"password",value:g,onChange:a=>r(a.target.value),autoComplete:"current-password",maxLength:256,disabled:i})]}),y.isError&&e.jsxs("div",{role:"alert",className:"space-y-2 text-sm text-destructive",children:[e.jsx("p",{children:y.error.message}),h&&e.jsx(o,{type:"button",variant:"outline",disabled:i,onClick:()=>s.mutate(),children:"Sign out and sign in again"})]}),s.isError&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:s.error.message}),e.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[e.jsx(o,{type:"button",variant:"outline",disabled:i,onClick:j,children:"Cancel"}),e.jsx(o,{type:"submit",variant:t==="disable"?"destructive":"default",disabled:i,children:i?"Saving…":t==="verify"?"Verify and enable":t==="disable"?"Disable protection":t==="regenerate"?"Replace codes":"Continue"})]})]})]})})]})}function W(){const{session:x,isReady:t}=H();if(!t)return e.jsx(M,{});if(!x?.user)return e.jsxs("div",{className:"mx-auto w-full max-w-md space-y-4 px-4 py-8 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Account settings"}),e.jsx("p",{className:"text-muted-foreground",children:"Sign in to view your profile and account details."}),e.jsx(o,{asChild:!0,children:e.jsx(E,{to:"/auth/login",search:Q({intent:"sign-in",callbackUrl:"/account/settings"}),children:"Sign in"})})]});const{user:n}=x,g=n.name?.trim()||"User";return e.jsx(K,{className:"py-8",children:e.jsxs(Y,{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-3xl font-semibold leading-tight",children:"Account settings"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your personal profile and sign-in details."})]}),e.jsxs("section",{"aria-labelledby":"account-profile-heading",className:"space-y-5 border-b border-border pb-8",children:[e.jsx("h2",{id:"account-profile-heading",className:"text-sm font-medium",children:"Profile"}),e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[n.image?e.jsx("img",{src:n.image,alt:"",referrerPolicy:"no-referrer",className:"h-12 w-12 shrink-0 rounded-full object-cover"}):e.jsx("div",{"aria-hidden":"true",className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-muted text-lg font-medium",children:(n.name?.trim()||n.email||"U").charAt(0).toUpperCase()}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"break-words font-medium",children:g}),e.jsx("p",{className:"break-all text-sm text-muted-foreground",children:n.email})]})]}),e.jsxs("details",{className:"space-y-3",children:[e.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Account details"}),e.jsxs("dl",{className:"space-y-1 text-sm",children:[e.jsx("dt",{className:"text-muted-foreground",children:"User ID"}),e.jsx("dd",{className:"break-all font-mono text-xs",children:n.id})]})]})]}),e.jsxs("section",{"aria-labelledby":"account-security-heading",className:"space-y-5 border-b border-border pb-8",children:[e.jsx("h2",{id:"account-security-heading",className:"text-sm font-medium",children:"Security"}),e.jsx(G,{enabled:!!n.twoFactorEnabled}),e.jsx(_,{userId:n.id})]}),e.jsxs("section",{"aria-labelledby":"account-session-heading",className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{id:"account-session-heading",className:"text-sm font-medium",children:"Session"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign out of your account on this device."})]}),e.jsx(o,{variant:"outline",asChild:!0,children:e.jsx(E,{to:"/auth/logout",children:"Sign out"})})]})]})})}export{W as component};
|
|
3
|
+
//# sourceMappingURL=settings-Ponr5XbS.js.map
|
package/dist/owletto/dist/assets/{status-variants-SzXYYedJ.js → status-variants-mLqVhg5O.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as t,i as s,
|
|
2
|
-
//# sourceMappingURL=status-variants-
|
|
1
|
+
import{j as t,i as s,bU as a}from"./index-DB2lVKuV.js";const u=a("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{status:{active:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",paused:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",error:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",pending:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",rejected:"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-400",default:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"}},defaultVariants:{status:"default"}}),i=a("h-1.5 w-1.5 rounded-full",{variants:{status:{active:"bg-green-500",paused:"bg-yellow-500",error:"bg-red-500",pending:"bg-blue-500",rejected:"bg-gray-500",default:"bg-gray-500"}},defaultVariants:{status:"default"}});function b({className:e,status:r,showDot:n=!0,children:d,...g}){return t.jsxs("span",{className:s(u({status:r}),e),...g,children:[n&&t.jsx("span",{className:i({status:r})}),d]})}const l=new Set(["error","failed","revoked"]);function x(e){return e==="active"?"active":e==="paused"?"paused":e==="pending"||e==="pending_auth"?"pending":l.has(e)?"error":"default"}export{b as S,x as g};
|
|
2
|
+
//# sourceMappingURL=status-variants-mLqVhg5O.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{af as x,r as n,j as e,$ as p,a0 as y,B as c,F as m,L as g,U as v}from"./index-DB2lVKuV.js";import{C as j,a as w,b as C,d as b,c as E}from"./card-C4oPCVh6.js";function F(){const{callbackUrl:l}=x.useSearch(),[a,h]=n.useState(!1),[s,d]=n.useState(""),[t,u]=n.useState(!1),[f,o]=n.useState(null);return e.jsx("main",{className:"mx-auto w-full max-w-md px-4 py-12",children:e.jsxs(j,{children:[e.jsxs(w,{children:[e.jsx(C,{children:"Two-factor authentication"}),e.jsx(b,{children:a?"Enter one of your saved recovery codes. Each code can be used once.":"Enter the six-digit code from your authenticator app."})]}),e.jsxs(E,{className:"space-y-4",children:[e.jsxs("form",{className:"space-y-4",onSubmit:async i=>{if(i.preventDefault(),!t){u(!0),o(null);try{const r=a?await m.twoFactor.verifyBackupCode({code:s.trim(),trustDevice:!1}):await m.twoFactor.verifyTotp({code:s.trim(),trustDevice:!1});if(r.error)throw new Error(r.error.message||"Verification failed. Try again.");window.location.assign(l)}catch(r){o(r instanceof Error?r.message:"Verification failed. Try again.")}finally{u(!1)}}},children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{htmlFor:"two-factor-code",children:a?"Recovery code":"Authenticator code"}),e.jsx(y,{id:"two-factor-code",value:s,onChange:i=>d(i.target.value),inputMode:a?"text":"numeric",autoComplete:a?"off":"one-time-code",pattern:a?void 0:"[0-9]{6}",minLength:a?1:6,maxLength:a?100:6,required:!0,disabled:t,autoFocus:!0})]}),f&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:f}),e.jsx(c,{type:"submit",className:"w-full",disabled:t||!s.trim(),children:t?"Verifying…":"Verify and sign in"})]}),e.jsx(c,{type:"button",variant:"ghost",className:"w-full",disabled:t,onClick:()=>{h(!a),d(""),o(null)},children:a?"Use an authenticator code":"Use a recovery code"}),e.jsx(c,{asChild:!0,variant:"link",className:"w-full",children:e.jsx(g,{to:"/auth/login",search:v({intent:"sign-in",callbackUrl:l}),children:"Start sign-in again"})})]})]})})}export{F as component};
|
|
2
|
+
//# sourceMappingURL=two-factor-pqoxGSgL.js.map
|
package/dist/owletto/dist/assets/{use-automations-DfBtVzGa.js → use-automations-DcdlmVuX.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=use-automations-
|
|
1
|
+
import{y as u,dR as s,dS as c,z as r,E as l,dT as o}from"./index-DB2lVKuV.js";function y(){return u({queryKey:["automation-catalog"],queryFn:async()=>(await o("manage_catalog",{action:"list_catalog",kinds:["automations"]})).catalogs?.automations?.entries??[],staleTime:6e4})}function g(t,e,i){return u({queryKey:["automations-list",t,e,i?.includeDetails??!0],queryFn:async()=>(await o("manage_automations",{action:"list",entity_id:e,status:"active",include_details:i?.includeDetails??!0})).automations||[],enabled:!!t,staleTime:3e4})}function _(t,e,i,a={}){const n=c(a.ownerSlug);return u({queryKey:["automation-detail",n,t,e,a.includeVersions??!1],queryFn:async()=>await o("get_automation",{automation_id:t,entity_id:e,page_size:1,include_versions:a.includeVersions??!1},{slug:n},{timeoutMs:3e4}),enabled:!!n&&!!t&&!!(a.ownerSlug||i),staleTime:3e4})}const A=s({tool:"manage_automations",body:t=>({action:"update",...t}),invalidateKeys:["automations-list","automation-detail","automations"],checkError:!1,successMessage:"Automation updated",errorMessage:"Failed to update Automation"}),q=s({tool:"manage_automations",body:t=>({action:"trigger",automation_id:t}),invalidateKeys:["automations-list","automation-detail","automations","runs-infinite"],errorMessage:"Failed to run Automation"}),v=s({tool:"manage_automations",body:t=>({action:"delete",automation_ids:[t]}),invalidateKeys:["automations-list","automation-detail","automations","agent-threads"],checkError:!1,successMessage:"Automation deleted",errorMessage:"Failed to delete Automation"}),K=s({tool:"manage_automations",body:t=>({action:"create",...t}),invalidateKeys:["automations-list","automations"],successMessage:"Automation created",errorMessage:"Failed to create Automation"});function f(){const t=r();return l({mutationFn:async e=>o("manage_automations",{action:"create_version",...e}),onSuccess:()=>{t.invalidateQueries({queryKey:["automations-list"]}),t.invalidateQueries({queryKey:["automation-detail"]}),t.invalidateQueries({queryKey:["automations"]})}})}function M(){const t=r();return l({mutationFn:async e=>o("manage_automations",{action:"set_reaction_script",...e}),onSuccess:()=>{t.invalidateQueries({queryKey:["automations-list"]}),t.invalidateQueries({queryKey:["automation-detail"]}),t.invalidateQueries({queryKey:["automations"]})}})}export{_ as a,q as b,K as c,f as d,M as e,A as f,y as g,v as h,g as u};
|
|
2
|
+
//# sourceMappingURL=use-automations-DcdlmVuX.js.map
|
package/dist/owletto/dist/assets/{use-login-redirect-BDiS3eyl.js → use-login-redirect-D7HW5Ed6.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as d,j as e,a7 as U,i as R,a8 as D,B as W,a9 as B,aa as I,ab as T,ac as V,a1 as q,ad as G}from"./index-BoqrvLHQ.js";import{C as K,a as J,b as Q,d as X,c as Y}from"./card-CAPpY9P5.js";function z(s){if(!s)return null;try{const t=new URL(s);return t.protocol==="https:"&&t.hostname?t.toString():null}catch{return null}}function _(s){const t=z(s);if(!t)return null;const a=new URL(t).hostname.toLowerCase();return a.length>0&&a.length<=253&&/^[a-z0-9.-]+$/.test(a)?a:null}function Z({clientName:s,logoUri:t=null,clientUri:a=null}){const[r,i]=d.useState(!1),[o,p]=d.useState(!1),g=r?null:z(t),j=o?null:_(a)??_(t);return g?e.jsx("img",{src:g,alt:"",referrerPolicy:"no-referrer",onError:()=>i(!0),className:"h-10 w-10 shrink-0 rounded-md object-contain"}):j?e.jsx("img",{src:`https://www.google.com/s2/favicons?domain=${encodeURIComponent(j)}&sz=64`,alt:"",referrerPolicy:"no-referrer",onError:()=>p(!0),className:"h-10 w-10 shrink-0 rounded-md bg-secondary object-contain"}):e.jsx("div",{"aria-hidden":"true",className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-secondary text-base font-bold text-secondary-foreground",children:(s??"?").charAt(0).toUpperCase()||"?"})}const H=["mcp:read","mcp:write","mcp:admin"],ee=[{value:"read",title:"Read only",description:"Search and view authorized workspace data."},{value:"write",title:"Read and make changes",description:"Includes read access. Create and update authorized workspace data."},{value:"admin",title:"Administer workspaces",description:"Includes read and write access. Manage administrator-only settings.",risk:"high"}],L={read:0,write:1,admin:2};function F(s){return s.includes("mcp:admin")?"admin":s.includes("mcp:write")?"write":s.includes("mcp:read")?"read":null}function se(s,t){const a=s.filter(i=>!H.includes(i));if(!t)return a;const r=F(s);return!r||L[t]>L[r]?a:["mcp:read",...t==="write"||t==="admin"?["mcp:write"]:[],...t==="admin"?["mcp:admin"]:[],...a]}function ie({idPrefix:s,clientName:t,clientNote:a,requestedScopes:r,accessLevel:i,onAccessLevelChange:o,allowNoAccess:p=!1,disabled:g=!1,resource:j=null,logoUri:w=null,clientUri:h=null}){const y=F(r),x=r.includes("profile:read"),m=r.filter(c=>!H.includes(c)&&c!=="profile:read"&&c!=="device_worker:run"&&c!=="connections:token");return e.jsxs("div",{className:"space-y-5",children:[e.jsx("section",{"aria-label":"Application",className:"space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Z,{clientName:t,logoUri:w,clientUri:h}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t||"Unnamed application"}),a?e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a}):null,j&&e.jsxs("div",{className:"mt-2 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[e.jsx("p",{children:"Requesting access to"}),r.length>0&&e.jsx("p",{className:"flex flex-wrap gap-1.5",children:r.map(c=>e.jsx("span",{className:"px-1 py-0.5 font-mono text-[11px] text-foreground",children:c},c))})]}),e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:e.jsxs("p",{children:["on"," ",e.jsx("code",{className:"break-all rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground",children:j})]})})]})]})]})}),x&&e.jsxs("section",{"aria-labelledby":`${s}-profile`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-profile`,className:"text-sm font-medium",children:"Account information"}),e.jsxs("div",{className:"rounded-md border p-3",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:["Basic profile",e.jsx(U,{variant:"secondary",children:"Always included"})]}),e.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"See your basic Lobu identity and the names and slugs of workspaces you belong to. This is separate from the workspace data access below."})]})]}),y&&e.jsxs("fieldset",{className:"space-y-2",disabled:g,children:[e.jsx("legend",{className:"text-sm font-medium",children:"What should this client have access to?"}),e.jsxs("div",{className:"space-y-2",children:[p?e.jsxs("label",{htmlFor:`${s}-access-none`,className:R("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",i===null&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:`${s}-access-none`,type:"radio",name:`${s}-access-level`,value:"none",checked:i===null,onChange:()=>o(null),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:"No workspace data access"}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:"Pair the device only. It won't read or write workspace data."})]})]}):null,ee.filter(c=>L[c.value]<=L[y]).map(c=>{const f=`${s}-access-${c.value}`,b=i===c.value;return e.jsxs("label",{htmlFor:f,className:R("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",b&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:f,type:"radio",name:`${s}-access-level`,value:c.value,checked:b,onChange:()=>o(c.value),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[c.title,c.risk==="high"&&e.jsx(D,{"aria-label":"High risk",className:"h-3.5 w-3.5 shrink-0 text-destructive",children:e.jsx("title",{children:"High risk"})})]}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:c.description})]})]},c.value)})]})]}),m.length>0&&e.jsxs("section",{"aria-labelledby":`${s}-additional`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-additional`,className:"text-sm font-medium",children:"Additional permissions"}),e.jsx("ul",{className:"space-y-2",children:m.map(c=>e.jsx("li",{className:"rounded-md border p-3 font-mono text-xs text-foreground",children:c},c))})]})]})}function oe({summary:s,children:t,className:a}){return e.jsxs("div",{className:R("flex flex-wrap items-center gap-3 border-t pt-4",s?"justify-between":"justify-end",a),children:[s?e.jsx("p",{className:"text-sm text-muted-foreground",children:s}):null,e.jsx("div",{className:"ml-auto flex items-center gap-3",children:t})]})}function de({busy:s,approveLabel:t="Approve",approveDisabled:a=!1,denyDisabled:r=!1,onApprove:i,onDeny:o}){return e.jsxs(e.Fragment,{children:[e.jsx(W,{type:"button",variant:"outline",onClick:o,disabled:r,children:s==="deny"?"Denying...":"Deny"}),e.jsx(W,{type:"button",onClick:i,disabled:a,children:s==="approve"?"Approving...":t})]})}function me({title:s,description:t,busy:a=!1,error:r=null,review:i,aside:o,below:p,notice:g,footer:j,live:w=!1}){return e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs(K,{className:R("w-full",o?"max-w-4xl":"max-w-lg"),role:w?"status":void 0,"aria-live":w?"polite":void 0,children:[e.jsxs(J,{children:[e.jsx(Q,{asChild:!0,children:e.jsx("h1",{children:s})}),t?e.jsx(X,{children:t}):null]}),e.jsxs(Y,{className:"space-y-5","aria-busy":a,children:[o?e.jsxs("div",{className:"grid gap-6 md:grid-cols-[minmax(0,1fr)_300px]",children:[e.jsx("div",{className:"min-w-0",children:i}),e.jsx("div",{className:"min-w-0",children:o})]}):i,p,g,r?e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:r}):null,j]})]})})}function ue({resourceOrg:s,accessLevel:t}){return e.jsxs("section",{className:"rounded-md border border-primary/20 bg-primary/5 p-3 text-sm space-y-2",children:[e.jsxs("p",{className:"font-medium text-foreground",children:["Workspace access: only ",s]}),e.jsxs("ul",{className:"space-y-1 text-muted-foreground",children:[e.jsx("li",{children:"If this workspace is public, the app can read public data immediately after approval."}),t==="write"?e.jsx("li",{children:"If you are not already a member, this connection will stay read-only. Ask an organization admin to grant write access, then reconnect the MCP client."}):null,t==="admin"?e.jsx("li",{children:"If you are not already an admin or owner, elevated actions will stay blocked. Ask an organization owner to grant the required role, then reconnect the MCP client."}):null,t==="read"?e.jsx("li",{children:"Public read access does not require membership."}):null]})]})}function te(s){const t=q(s);return t.kind==="cross-host"?t.href:t.to}function pe({idPrefix:s,heading:t,orgList:a,selectedOrgIds:r,onWorkspaceAccessChange:i,onSelectedOrgChange:o,orgsLoading:p,orgsError:g,onRetry:j,disabled:w=!1,includedOrgId:h=null,allowMultiple:y}){const x=`${s}-workspace-access-legend`,m=`${s}-workspace-search`,[c,f]=d.useState(""),b=t??"Workspace access",N=h?a.find(n=>n.id===h)??null:null,k=a.filter(n=>n.id!==h),$=r.filter(n=>n!==h).length,A=h?$:r.length,E=k.length>0&&k.every(n=>r.includes(n.id));if(p)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsx("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:"Loading your workspaces..."})]});if(g)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsxs("div",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[e.jsx("p",{children:"Workspaces could not be loaded. Approval is unavailable until they load."}),e.jsx(W,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:j,children:"Retry"})]})]});if(a.length===0)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:"No member workspaces are available for this connection."})]});const M=()=>{if(E)for(const n of k)o(n.id,!1);else i("all_current")},S=c.trim().toLowerCase(),l=S?k.filter(n=>n.name.toLowerCase().includes(S)||n.slug.toLowerCase().includes(S)):k;return e.jsxs("fieldset",{className:"min-w-0 space-y-3",disabled:w,children:[e.jsx("legend",{id:x,className:"sr-only",children:b}),e.jsxs("p",{className:"text-sm font-medium",children:[b," ",e.jsxs("span",{className:"font-normal text-muted-foreground",children:["· ",A," selected"]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-md border bg-card",children:[e.jsxs("div",{className:"border-b bg-card p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Workspaces"}),y&&k.length>0&&e.jsx("button",{type:"button",onClick:M,className:"shrink-0 cursor-pointer bg-none p-0 text-xs font-semibold text-foreground underline underline-offset-4",children:E?"Clear all":`Select all ${k.length}`})]}),!h&&e.jsx("p",{className:"mt-0.5 whitespace-nowrap text-sm text-muted-foreground",children:y?"Choose workspaces for this app.":"Choose one workspace this application can access."}),e.jsx("input",{id:m,type:"search",value:c,onChange:n=>f(n.target.value),placeholder:"Filter workspaces…","aria-label":"Filter workspaces",className:"mt-2 flex h-9 w-full rounded-md border border-input bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-ring"})]}),e.jsxs("div",{className:"max-h-80 space-y-1.5 overflow-auto p-2",children:[N?e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md bg-muted px-2.5 py-2",children:[e.jsx(B,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 text-primary"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate",children:N.name}),N.isPersonal&&e.jsx(I,{"aria-label":"Personal workspace",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground",children:e.jsx("title",{children:"Personal workspace"})}),e.jsx(U,{variant:"secondary",className:"shrink-0",children:"Device home"})]})}),e.jsx("span",{className:"sr-only",children:"Included"})]}):null,l.map(n=>{const u=`${s}-workspace-${n.id}`,v=r.includes(n.id);return e.jsxs("div",{className:R("flex items-center gap-2.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted/60",v&&"bg-primary/5 hover:bg-primary/5"),children:[e.jsx(T,{id:u,checked:v,disabled:w,onCheckedChange:C=>o(n.id,C===!0)}),e.jsx("label",{htmlFor:u,className:"min-w-0 flex-1 cursor-pointer truncate text-sm font-medium text-foreground",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate",children:n.name}),n.isPersonal&&e.jsx(I,{"aria-label":"Personal workspace",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground",children:e.jsx("title",{children:"Personal workspace"})})]})}),e.jsx("a",{href:te(n.slug),target:"_blank",rel:"noopener noreferrer",onClick:C=>C.stopPropagation(),"aria-label":`Open ${n.name} workspace`,title:`Open ${n.name} workspace`,className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(V,{className:"h-3.5 w-3.5"})})]},n.id)}),l.length===0&&!N&&e.jsx("p",{className:"px-2 py-3 text-[13px] text-muted-foreground",children:"No workspaces match."})]}),e.jsx("div",{className:"border-t bg-card px-3 py-2 text-xs text-muted-foreground",children:e.jsx("p",{"aria-live":"polite",children:h?`${$} additional workspace${$===1?"":"s"} selected.`:`${r.length} of ${a.length} workspaces selected.`})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Workspaces you join later are not added automatically."}),r.length===0&&e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"Choose at least one workspace."})]})}function ne(s,t){return s.length===t.length&&s.every((a,r)=>a===t[r])}function re(s={}){const{requireDeviceHome:t=!1,deviceHomeOrgId:a=null,allowMultiple:r=!0}=s,{data:i,error:o,isPending:p,refetch:g}=G(),[j,w]=d.useState("selected"),[h,y]=d.useState([]),x=d.useRef(!1),m=d.useMemo(()=>i?i.filter(l=>l.is_member).map(l=>({id:l.id,name:l.name,slug:l.slug,isPersonal:l.is_personal===!0})):[],[i]),c=m.find(l=>l.isPersonal)?.id??null,f=t?a&&m.some(l=>l.id===a)?a:c:null,b=d.useRef(m);b.current=m;const N=o instanceof Error?o.message:o?"Unable to load workspaces":null;d.useEffect(()=>{if(p||N)return;const l=m.map(u=>u.id),n=new Set(l);y(u=>{const v=x.current?u.filter(C=>n.has(C)):[c??l[0]].filter(C=>!!C);return x.current=!0,ne(u,v)?u:v})},[m,N,p,c]);const k=d.useCallback(l=>{if(l==="all_current"){if(!r)return;y(b.current.map(n=>n.id))}w(l)},[r]),$=d.useCallback((l,n)=>{b.current.some(u=>u.id===l)&&(t&&(l===f||!r)||(w("selected"),y(u=>n?r?u.includes(l)?u:[...u,l]:[l]:u.filter(v=>v!==l))))},[r,f,t]),A=d.useMemo(()=>{if(t&&f&&!r)return[f];const l=new Set(h);return t&&f&&l.add(f),m.filter(n=>l.has(n.id)).map(n=>n.id)},[r,h,f,m,t]),E=d.useCallback(()=>{const l=b.current,n=l.find(u=>u.isPersonal)?.id??l[0]?.id;x.current=l.length>0,w("selected"),y(n?[n]:[])},[]),M=!p&&!N&&m.length>0&&A.length>0&&(r||A.length===1)&&(!t||f!==null&&A.includes(f)),S=d.useCallback(()=>{g()},[g]);return{orgList:m,workspaceAccess:j,setWorkspaceAccess:k,selectedOrgIds:A,toggleSelectedOrgId:$,resetWorkspaceSelection:E,personalOrgId:c,deviceHomeOrgId:f,orgsLoading:p,orgsError:N,retryOrgs:S,workspaceSelectionReady:M}}function ae(s){if(!s)return null;try{return new URL(s).pathname.match(/^\/mcp\/([^/]+)$/)?.[1]?.trim()||null}catch{return null}}function he({requestedScopes:s,resource:t=null,allowMultiple:a,requireDeviceHome:r=!1,deviceHomeOrgId:i=null}){const o=F(s),[p,g]=d.useState(o);d.useEffect(()=>{g(F(s))},[s]);const j=d.useMemo(()=>se(s,p),[s,p]),w=d.useMemo(()=>ae(t),[t]),h=j.some(m=>m.startsWith("mcp:")),y=h&&!w,x=re({allowMultiple:a,requireDeviceHome:r,deviceHomeOrgId:i});return{accessLevel:p,setAccessLevel:g,selectedScopes:j,resourceOrg:w,hasMcpScopes:h,requiresWorkspaceAccess:y,...x}}function P(s){return typeof s=="string"&&s.length>0?s:null}function xe(s,t){return P(s?.error_description)??P(s?.message)??P(s?.error)??t}function O(s=window.location.href){const t=new URL("/auth/login",window.location.origin);return t.searchParams.set("callbackUrl",s),t.toString()}function fe(){window.location.href=O()}function ge(s,t){d.useEffect(()=>{t||s||(window.location.href=O())},[s,t])}export{ie as A,me as C,ue as R,pe as W,ge as a,oe as b,de as c,F as g,xe as o,fe as r,he as u};
|
|
2
|
-
//# sourceMappingURL=use-login-redirect-
|
|
1
|
+
import{r as d,j as e,a8 as U,i as R,a9 as D,B as W,aa as B,ab as I,ac as T,ad as V,a2 as q,ae as G}from"./index-DB2lVKuV.js";import{C as K,a as J,b as Q,d as X,c as Y}from"./card-C4oPCVh6.js";function z(s){if(!s)return null;try{const t=new URL(s);return t.protocol==="https:"&&t.hostname?t.toString():null}catch{return null}}function _(s){const t=z(s);if(!t)return null;const a=new URL(t).hostname.toLowerCase();return a.length>0&&a.length<=253&&/^[a-z0-9.-]+$/.test(a)?a:null}function Z({clientName:s,logoUri:t=null,clientUri:a=null}){const[r,i]=d.useState(!1),[o,p]=d.useState(!1),g=r?null:z(t),j=o?null:_(a)??_(t);return g?e.jsx("img",{src:g,alt:"",referrerPolicy:"no-referrer",onError:()=>i(!0),className:"h-10 w-10 shrink-0 rounded-md object-contain"}):j?e.jsx("img",{src:`https://www.google.com/s2/favicons?domain=${encodeURIComponent(j)}&sz=64`,alt:"",referrerPolicy:"no-referrer",onError:()=>p(!0),className:"h-10 w-10 shrink-0 rounded-md bg-secondary object-contain"}):e.jsx("div",{"aria-hidden":"true",className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-secondary text-base font-bold text-secondary-foreground",children:(s??"?").charAt(0).toUpperCase()||"?"})}const H=["mcp:read","mcp:write","mcp:admin"],ee=[{value:"read",title:"Read only",description:"Search and view authorized workspace data."},{value:"write",title:"Read and make changes",description:"Includes read access. Create and update authorized workspace data."},{value:"admin",title:"Administer workspaces",description:"Includes read and write access. Manage administrator-only settings.",risk:"high"}],L={read:0,write:1,admin:2};function F(s){return s.includes("mcp:admin")?"admin":s.includes("mcp:write")?"write":s.includes("mcp:read")?"read":null}function se(s,t){const a=s.filter(i=>!H.includes(i));if(!t)return a;const r=F(s);return!r||L[t]>L[r]?a:["mcp:read",...t==="write"||t==="admin"?["mcp:write"]:[],...t==="admin"?["mcp:admin"]:[],...a]}function ie({idPrefix:s,clientName:t,clientNote:a,requestedScopes:r,accessLevel:i,onAccessLevelChange:o,allowNoAccess:p=!1,disabled:g=!1,resource:j=null,logoUri:w=null,clientUri:h=null}){const y=F(r),x=r.includes("profile:read"),m=r.filter(c=>!H.includes(c)&&c!=="profile:read"&&c!=="device_worker:run"&&c!=="connections:token");return e.jsxs("div",{className:"space-y-5",children:[e.jsx("section",{"aria-label":"Application",className:"space-y-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Z,{clientName:t,logoUri:w,clientUri:h}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:t||"Unnamed application"}),a?e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a}):null,j&&e.jsxs("div",{className:"mt-2 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[e.jsx("p",{children:"Requesting access to"}),r.length>0&&e.jsx("p",{className:"flex flex-wrap gap-1.5",children:r.map(c=>e.jsx("span",{className:"px-1 py-0.5 font-mono text-[11px] text-foreground",children:c},c))})]}),e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:e.jsxs("p",{children:["on"," ",e.jsx("code",{className:"break-all rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground",children:j})]})})]})]})]})}),x&&e.jsxs("section",{"aria-labelledby":`${s}-profile`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-profile`,className:"text-sm font-medium",children:"Account information"}),e.jsxs("div",{className:"rounded-md border p-3",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:["Basic profile",e.jsx(U,{variant:"secondary",children:"Always included"})]}),e.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"See your basic Lobu identity and the names and slugs of workspaces you belong to. This is separate from the workspace data access below."})]})]}),y&&e.jsxs("fieldset",{className:"space-y-2",disabled:g,children:[e.jsx("legend",{className:"text-sm font-medium",children:"What should this client have access to?"}),e.jsxs("div",{className:"space-y-2",children:[p?e.jsxs("label",{htmlFor:`${s}-access-none`,className:R("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",i===null&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:`${s}-access-none`,type:"radio",name:`${s}-access-level`,value:"none",checked:i===null,onChange:()=>o(null),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:"No workspace data access"}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:"Pair the device only. It won't read or write workspace data."})]})]}):null,ee.filter(c=>L[c.value]<=L[y]).map(c=>{const f=`${s}-access-${c.value}`,b=i===c.value;return e.jsxs("label",{htmlFor:f,className:R("flex cursor-pointer items-start gap-3 rounded-md border p-3 transition-colors",b&&"border-primary bg-primary/5"),children:[e.jsx("input",{id:f,type:"radio",name:`${s}-access-level`,value:c.value,checked:b,onChange:()=>o(c.value),className:"mt-1 h-4 w-4 accent-primary"}),e.jsxs("span",{className:"min-w-0 space-y-0.5",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[c.title,c.risk==="high"&&e.jsx(D,{"aria-label":"High risk",className:"h-3.5 w-3.5 shrink-0 text-destructive",children:e.jsx("title",{children:"High risk"})})]}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:c.description})]})]},c.value)})]})]}),m.length>0&&e.jsxs("section",{"aria-labelledby":`${s}-additional`,className:"space-y-2",children:[e.jsx("p",{id:`${s}-additional`,className:"text-sm font-medium",children:"Additional permissions"}),e.jsx("ul",{className:"space-y-2",children:m.map(c=>e.jsx("li",{className:"rounded-md border p-3 font-mono text-xs text-foreground",children:c},c))})]})]})}function oe({summary:s,children:t,className:a}){return e.jsxs("div",{className:R("flex flex-wrap items-center gap-3 border-t pt-4",s?"justify-between":"justify-end",a),children:[s?e.jsx("p",{className:"text-sm text-muted-foreground",children:s}):null,e.jsx("div",{className:"ml-auto flex items-center gap-3",children:t})]})}function de({busy:s,approveLabel:t="Approve",approveDisabled:a=!1,denyDisabled:r=!1,onApprove:i,onDeny:o}){return e.jsxs(e.Fragment,{children:[e.jsx(W,{type:"button",variant:"outline",onClick:o,disabled:r,children:s==="deny"?"Denying...":"Deny"}),e.jsx(W,{type:"button",onClick:i,disabled:a,children:s==="approve"?"Approving...":t})]})}function me({title:s,description:t,busy:a=!1,error:r=null,review:i,aside:o,below:p,notice:g,footer:j,live:w=!1}){return e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs(K,{className:R("w-full",o?"max-w-4xl":"max-w-lg"),role:w?"status":void 0,"aria-live":w?"polite":void 0,children:[e.jsxs(J,{children:[e.jsx(Q,{asChild:!0,children:e.jsx("h1",{children:s})}),t?e.jsx(X,{children:t}):null]}),e.jsxs(Y,{className:"space-y-5","aria-busy":a,children:[o?e.jsxs("div",{className:"grid gap-6 md:grid-cols-[minmax(0,1fr)_300px]",children:[e.jsx("div",{className:"min-w-0",children:i}),e.jsx("div",{className:"min-w-0",children:o})]}):i,p,g,r?e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:r}):null,j]})]})})}function ue({resourceOrg:s,accessLevel:t}){return e.jsxs("section",{className:"rounded-md border border-primary/20 bg-primary/5 p-3 text-sm space-y-2",children:[e.jsxs("p",{className:"font-medium text-foreground",children:["Workspace access: only ",s]}),e.jsxs("ul",{className:"space-y-1 text-muted-foreground",children:[e.jsx("li",{children:"If this workspace is public, the app can read public data immediately after approval."}),t==="write"?e.jsx("li",{children:"If you are not already a member, this connection will stay read-only. Ask an organization admin to grant write access, then reconnect the MCP client."}):null,t==="admin"?e.jsx("li",{children:"If you are not already an admin or owner, elevated actions will stay blocked. Ask an organization owner to grant the required role, then reconnect the MCP client."}):null,t==="read"?e.jsx("li",{children:"Public read access does not require membership."}):null]})]})}function te(s){const t=q(s);return t.kind==="cross-host"?t.href:t.to}function pe({idPrefix:s,heading:t,orgList:a,selectedOrgIds:r,onWorkspaceAccessChange:i,onSelectedOrgChange:o,orgsLoading:p,orgsError:g,onRetry:j,disabled:w=!1,includedOrgId:h=null,allowMultiple:y}){const x=`${s}-workspace-access-legend`,m=`${s}-workspace-search`,[c,f]=d.useState(""),b=t??"Workspace access",N=h?a.find(n=>n.id===h)??null:null,k=a.filter(n=>n.id!==h),$=r.filter(n=>n!==h).length,A=h?$:r.length,E=k.length>0&&k.every(n=>r.includes(n.id));if(p)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsx("p",{role:"status","aria-live":"polite",className:"text-sm text-muted-foreground",children:"Loading your workspaces..."})]});if(g)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsxs("div",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[e.jsx("p",{children:"Workspaces could not be loaded. Approval is unavailable until they load."}),e.jsx(W,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:j,children:"Retry"})]})]});if(a.length===0)return e.jsxs("section",{"aria-labelledby":x,className:"space-y-2",children:[e.jsx("p",{id:x,className:"text-sm font-medium",children:b}),e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:"No member workspaces are available for this connection."})]});const M=()=>{if(E)for(const n of k)o(n.id,!1);else i("all_current")},S=c.trim().toLowerCase(),l=S?k.filter(n=>n.name.toLowerCase().includes(S)||n.slug.toLowerCase().includes(S)):k;return e.jsxs("fieldset",{className:"min-w-0 space-y-3",disabled:w,children:[e.jsx("legend",{id:x,className:"sr-only",children:b}),e.jsxs("p",{className:"text-sm font-medium",children:[b," ",e.jsxs("span",{className:"font-normal text-muted-foreground",children:["· ",A," selected"]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-md border bg-card",children:[e.jsxs("div",{className:"border-b bg-card p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Workspaces"}),y&&k.length>0&&e.jsx("button",{type:"button",onClick:M,className:"shrink-0 cursor-pointer bg-none p-0 text-xs font-semibold text-foreground underline underline-offset-4",children:E?"Clear all":`Select all ${k.length}`})]}),!h&&e.jsx("p",{className:"mt-0.5 whitespace-nowrap text-sm text-muted-foreground",children:y?"Choose workspaces for this app.":"Choose one workspace this application can access."}),e.jsx("input",{id:m,type:"search",value:c,onChange:n=>f(n.target.value),placeholder:"Filter workspaces…","aria-label":"Filter workspaces",className:"mt-2 flex h-9 w-full rounded-md border border-input bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-ring"})]}),e.jsxs("div",{className:"max-h-80 space-y-1.5 overflow-auto p-2",children:[N?e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md bg-muted px-2.5 py-2",children:[e.jsx(B,{"aria-hidden":"true",className:"h-4 w-4 shrink-0 text-primary"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate",children:N.name}),N.isPersonal&&e.jsx(I,{"aria-label":"Personal workspace",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground",children:e.jsx("title",{children:"Personal workspace"})}),e.jsx(U,{variant:"secondary",className:"shrink-0",children:"Device home"})]})}),e.jsx("span",{className:"sr-only",children:"Included"})]}):null,l.map(n=>{const u=`${s}-workspace-${n.id}`,v=r.includes(n.id);return e.jsxs("div",{className:R("flex items-center gap-2.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted/60",v&&"bg-primary/5 hover:bg-primary/5"),children:[e.jsx(T,{id:u,checked:v,disabled:w,onCheckedChange:C=>o(n.id,C===!0)}),e.jsx("label",{htmlFor:u,className:"min-w-0 flex-1 cursor-pointer truncate text-sm font-medium text-foreground",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate",children:n.name}),n.isPersonal&&e.jsx(I,{"aria-label":"Personal workspace",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground",children:e.jsx("title",{children:"Personal workspace"})})]})}),e.jsx("a",{href:te(n.slug),target:"_blank",rel:"noopener noreferrer",onClick:C=>C.stopPropagation(),"aria-label":`Open ${n.name} workspace`,title:`Open ${n.name} workspace`,className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",children:e.jsx(V,{className:"h-3.5 w-3.5"})})]},n.id)}),l.length===0&&!N&&e.jsx("p",{className:"px-2 py-3 text-[13px] text-muted-foreground",children:"No workspaces match."})]}),e.jsx("div",{className:"border-t bg-card px-3 py-2 text-xs text-muted-foreground",children:e.jsx("p",{"aria-live":"polite",children:h?`${$} additional workspace${$===1?"":"s"} selected.`:`${r.length} of ${a.length} workspaces selected.`})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Workspaces you join later are not added automatically."}),r.length===0&&e.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"Choose at least one workspace."})]})}function ne(s,t){return s.length===t.length&&s.every((a,r)=>a===t[r])}function re(s={}){const{requireDeviceHome:t=!1,deviceHomeOrgId:a=null,allowMultiple:r=!0}=s,{data:i,error:o,isPending:p,refetch:g}=G(),[j,w]=d.useState("selected"),[h,y]=d.useState([]),x=d.useRef(!1),m=d.useMemo(()=>i?i.filter(l=>l.is_member).map(l=>({id:l.id,name:l.name,slug:l.slug,isPersonal:l.is_personal===!0})):[],[i]),c=m.find(l=>l.isPersonal)?.id??null,f=t?a&&m.some(l=>l.id===a)?a:c:null,b=d.useRef(m);b.current=m;const N=o instanceof Error?o.message:o?"Unable to load workspaces":null;d.useEffect(()=>{if(p||N)return;const l=m.map(u=>u.id),n=new Set(l);y(u=>{const v=x.current?u.filter(C=>n.has(C)):[c??l[0]].filter(C=>!!C);return x.current=!0,ne(u,v)?u:v})},[m,N,p,c]);const k=d.useCallback(l=>{if(l==="all_current"){if(!r)return;y(b.current.map(n=>n.id))}w(l)},[r]),$=d.useCallback((l,n)=>{b.current.some(u=>u.id===l)&&(t&&(l===f||!r)||(w("selected"),y(u=>n?r?u.includes(l)?u:[...u,l]:[l]:u.filter(v=>v!==l))))},[r,f,t]),A=d.useMemo(()=>{if(t&&f&&!r)return[f];const l=new Set(h);return t&&f&&l.add(f),m.filter(n=>l.has(n.id)).map(n=>n.id)},[r,h,f,m,t]),E=d.useCallback(()=>{const l=b.current,n=l.find(u=>u.isPersonal)?.id??l[0]?.id;x.current=l.length>0,w("selected"),y(n?[n]:[])},[]),M=!p&&!N&&m.length>0&&A.length>0&&(r||A.length===1)&&(!t||f!==null&&A.includes(f)),S=d.useCallback(()=>{g()},[g]);return{orgList:m,workspaceAccess:j,setWorkspaceAccess:k,selectedOrgIds:A,toggleSelectedOrgId:$,resetWorkspaceSelection:E,personalOrgId:c,deviceHomeOrgId:f,orgsLoading:p,orgsError:N,retryOrgs:S,workspaceSelectionReady:M}}function ae(s){if(!s)return null;try{return new URL(s).pathname.match(/^\/mcp\/([^/]+)$/)?.[1]?.trim()||null}catch{return null}}function he({requestedScopes:s,resource:t=null,allowMultiple:a,requireDeviceHome:r=!1,deviceHomeOrgId:i=null}){const o=F(s),[p,g]=d.useState(o);d.useEffect(()=>{g(F(s))},[s]);const j=d.useMemo(()=>se(s,p),[s,p]),w=d.useMemo(()=>ae(t),[t]),h=j.some(m=>m.startsWith("mcp:")),y=h&&!w,x=re({allowMultiple:a,requireDeviceHome:r,deviceHomeOrgId:i});return{accessLevel:p,setAccessLevel:g,selectedScopes:j,resourceOrg:w,hasMcpScopes:h,requiresWorkspaceAccess:y,...x}}function P(s){return typeof s=="string"&&s.length>0?s:null}function xe(s,t){return P(s?.error_description)??P(s?.message)??P(s?.error)??t}function O(s=window.location.href){const t=new URL("/auth/login",window.location.origin);return t.searchParams.set("callbackUrl",s),t.toString()}function fe(){window.location.href=O()}function ge(s,t){d.useEffect(()=>{t||s||(window.location.href=O())},[s,t])}export{ie as A,me as C,ue as R,pe as W,ge as a,oe as b,de as c,F as g,xe as o,fe as r,he as u};
|
|
2
|
+
//# sourceMappingURL=use-login-redirect-D7HW5Ed6.js.map
|