@lobu/runtime-server 24.10.0 → 24.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalogs/connectors.json +1 -1
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/linkedin-inbox-adapter.js +13 -3
- package/dist/connectors/whatsapp-web-adapter.js +14 -13
- package/dist/connectors/whatsapp-web-helpers.ts +37 -1
- package/dist/connectors/whatsapp_web.ts +5 -5
- package/dist/connectors/x-dm-adapter.js +17 -3
- package/dist/db/migrations/20261113170000_member_sql_rls.sql +254 -0
- package/dist/db/migrations/20261113180000_member_sql_rls_parallel_plans.sql +192 -0
- package/dist/db/migrations/20261113190000_member_sql_schema_usage.sql +24 -0
- package/dist/db/migrations/20261114120000_events_owner_only_visibility.sql +39 -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/dependencies.bun.lock +10 -10
- package/dist/embeddings-server.mjs +1 -1
- package/dist/guest.bundle.js +1 -1
- package/dist/owletto/dist/assets/_-BDMUN9XZ.js +2 -0
- package/dist/owletto/dist/assets/_-CF5X4ANe.js +3 -0
- package/dist/owletto/dist/assets/{_agentId-DN0EwMAC.js → _agentId-CGScf8z_.js} +2 -2
- package/dist/owletto/dist/assets/_agentId-EQU2aUP0.js +2 -0
- package/dist/owletto/dist/assets/_automationId-PXZ33jsF.js +2 -0
- package/dist/owletto/dist/assets/{_connectorKey._connectionId-CVKfL9AG.js → _connectorKey._connectionId-DcI29kGy.js} +2 -2
- package/dist/owletto/dist/assets/_connectorKey.index-Cr2NDJWX.js +2 -0
- package/dist/owletto/dist/assets/{_conversationId-CPpNySjO.js → _conversationId-CnmLYlVS.js} +2 -2
- package/dist/owletto/dist/assets/_eventId-w5sDz5oa.js +2 -0
- package/dist/owletto/dist/assets/_owner-CkOZR4n0.js +3 -0
- package/dist/owletto/dist/assets/_shape-C_FmSf9G.js +2 -0
- package/dist/owletto/dist/assets/{_slug-DJx_8fsV.js → _slug-COPpRXLt.js} +2 -2
- package/dist/owletto/dist/assets/_viewKey-BVdJiilV.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-mxxpqjtC.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-Dwq1GAnG.js → accept-invitation-BKeIzZXE.js} +2 -2
- package/dist/owletto/dist/assets/{activity-route-location-C1jcXC7v.js → activity-route-location-sLvKaSCa.js} +2 -2
- package/dist/owletto/dist/assets/activity-route-view-msesKUwn.js +2 -0
- package/dist/owletto/dist/assets/{agent-connect-pages-DoI9UR0a.js → agent-connect-pages-DVq9nAR7.js} +3 -3
- package/dist/owletto/dist/assets/{agent-editor-form-DlavYg2q.js → agent-editor-form-DVFyyMyd.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-DYqQphN7.js → agent-loading-shells-BLNHIy-r.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-C1L8IcYR.js → agent-permissions-matrix-UBKRR5vs.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-D1nMrVod.js → agent-skill-context-fqedKd0D.js} +2 -2
- package/dist/owletto/dist/assets/{agent-subpage-shell-2w7vTeXw.js → agent-subpage-shell-BUCoY2Nf.js} +2 -2
- package/dist/owletto/dist/assets/{agent-thread-BopD-2k1.js → agent-thread-Cqf9ITrT.js} +2 -2
- package/dist/owletto/dist/assets/app-bridge-B-L0rGz9.js +121 -0
- package/dist/owletto/dist/assets/{app._appId-BXeFXW1w.js → app._appId-ByIypCL9.js} +2 -2
- package/dist/owletto/dist/assets/{assist-composer-CL5x8pNt.js → assist-composer-kG_heHXo.js} +2 -2
- package/dist/owletto/dist/assets/{automation-run-now-MtxUTfzd.js → automation-run-now-C5XTS00o.js} +2 -2
- package/dist/owletto/dist/assets/{callback-BgfwP1Eo.js → callback-Pz5uS-k7.js} +2 -2
- package/dist/owletto/dist/assets/{card-DtLIFq7D.js → card-CAPpY9P5.js} +2 -2
- package/dist/owletto/dist/assets/{claim-CT3hYVMF.js → claim-DgWWK0KI.js} +2 -2
- package/dist/owletto/dist/assets/{client-activity-scopes-BPbRX-Pe.js → client-activity-scopes-Aqdo6Pdr.js} +2 -2
- package/dist/owletto/dist/assets/{client-rows-vrNA6FLs.js → client-rows-Dd5YV8vn.js} +2 -2
- package/dist/owletto/dist/assets/{clients-xnzZeEdZ.js → clients-Bf7ZgGro.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-mrKkAfcE.js → code-editor-z1Sy_hiX.js} +2 -2
- package/dist/owletto/dist/assets/connect-BFNp1y_s.js +2 -0
- package/dist/owletto/dist/assets/{connect-menu-C6iVtuSo.js → connect-menu-BWrAhMqO.js} +2 -2
- package/dist/owletto/dist/assets/connect._clientId-CSPfwYIN.js +2 -0
- package/dist/owletto/dist/assets/{connected._clientId-ROfVgp9h.js → connected._clientId-CuOeHafK.js} +2 -2
- package/dist/owletto/dist/assets/{connection-BMz740Wi.js → connection-CVeHmDLs.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-0VAJiZTP.js → connection-feed-detail-BYo7zdVD.js} +2 -2
- package/dist/owletto/dist/assets/{connector-page-shell-BFv21yuv.js → connector-page-shell-an3SYLim.js} +2 -2
- package/dist/owletto/dist/assets/{connector-provenance-b59RfBtk.js → connector-provenance-mSZCOud-.js} +2 -2
- package/dist/owletto/dist/assets/{connectors-nYS31lO2.js → connectors-DBEM9QQz.js} +2 -2
- package/dist/owletto/dist/assets/{consent-cPRF9JQv.js → consent-1ulwyJ3k.js} +2 -2
- package/dist/owletto/dist/assets/{copy-button-C3wMMv63.js → copy-button-Xhh7ZnjO.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-C9QlSrgK.js → core.esm-Ctg_pXLe.js} +2 -2
- package/dist/owletto/dist/assets/{create-CGOWfMk4.js → create-CGuoqPh8.js} +2 -2
- package/dist/owletto/dist/assets/create-Ccb5R-S4.js +2 -0
- package/dist/owletto/dist/assets/{create-ASRN3Obq.js → create-DmhbacIa.js} +2 -2
- package/dist/owletto/dist/assets/{create-automation-form-CLicoPH5.js → create-automation-form-CD6jSlWL.js} +2 -2
- package/dist/owletto/dist/assets/create._connectorKey-CZsAqj1p.js +2 -0
- package/dist/owletto/dist/assets/{custom-guardrail-edits-BUL7nmuO.js → custom-guardrail-edits-Ce_BwiwD.js} +2 -2
- package/dist/owletto/dist/assets/{definition-comparison-4UYMI6BK.js → definition-comparison-D_qP25jR.js} +2 -2
- package/dist/owletto/dist/assets/{detail-page-skeleton-C8v3rJXK.js → detail-page-skeleton-CPAfZLG0.js} +2 -2
- package/dist/owletto/dist/assets/{device-BBwsOi7q.js → device-DDl5XKvt.js} +2 -2
- package/dist/owletto/dist/assets/{device-pin-tombstone-Bcpe7nAA.js → device-pin-tombstone-Dkj7hrBE.js} +2 -2
- package/dist/owletto/dist/assets/{device._deviceId-DLT4jh0Z.js → device._deviceId-bNhTcops.js} +2 -2
- package/dist/owletto/dist/assets/{dynamic-schema-form-BDT8x0Vg.js → dynamic-schema-form-CRyUchXo.js} +2 -2
- package/dist/owletto/dist/assets/{entity-options-B9hm9V87.js → entity-options-D4t-NAcg.js} +2 -2
- package/dist/owletto/dist/assets/entity-page-BOOL_vy3.js +2 -0
- package/dist/owletto/dist/assets/{entity-pages-BWBpttz3.js → entity-pages-_nuesgnp.js} +2 -2
- package/dist/owletto/dist/assets/{entity-schema-graph-lMMx3HhR.js → entity-schema-graph-Cq96SJ3c.js} +2 -2
- package/dist/owletto/dist/assets/{entity-type-page-CkQm0yEu.js → entity-type-page-CkCSbkBx.js} +2 -2
- package/dist/owletto/dist/assets/event-detail-DUvlqn9b.js +2 -0
- package/dist/owletto/dist/assets/{events-feed-DmRzikZW.js → events-feed-DcKTkJVe.js} +2 -2
- package/dist/owletto/dist/assets/{filter-editors-CQoSj-20.js → filter-editors-DGVl9U4D.js} +3 -3
- package/dist/owletto/dist/assets/{full-page-spinner-CYyCnKve.js → full-page-spinner-CtVlF8GQ.js} +2 -2
- package/dist/owletto/dist/assets/index-BUlkNJzX.js +2 -0
- package/dist/owletto/dist/assets/{index-BS5Ty3tf.js → index-BifR-LE9.js} +2 -2
- package/dist/owletto/dist/assets/{index-DByaMzsG.js → index-BoqrvLHQ.js} +1383 -1383
- package/dist/owletto/dist/assets/index-CA9mW_ZM.js +2 -0
- package/dist/owletto/dist/assets/index-CH0GzG4i.js +2 -0
- package/dist/owletto/dist/assets/index-CK5GDX4B.js +2 -0
- package/dist/owletto/dist/assets/index-CtI5Eomq.js +2 -0
- package/dist/owletto/dist/assets/{index-CUndAH6o.js → index-DbjbHlDe.js} +2 -2
- package/dist/owletto/dist/assets/index-DmtQ0bds.js +2 -0
- package/dist/owletto/dist/assets/{index-CDyFQ32o.js → index-Du_J8hnx.js} +2 -2
- package/dist/owletto/dist/assets/{index-ittfA0k8.js → index-DvuJ_S_o.js} +2 -2
- package/dist/owletto/dist/assets/index-Pae_f9LM.css +1 -0
- package/dist/owletto/dist/assets/{index-C3hz9tzx.js → index-XETZnN7L.js} +2 -2
- package/dist/owletto/dist/assets/{json-diff-mcDgyct_.js → json-diff-OjtREegr.js} +2 -2
- package/dist/owletto/dist/assets/{list-skeleton-DsYGUHxi.js → list-skeleton-CH0qQBYk.js} +2 -2
- package/dist/owletto/dist/assets/{login-EoLq136v.js → login-DG0b9uSC.js} +2 -2
- package/dist/owletto/dist/assets/{logout-gLgEQOiX.js → logout-DfdgOLoM.js} +2 -2
- package/dist/owletto/dist/assets/{member-scope-gate-vvkgSAb2.js → member-scope-gate-Cxg2zGQT.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-qEDQ9Z18.js +74 -0
- package/dist/owletto/dist/assets/missing-view-xT0B-f5z.js +2 -0
- package/dist/owletto/dist/assets/{model-selector-D3vSMLO2.js → model-selector-D2OpDkwH.js} +2 -2
- package/dist/owletto/dist/assets/{needs-you-list-B5Bgd05M.js → needs-you-list-3uMsWcDv.js} +2 -2
- package/dist/owletto/dist/assets/{new-dLXsCHBd.js → new-AdGV6a8R.js} +2 -2
- package/dist/owletto/dist/assets/new-BdtIhBpo.js +2 -0
- package/dist/owletto/dist/assets/{new-Bk_flKQO.js → new-BjGwX6s6.js} +2 -2
- package/dist/owletto/dist/assets/{new-BPW3V0Y1.js → new-D-iMjV74.js} +2 -2
- package/dist/owletto/dist/assets/{organization-DBfgBkzq.js → organization-qaIpEiQg.js} +2 -2
- package/dist/owletto/dist/assets/peek-pane-content-CEsDVScl.js +2 -0
- package/dist/owletto/dist/assets/{pending-seed-CBhx2Ql-.js → pending-seed-BBACroge.js} +2 -2
- package/dist/owletto/dist/assets/{proposal-review-shell-B-jYcKfB.js → proposal-review-shell-C8ZfIAYn.js} +2 -2
- package/dist/owletto/dist/assets/public-shell-ready-K2R8iXSI.js +2 -0
- package/dist/owletto/dist/assets/{record-session-CAmGHMyM.js → record-session-BrM9cdXu.js} +2 -2
- package/dist/owletto/dist/assets/{renderer-olRv_HMI.js → renderer-CTKNMcXP.js} +4 -4
- package/dist/owletto/dist/assets/{reset-password-B9_xi8Pq.js → reset-password-DKBEneyR.js} +2 -2
- package/dist/owletto/dist/assets/{run-initiator-DhE5v4z0.js → run-initiator-BKSgI1o0.js} +2 -2
- package/dist/owletto/dist/assets/{runs-C8sZQr4o.js → runs-k2NpbZm8.js} +2 -2
- package/dist/owletto/dist/assets/runs-list-DUXRMkWN.js +2 -0
- package/dist/owletto/dist/assets/{schema-value-zTJGE4eh.js → schema-value-wjqGxXhv.js} +3 -3
- package/dist/owletto/dist/assets/{scoped-feed-bar-BKyJSa3_.js → scoped-feed-bar-DNFL0sYX.js} +2 -2
- package/dist/owletto/dist/assets/{settings-z02cvVS3.js → settings-V0m5Om5j.js} +2 -2
- package/dist/owletto/dist/assets/{source-record-panels-CGmKIJdN.js → source-record-panels-BMut9YIA.js} +2 -2
- package/dist/owletto/dist/assets/{status-variants-DyRCXBzM.js → status-variants-SzXYYedJ.js} +2 -2
- package/dist/owletto/dist/assets/subDays-9s9OEl5t.js +2 -0
- package/dist/owletto/dist/assets/{table-C637cQxG.js → table-ZuYMOjVR.js} +2 -2
- package/dist/owletto/dist/assets/{use-automations-CgWNoYio.js → use-automations-DfBtVzGa.js} +2 -2
- package/dist/owletto/dist/assets/{use-login-redirect-tDdhXTpt.js → use-login-redirect-BDiS3eyl.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-D-kIKchD.js → use-mention-search-khySpz_V.js} +2 -2
- package/dist/owletto/dist/assets/view-card-DiHWlypr.js +2 -0
- package/dist/owletto/dist/assets/view-param-filters-DGKxSr7r.js +2 -0
- package/dist/owletto/dist/assets/{views-access-required-C35Dyt91.js → views-access-required-HA-PiOwA.js} +2 -2
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +1099 -545
- package/npm-shrinkwrap.json +38 -38
- package/package.json +1 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-CYvj1y65.js +0 -3
- package/dist/owletto/dist/assets/_-CeLTSYYY.js +0 -2
- package/dist/owletto/dist/assets/_agentId-BB5E-L6T.js +0 -2
- package/dist/owletto/dist/assets/_automationId-DvUl9CSd.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-Cv6FzK1v.js +0 -2
- package/dist/owletto/dist/assets/_eventId-DZKicuq6.js +0 -2
- package/dist/owletto/dist/assets/_owner-Dauk3YuD.js +0 -3
- package/dist/owletto/dist/assets/_shape-cKrEID3T.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-CPVzVKEf.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-CW8gexOQ.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-D78Wj0RH.js +0 -2
- package/dist/owletto/dist/assets/app-bridge-C4nPtae3.js +0 -121
- package/dist/owletto/dist/assets/connect-NUCSay8X.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-Cp-d9Q5b.js +0 -2
- package/dist/owletto/dist/assets/create-CBcodaSO.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-s4xkktTC.js +0 -2
- package/dist/owletto/dist/assets/entity-page-DZjzQ2V4.js +0 -2
- package/dist/owletto/dist/assets/event-detail-CkzfakTK.js +0 -2
- package/dist/owletto/dist/assets/index-BE7eb2kE.js +0 -2
- package/dist/owletto/dist/assets/index-BFR0uiKY.js +0 -2
- package/dist/owletto/dist/assets/index-C38OzBpB.js +0 -2
- package/dist/owletto/dist/assets/index-CiKysEhV.js +0 -2
- package/dist/owletto/dist/assets/index-DfdinB7B.js +0 -2
- package/dist/owletto/dist/assets/index-DgMM4Zt5.css +0 -1
- package/dist/owletto/dist/assets/index-Xk711gVC.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-DvDtwrEI.js +0 -74
- package/dist/owletto/dist/assets/new-C5HtQdM_.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-c2PG3TEX.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-D8TijlRY.js +0 -2
- package/dist/owletto/dist/assets/record-activity-DnRVOrG2.js +0 -2
- package/dist/owletto/dist/assets/runs-list-CwtH-wmk.js +0 -2
- package/dist/owletto/dist/assets/subDays-D8nHthaS.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-CUCj9Df-.js +0 -2
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/runtime-server",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.11.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@lobu/runtime-server",
|
|
9
|
-
"version": "24.
|
|
9
|
+
"version": "24.11.1",
|
|
10
10
|
"license": "BUSL-1.1",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
@@ -117,14 +117,14 @@
|
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
"node_modules/@aws-sdk/client-bedrock": {
|
|
120
|
-
"version": "3.
|
|
121
|
-
"resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock/-/client-bedrock-3.
|
|
122
|
-
"integrity": "sha512-
|
|
120
|
+
"version": "3.1169.0",
|
|
121
|
+
"resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock/-/client-bedrock-3.1169.0.tgz",
|
|
122
|
+
"integrity": "sha512-ZeBXxZg90apw6JVn5yJ2c+k4EFq6HiuW0NT6GmRVYHg3PmjjKEgY9180LBBpPUe4Qg37r1LdyFhqGqDh8sbsoQ==",
|
|
123
123
|
"license": "Apache-2.0",
|
|
124
124
|
"dependencies": {
|
|
125
125
|
"@aws-sdk/core": "^3.981.0",
|
|
126
126
|
"@aws-sdk/credential-provider-node": "^3.972.97",
|
|
127
|
-
"@aws-sdk/token-providers": "3.
|
|
127
|
+
"@aws-sdk/token-providers": "3.1169.0",
|
|
128
128
|
"@aws-sdk/types": "^3.975.1",
|
|
129
129
|
"@smithy/core": "^3.40.0",
|
|
130
130
|
"@smithy/fetch-http-handler": "^5.8.1",
|
|
@@ -137,9 +137,9 @@
|
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
"node_modules/@aws-sdk/client-bedrock-runtime": {
|
|
140
|
-
"version": "3.
|
|
141
|
-
"resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.
|
|
142
|
-
"integrity": "sha512-
|
|
140
|
+
"version": "3.1169.0",
|
|
141
|
+
"resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.1169.0.tgz",
|
|
142
|
+
"integrity": "sha512-KkMuq9IW+H8VHTEw/qV+ArI70w1WoqDuM/ZLX87MXB0yV31ihqY+2lwZ+zeD5spcZpmlLuUzXTPyMpWE2ZnbtA==",
|
|
143
143
|
"license": "Apache-2.0",
|
|
144
144
|
"dependencies": {
|
|
145
145
|
"@aws-sdk/core": "^3.981.0",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"@aws-sdk/eventstream-handler-node": "^3.972.42",
|
|
148
148
|
"@aws-sdk/middleware-eventstream": "^3.972.38",
|
|
149
149
|
"@aws-sdk/middleware-websocket": "^3.972.66",
|
|
150
|
-
"@aws-sdk/token-providers": "3.
|
|
150
|
+
"@aws-sdk/token-providers": "3.1169.0",
|
|
151
151
|
"@aws-sdk/types": "^3.975.1",
|
|
152
152
|
"@smithy/core": "^3.40.0",
|
|
153
153
|
"@smithy/fetch-http-handler": "^5.8.1",
|
|
@@ -160,9 +160,9 @@
|
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
"node_modules/@aws-sdk/client-secrets-manager": {
|
|
163
|
-
"version": "3.
|
|
164
|
-
"resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.
|
|
165
|
-
"integrity": "sha512-
|
|
163
|
+
"version": "3.1169.0",
|
|
164
|
+
"resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.1169.0.tgz",
|
|
165
|
+
"integrity": "sha512-BsVIFICFZ5CcpwwoBjsujHl5hRC2SUoEU5TeW3eMKoerxJPKCvitJJSGU6ddct4O6bB3/kMxWP9RPL0vJT1juQ==",
|
|
166
166
|
"license": "Apache-2.0",
|
|
167
167
|
"dependencies": {
|
|
168
168
|
"@aws-sdk/core": "^3.981.0",
|
|
@@ -445,9 +445,9 @@
|
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
"node_modules/@aws-sdk/token-providers": {
|
|
448
|
-
"version": "3.
|
|
449
|
-
"resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.
|
|
450
|
-
"integrity": "sha512-
|
|
448
|
+
"version": "3.1169.0",
|
|
449
|
+
"resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1169.0.tgz",
|
|
450
|
+
"integrity": "sha512-ScQiQuJIAFevAHjCh/E159qaWeQtw8KUZ4PGUfHMeJU0VXaF4HE8PSgNXY/y4nmqrT8/gD3SoFhuFT5dy1cisA==",
|
|
451
451
|
"license": "Apache-2.0",
|
|
452
452
|
"dependencies": {
|
|
453
453
|
"@aws-sdk/core": "^3.981.0",
|
|
@@ -674,9 +674,9 @@
|
|
|
674
674
|
}
|
|
675
675
|
},
|
|
676
676
|
"node_modules/@chat-adapter/catalog": {
|
|
677
|
-
"version": "4.
|
|
678
|
-
"resolved": "https://registry.npmjs.org/@chat-adapter/catalog/-/catalog-4.
|
|
679
|
-
"integrity": "sha512-
|
|
677
|
+
"version": "4.45.0",
|
|
678
|
+
"resolved": "https://registry.npmjs.org/@chat-adapter/catalog/-/catalog-4.45.0.tgz",
|
|
679
|
+
"integrity": "sha512-oP8ySvXTYRVRIusTehLTvpwynMLkEcaFZBASZRDDfNFZzSO02xQX1kVgMAz4VbtiMTMU6k01tjZE4KEDbrmonA==",
|
|
680
680
|
"license": "MIT",
|
|
681
681
|
"engines": {
|
|
682
682
|
"node": ">=20"
|
|
@@ -4681,12 +4681,12 @@
|
|
|
4681
4681
|
}
|
|
4682
4682
|
},
|
|
4683
4683
|
"node_modules/chat": {
|
|
4684
|
-
"version": "4.
|
|
4685
|
-
"resolved": "https://registry.npmjs.org/chat/-/chat-4.
|
|
4686
|
-
"integrity": "sha512-
|
|
4684
|
+
"version": "4.45.0",
|
|
4685
|
+
"resolved": "https://registry.npmjs.org/chat/-/chat-4.45.0.tgz",
|
|
4686
|
+
"integrity": "sha512-7p1fkEupHEqYhXmSxLnHcK4hWEg93182/F2YxHSwqc7xtF4mekmG9EuJjRYX3aNEJJa2Rvu48A1f3ulOxxHIrA==",
|
|
4687
4687
|
"license": "MIT",
|
|
4688
4688
|
"dependencies": {
|
|
4689
|
-
"@chat-adapter/catalog": "4.
|
|
4689
|
+
"@chat-adapter/catalog": "4.45.0",
|
|
4690
4690
|
"@workflow/serde": "4.1.0-beta.2",
|
|
4691
4691
|
"mdast-util-to-string": "^4.0.0",
|
|
4692
4692
|
"remark-gfm": "^4.0.0",
|
|
@@ -4936,9 +4936,9 @@
|
|
|
4936
4936
|
}
|
|
4937
4937
|
},
|
|
4938
4938
|
"node_modules/cron-parser": {
|
|
4939
|
-
"version": "5.10.
|
|
4940
|
-
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.10.
|
|
4941
|
-
"integrity": "sha512-
|
|
4939
|
+
"version": "5.10.6",
|
|
4940
|
+
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-5.10.6.tgz",
|
|
4941
|
+
"integrity": "sha512-kpoxgQyveO1l29nw+FWdvmotyV7eOSzGHQpxiXOEZIDOjqO1iR6kfgJ0PVHTuV26uBemKq3ppzma7dHFAG7viw==",
|
|
4942
4942
|
"license": "MIT",
|
|
4943
4943
|
"dependencies": {
|
|
4944
4944
|
"luxon": "^3.7.2"
|
|
@@ -6780,9 +6780,9 @@
|
|
|
6780
6780
|
}
|
|
6781
6781
|
},
|
|
6782
6782
|
"node_modules/isomorphic-git": {
|
|
6783
|
-
"version": "1.44.
|
|
6784
|
-
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.44.
|
|
6785
|
-
"integrity": "sha512-
|
|
6783
|
+
"version": "1.44.14",
|
|
6784
|
+
"resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.44.14.tgz",
|
|
6785
|
+
"integrity": "sha512-ZSVmLOUvzjnUrPBEpVcVOZ6w4N6NSFte2CEZ4ruTYpEIb19iwykPs7lgmh+y9+3qwmDgQePcOQzsMShcSrW5jA==",
|
|
6786
6786
|
"license": "MIT",
|
|
6787
6787
|
"dependencies": {
|
|
6788
6788
|
"async-lock": "^1.4.1",
|
|
@@ -8755,9 +8755,9 @@
|
|
|
8755
8755
|
}
|
|
8756
8756
|
},
|
|
8757
8757
|
"node_modules/postcss": {
|
|
8758
|
-
"version": "8.5.
|
|
8759
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.
|
|
8760
|
-
"integrity": "sha512-
|
|
8758
|
+
"version": "8.5.33",
|
|
8759
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz",
|
|
8760
|
+
"integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==",
|
|
8761
8761
|
"funding": [
|
|
8762
8762
|
{
|
|
8763
8763
|
"type": "opencollective",
|
|
@@ -10042,9 +10042,9 @@
|
|
|
10042
10042
|
}
|
|
10043
10043
|
},
|
|
10044
10044
|
"node_modules/strtok3": {
|
|
10045
|
-
"version": "10.
|
|
10046
|
-
"resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.
|
|
10047
|
-
"integrity": "sha512-
|
|
10045
|
+
"version": "10.8.0",
|
|
10046
|
+
"resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.8.0.tgz",
|
|
10047
|
+
"integrity": "sha512-e6bW3fD6V01DPmcbLfNtn0cjsiHvTKS/hivgbzqYMfHb/nLes4QQ0H5QBxlkPQayF4xv08AvlSgptGwN86Eemw==",
|
|
10048
10048
|
"license": "MIT",
|
|
10049
10049
|
"dependencies": {
|
|
10050
10050
|
"@tokenizer/token": "^0.3.0"
|
|
@@ -11497,7 +11497,7 @@
|
|
|
11497
11497
|
},
|
|
11498
11498
|
"vendor/connector-sdk": {
|
|
11499
11499
|
"name": "@lobu/connector-sdk",
|
|
11500
|
-
"version": "24.
|
|
11500
|
+
"version": "24.11.1",
|
|
11501
11501
|
"license": "BUSL-1.1",
|
|
11502
11502
|
"dependencies": {
|
|
11503
11503
|
"@lobu/core": "file:../core",
|
|
@@ -11512,7 +11512,7 @@
|
|
|
11512
11512
|
},
|
|
11513
11513
|
"vendor/core": {
|
|
11514
11514
|
"name": "@lobu/core",
|
|
11515
|
-
"version": "24.
|
|
11515
|
+
"version": "24.11.1",
|
|
11516
11516
|
"license": "Apache-2.0",
|
|
11517
11517
|
"dependencies": {
|
|
11518
11518
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -11557,7 +11557,7 @@
|
|
|
11557
11557
|
},
|
|
11558
11558
|
"vendor/views": {
|
|
11559
11559
|
"name": "@lobu/views",
|
|
11560
|
-
"version": "24.
|
|
11560
|
+
"version": "24.11.1",
|
|
11561
11561
|
"license": "Apache-2.0",
|
|
11562
11562
|
"dependencies": {
|
|
11563
11563
|
"@lobu/core": "file:../core"
|
package/package.json
CHANGED
package/vendor/core/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-DZjzQ2V4.js","assets/index-DByaMzsG.js","assets/index-DgMM4Zt5.css","assets/entity-pages-BWBpttz3.js","assets/renderer-olRv_HMI.js","assets/schema-value-zTJGE4eh.js","assets/card-DtLIFq7D.js","assets/table-C637cQxG.js","assets/record-activity-DnRVOrG2.js","assets/filter-editors-CQoSj-20.js","assets/subDays-D8nHthaS.js","assets/runs-C8sZQr4o.js","assets/activity-route-location-C1jcXC7v.js","assets/event-kind-options-fHAIXu24.js","assets/source-record-panels-CGmKIJdN.js","assets/events-feed-DmRzikZW.js","assets/definition-comparison-4UYMI6BK.js","assets/json-diff-mcDgyct_.js","assets/code-editor-mrKkAfcE.js","assets/index-Vcq4gwWv.js","assets/run-initiator-DhE5v4z0.js","assets/list-skeleton-DsYGUHxi.js","assets/use-automations-CgWNoYio.js","assets/clients-xnzZeEdZ.js","assets/copy-button-C3wMMv63.js","assets/device-automation-Dp3faMvp.js","assets/client-activity-scopes-BPbRX-Pe.js","assets/client-rows-vrNA6FLs.js","assets/agent-loading-shells-DYqQphN7.js","assets/member-scope-gate-vvkgSAb2.js","assets/dynamic-schema-form-BDT8x0Vg.js","assets/views-access-required-C35Dyt91.js","assets/record-session-CAmGHMyM.js","assets/view-param-filters-CUCj9Df-.js","assets/app-bridge-C4nPtae3.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{av as a,aw as m,H as p,I as y,J as j,j as e,r as g,ax as f,l as R,_ as v}from"./index-DByaMzsG.js";import{A as P}from"./activity-route-location-C1jcXC7v.js";import{P as i}from"./public-shell-ready-D8TijlRY.js";const S=R(async()=>({default:(await v(async()=>{const{EntityPage:s}=await import("./entity-page-DZjzQ2V4.js");return{EntityPage:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))).EntityPage}));function c(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(f,{})})}function A(){const{owner:s}=a.useParams(),{path:l,viewKey:d,pathname:u}=a.useLoaderData(),x=a.useSearch(),{data:t,isLoading:n,error:o}=m(l,{slug:s}),{session:h,isReady:r}=p();return y({active:j({settled:!n,authReady:r,session:h,resolved:!!t,error:o}),owner:s}),n||!r&&!t?e.jsx(c,{}):o||!t||!t.entity?e.jsxs(e.Fragment,{children:[e.jsx(i,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(i,{}),e.jsx(g.Suspense,{fallback:e.jsx(c,{}),children:e.jsx(P,{pathname:u,search:x,children:e.jsx(S,{namespace:t.workspace,path:t.path,entity:t.entity,viewKey:d})})})]})}export{A as component};
|
|
3
|
-
//# sourceMappingURL=_-CYvj1y65.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cl as t,j as r}from"./index-DByaMzsG.js";import{A as e}from"./activity-route-view-D78Wj0RH.js";import{A as s}from"./activity-route-location-C1jcXC7v.js";import"./record-activity-DnRVOrG2.js";import"./filter-editors-CQoSj-20.js";import"./subDays-D8nHthaS.js";import"./runs-C8sZQr4o.js";import"./event-kind-options-fHAIXu24.js";import"./source-record-panels-CGmKIJdN.js";import"./events-feed-DmRzikZW.js";import"./definition-comparison-4UYMI6BK.js";import"./json-diff-mcDgyct_.js";import"./code-editor-mrKkAfcE.js";import"./index-Vcq4gwWv.js";import"./schema-value-zTJGE4eh.js";import"./run-initiator-DhE5v4z0.js";import"./list-skeleton-DsYGUHxi.js";import"./use-automations-CgWNoYio.js";import"./clients-xnzZeEdZ.js";import"./renderer-olRv_HMI.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./copy-button-C3wMMv63.js";import"./device-automation-Dp3faMvp.js";import"./client-activity-scopes-BPbRX-Pe.js";import"./client-rows-vrNA6FLs.js";import"./agent-loading-shells-DYqQphN7.js";import"./member-scope-gate-vvkgSAb2.js";import"./needs-you-list-B5Bgd05M.js";import"./entity-schema-graph-lMMx3HhR.js";import"./feed-event-kinds-BYuZCoU4.js";import"./public-shell-ready-D8TijlRY.js";function J(){const{owner:i}=t.useParams(),{entityScope:m,pathname:p}=t.useLoaderData(),o=t.useSearch();return r.jsx(s,{pathname:p,search:o,children:r.jsx(e,{owner:i,search:o,entityScope:m})})}export{J as component};
|
|
2
|
-
//# sourceMappingURL=_-CeLTSYYY.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as L,dw as w,r as u,j as n,i as D,H as P,n as E,s as M,bc as N,dj as R,z as O,dx as $,dy as z,bp as B,V as H}from"./index-DByaMzsG.js";import{L as Q,A as F}from"./agent-thread-BopD-2k1.js";import{n as b,c as S}from"./agent-thread-storage-Bx2-WBHQ.js";import{A as U,C as V}from"./agent-loading-shells-DYqQphN7.js";import"./app-bridge-C4nPtae3.js";import"./pending-seed-CBhx2Ql-.js";import"./use-mention-search-D-kIKchD.js";import"./index-Vcq4gwWv.js";import"./use-automations-CgWNoYio.js";import"./events-feed-DmRzikZW.js";import"./definition-comparison-4UYMI6BK.js";import"./json-diff-mcDgyct_.js";import"./code-editor-mrKkAfcE.js";import"./schema-value-zTJGE4eh.js";import"./run-initiator-DhE5v4z0.js";import"./list-skeleton-DsYGUHxi.js";import"./subDays-D8nHthaS.js";import"./clients-xnzZeEdZ.js";import"./renderer-olRv_HMI.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./copy-button-C3wMMv63.js";import"./device-automation-Dp3faMvp.js";function W({owner:e,agent:s,threadId:t,afterMessagesContent:d,className:r,initialDraft:g,newChatRequested:f=!1,preventAutoNavigate:p}){const o=L(),i=s.agentId,{data:a=[]}=w(i,{orgSlug:e}),[l,x]=u.useState(()=>b()),[h,A]=u.useState(null);u.useEffect(()=>{!f||t||(x(b()),A(null),o({to:".",search:(m=>{const{new:C,...y}=m;return y}),replace:!0}))},[f,t,o]);const v=u.useMemo(()=>!h||a.some(m=>m.id===h.id)?a:[h,...a],[a,h]),c=t??l,j=!t||!v.some(m=>m.id===t),T=u.useCallback(()=>{if(v.some(C=>C.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const m=S(e,i,c);o({...m,replace:!0})},[v,c,o,e,i]),k=u.useCallback(()=>{j&&!p&&T()},[j,T,p]);return n.jsx("div",{className:D("flex min-h-0 flex-1 flex-col",r),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(Q,{agentId:i,workspaceSlug:e,thread:c,loadHistory:!!t,onFirstUserMessage:k,initialDraft:g,children:n.jsx(F,{afterMessagesContent:d})},`${i}:${c}`)})})}function _({owner:e,agentId:s,threadId:t,initialDraft:d,newChatRequested:r,afterMessagesContent:g,preventAutoNavigate:f}){const{isAuthenticated:p}=P(),{isMember:o,isLoading:i}=E(),a=p&&o,{data:l=[],isLoading:x}=M({enabled:a}),h=s??null,A=l.find(c=>c.agentId===h)??null;return a&&x||i?n.jsx(U,{}):A?n.jsx(W,{owner:e,agent:A,threadId:t,initialDraft:d,newChatRequested:r,afterMessagesContent:g,preventAutoNavigate:f,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(N,{icon:R,title:"Agent not found",description:"This agent may have been removed."})}function q(e){return[...e].sort((s,t)=>t.updatedAt-s.updatedAt)[0]}function G({owner:e,agentId:s,threadId:t,initialDraft:d,forceComposer:r=!1,newChatRequested:g=!1,afterMessagesContent:f,preventAutoNavigate:p}){const o=L(),{data:i=[],isLoading:a}=O($(e,s,{strict:!1})),l=u.useMemo(()=>q(i),[i]);return u.useEffect(()=>{if(t||r||a||!l)return;const x=S(e,s,l.id);o({...x,replace:!0})},[s,a,l,o,e,t,r]),!t&&!r&&(a||l)?n.jsx(V,{}):n.jsx(_,{owner:e,agentId:s,threadId:t,initialDraft:d,newChatRequested:g,afterMessagesContent:f,preventAutoNavigate:p})}function xt(){const{owner:e,agentId:s}=z.useParams(),{threadId:t}=B({strict:!1}),{new:d,prompt:r}=H({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 pt-2.5 pb-4 lg:px-6 lg:pb-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(G,{owner:e,agentId:s,threadId:t,initialDraft:r,forceComposer:!t,newChatRequested:!!d})})})}export{xt as component};
|
|
2
|
-
//# sourceMappingURL=_agentId-BB5E-L6T.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as b,d as P,j as t,dA as $,dB as L,dC as S,B as r,L as u,d5 as _,dD as z,c as B,M as T,aw as E,H as O,n as K,r as H,at as W,au as F,ds as M,dt as N,dj as U,m as V,c9 as G,dE as q,dF as w,aS as J}from"./index-DByaMzsG.js";import{u as Q,R as X,a as Y,A as Z}from"./automation-run-now-MtxUTfzd.js";import{a as I,b as tt}from"./use-automations-CgWNoYio.js";import"./event-detail-CkzfakTK.js";import"./events-feed-DmRzikZW.js";import"./definition-comparison-4UYMI6BK.js";import"./json-diff-mcDgyct_.js";import"./code-editor-mrKkAfcE.js";import"./index-Vcq4gwWv.js";import"./schema-value-zTJGE4eh.js";import"./run-initiator-DhE5v4z0.js";import"./list-skeleton-DsYGUHxi.js";import"./subDays-D8nHthaS.js";import"./clients-xnzZeEdZ.js";import"./renderer-olRv_HMI.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./copy-button-C3wMMv63.js";import"./device-automation-Dp3faMvp.js";import"./view-param-filters-CUCj9Df-.js";import"./app-bridge-C4nPtae3.js";import"./filter-editors-CQoSj-20.js";import"./needs-you-list-B5Bgd05M.js";import"./scoped-feed-bar-BKyJSa3_.js";import"./event-kind-options-fHAIXu24.js";import"./create-automation-form-CLicoPH5.js";import"./entity-options-B9hm9V87.js";import"./model-selector-D3vSMLO2.js";import"./skill-editor-D_W3QlRz.js";import"./use-mention-search-D-kIKchD.js";import"./proposal-review-shell-B-jYcKfB.js";import"./runs-C8sZQr4o.js";import"./runs-list-CwtH-wmk.js";function et({owner:e,automationId:s,name:i}){const a=b(),n=`/${e}/automations/${encodeURIComponent(String(s))}?view=activity`,{pathname:p,search:h}=P(n);return t.jsx($,{delayDuration:200,children:t.jsxs(L,{children:[t.jsx(S,{asChild:!0,children:t.jsx(r,{asChild:!0,variant:"ghost",size:"icon",className:"size-8 shrink-0 text-muted-foreground hover:text-foreground",children:t.jsxs(u,{to:p,search:h??{},onClick:o=>{!a||o.button!==0||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey||(o.preventDefault(),a.open({href:n,title:i,owner:e}))},children:[t.jsx(_,{className:"h-4 w-4","aria-hidden":"true"}),t.jsx("span",{className:"sr-only",children:"View activity"})]})})}),t.jsxs(z,{children:["View activity for ",i]})]})})}function st({owner:e,automationId:s,view:i,runId:a}){const n=B(),{orgContext:p,hasOrgContext:h}=T(),{data:o,isLoading:g}=E(`/${e}`,p),{isAuthenticated:C}=O(),{isLoading:j}=K(),y=o?.workspace?.id??"",k=C?!h||g||j:g||j,c=I(s,void 0,y).data?.automation,x=c?.automation_name??"Automation",f=()=>void n({to:"/$owner",params:{owner:e},search:{section:"automation"}}),d=tt(),A=()=>void n({to:"/$owner/automations/$automationId",params:{owner:e,automationId:s},search:{view:"activity",run_id:void 0}}),R=()=>void n({to:"/$owner/automations/$automationId",params:{owner:e,automationId:s},search:{view:"definition",run_id:void 0},replace:!0}),m=!a&&i==="definition",[D,v]=H.useState(!1),l=Q(e,s,c,!a&&!m);return t.jsx(W,{className:"gap-6 pt-2.5 pb-8",children:t.jsxs(F,{className:"flex min-w-0 flex-col gap-4",children:[t.jsx(M,{crumbs:[m||a?t.jsx(u,{to:"/$owner",params:{owner:e},search:{section:"automation"},className:N,children:"Automations"},"automations"):t.jsx(u,{to:"/$owner",params:{owner:e},className:N,children:"Home"},"home")],current:a?"Review change":x}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("div",{className:"flex min-w-0 items-center gap-2",children:t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx(U,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),k&&!c?t.jsx(V,{className:"h-5 w-40"}):a?"Review change":x]})}),t.jsxs("div",{className:"flex items-center gap-2",children:[m?t.jsx(et,{owner:e,automationId:s,name:x}):null,m&&c?D?t.jsxs(t.Fragment,{children:[t.jsx(r,{type:"button",variant:"destructive",size:"sm",className:"h-8",disabled:d.isPending,onClick:()=>d.mutate(s,{onSuccess:f}),children:d.isPending?"Deleting...":"Delete"}),t.jsx(r,{type:"button",variant:"ghost",size:"sm",className:"h-8",disabled:d.isPending,onClick:()=>v(!1),children:"Cancel"})]}):t.jsxs(r,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 text-muted-foreground hover:text-destructive",onClick:()=>v(!0),children:[t.jsx(G,{className:"h-3.5 w-3.5"}),"Delete"]}):null,l.canRun&&!l.paused?t.jsx(X,{pending:l.pending,onRun:l.run}):null,a?null:m?t.jsx(r,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:A,children:"Done"}):t.jsx(r,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs(u,{to:"/$owner/automations/$automationId",params:{owner:e,automationId:s},search:{view:"definition",run_id:void 0},children:[t.jsx(q,{className:"h-3.5 w-3.5"}),"Edit"]})})]})]}),t.jsx(Y,{runNow:l}),t.jsx(Z,{owner:e,agentId:c?.managed_agent_id??null,automationId:s,view:i,runId:a,onDone:a?f:R})]})})}function Et(){const{owner:e,automationId:s}=w.useParams(),i=w.useSearch();return t.jsx(J,{owner:e,children:()=>t.jsx(st,{owner:e,automationId:s,view:i.view,runId:i.run_id})})}export{Et as component};
|
|
2
|
-
//# sourceMappingURL=_automationId-DvUl9CSd.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aW as Pe,aX as Se,aY as $e,b3 as re,b0 as Z,ic as Ge,id as Qe,j as e,ie as Je,B as g,L as _,b2 as le,bl as De,dr as ee,ds as se,dt as U,ig as Ze,y as es,ih as J,r as u,ii as ye,ij as Ee,dJ as ss,ik as Ne,by as I,il as Ce,Z as k,bq as ts,br as ns,bs as as,bt as is,bu as rs,im as os,$ as S,bR as V,al as T,A as ke,io as ls,ip as cs,ev as ds,iq as us,c9 as ce,ir as ms,is as xs,it as _e,iu as Fe,iv as Le,e6 as Be,a7 as E,a8 as te,iw as hs,gn as ps,ix as gs,cJ as Re,iy as Ke,i8 as R,c as X,iz as js,aE as fs,aF as vs,aH as bs,iA as W,iB as ys,aS as Ns,u as Oe,iC as Ie,iD as Cs,b5 as ks,iE as ws,iF as As,iG as Ps,aV as we,aU as Ss,cK as $s,aN as Ds,au as M,eO as Ue,iH as Me,aP as de,be as Es,i as _s,iI as Fs}from"./index-DByaMzsG.js";import{C as Ls,A as Bs}from"./connect-menu-C6iVtuSo.js";import{C as ne}from"./connector-page-shell-BFv21yuv.js";import{C as Rs}from"./connector-provenance-b59RfBtk.js";import{R as Ks,D as ue}from"./detail-page-skeleton-C8v3rJXK.js";import{L as oe}from"./list-skeleton-DsYGUHxi.js";import"./runs-C8sZQr4o.js";import"./filter-editors-CQoSj-20.js";import"./subDays-D8nHthaS.js";import"./runs-list-CwtH-wmk.js";import"./run-initiator-DhE5v4z0.js";import"./use-automations-CgWNoYio.js";import"./clients-xnzZeEdZ.js";function Os({ownerSlug:s,familyKind:t,familyId:a}){const n=t==="inference",o=Pe({enabled:n}),d=Se({enabled:n}),x=$e({enabled:!n}),c=n?o:x,l=n?d.data?.find(i=>i.slug===a)?.displayName??a:re(a),p=(n?(o.data??[]).filter(i=>i.kind===a).map(i=>({key:`${Z}${i.slug}`,name:i.displayName||i.slug,status:[i.isDefault?"Default":null,i.status].filter(Boolean).join(" · ")})):(x.data?.sandboxes??[]).filter(i=>i.providerKind===a).map(i=>({key:`${Ge}${i.id}`,name:i.name,status:i.connected?"Connected":"Needs credentials"}))).map(i=>({id:i.key,name:i.name,description:i.status,tone:null,link:Qe({to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:i.key},search:{}})})),m=`${n?Z:le}${a}`;return e.jsx(ne,{header:e.jsx(ee,{title:l,breadcrumb:e.jsx(se,{crumbs:[e.jsx(_,{to:"/$owner/connectors",params:{owner:s},className:U,children:"Connectors"},"connectors")]})}),children:e.jsx(Je,{entries:p,isLoading:c.isLoading,isError:c.isError,onRetry:()=>void c.refetch(),action:n?e.jsx(g,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(_,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:m},search:{addAccount:!0},children:"Add connection"})}):e.jsx(De,{ownerSlug:s,connectorKey:m})})})}function Is({catalog:s,initialProvider:t,initialSlug:a,allowOAuth:n=!0,initialModel:o,onDone:d}){const x=Ze(),c=es(),l=s.find(r=>r.slug===t)??s[0],p=n&&l&&J(l)?"oauth":"api-key",[m,i]=u.useState(l?.slug??""),[f,N]=u.useState(a??l?.slug??""),[h,b]=u.useState(l?.displayName??""),[v,w]=u.useState(l?.baseUrl??""),[D,A]=u.useState(o??l?.defaultModel??""),[$,z]=u.useState(""),[Y,B]=u.useState(l?.apiKeyPlaceholder??""),[q,K]=u.useState(p),[F,H]=u.useState(""),[C,ae]=u.useState(null),[O,L]=u.useState(!1),[me,xe]=u.useState(!1),j=s.find(r=>r.slug===m),G=ye(j?.modalities??[]),he=n&&!!j&&J(j),pe=j?Ee(j):!1,ge=he&&q==="oauth",je=pe&&!ge,P=ss().slug,Q=u.useCallback(()=>{xe(!0),c.invalidateQueries({queryKey:["inference-providers"]})},[c]),Te=u.useCallback(()=>{c.invalidateQueries({queryKey:["inference-providers"]}),d()},[c,d]),ze=u.useCallback(async()=>{if(!(!P||!j)){L(!0);try{const r=await Ne(P,j.slug);if(r.mode!=="redirect")throw new Error("Unexpected sign-in mode");window.open(r.authorizeUrl,"_blank","noreferrer")}catch(r){I.error(r instanceof Error?r.message:"Failed to start sign-in")}finally{L(!1)}}},[P,j]),qe=u.useCallback(async()=>{if(!(!P||!j||!F.trim())){L(!0);try{const r=await Ce(P,j.slug,{code:F.trim()});if(r.status!=="success")throw new Error(r.error||"Sign-in not complete");Q(),I.success(`Signed in with ${j.displayName}`)}catch(r){I.error(r instanceof Error?r.message:"Failed to complete sign-in")}finally{L(!1)}}},[P,j,F,Q]),Ve=u.useCallback(async()=>{if(!(!P||!j)){L(!0);try{const r=await Ne(P,j.slug);if(r.mode!=="device")throw new Error("Unexpected sign-in mode");ae({userCode:r.userCode,deviceAuthId:r.deviceAuthId,verificationUrl:r.verificationUrl}),window.open(r.verificationUrl,"_blank","noreferrer")}catch(r){I.error(r instanceof Error?r.message:"Failed to start sign-in")}finally{L(!1)}}},[P,j]),We=u.useCallback(async()=>{if(!(!P||!j||!C)){L(!0);try{const r=await Ce(P,j.slug,{deviceAuthId:C.deviceAuthId,userCode:C.userCode});if(r.status==="success"){Q(),I.success(`Signed in with ${j.displayName}`);return}ae(y=>y&&{...y,message:r.error||"Waiting for approval..."})}catch(r){I.error(r instanceof Error?r.message:"Failed to check status")}finally{L(!1)}}},[P,j,C,Q]),Xe=j?.supportedAuthTypes.includes("device-code")??!1,Ye=r=>{i(r);const y=s.find(ie=>ie.slug===r);y&&(N(y.slug),b(y.displayName),w(y.baseUrl),A(y.slug===t&&o?o:y.defaultModel??""),B(y.apiKeyPlaceholder),K(n&&J(y)?"oauth":"api-key"),H(""),ae(null),xe(!1))},fe=/^[a-z0-9][a-z0-9-]*$/.test(f),ve=fe&&je&&$.trim().length>0&&!x.isPending,He=r=>{if(r.preventDefault(),!ve)return;const y={};v.trim()&&(y.base_url=v.trim()),D.trim()&&(y.model=D.trim());const ie=Object.keys(y).length>0?{text:y}:void 0;x.mutate({slug:f.trim(),kind:m,displayName:h.trim()||void 0,apiKey:$.trim(),capabilities:ie},{onSuccess:()=>d()})},be=!!(t&&s.some(r=>r.slug===t));return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:be&&j?`Connect ${j.displayName}`:"Add an inference provider"}),e.jsxs("form",{onSubmit:He,className:"grid max-w-md gap-3",children:[be&&j?e.jsx("p",{className:"text-xs text-muted-foreground",children:G.length>0?`Serves text, plus ${G.join(", ").toLowerCase()}.`:"Serves text (chat)."}):e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-provider",children:"Provider"}),e.jsxs(ts,{value:m,onValueChange:Ye,children:[e.jsx(ns,{id:"ip-provider",className:"w-full",children:e.jsx(as,{})}),e.jsx(is,{children:s.map(r=>{const y=ye(r.modalities);return e.jsx(rs,{value:r.slug,children:e.jsxs("span",{className:"flex items-center gap-2",children:[r.iconUrl?e.jsx("img",{src:r.iconUrl,alt:"",className:"h-4 w-4 shrink-0 rounded-sm",loading:"lazy"}):e.jsx(os,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),r.displayName,y.length>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",y.join(", ")]}):null]})},r.slug)})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:G.length>0?`Serves text, plus ${G.join(", ").toLowerCase()}.`:"Serves text (chat)."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-display",children:"Name"}),e.jsx(S,{id:"ip-display",placeholder:"Friendly name",value:h,onChange:r=>b(r.target.value)})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(k,{htmlFor:"ip-slug",children:["Slug ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"ip-slug",placeholder:"my-provider",value:f,onChange:r=>N(r.target.value),autoComplete:"off",required:!0}),f&&!fe?e.jsx("p",{className:"text-xs text-destructive",children:"Lowercase letters, numbers, and hyphens only."}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"A stable identifier agents reference this provider by."})]}),he&&pe?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Auth method"}),e.jsxs("div",{className:"inline-flex w-fit rounded-md border border-border p-1",children:[e.jsx(g,{type:"button",size:"sm",variant:q==="oauth"?"secondary":"ghost",onClick:()=>K("oauth"),children:"Sign in"}),e.jsx(g,{type:"button",size:"sm",variant:q==="api-key"?"secondary":"ghost",onClick:()=>K("api-key"),children:"API key"})]})]}):null,je?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-base-url",children:"Base URL"}),e.jsx(S,{id:"ip-base-url",placeholder:"https://api.example.com/v1",value:v,onChange:r=>w(r.target.value),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Override the upstream URL — e.g. a self-hosted vLLM, Azure, or LiteLLM endpoint."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-model",children:"Default model"}),e.jsx(S,{id:"ip-model",placeholder:"gpt-4o-mini",value:D,onChange:r=>A(r.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(k,{htmlFor:"ip-key",children:["API key ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(S,{id:"ip-key",type:"password",placeholder:Y||void 0,value:$,onChange:r=>z(r.target.value),autoComplete:"off",required:!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Stored encrypted in the vault. It's never shown again — rotate it here if it changes."})]}),e.jsx(V,{onCancel:d,children:e.jsx(g,{type:"submit",disabled:!ve,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(T,{size:"lg",className:"mr-2"}),"Creating..."]}):"Create provider"})})]}):ge?e.jsxs("div",{className:"grid gap-3",children:[me?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Signed in with ",j?.displayName??"provider",". This covers your agents in this org."]}):Xe?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void Ve(),disabled:O||!P,children:C?"Get a new code":"Get device code"}),C?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-device-code",children:"Device code"}),e.jsx(S,{id:"ip-device-code",readOnly:!0,value:C.userCode}),e.jsx(g,{type:"button",variant:"default",className:"justify-self-start",asChild:!0,children:e.jsxs("a",{href:C.verificationUrl,target:"_blank",rel:"noreferrer",children:["Open ",j?.displayName??"provider"," to approve",e.jsx(ke,{className:"h-4 w-4"})]})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:C.message||"We opened the approval page. Enter the code above if asked, approve, then check status."}),e.jsx(g,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void We(),disabled:O,children:O?"Checking...":"Check status"})]}):null]}):e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(g,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void ze(),disabled:O||!P,children:["Sign in with ",j?.displayName??"provider",e.jsx(ke,{className:"h-4 w-4"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-oauth-code",children:"Paste code#state"}),e.jsx(S,{id:"ip-oauth-code",placeholder:"code#state",value:F,onChange:r=>H(r.target.value),autoComplete:"off"})]}),e.jsx(g,{type:"button",className:"justify-self-start",onClick:()=>void qe(),disabled:O||!F.trim(),children:O?"Finishing...":"Finish sign-in"})]}),e.jsx(V,{onCancel:d,children:e.jsx(g,{type:"button",onClick:Te,disabled:!me,children:"Done"})})]}):e.jsxs("div",{className:"grid gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This provider cannot be added from the catalog yet."}),e.jsx(V,{onCancel:d})]})]})]})}const Us={text:"Text",image:"Image",stt:"Speech-to-text",tts:"Text-to-speech"};function Ms({provider:s,catalog:t,autoOpenEdit:a}){const n=ls(),[o,d]=u.useState(a?"edit":null),x=cs(s.kind,t);u.useEffect(()=>{a&&d("edit")},[a]);const l=(t.find(i=>i.slug===s.kind)?.modalities??["text"]).filter(i=>i!=="text"),p=x&&l.length>0,m=i=>d(f=>f===i?null:i);return e.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:"Credential"}),e.jsxs("p",{className:"truncate text-[11px] text-muted-foreground",children:[s.slug,s.createdAt?` · created ${ds(s.createdAt)}`:""]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.isDefault?null:e.jsx(g,{variant:"outline",size:"sm",className:"h-8 text-xs",disabled:n.isPending,onClick:()=>n.mutate({providerSlug:s.slug}),children:"Set as default"}),p?e.jsx(g,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>m("capabilities"),children:"Configure"}):null,e.jsx(g,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>m("edit"),children:"Edit"})]})]}),o==="edit"?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsx(zs,{provider:s,supportsUpstreamConfig:x,onDone:()=>d(null)})}):null,o==="capabilities"&&p?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Other modalities (optional)"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"This provider's text base URL and model are set under Edit. Only set these if you want a modality routed to a different endpoint — otherwise it uses the provider's defaults."})]}),l.map(i=>e.jsx(qs,{providerSlug:s.slug,modality:i,block:s.capabilities[i]??{}},i))]})}):null]})}function Ts({provider:s,onDeleted:t}){const a=us(),[n,o]=u.useState(!1);return e.jsxs("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Delete provider"}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Removes ",s.displayName||s.slug," and its stored key from this workspace. Agents referencing it will need another connected provider before they can run."]}),e.jsx("div",{className:"mt-3",children:n?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(g,{variant:"destructive",size:"sm",disabled:a.isPending,onClick:()=>a.mutate({providerSlug:s.slug},{onSuccess:t,onSettled:()=>o(!1)}),children:[a.isPending?e.jsx(T,{size:"md",className:"mr-1.5"}):null,"Confirm delete"]}),e.jsx(g,{variant:"ghost",size:"sm",disabled:a.isPending,onClick:()=>o(!1),children:"Cancel"})]}):e.jsxs(g,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",disabled:a.isPending,onClick:()=>o(!0),children:[e.jsx(ce,{className:"mr-1.5 h-3.5 w-3.5"}),"Delete provider"]})})]})}function zs({provider:s,supportsUpstreamConfig:t,onDone:a}){const n=ms(),o=xs(),d=_e(),[x,c]=u.useState(s.displayName??""),[l,p]=u.useState(""),m=s.capabilities.text??{},[i,f]=u.useState(m.base_url??""),[N,h]=u.useState(m.model??""),[b,v]=u.useState(null),w=x.trim().length>0&&x.trim()!==(s.displayName??""),D=t&&l.trim().length>0,A=i.trim()!==(m.base_url??""),$=N.trim()!==(m.model??""),z=t&&(A||$),Y={base_url:i.trim()||void 0,model:N.trim()||void 0,models_endpoint:m.models_endpoint},B=Fe(Y),q=t&&z&&Le(B),K=n.isPending||o.isPending||d.isPending,F=(w||D||z)&&!q&&!K,H=async C=>{if(C.preventDefault(),!!F){v(null);try{await Promise.all([w?n.mutateAsync({providerSlug:s.slug,displayName:x.trim()}):Promise.resolve(),z?d.mutateAsync({providerSlug:s.slug,modality:"text",block:Y}):Promise.resolve(),D?o.mutateAsync({providerSlug:s.slug,value:l.trim()}):Promise.resolve()]),a()}catch{v("Some changes could not be saved. Review the fields and try again.")}}};return e.jsxs("form",{onSubmit:H,className:"grid max-w-md gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-name-${s.slug}`,children:"Name"}),e.jsx(S,{id:`edit-name-${s.slug}`,value:x,onChange:C=>c(C.target.value),placeholder:s.slug}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["The slug (",e.jsx("code",{children:s.slug}),") is fixed — agents reference it."]})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-base-${s.slug}`,children:"Base URL"}),e.jsx(S,{id:`edit-base-${s.slug}`,placeholder:"https://api.example.com/v1",value:i,onChange:C=>f(C.target.value),autoComplete:"off"}),B.base_url?e.jsx("p",{className:"text-xs text-destructive",children:B.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-model-${s.slug}`,children:"Default model"}),e.jsx(S,{id:`edit-model-${s.slug}`,placeholder:"gpt-4o-mini",value:N,onChange:C=>h(C.target.value),autoComplete:"off"}),B.model?e.jsx("p",{className:"text-xs text-destructive",children:B.model}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-key-${s.slug}`,children:"New API key"}),e.jsx(S,{id:`edit-key-${s.slug}`,type:"password",value:l,onChange:C=>p(C.target.value),autoComplete:"off",placeholder:"Leave blank to keep the current key"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter a value only to replace the stored key. The old key is discarded."})]})]}):null,b?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:b}):null,e.jsx(V,{onCancel:a,children:e.jsx(g,{type:"submit",disabled:!F,children:K?e.jsxs(e.Fragment,{children:[e.jsx(T,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]})}function qs({providerSlug:s,modality:t,block:a}){const n=_e(),[o,d]=u.useState(!1),[x,c]=u.useState(a.base_url??""),[l,p]=u.useState(a.model??""),[m,i]=u.useState(a.models_endpoint??""),[f,N]=u.useState(!!a.models_endpoint),h=!!(a.base_url||a.model||a.models_endpoint),b={base_url:x.trim()||void 0,model:l.trim()||void 0,models_endpoint:m.trim()||void 0},v=Fe(b),w=Le(v),D=()=>{w||n.mutate({providerSlug:s,modality:t,block:b})};return e.jsxs("div",{className:Be,children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-left",onClick:()=>d(A=>!A),children:[e.jsx("span",{className:"text-sm font-medium",children:Us[t]}),h?e.jsx(E,{variant:"outline",children:"Custom"}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Static"})]}),o?e.jsxs("div",{className:"grid gap-3 border-t px-3 py-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`base-${s}-${t}`,children:"Base URL"}),e.jsx(S,{id:`base-${s}-${t}`,placeholder:"https://api.example.com/v1",value:x,onChange:A=>c(A.target.value),autoComplete:"off"}),v.base_url?e.jsx("p",{className:"text-xs text-destructive",children:v.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`model-${s}-${t}`,children:"Model"}),e.jsx(S,{id:`model-${s}-${t}`,placeholder:"gpt-4o-mini",value:l,onChange:A=>p(A.target.value),autoComplete:"off"}),v.model?e.jsx("p",{className:"text-xs text-destructive",children:v.model}):null]}),f?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`endpoint-${s}-${t}`,children:"Models endpoint"}),e.jsx(S,{id:`endpoint-${s}-${t}`,placeholder:"/v1/models",value:m,onChange:A=>i(A.target.value),autoComplete:"off"}),v.models_endpoint?e.jsx("p",{className:"text-xs text-destructive",children:v.models_endpoint}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"Path used to list this modality's models (e.g. /v1/models)."})]}):e.jsx("button",{type:"button",className:"justify-self-start text-xs text-muted-foreground hover:text-foreground",onClick:()=>N(!0),children:"Advanced"}),e.jsx(V,{onCancel:()=>d(!1),children:e.jsx(g,{size:"sm",disabled:w||n.isPending,onClick:D,children:n.isPending?e.jsxs(e.Fragment,{children:[e.jsx(T,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]}):null]})}function Vs({sandbox:s}){const t=Object.entries(s.details??{});return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(Xs,{kind:s.providerKind}),e.jsx("span",{className:"text-sm font-medium",children:s.name}),e.jsx(E,{variant:"secondary",className:"h-4 px-1.5 py-0 text-[10px] uppercase tracking-wide",children:s.providerKind}),s.connected?e.jsx(E,{className:"h-4 border-transparent bg-emerald-500/10 px-1.5 py-0 text-[10px] uppercase tracking-wide text-emerald-500",children:"Connected"}):e.jsx(E,{variant:"destructive",className:"h-4 border-transparent bg-destructive/10 px-1.5 py-0 text-[10px] uppercase tracking-wide text-destructive",children:"No credential"})]}),t.length>0?e.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:t.map(([a,n])=>`${a}: ${n}`).join(" | ")}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Remote sandbox agents execute in instead of the built-in local runtime."}),s.connected?null:e.jsxs("div",{className:"flex gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:[e.jsx(te,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("p",{children:"This sandbox has no vault credential. Delete it and re-add the provider with a valid key, or set the credential via the API."})]})]})})}function Ws({sandbox:s,onDeleted:t}){const a=hs(),[n,o]=u.useState(!1);return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"rounded-lg border border-destructive/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ce,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Remove sandbox"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Agents pinned to this runtime fall back to the built-in local sandbox."})]})]}),n?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{variant:"destructive",size:"sm",disabled:a.isPending,onClick:()=>a.mutate({id:s.id},{onSuccess:t}),children:a.isPending?e.jsx(T,{}):"Delete permanently"}),e.jsx(g,{variant:"ghost",size:"sm",onClick:()=>o(!1),children:"Cancel"})]}):e.jsx(g,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>o(!0),children:"Delete sandbox"})]})})}function Xs({kind:s}){return s==="vercel"?e.jsxs("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 shrink-0 fill-foreground","aria-hidden":!0,children:[e.jsx("title",{children:"Vercel"}),e.jsx("path",{d:"M12 3 22 20H2L12 3Z"})]}):s==="builtin"?e.jsx(ps,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):e.jsx(gs,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}const Ys={data:!1,chat:!1,actions:!1,audience:!1,inference:!0,runtime:!1},Hs={data:!1,chat:!1,actions:!1,audience:!1,inference:!1,runtime:!0};function Nt(){const{owner:s,connectorKey:t}=W.useParams(),{instances:a}=W.useSearch(),{kind:n,id:o}=ys(t);return e.jsx(Ns,{owner:s,children:({ownerSlug:d,organizationId:x,isWorkspaceLoading:c})=>{if(a&&(n==="inference"||n==="sandbox-provider"))return e.jsx(Os,{ownerSlug:d,familyKind:n,familyId:o});switch(n){case"inference":return e.jsx(Js,{ownerSlug:d,providerSlug:o});case"sandbox":return e.jsx(Qs,{ownerSlug:d,sandboxId:o});case"sandbox-provider":return e.jsx(Gs,{ownerSlug:d,providerKind:o});default:return e.jsx(tt,{ownerSlug:d,organizationId:x,isWorkspaceLoading:c,connectorKey:t})}}})}function Gs({ownerSlug:s,providerKind:t}){const a=X();return u.useEffect(()=>{a({to:"/$owner/connectors/create/$connectorKey",params:{owner:s,connectorKey:`${le}${t}`},replace:!0})},[a,s,t]),null}function Qs({ownerSlug:s,sandboxId:t}){const a=X(),{data:n,isLoading:o,isError:d,refetch:x}=$e(),c=n?.sandboxes.find(p=>p.id===t)??null;if(o)return e.jsx(ue,{label:"Loading sandbox",sections:1});if(d)return e.jsx(M,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this instance."}),e.jsx(g,{variant:"outline",onClick:()=>void x(),children:"Retry"})]})});if(!c)return e.jsxs(M,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This sandbox isn't in this workspace, so its details aren't available."}),e.jsx(g,{variant:"outline",size:"sm",onClick:()=>void a({to:"/$owner/connectors",params:{owner:s}}),children:"Back to connectors"})]});const l=c.name||re(c.providerKind);return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(ne,{header:e.jsx(ee,{breadcrumb:e.jsx(se,{crumbs:[e.jsx(_,{to:"/$owner/connectors",params:{owner:s},className:U,children:"Connectors"},"connectors"),e.jsx(_,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${le}${c.providerKind}`},search:{instances:!0},className:U,children:re(c.providerKind)},"family")]}),icon:e.jsx(de,{name:l,faviconDomain:Es(c.providerKind)}),title:l,badge:e.jsxs(e.Fragment,{children:[e.jsx(E,{variant:"secondary",children:c.providerKind}),c.connected?e.jsx(E,{className:"border-transparent bg-emerald-500/10 text-emerald-500",children:"Connected"}):e.jsx(E,{variant:"destructive",children:"No credential"})]}),status:e.jsx(Me,{facets:Hs})}),children:[e.jsx(Vs,{sandbox:c}),e.jsx(R,{title:"Settings",muted:!0,children:e.jsx(Ws,{sandbox:c,onDeleted:()=>void a({to:"/$owner/connectors",params:{owner:s}})})})]})})}function Js({ownerSlug:s,providerSlug:t}){const a=X(),{model:n,reason:o,agentId:d,addAccount:x}=W.useSearch(),{data:c=[],isLoading:l,isError:p,refetch:m}=Pe(),i=Se(),{data:f=[],isLoading:N}=i,h=x?null:c.find($=>$.slug===t)??null,b=f.find($=>$.slug===(h?.kind??t))??null;if(l||N)return e.jsx(ue,{label:"Loading account"});if(p)return e.jsx(M,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this account."}),e.jsx(g,{variant:"outline",onClick:()=>void m(),children:"Retry"})]})});if(!h&&!b&&!i.isError)return e.jsxs(M,{className:"space-y-3",children:[e.jsx(Ue,{connector:{key:t,name:t},showDescription:!1,className:"gap-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector isn't installed in this workspace, so its details aren't available."})]});const v=h?h.displayName||h.slug:b?.displayName||t,w=h!==null,D=o?e.jsx(st,{agentId:d,model:n,providerName:v}):n?e.jsx(et,{providerName:v,model:n,isConnected:w}):null,A=e.jsx(ee,{breadcrumb:e.jsx(se,{crumbs:[e.jsx(_,{to:"/$owner/connectors",params:{owner:s},className:U,children:"Connectors"},"connectors"),...h?[e.jsx(_,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${Z}${h.kind}`},search:{instances:!0},className:U,children:b?.displayName??h.kind},"family")]:[]]}),icon:e.jsx(de,{iconUrl:b?.iconUrl,name:v}),title:v,badge:h?e.jsxs(e.Fragment,{children:[h.isDefault?e.jsx(E,{variant:"secondary",children:"Default"}):null,h.status?e.jsx(E,{variant:"outline",children:h.status}):null,h.hasCustomUpstream?e.jsx(E,{variant:"outline",children:"Custom upstream"}):null]}):null,status:e.jsx(Me,{facets:Ys})});return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(ne,{header:A,children:[D,e.jsx("div",{className:"space-y-6",children:h?e.jsx(Ms,{provider:h,catalog:f,autoOpenEdit:!!n}):e.jsx(Zs,{ownerSlug:s,providerSlug:t,existingSlugs:c.map($=>$.slug),catalog:f,catalogError:i.isError?i.error:null,model:n})}),h?e.jsx(R,{title:"Settings",muted:!0,children:e.jsx(Ts,{provider:h,onDeleted:()=>void a({to:"/$owner/connectors",params:{owner:s}})})}):null]})})}function Zs({ownerSlug:s,providerSlug:t,existingSlugs:a,catalog:n,catalogError:o,model:d}){const x=X(),c=n.find(m=>m.slug===t),l=a.includes(t)&&!!c&&J(c);let p=t;for(let m=2;a.includes(p);m++)p=`${t}-${m}`;return o?e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(te,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Failed to load provider catalog."}),e.jsx("p",{className:"mt-1 text-xs",children:o instanceof Error?o.message:"Check the workspace URL and try again."})]})]})}):e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[l&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"Subscription sign-in is managed on the existing connection."}),e.jsx(g,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(_,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${Z}${t}`},search:{},children:"Open existing connection"})})]}),(!l||c&&Ee(c))&&e.jsx(Is,{catalog:n,initialProvider:t,initialSlug:p,allowOAuth:!l,initialModel:d?.includes("/")?d.split("/").slice(1).join("/"):d,onDone:()=>void x({to:"/$owner/connectors",params:{owner:s}})},`${n.length}:${t}`)]})}function et({providerName:s,model:t,isConnected:a}){return e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(te,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("p",{children:["Review ",e.jsx("strong",{children:s})," for model"," ",e.jsx("strong",{children:t}),"."," ",a?"Its edit controls are open.":"It is not connected yet; add it to continue."]})]})})}function st({agentId:s,model:t,providerName:a}){return e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(te,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:"This agent needs a model provider before it can reply."}),e.jsxs("p",{children:[s?e.jsxs("span",{children:["Agent ",e.jsx("strong",{children:s})," is"," "]}):null,"configured to use ",t?e.jsx("strong",{children:t}):"a model"," ","from ",e.jsx("strong",{children:a}),", but that provider is not ready in this workspace."]}),e.jsx("p",{children:"Connect the provider below, then retry the message."})]})]})})}function tt({ownerSlug:s,organizationId:t,isWorkspaceLoading:a,connectorKey:n}){const{data:o=[],isLoading:d,isError:x,refetch:c}=Ss(t??""),{data:l=[],isLoading:p,isError:m,refetch:i}=$s(t??"",{connectorKey:n}),{setup:f}=W.useSearch(),N=W.useNavigate(),h=u.useMemo(()=>o.find(w=>w.key===n),[o,n]),b=u.useMemo(()=>Ds(n,o,{name:l[0]?.connector_name??n}),[n,o,l]);if(a||d)return e.jsx(ue,{label:"Loading connector",sections:3});if(x||m)return e.jsx(M,{children:e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsx("p",{children:"Could not load this connector."}),e.jsx(g,{variant:"outline",onClick:()=>{c(),i()},children:"Retry"})]})});const v=h?e.jsx(at,{connector:h,ownerSlug:s,organizationId:t??void 0,connectionCount:l.length}):e.jsxs("div",{className:"space-y-3",children:[e.jsx(Ue,{connector:b,showDescription:!1,className:"gap-2"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This connector isn't installed in this workspace, so its details aren't available.",l.length>0?" Existing connections keep working.":""]})]});return e.jsx("div",{className:"flex flex-1 flex-col",children:h&&t?e.jsx(nt,{hero:v,connector:h,organizationId:t,ownerSlug:s,connectorKey:n,connections:l,isLoading:p,openNewApp:f==="oauth_app",onNewAppHandled:()=>void N({search:w=>({...w,setup:void 0}),replace:!0})}):e.jsxs(M,{className:"space-y-6",children:[v,l.length>0&&!p?e.jsx(Ke,{section:!0,connections:l,ownerSlug:s,connectorKey:n}):p?e.jsx(oe,{label:"Loading connections",rows:2}):e.jsx("div",{children:e.jsx(De,{ownerSlug:s,connectorKey:n})})]})})}function nt({hero:s,connector:t,organizationId:a,ownerSlug:n,connectorKey:o,connections:d,isLoading:x,openNewApp:c,onNewAppHandled:l}){const{isAdmin:p,isLoading:m}=Re(a),i=(t.operations_summary?.total??0)>0,f=e.jsx(Ls,{connector:t,organizationId:a,ownerSlug:n,connections:d,openNewApp:c,onNewAppHandled:l});return e.jsxs(ne,{header:s,children:[x?e.jsx(oe,{label:"Loading connections",rows:2}):d.length>0?e.jsx(Ke,{section:!0,connections:d,connector:t,ownerSlug:n,connectorKey:o,action:f}):f,e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:auto-cols-fr sm:grid-flow-col",children:[e.jsx(lt,{connector:t,organizationId:a,ownerSlug:n}),i&&m?e.jsx(oe,{label:"Loading actions",rows:2}):i&&p?e.jsx(ot,{connector:t,organizationId:a,ownerSlug:n}):i&&!p?e.jsx(R,{title:"Actions",muted:!0,children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Only workspace admins can view and configure connector actions."})}):null]}),d.length>0?e.jsx(R,{title:"Runs",children:e.jsx(Ks,{scope:{connectorKey:o},ownerSlug:n})}):null,e.jsx(it,{connector:t,organizationId:a,ownerSlug:n})]})}function at({connector:s,ownerSlug:t,organizationId:a,connectionCount:n}){return e.jsx(ee,{breadcrumb:e.jsx(se,{crumbs:[e.jsx(_,{to:"/$owner/connectors",params:{owner:t},className:U,children:"Connectors"},"connectors")]}),icon:e.jsx(de,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??Fs(s.auth_schema),className:"h-10 w-10"}),title:s.name,badge:e.jsxs(e.Fragment,{children:[e.jsx(Rs,{connectorDef:s,ownerSlug:t}),a?e.jsx(rt,{connector:s,organizationId:a,ownerSlug:t,connectionCount:n}):null]}),caption:s.description})}function it({connector:s,organizationId:t,ownerSlug:a}){const n=Cs(s.auth_schema),o=ks(s.auth_schema),d=ws(s.auth_schema),x=As(s.auth_schema),c=n.some(b=>b.type==="env_keys"),l=n.some(b=>b.type==="browser"),p=o.some(b=>b.type==="interactive"),m=!!(d||x||c||l),i=Ps(s),{data:f=[]}=we(t,{connectorKey:s.key,profileKind:"env"}),{data:N=[]}=we(t,{profileKind:"browser_session",connectorKey:s.key});return c&&f.length>0||l&&N.length>0||!m&&(i||p)?e.jsxs("div",{className:"space-y-6",children:[c&&f.length>0?e.jsx(Ae,{profiles:f,type:"env"}):null,l&&N.length>0?e.jsx(Ae,{profiles:N,type:"browser_session"}):null,m?null:i?e.jsx(R,{title:"Device runtime",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.name," runs on a linked device — there are no workspace credentials to configure here. Pair a device, then create a connection pinned to it."]}),e.jsx(g,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(_,{to:"/$owner/connectors",params:{owner:a},search:{},children:"View devices"})})]})}):p?e.jsx(R,{title:"Authentication",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.name," pairs when you create a connection — there is no workspace-level credential to configure here."]})}):null]}):null}function rt({connector:s,organizationId:t,ownerSlug:a,connectionCount:n}){const o=X(),{isAdmin:d}=Re(t),x=js(),[c,l]=u.useState(null),p=s.installed!==!1;if(!d||!p)return null;const m=n>0,i=x.isPending,f=()=>{l(null),x.mutate({connector_key:s.key},{onSuccess:()=>{o({to:"/$owner/connectors",params:{owner:a}})},onError:N=>{l(N instanceof Error?N.message:"Failed to remove connector")}})};return e.jsxs(fs,{onOpenChange:()=>l(null),children:[e.jsx(vs,{asChild:!0,children:e.jsx(g,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive","aria-label":"Remove connector",title:"Remove connector",children:e.jsx(ce,{className:"h-3.5 w-3.5"})})}),e.jsxs(bs,{align:"start",className:"space-y-3",children:[e.jsxs("p",{className:"text-sm font-medium",children:["Remove ",s.name,"?"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Archives it in this workspace. Existing synced data stays in memory."}),m?e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Delete"," ",e.jsxs("span",{className:"font-medium text-foreground",children:[n," connection",n===1?"":"s"]})," ","first — uninstall is blocked while any connection still references this connector."]}):null,c?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:c}):null,e.jsxs(g,{variant:"destructive",size:"sm",disabled:i||m,onClick:f,children:[i?e.jsx(T,{size:"md",className:"mr-1.5"}):null,"Remove connector"]})]})]})}function ot({connector:s,organizationId:t,ownerSlug:a}){const n=Oe();return e.jsx(Ie,{title:"Actions",summary:`${s.operations_summary?.total??0} actions · organization policies`,onOpen:()=>n?.open({href:"",title:"Actions",connectorPanel:{section:"actions",connectorKey:s.key,organizationId:t,ownerSlug:a}})})}function Ae({profiles:s,type:t}){const a=t==="env"?"Credentials":"Browser sessions";return e.jsx(R,{title:a,children:e.jsx("div",{className:"space-y-2",children:s.map(n=>e.jsxs("div",{className:_s(Be,"p-3"),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:n.display_name}),e.jsx(Bs,{status:n.status})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.slug})]},n.slug))})})}function lt({connector:s,organizationId:t,ownerSlug:a}){const n=Oe(),o=Object.keys(s.feeds_schema??{}).length;return o?e.jsx(Ie,{title:"Feeds",summary:`${o} ${o===1?"feed type":"feed types"}`,onOpen:()=>n?.open({href:"",title:"Feeds",connectorPanel:{section:"feeds",connectorKey:s.key,organizationId:t,ownerSlug:a}})}):null}export{nt as ConnectorDetailShell,rt as ConnectorRemoveButton,Nt as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey.index-Cv6FzK1v.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{V as v,c as d,j as r,at as h,aS as f,cg as x,ch as w,ci as j,cj as P,bp as g,ck as E}from"./index-DByaMzsG.js";import{E as $}from"./event-detail-CkzfakTK.js";import"./events-feed-DmRzikZW.js";import"./definition-comparison-4UYMI6BK.js";import"./json-diff-mcDgyct_.js";import"./code-editor-mrKkAfcE.js";import"./index-Vcq4gwWv.js";import"./schema-value-zTJGE4eh.js";import"./run-initiator-DhE5v4z0.js";import"./list-skeleton-DsYGUHxi.js";import"./subDays-D8nHthaS.js";import"./use-automations-CgWNoYio.js";import"./clients-xnzZeEdZ.js";import"./renderer-olRv_HMI.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./copy-button-C3wMMv63.js";import"./device-automation-Dp3faMvp.js";import"./view-param-filters-CUCj9Df-.js";import"./app-bridge-C4nPtae3.js";import"./filter-editors-CQoSj-20.js";function b({owner:e,eventId:t,viewKey:s}){const o=v({strict:!1}),p=d(),m=(i,a)=>r.jsx($,{owner:a,organizationId:i,eventId:t,viewKey:s,params:s?j(o):{},onParamsChange:(n,c,l)=>void p({to:w(a,t,n),search:u=>x(u,c),replace:l?.replace??!0}),fullBleed:!0},`${a}/${t}`);return r.jsx(h,{className:"gap-6 pt-2.5 pb-8",children:e==="me"?m(null,e):r.jsx(f,{owner:e,children:({organizationId:i,ownerSlug:a})=>i?m(i,a):r.jsx("div",{className:"mx-auto h-40 w-full max-w-3xl animate-pulse rounded-md bg-muted/40"})})})}function L(){const{owner:e,eventId:t}=P.useParams(),s=g({from:"/$owner/events/$eventId/-/views/$viewKey",shouldThrow:!1}),o=E(t);return o===null?null:r.jsx(b,{owner:e,eventId:o,viewKey:s?.viewKey})}export{L as component};
|
|
2
|
-
//# sourceMappingURL=_eventId-DZKicuq6.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peek-pane-content-c2PG3TEX.js","assets/index-DByaMzsG.js","assets/index-DgMM4Zt5.css","assets/automation-run-now-MtxUTfzd.js","assets/event-detail-CkzfakTK.js","assets/events-feed-DmRzikZW.js","assets/definition-comparison-4UYMI6BK.js","assets/json-diff-mcDgyct_.js","assets/code-editor-mrKkAfcE.js","assets/index-Vcq4gwWv.js","assets/schema-value-zTJGE4eh.js","assets/run-initiator-DhE5v4z0.js","assets/list-skeleton-DsYGUHxi.js","assets/subDays-D8nHthaS.js","assets/use-automations-CgWNoYio.js","assets/clients-xnzZeEdZ.js","assets/renderer-olRv_HMI.js","assets/card-DtLIFq7D.js","assets/table-C637cQxG.js","assets/copy-button-C3wMMv63.js","assets/device-automation-Dp3faMvp.js","assets/view-param-filters-CUCj9Df-.js","assets/app-bridge-C4nPtae3.js","assets/filter-editors-CQoSj-20.js","assets/needs-you-list-B5Bgd05M.js","assets/scoped-feed-bar-BKyJSa3_.js","assets/event-kind-options-fHAIXu24.js","assets/create-automation-form-CLicoPH5.js","assets/entity-options-B9hm9V87.js","assets/model-selector-D3vSMLO2.js","assets/skill-editor-D_W3QlRz.js","assets/use-mention-search-D-kIKchD.js","assets/proposal-review-shell-B-jYcKfB.js","assets/runs-C8sZQr4o.js","assets/runs-list-CwtH-wmk.js","assets/agent-loading-shells-DYqQphN7.js","assets/agent-thread-BopD-2k1.js","assets/pending-seed-CBhx2Ql-.js","assets/connection-feed-detail-0VAJiZTP.js","assets/status-variants-DyRCXBzM.js","assets/feed-event-kinds-BYuZCoU4.js","assets/connect-menu-C6iVtuSo.js","assets/source-record-panels-CGmKIJdN.js","assets/entity-type-page-CkQm0yEu.js","assets/views-access-required-C35Dyt91.js","assets/dynamic-schema-form-BDT8x0Vg.js","assets/record-session-CAmGHMyM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{p as m,j as t,r as p,C as R,L as v,u as N,a as P,b as A,c as E,d as D,D as _,e as $,f as z,g as K,h as L,i as j,B as h,k as T,S as O,A as q,X as W,l as B,_ as U,m as g,n as C,o as F,q as H,s as Q,t as G,v as J,w as M,x as V,y as Y,z as X,E as Z,F as w,G as S,R as ee,H as te,I as ne,J as ae,K as se,N as re,O as b}from"./index-DByaMzsG.js";import{R as ie}from"./record-session-CAmGHMyM.js";import{u as oe}from"./use-automations-CgWNoYio.js";import{u as le}from"./clients-xnzZeEdZ.js";function I({item:e}){const n=e.href?m(e.href):null;if(!n||n.kind==="event"||n.kind==="automation"&&!("runId"in n&&n.runId!=null))return null;const a=n.owner,o=n.kind==="automation"?n.automationId:e.sourceAttribution?.automation_id??null,s=e.sourceAttribution,r=[{label:a,to:"/$owner",params:{owner:a}}];return s?.agent_id&&s.agent_name&&r.push({label:s.agent_name,to:"/$owner/agents/$agentId",params:{owner:a,agentId:s.agent_id}}),o!=null&&r.push({label:s?.automation_name??"Automation",to:"/$owner/automations/$automationId",params:{owner:a,automationId:String(o)}}),(n.kind==="memory"||n.kind==="automation")&&"runId"in n&&n.runId!=null?r.push({label:"Run details"}):n.kind==="memory"&&"contentIds"in n&&r.push({label:"Details"}),r.length<2?null:t.jsx("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 shrink-0 items-center gap-1 overflow-x-auto border-b border-border px-3 py-1.5 text-xs text-muted-foreground",children:r.map((i,l)=>{const c=l===r.length-1,f=t.jsx("span",{className:c?"truncate font-medium text-foreground":"whitespace-nowrap",children:i.label});return t.jsxs(p.Fragment,{children:[l>0?t.jsx(R,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}):null,i.to&&!c?t.jsx(v,{to:i.to,params:i.params,className:"whitespace-nowrap transition-colors hover:text-foreground",children:i.label}):f]},i.to??i.label)})})}const ce=B(async()=>({default:(await U(async()=>{const{PeekPaneContent:e}=await import("./peek-pane-content-c2PG3TEX.js");return{PeekPaneContent:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]))).PeekPaneContent}));function ue(){return t.jsxs("div",{"data-testid":"peek-pane-body-loading",className:"space-y-3 p-4",children:[t.jsx(g,{className:"h-5 w-2/3"}),t.jsx(g,{className:"h-4 w-full"}),t.jsx(g,{className:"h-24 w-full rounded-lg"})]})}const de=460,fe=480;function he({children:e}){const n=p.useRef(null),a=N(),o=P(),s=A(n,de+fe),r=!o&&s&&a?.item!=null;return t.jsxs("div",{ref:n,className:"relative flex min-h-0 flex-1 flex-row",children:[t.jsx("div",{inert:r,className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:e}),t.jsx(me,{covers:r})]})}function me({covers:e=!1}){const n=N(),a=P();return n?.item?t.jsx(ve,{item:n.item,onClose:n.close,onBack:n.back,isNarrow:a,covers:e}):null}function y({item:e,children:n}){const a=e.href?m(e.href):null;return a?.kind==="automation"&&a.runId==null&&!e.runId?t.jsx(ge,{owner:a.owner,automationId:a.automationId,fallback:e.title,children:n}):a?.kind==="agent"?t.jsx(we,{agentId:a.agentId,clientIds:a.clientIds,fallback:e.title,children:n}):a?.kind==="event"?t.jsx(xe,{owner:a.owner,eventId:a.eventId,fallback:e.title,children:n}):t.jsx(pe,{item:e,children:n})}function xe({owner:e,eventId:n,fallback:a,children:o}){const{org:s}=C(e),{data:r}=G(s?.id??null,void 0,{contentIds:[n]},e),i=r?.pages[0]?.content.find(l=>Number(l.id)===n);return o({title:i?J(i):a,status:null})}function pe({item:e,children:n}){const a=e.href?m(e.href):null,o=a?.kind==="record-view"?a.viewKey:null,s=a?.kind==="entity-type"?a:null,r=s?.typeSlug??null,i=M({slug:o?a?.owner:void 0}),{data:l}=V(r?a?.owner??null:null),c=r?l?.find(f=>f.slug===r)?.name:void 0;return n({title:o&&i.data?.find(f=>f.key===o)?.name||c&&(s?.view==="activity"?`${c} activity`:c)||e.title,status:null})}function ge({owner:e,automationId:n,fallback:a,children:o}){const{org:s}=C(e),{data:r}=oe(s?.id,void 0,{includeDetails:!1}),i=r?.find(l=>l.automation_id===n);return o({title:i?.name?.trim()||a,status:i?F(H(i),Date.now()):null})}function we({agentId:e,clientIds:n,fallback:a,children:o}){const s=Q({enabled:!!e}),r=le(null,{enabled:!e&&!!n?.length}),i=e?s.data?.find(l=>l.agentId===e)?.name:r.data?.find(l=>n?.includes(l.id))?.title;return o({title:i?.trim()||a,status:null})}function ye(e){const n=e.connectorPanel;if(n?.connectionId!=null)return{label:"Settings",pathname:`/${n.ownerSlug}/connectors/${encodeURIComponent(n.connectorKey)}/${n.connectionId}`,search:{settings:!0}};const a=e.href?m(e.href):null;if(a?.kind==="automation"&&a.runId==null&&!e.runId)return{label:"Edit",pathname:`/${a.owner}/automations/${encodeURIComponent(a.automationId)}`,search:{view:"definition"}};if(a?.kind==="agent"&&a.owner!=="me"){if(a.agentId)return{label:"Agent settings",pathname:`/${a.owner}/agents/${encodeURIComponent(a.agentId)}`};const o=a.clientIds?.[0];if(o)return{label:"Agent settings",pathname:`/${a.owner}/agents/connected/${encodeURIComponent(o)}`}}return null}function ve({item:e,onClose:n,onBack:a,isNarrow:o,covers:s}){const r=E(),i=e.href?m(e.href):null,l=e.runId&&i?.kind==="automation"&&i.view==="activity"?{pathname:`/${i.owner}/events`,search:{run_ids:String(e.runId)}}:e.href?D(e.href):null,c=ye(e);p.useEffect(()=>{if(o)return;const d=u=>{u.defaultPrevented||u.key!=="Escape"||(u.preventDefault(),n())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[n,o]);const f=d=>t.jsxs("div",{className:"flex min-h-11 shrink-0 items-center gap-1 border-b border-border px-3 py-1.5",children:[a||d?t.jsx(h,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Back",onClick:a??n,children:t.jsx(T,{className:"h-4 w-4"})}):null,t.jsx(y,{item:e,children:({title:u,status:x})=>t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:u}),x?t.jsx("p",{title:x.text,className:j("truncate text-xs",x.problem?"text-destructive":"text-muted-foreground"),children:x.text}):null]})}),c?t.jsx(h,{asChild:!0,variant:"ghost",size:"sm",className:"h-7 shrink-0 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground",children:t.jsxs(v,{to:c.pathname,search:c.search??{},onClick:u=>{u.button!==0||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||(u.preventDefault(),(async()=>(await n(),await r({to:c.pathname,search:c.search??{}})))())},children:[t.jsx(O,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),c.label]})}):null,l?t.jsx(h,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Open full page",asChild:!0,children:t.jsx(v,{to:l.pathname,search:l.search??{},onClick:u=>{u.button!==0||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||(u.preventDefault(),(async()=>(await n(),await r({to:l.pathname,search:l.search??{}})))())},children:t.jsx(q,{className:"h-4 w-4"})})}):null,t.jsx(h,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Close preview",onClick:n,children:t.jsx(W,{className:"h-4 w-4"})})]}),k=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t.jsx(p.Suspense,{fallback:t.jsx(ue,{}),children:t.jsx(y,{item:e,children:({title:d})=>t.jsx(ce,{item:d===e.title?e:{...e,title:d}})})})});return o?t.jsx(_,{open:!0,onOpenChange:d=>{d||n()},children:t.jsxs($,{children:[t.jsx(z,{className:"fixed inset-0 z-40 bg-black/60 data-[state=open]:animate-in data-[state=open]:fade-in-0"}),t.jsxs(K,{"aria-describedby":void 0,className:"fixed inset-y-0 right-0 z-50 flex w-full max-w-[460px] flex-col border-l border-border bg-background outline-none data-[state=open]:animate-in data-[state=open]:slide-in-from-right",children:[t.jsx(L,{className:"sr-only",children:t.jsx(y,{item:e,children:({title:d})=>d})}),f(!0),t.jsx(I,{item:e}),k]})]})}):t.jsxs("aside",{className:j("flex flex-col border-l border-border bg-background",s?"absolute inset-0 z-30 w-full":"w-[460px] max-w-[45vw] shrink-0"),children:[f(!1),t.jsx(I,{item:e}),k]})}function ke({owner:e,userId:n,children:a}){const o=Y(),s=X({queryKey:["workspace-invitation",n,e],retry:!1,queryFn:async()=>{const i=await w.organization.listUserInvitations();if(i.error)throw new Error(i.error.message||"Could not check invitations.");for(const l of i.data??[]){if(l.status!=="pending"||new Date(l.expiresAt).getTime()<=Date.now())continue;const c=await w.organization.getInvitation({query:{id:l.id}});if(c.error){if([400,403,404].includes(c.error.status))continue;throw new Error(c.error.message||"Could not check invitations.")}if(c.data.organizationSlug===e)return c.data}return null}}),r=Z({mutationFn:async()=>{if(!s.data)return;const i=await w.organization.acceptInvitation({invitationId:s.data.id});if(i.error)throw new Error(i.error.message||"Could not accept the invitation.");await Promise.all([o.invalidateQueries({queryKey:["organizations"]}),o.invalidateQueries({queryKey:S.queryOptions(e,{slug:e}).queryKey})])}});return s.isPending?t.jsx("p",{role:"status",className:"py-12 text-center text-sm text-muted-foreground",children:"Checking your invitation…"}):s.isError?t.jsxs("div",{className:"flex flex-col items-center gap-3 px-4 py-12 text-center",children:[t.jsx("p",{role:"alert",className:"text-sm text-muted-foreground",children:"Your invitations could not be checked."}),t.jsx(h,{variant:"outline",onClick:()=>void s.refetch(),children:"Try again"})]}):s.data?t.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 px-4 py-12 text-center",children:[t.jsxs("div",{className:"max-w-md space-y-2",children:[t.jsxs("h1",{className:"text-xl font-semibold text-balance",children:["You're invited to join ",s.data.organizationName]}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept your invitation to open this workspace."})]}),r.isError&&t.jsx("p",{role:"alert",className:"max-w-md text-sm text-destructive",children:r.error.message}),t.jsx(h,{disabled:r.isPending,onClick:()=>r.mutate(),children:r.isPending?"Joining…":"Accept invitation"})]}):a}function Pe(){const{owner:e}=ee.useParams(),{data:n,isLoading:a,error:o}=S(e==="me"?null:e,{slug:e}),{session:s,isReady:r}=te();if(ne({active:ae({settled:!a,authReady:r,session:s,resolved:!!n?.workspace,error:o}),owner:e}))return null;const l=e!=="me"&&s&&r&&!a&&!n?.workspace&&o instanceof se&&[401,403,404].includes(o.status);return t.jsx(re,{children:t.jsx(ie,{children:t.jsx(he,{children:l&&s?t.jsx(ke,{owner:e,userId:s.user.id,children:t.jsx(b,{})},`${s.user.id}:${e}`):t.jsx(b,{})})})})}export{Pe as component};
|
|
3
|
-
//# sourceMappingURL=_owner-Dauk3YuD.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jE as p,j as e,bo as m}from"./index-DByaMzsG.js";import{M as i}from"./memory-browse-page-DvDtwrEI.js";import"./public-shell-ready-D8TijlRY.js";import"./dynamic-schema-form-BDT8x0Vg.js";import"./renderer-olRv_HMI.js";import"./schema-value-zTJGE4eh.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./entity-pages-BWBpttz3.js";import"./filter-editors-CQoSj-20.js";import"./subDays-D8nHthaS.js";import"./entity-schema-graph-lMMx3HhR.js";import"./core.esm-C9QlSrgK.js";import"./view-param-filters-CUCj9Df-.js";import"./app-bridge-C4nPtae3.js";import"./member-scope-gate-vvkgSAb2.js";function h(){const{owner:o,entityType:t,shape:r}=p.useParams();return e.jsx(i,{ownerSlug:o,typeScope:m(t),create:!1,shape:r})}export{h as component};
|
|
2
|
-
//# sourceMappingURL=_shape-cKrEID3T.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jF as t,j as m}from"./index-DByaMzsG.js";import{M as i}from"./memory-browse-page-DvDtwrEI.js";import"./public-shell-ready-D8TijlRY.js";import"./dynamic-schema-form-BDT8x0Vg.js";import"./renderer-olRv_HMI.js";import"./schema-value-zTJGE4eh.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./entity-pages-BWBpttz3.js";import"./filter-editors-CQoSj-20.js";import"./subDays-D8nHthaS.js";import"./entity-schema-graph-lMMx3HhR.js";import"./core.esm-C9QlSrgK.js";import"./view-param-filters-CUCj9Df-.js";import"./app-bridge-C4nPtae3.js";import"./member-scope-gate-vvkgSAb2.js";function R(){const{owner:o,viewKey:r}=t.useParams();return m.jsx(i,{ownerSlug:o,create:!1,viewKey:r})}export{R as component};
|
|
2
|
-
//# sourceMappingURL=_viewKey-CPVzVKEf.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jO as e,j as p,bo as i}from"./index-DByaMzsG.js";import{M as m}from"./memory-browse-page-DvDtwrEI.js";import"./public-shell-ready-D8TijlRY.js";import"./dynamic-schema-form-BDT8x0Vg.js";import"./renderer-olRv_HMI.js";import"./schema-value-zTJGE4eh.js";import"./card-DtLIFq7D.js";import"./table-C637cQxG.js";import"./entity-pages-BWBpttz3.js";import"./filter-editors-CQoSj-20.js";import"./subDays-D8nHthaS.js";import"./entity-schema-graph-lMMx3HhR.js";import"./core.esm-C9QlSrgK.js";import"./view-param-filters-CUCj9Df-.js";import"./app-bridge-C4nPtae3.js";import"./member-scope-gate-vvkgSAb2.js";function M(){const{owner:o,entityType:t,viewKey:r}=e.useParams();return p.jsx(m,{ownerSlug:o,typeScope:i(t),create:!1,viewKey:r})}export{M as component};
|
|
2
|
-
//# sourceMappingURL=_viewKey-CW8gexOQ.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{M as te,n as Ke,bo as Ne,cm as ze,V as gt,r as h,cn as xt,co as we,cp as pt,aw as ft,cq as yt,j as e,bQ as bt,bc as Se,cr as Le,cs as Be,ct as jt,B as Q,L as W,cu as Ee,cv as vt,q as Nt,cw as wt,cx as kt,cy as Ct,cz as Ye,cA as St,cB as Lt,cC as Et,Z as ee,bq as xe,br as pe,bs as fe,bt as ye,bu as re,cD as Mt,$ as Ue,cE as Tt,bR as It,cF as _t,cG as Rt,cH as At,x as Me,cI as $t,c as Pt,u as Ve,cJ as Xe,cK as Qe,cL as qe,cM as Ze,cN as Ot,cO as Wt,cP as Je,aN as Ht,aP as Dt,b$ as Ft,ab as Gt,i as $,X as Kt,s as zt,cQ as Bt,cR as Yt,cS as Ut,m as F,cT as Vt,cU as Xt,cV as Qt,a9 as qt,cW as _e,cX as ie,ad as Zt,cY as Jt,a1 as en,am as tn,cZ as nn,c_ as sn,c$ as an,d0 as on,d1 as rn,d2 as ln,d3 as cn,d4 as dn,d5 as un,d6 as mn,aC as hn,d7 as gn,d8 as xn,d9 as pn,da as fn,db as et,bf as yn,dc as bn,bk as jn,d as tt,dd as vn,de as Nn,df as wn,dg as kn,dh as Cn,di as Sn,dj as Ln,dk as En,dl as Mn,at as Tn,aS as In,au as _n}from"./index-DByaMzsG.js";import{R as Rn,E as An,M as $n}from"./record-activity-DnRVOrG2.js";import{M as Pn}from"./member-scope-gate-vvkgSAb2.js";import{N as On}from"./needs-you-list-B5Bgd05M.js";import{H as be,n as je,s as Wn,l as Hn,b as Dn,a as Fn,G as Gn,c as Kn}from"./entity-schema-graph-lMMx3HhR.js";import{u as nt}from"./use-automations-CgWNoYio.js";import{f as zn}from"./feed-event-kinds-BYuZCoU4.js";import{a as st}from"./list-skeleton-DsYGUHxi.js";import{u as Bn}from"./clients-xnzZeEdZ.js";import{u as Yn}from"./client-activity-scopes-BPbRX-Pe.js";import{g as Un}from"./client-rows-vrNA6FLs.js";import{P as Vn}from"./public-shell-ready-D8TijlRY.js";function Xn({organizationId:t,ownerSlug:n,typeScope:s,entityScope:o}){const{orgContext:i}=te(),{isMember:c,isLoading:a}=Ke(),l=c&&!!t,d=s?Ne(s):void 0,u=!o&&!d,x=ze(l?n:null),w=gt({strict:!1}),p=h.useMemo(()=>xt(we(x.attentionCards),w),[x.attentionCards,w]),{feeds:g,pageIds:L}=pt(t,h.useMemo(()=>p.map(({item:R})=>R),[p])),r=h.useMemo(()=>[...p].sort((R,C)=>Number(L.has(C.item.id))-Number(L.has(R.item.id))),[p,L]),b=h.useMemo(()=>({approvalRunIds:new Set(r.flatMap(({item:R})=>R.approvalRunId!=null?[R.approvalRunId]:[])),eventIds:new Set(r.flatMap(({item:R,unreadIds:C})=>[...R.notificationId!=null?[R.notificationId]:[],...C]))}),[r]),v=R=>{R.length>0&&x.markManyRead.mutateAsync(R)},{data:f,isLoading:N,error:j}=ft(o?`/${n}/${yt(o)}`:`/${n}`,i),S=o?f?.entity:void 0,P=(o?S?.entity_type??Ne(o.split("/").at(-2)??""):d)==="$member",H=o!=null&&!N&&(j!=null||f?.entity==null),M=o?void 0:f?.counts,D=M?M.connections>0||M.agents>0:!1,_=l&&!a&&!N&&M!=null&&!D,G=o&&N?e.jsx(bt,{label:"Loading record…"}):H?e.jsx(Se,{icon:Le,title:"Record not found",description:"It may have been deleted, or it may live in a workspace you can't access."}):S?e.jsx(Rn,{ownerSlug:n,entity:S,organizationId:t}):e.jsx(An,{organizationId:t,ownerSlug:n,hideSourceFilter:!0,scopedEntityTypes:d?[d]:void 0,pinned:u?{needsYou:x.isError?e.jsx("p",{role:"alert",className:"mb-4 text-sm text-destructive",children:"Could not load what needs you. Refresh to try again."}):e.jsx(On,{owner:n,entries:r,pageIds:L,onMarkRead:v,markPending:x.markManyRead.isPending}),rows:g.length>0?e.jsx(Be,{organizationId:t,feeds:g}):null,hidden:b}:void 0,toolbar:!0,emptyState:_?e.jsx(Qn,{ownerSlug:n}):void 0});return e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4",children:[o?null:e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Activity"}),P?e.jsx(Pn,{children:G}):G]})}function Qn({ownerSlug:t}){return e.jsx("div",{className:"px-6",children:e.jsx(Se,{icon:jt,title:"Nothing to catch up on — yet",description:"No notifications here. Add a connector to bring in data, or bring your agent to Lobu and give it something to work with.",children:e.jsxs("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:[e.jsx(Q,{asChild:!0,children:e.jsxs(W,{to:"/$owner/connectors/create",params:{owner:t},children:[e.jsx(Ee,{className:"mr-2 h-4 w-4"}),"Add a connector"]})}),e.jsx(Q,{asChild:!0,variant:"outline",children:e.jsxs(W,{to:"/$owner/agents/connect",params:{owner:t},children:[e.jsx(vt,{className:"mr-2 h-4 w-4"}),"Connect agent"]})})]})})})}const Re={trigger:"runs on arrival",delivery:"delivers here"};function qn(t){const n=new Map,s=(o,i,c,a)=>{const l=Number(o);if(!Number.isInteger(l)||l<=0)return;const d=n.get(l)??[],u=d.find(x=>x.automation.automation_id===i.automation_id);if(u){if(u.reason===c)for(const x of a)u.eventTypes.includes(x)||u.eventTypes.push(x);return}d.push({automation:i,reason:c,eventTypes:[...a]}),n.set(l,d)};for(const o of t){for(const i of o.triggers??[]){const c=Array.isArray(i.event_types)?i.event_types.map(String):[];s(i.connection_id,o,"trigger",c)}s(o.delivery_target?.connection_id,o,"delivery",[])}return n}function Zn(t){const n=new Map;for(const s of t){const o=n.get(s.connection_id)??[];o.push(s),n.set(s.connection_id,o)}return n}function Jn(t){const n=(s,o,i)=>`${s} ${s===1?o:i}`;return[n(t.feeds,"feed","feeds"),t.actions>0?n(t.actions,"action","actions"):null,t.automations>0?n(t.automations,"Automation","Automations"):null].filter(Boolean).join(" · ")}const ke="connector:",Ae=t=>`${ke}${t}`,es={event:"Zap",schedule:"CalendarClock",manual:"Hand"},ts=0,ns=1,$e=2;function ss(t,n){const s=new Map;for(const{kind:o,targets:i}of zn(t?.feeds_schema?.[n]))for(const{entityType:c,creates:a}of i){const l=s.get(c)??{creates:!1,eventKinds:new Set};l.creates||=a,l.eventKinds.add(o),s.set(c,l)}return s}function as(t,n){const s=new Map(t.connectorDefs.map(r=>[r.key,r])),o=new Map(t.connectorDefs.map(r=>[r.key,r.name])),i=new Map(t.connections.map(r=>[r.id,r])),c=Zn(t.feeds),a=r=>`connection:${r}`,l=r=>`automation:${r}`,d=[],u=(r,b,v,f,N=!1)=>{d.push({id:`flow:${r}->${b}`,source:r,target:b,layoutReversed:N,data:{relationships:[],isSymmetric:!1,flow:{summary:v,details:f}}})},x=new Set(t.connections.map(r=>r.id));for(const r of t.connections){const b=new Map;for(const v of c.get(r.id)??[]){const f=ss(s.get(r.connector_key),v.feed_key);for(const[N,j]of f){const S=b.get(N)??{creates:!1,eventKinds:new Set};S.creates||=j.creates;for(const I of j.eventKinds)S.eventKinds.add(I);b.set(N,S)}}for(const[v,f]of b){const N=n.get(v);N&&u(a(r.id),N,f.creates?"creates records":"links records",[`From ${[...f.eventKinds].sort().join(", ")} events`])}}const w=qn(t.automations);for(const[r,b]of w)if(x.has(r))for(const{automation:v,reason:f,eventTypes:N}of b){const j=l(v.automation_id);f==="trigger"?u(a(r),j,Re.trigger,N.length>0?[`On ${[...N].sort().join(", ")}`]:[]):u(j,a(r),Re.delivery,[],!0)}const p=[];for(const r of t.automations){const b=l(r.automation_id),v=r.entity_type?n.get(r.entity_type):void 0;v&&u(v,b,"anchored here",[r.entity_name?`On ${r.entity_name}`:""].filter(Boolean));const f=Nt(r,o,i),N=wt(r),j=r.health==="degraded"?"Needs attention":void 0;p.push({id:b,lane:$e,width:je(`${f.does} ${j??""}`,f.when),height:be,data:{slug:b,label:f.does,icon:N?Ae(N):es[f.kind],isSystem:!1,badge:j,metaLabel:f.when,ref:{kind:"automation",automationId:r.automation_id}}})}const g=[];for(const r of t.metrics){const b=n.get(r.typeSlug);if(!b)continue;const v=`metric:${r.typeSlug}:${r.name}`;u(b,v,"measures",[r.description].filter(Boolean)),g.push({id:v,lane:$e,width:je(r.name,r.agg),height:be,data:{slug:v,label:r.name,icon:"ChartColumn",isSystem:!1,metaLabel:r.agg,ref:{kind:"metric",typeSlug:r.typeSlug,name:r.name}}})}return{nodes:[...t.connections.map(r=>{const b=kt(r),v=Ct(r,s.get(r.connector_key)),f=Jn({feeds:c.get(r.id)?.length||r.feed_count,actions:r.operations_summary?.total??0,automations:w.get(r.id)?.length??0}),N=v.needsAttention?"Needs attention":r.device_label??void 0;return{id:a(r.id),lane:ts,width:je(`${b} ${N??""}`,f),height:be,data:{slug:a(r.id),label:b,icon:Ae(r.connector_key),isSystem:!1,badge:N,metaLabel:f,ref:{kind:"connection",connectorKey:r.connector_key,connectionId:r.id}}}}),...p,...g],edges:d}}function at(t){switch(t.data.ref?.kind){case"connection":return"connections";case"automation":return"automations";case"metric":return"metrics";default:return"entities"}}function os(t,n){const s=new Map;for(const d of t.nodes)(!d.data.organizationSlug||!s.has(d.data.slug))&&s.set(d.data.slug,d.id);const o=as(n,s),{layers:i}=n,c=[...o.nodes,...t.nodes.map(d=>({...d,lane:ns}))].filter(d=>i[at(d)]),a=new Set(c.map(d=>d.id)),l=[...t.edges,...o.edges].filter(d=>a.has(d.source)&&a.has(d.target));return{nodes:c,edges:l}}const Pe="__new__";function Oe(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")}function rs({entityTypes:t,initialSource:n="",initialTarget:s="",onDone:o}){const i=h.useId(),c=`${i}-relationship`,a=`${i}-name`,l=`${i}-symmetric`,d=`${i}-source`,u=`${i}-target`,{orgContext:x}=te(),{data:w=[]}=Ye(x),p=St(),g=Lt(),[L,r]=h.useState(""),[b,v]=h.useState(""),[f,N]=h.useState(!1),[j,S]=h.useState(n),[I,P]=h.useState(s),[H,M]=h.useState(null),D=L===Pe,_=w.filter(C=>C.status==="active"&&C.purpose!==Et&&(!C.organization_slug||C.organization_slug===x?.slug)),G=p.isPending||g.isPending,R=async()=>{if(M(null),!L)return M("Pick a relationship");if(!j||!I)return M("Pick both ends");try{let C=L;if(D){const z=b.trim();if(!z)return M("Name the relationship");const O=Oe(z);if(!O)return M("Name must contain a letter or number");C=(await p.mutateAsync({slug:O,name:z,is_symmetric:f})).relationship_type.slug,r(C)}await g.mutateAsync({slug:C,source_entity_type_slug:j,target_entity_type_slug:I}),o()}catch(C){M(C instanceof Error?C.message:"Could not save")}};return e.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-muted/30 p-3",children:[e.jsx("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:"Relationships are defined once for the workspace, then paired with the types they connect."}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(ee,{htmlFor:c,className:"text-xs after:ml-1 after:text-destructive after:content-['*']",children:"Relationship"}),e.jsxs(xe,{value:L,onValueChange:r,children:[e.jsx(pe,{id:c,className:"h-8 text-xs",children:e.jsx(fe,{placeholder:"Pick or define one"})}),e.jsxs(ye,{children:[_.map(C=>e.jsx(re,{value:C.slug,children:C.name||C.slug},C.slug)),_.length>0?e.jsx(Mt,{}):null,e.jsx(re,{value:Pe,children:"Define a new one…"})]})]})]}),D?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(ee,{htmlFor:a,className:"text-xs after:ml-1 after:text-destructive after:content-['*']",children:"Name"}),e.jsx(Ue,{id:a,value:b,onChange:C=>v(C.target.value),placeholder:"works at",className:"h-8 text-xs"}),b.trim()?e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Slug: ",e.jsx("code",{children:Oe(b)||"—"})]}):null]}),e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs(ee,{htmlFor:l,className:"text-xs font-normal",children:["Symmetric",e.jsx("span",{className:"mt-0.5 block text-[11px] text-muted-foreground",children:"Both ends mean the same thing, like “connected with”."})]}),e.jsx(Tt,{id:l,checked:f,onCheckedChange:N})]})]}):null,e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(ee,{htmlFor:d,className:"text-xs after:ml-1 after:text-destructive after:content-['*']",children:"From"}),e.jsxs(xe,{value:j,onValueChange:S,children:[e.jsx(pe,{id:d,className:"h-8 text-xs",children:e.jsx(fe,{placeholder:"Type"})}),e.jsx(ye,{children:t.map(C=>e.jsx(re,{value:C.slug,children:C.label},C.slug))})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(ee,{htmlFor:u,className:"text-xs after:ml-1 after:text-destructive after:content-['*']",children:"To"}),e.jsxs(xe,{value:I,onValueChange:P,children:[e.jsx(pe,{id:u,className:"h-8 text-xs",children:e.jsx(fe,{placeholder:"Type"})}),e.jsx(ye,{children:t.map(C=>e.jsx(re,{value:C.slug,children:C.label},C.slug))})]})]}),H?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:H}):null,e.jsx(It,{onCancel:o,cancelDisabled:G,className:"[&>button]:h-7 [&>button]:px-3 [&>button]:text-xs",children:e.jsx(Q,{type:"button",size:"sm",onClick:R,disabled:G,children:G?"Saving…":"Add relationship"})})]})}const ot=288,le=240,ce=720,is=320,Te="lobu.schema-panel-width:v1";function de(t,n){if(!Number.isFinite(t))return ot;const s=Math.max(le,Math.min(ce,n-is));return Math.round(Math.min(s,Math.max(le,t)))}function ls(){const t=_t(Te);if(t===null)return null;const n=Number.parseInt(t,10);return!Number.isFinite(n)||n<le||n>ce?null:n}function cs(t){Rt(Te,String(Math.round(t)))}function ds(){At(Te)}const We={nodes:[],edges:[]};function us(t,n,s){const{orgContext:o}=te(),{data:i=[],isLoading:c,isError:a}=Me(o),{data:l=[],isLoading:d,isError:u}=Ye(o),x=h.useMemo(()=>Wn(l,t),[l,t]),{data:w,isLoading:p,isError:g}=$t(o),L=h.useMemo(()=>{const j=new Map(x.map(I=>[I.id,I.slug])),S={};for(const I of w??[]){const P=j.get(I.relationship_type_id);P&&(S[P]??=[]).push(I)}return S},[w,x]),r=h.useMemo(()=>({entityTypes:i,relationshipTypes:x,rulesBySlug:L,ownerSlug:t,targetAspect:n,flow:s}),[i,x,L,t,n,s]),[b,v]=h.useState(null),f=c||d||p,N=a||u||g;return h.useEffect(()=>{if(f||N)return;let j=!1;const S={targetAspect:r.targetAspect};let I;return r.flow?I=Hn(os(Dn(r),r.flow),S):I=Fn(r,S),I.then(P=>{j||v({graph:P,isError:!1})}).catch(()=>{j||v({graph:We,isError:!0})}),()=>{j=!0}},[r,f,N]),{graph:b?.graph??We,isLoading:!N&&!b,isError:N||b?.isError===!0}}function He(t){const n=t.ruleCount>1?` ×${t.ruleCount}`:"",s=typeof t.linkCount=="number"?` · ${t.linkCount.toLocaleString()}`:"";return`${t.label}${n}${s}`}const Ce={connections:"--chart-3",entities:"--chart-5",automations:"--chart-2",metrics:"--chart-4"};function ms(t,n){const s=t.nodes.some(a=>a.data.ref),o=new Map(t.nodes.map(a=>[a.id,a.data.label])),i=t.nodes.map(a=>({id:a.id,x:a.position.x+a.width/2,y:a.position.y+a.height/2,w:a.width,h:a.height,title:a.data.label,meta:a.data.metaLabel,icon:a.data.icon,badge:a.data.badge??a.data.organizationSlug,muted:a.data.isSystem,dimmed:n?!n.nodes.has(a.id):!1,accent:s?Ce[at(a)]:void 0})),c=t.edges.map(a=>{const{relationships:l,isSymmetric:d,flow:u}=a.data;if(u)return{id:a.id,source:a.source,target:a.target,route:a.route??null,summary:u.summary,details:[u.summary,...u.details],directed:!0,dimmed:n?!n.edges.has(a.id):!1,ariaLabel:`${o.get(a.source)??a.source} to ${o.get(a.target)??a.target}: ${u.summary}`};const x=l.map(w=>w.label).join(", ");return{id:a.id,source:a.source,target:a.target,route:a.route??null,summary:l.length===1?He(l[0]):`${l.length} relationships`,details:l.map(He),directed:!d,dimmed:n?!n.edges.has(a.id):!1,ariaLabel:`${o.get(a.source)??a.source} ${d?"and":"to"} ${o.get(a.target)??a.target}: ${x}`}});return{boxes:i,edges:c}}const De=[{key:"connections",label:"Connections"},{key:"entities",label:"Entities"},{key:"automations",label:"Automations"},{key:"metrics",label:"Metrics"}],hs={count:"Count",count_distinct:"Distinct count",sum:"Sum",min:"Minimum",max:"Maximum"};function gs({metric:t,ownerSlug:n}){const s=(o,i)=>i.length>0?e.jsxs("section",{className:"flex flex-col gap-1.5",children:[e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:o}),e.jsx("ul",{className:"flex flex-col gap-1 text-sm",children:i.map(c=>e.jsxs("li",{children:[e.jsx("span",{className:"font-medium",children:c.name}),c.description?e.jsx("span",{className:"text-muted-foreground",children:` · ${c.description}`}):null]},c.name))})]}):null;return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"flex flex-col gap-1",children:[e.jsxs("p",{className:"text-sm",children:[hs[t.agg]??t.agg," of"," ",e.jsx("code",{className:"rounded bg-muted px-1 text-xs",children:t.eventSet})," ","events, per ",t.typeLabel]}),t.description?e.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}):null]}),s("Data from",t.sources.map(o=>({name:o,description:""}))),s("Group by",t.dimensions),s("Segments",t.segments),e.jsx(Q,{asChild:!0,variant:"outline",size:"sm",className:"self-start",children:e.jsxs(W,{to:"/$owner/$entityType",params:{owner:n,entityType:t.typeSlug},children:["Open ",t.typeLabel]})})]})}function xs({ownerSlug:t,metric:n,endpointOptions:s,canAuthor:o,mode:i,onModeChange:c}){const a=()=>c({kind:"index"});return i.kind==="metric"?n?e.jsx(gs,{metric:n,ownerSlug:t}):null:o&&i.kind==="new-relationship"?e.jsx(rs,{entityTypes:s,initialSource:i.source,initialTarget:i.target,onDone:a},`${i.source??""}|${i.target??""}`):null}function ps(t){const{mode:n,canAuthor:s,onModeChange:o,isPeekOpen:i}=t,c=n.kind==="metric"?n.name:s&&n.kind==="new-relationship"?"New relationship":"Data map",a=h.useRef(null),l=JSON.stringify(n),d=h.useRef(l);return h.useEffect(()=>{d.current!==l&&(d.current=l,a.current?.focus({preventScroll:!0}))},[l]),e.jsx("aside",{style:{"--schema-panel-width":`${t.width}px`},className:$("order-first flex w-full shrink-0 flex-col lg:order-none lg:w-[var(--schema-panel-width)]",n.kind==="index"?"lg:absolute lg:top-0 lg:right-6 lg:z-10 lg:w-max lg:max-w-[calc(100%-3rem)] lg:max-h-[calc(100%-2rem)]":"bg-background lg:relative",i&&"lg:hidden"),children:e.jsxs("div",{className:$("flex min-h-0 flex-1 flex-col",n.kind!=="index"&&"lg:absolute lg:inset-0"),children:[e.jsxs("div",{className:n.kind==="index"?"sr-only":"flex h-11 shrink-0 items-center gap-1 border-b border-border px-3",children:[e.jsx("h2",{ref:a,tabIndex:-1,className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground outline-none",children:c}),n.kind!=="index"?e.jsx(Q,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Close",onClick:()=>o({kind:"index"}),children:e.jsx(Kt,{className:"h-4 w-4"})}):null]}),e.jsx("div",{className:$("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",n.kind==="index"?"pb-1":"p-4"),children:e.jsx(xs,{...t})})]})})}function rt(t){const n=t.previousElementSibling,s=t.nextElementSibling;if(n instanceof HTMLElement&&s instanceof HTMLElement){const o=n.clientWidth+s.clientWidth;if(o>0)return o}return 0}function fs({width:t,maxWidth:n,onResize:s,onCommit:o,onReset:i,className:c}){const[a,l]=h.useState(!1),d=h.useRef(0),u=p=>{const g=rt(p);return g>0?g:p.parentElement?.clientWidth??0},x=p=>{if(p.button!==0)return;const g=p.currentTarget;if(!g.parentElement)return;p.preventDefault(),d.current=u(g);const r=p.clientX,b=t;l(!0),g.setPointerCapture(p.pointerId);const v=S=>de(b-(S-r),d.current);let f=b;const N=S=>{f=v(S.clientX),s(f)},j=S=>{g.removeEventListener("pointermove",N),g.removeEventListener("pointerup",j),g.removeEventListener("pointercancel",j),l(!1),o(S.type==="pointercancel"?f:v(S.clientX))};g.addEventListener("pointermove",N),g.addEventListener("pointerup",j),g.addEventListener("pointercancel",j)},w=p=>{const g=u(p.currentTarget),L=r=>{p.preventDefault(),o(de(t+r,g))};p.key==="ArrowLeft"?L(16):p.key==="ArrowRight"?L(-16):p.key==="Home"&&(p.preventDefault(),i())};return e.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize map panel","aria-valuenow":t,"aria-valuemin":le,"aria-valuemax":n,tabIndex:0,onPointerDown:x,onKeyDown:w,onDoubleClick:i,className:$("group hidden shrink-0 cursor-col-resize touch-none items-stretch justify-center px-1.5 outline-none lg:flex",a&&"cursor-col-resize",c),children:e.jsx("div",{className:$("w-px rounded-full bg-border transition-[background-color,width] group-hover:w-0.5 group-hover:bg-primary/60 group-focus-visible:w-0.5 group-focus-visible:bg-primary",a&&"w-0.5 bg-primary")})})}function ys({ownerSlug:t,renderToolbar:n}){const s=Pt(),o=Ve(),i=o?.item!=null,{orgContext:c}=te(),{isAdmin:a}=Xe(c.organizationId),[l,d]=h.useState({connections:!0,entities:!0,automations:!0,metrics:!0}),[u,x]=h.useState({kind:"index"}),w=o?.close,p=h.useCallback(m=>{m.kind!=="index"&&i&&w?.(),x(m)},[i,w]),[g,L]=h.useState(),r=h.useRef(null),b=h.useCallback(m=>{if(r.current?.disconnect(),r.current=null,!m||typeof ResizeObserver>"u")return;const y=()=>{if(!m.clientWidth||!m.clientHeight)return;const A=Math.round(m.clientHeight/m.clientWidth*10)/10;L(E=>E===A?E:A)};y();const T=new ResizeObserver(y);T.observe(m),r.current=T},[]),v=c.organizationId,f=Qe(v),N=qe(v),j=Ze(v),S=nt(v??void 0),{data:I}=Me(c),P=h.useMemo(()=>I?.filter(m=>Ot(m,t)),[I,t]),H=h.useMemo(()=>(P??[]).flatMap(m=>Object.entries(m.metrics_config?.measures??{}).map(([y,T])=>({typeSlug:m.slug,name:y,agg:T.agg,description:T.description}))),[P]),M=f.isLoading||N.isLoading||j.isLoading||S.isLoading,D=h.useMemo(()=>M?null:{connections:f.data??[],feeds:N.data??[],connectorDefs:j.data??[],automations:S.data??[],metrics:H,layers:l},[M,f.data,N.data,j.data,S.data,H,l]),{graph:_,isLoading:G,isError:R}=us(t,g,D),C=G||M,z={connections:!M&&(f.data??[]).length===0,entities:!1,automations:!M&&(S.data??[]).length===0,metrics:!M&&H.length===0},O=u.kind==="metric"?u:null,B=h.useMemo(()=>{if(!O)return null;const m=`metric:${O.typeSlug}:${O.name}`,y=_.edges.find(E=>E.target===m);if(!y)return null;const T=y.source,A=_.edges.filter(E=>E.target===T&&_.nodes.find(Y=>Y.id===E.source)?.data.ref?.kind==="connection");return{typeId:T,nodes:new Set([m,T,...A.map(E=>E.source)]),edges:new Set([y.id,...A.map(E=>E.id)]),sources:A.map(E=>_.nodes.find(Y=>Y.id===E.source)?.data.label??E.source)}},[O,_]),{boxes:ne,edges:ue}=h.useMemo(()=>ms(_,B),[_,B]),me=h.useMemo(()=>{if(!O)return null;const m=P?.find(A=>A.slug===O.typeSlug),y=m?.metrics_config,T=y?.measures?.[O.name];return!m||!T?null:{name:O.name,typeSlug:m.slug,typeLabel:m.name||m.slug,agg:T.agg,eventSet:T.eventSet,description:T.description,dimensions:Object.entries(y?.dimensions??{}).map(([A,E])=>({name:A,description:E.description})),segments:Object.entries(y?.segments??{}).map(([A,E])=>({name:A,description:E.description})),sources:B?.sources??[]}},[O,P,B]),U=h.useMemo(()=>new Map(_.nodes.map(m=>[m.id,m.data.slug])),[_.nodes]),V=h.useMemo(()=>new Map(_.nodes.flatMap(m=>m.data.ref?[[m.id,m.data.ref]]:[])),[_.nodes]),X=h.useMemo(()=>{const m=new Map;for(const y of _.nodes)y.data.ref||(!y.data.organizationSlug||!m.has(y.data.slug))&&m.set(y.data.slug,{slug:y.data.slug,label:y.data.label});return[...m.values()]},[_.nodes]),J=h.useCallback(m=>{const y=V.get(m);if(y?.kind==="connection"){s({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:t,connectorKey:y.connectorKey,connectionId:String(y.connectionId)},search:{}});return}if(y?.kind==="metric"){p({kind:"metric",typeSlug:y.typeSlug,name:y.name});return}if(y?.kind==="automation"){s({to:"/$owner/automations/$automationId",params:{owner:t,automationId:y.automationId},search:{view:"activity",run_id:void 0}});return}s(Wt(t,U.get(m)??m))},[s,t,U,V,p]),se=h.useCallback((m,y)=>{V.has(m)||V.has(y)||p({kind:"new-relationship",source:U.get(m)??m,target:U.get(y)??y})},[U,V,p]),he=h.useCallback(m=>{const y=m.startsWith(ke)?m.slice(ke.length):null;if(!y)return e.jsx(Je,{icon:m||null,className:"h-4 w-4"});const T=Ht(y,j.data??[],{name:f.data?.find(A=>A.connector_key===y)?.connector_name??y});return e.jsx(Dt,{plain:!0,icon:T.icon,iconUrl:T.iconUrl,name:T.name,faviconDomain:T.faviconDomain})},[j.data,f.data]),ae=u.kind==="metric"||a&&u.kind!=="index",[oe,q]=h.useState(()=>ls()),k=oe??ot,[K,lt]=h.useState(null),ge=h.useRef(null),ct=h.useCallback(m=>{if(ge.current?.disconnect(),ge.current=null,!m||typeof ResizeObserver>"u")return;const y=m.children[1];if(!y)return;const T=()=>{const E=rt(y);E>0&<(Y=>Y===E?Y:E)};T();const A=new ResizeObserver(T);A.observe(m),ge.current=A},[]),Ie=K===null?k:de(k,K),dt=K===null?ce:de(ce,K),ut=h.useCallback(m=>{q(m),cs(m)},[]),mt=h.useCallback(()=>{q(null),ds()},[]);if(C)return e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-3",children:[n(null),e.jsx(Gn,{label:"Loading data map",fill:!0})]});if(R)return e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n(null),e.jsx(Ft,{label:"data map"})]});const ht=e.jsxs("fieldset",{className:$("m-0 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1 border-0 p-0 text-sm",ae&&"hidden lg:flex"),children:[e.jsx("legend",{className:"sr-only",children:"Show on the map"}),De.map(({key:m,label:y})=>{const T=`memory-map-show-${m}`,A=l[m]&&!z[m]&&De.filter(({key:E})=>l[E]&&!z[E]).length===1;return e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(Gt,{id:T,checked:l[m],disabled:A,style:{borderColor:`var(${Ce[m]})`,backgroundColor:l[m]?`var(${Ce[m]})`:void 0},onCheckedChange:E=>d(Y=>({...Y,[m]:E===!0}))}),e.jsx("label",{htmlFor:T,className:"inline-flex cursor-pointer select-none items-center",children:y})]},m)})]});return e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-3",children:[n(ht),e.jsxs("div",{ref:ct,className:"relative flex min-h-0 min-w-0 flex-1 flex-col gap-3 lg:-mr-6 lg:-mb-8 lg:flex-row lg:gap-0",children:[e.jsx("div",{className:$("flex min-w-0 flex-1 flex-col lg:pb-8",ae&&"hidden lg:flex"),children:e.jsx("div",{ref:b,className:"min-h-[420px] min-w-0 flex-1 overflow-hidden rounded-lg bg-background",children:e.jsx(Kn,{boxes:ne,edges:ue,label:"Data map",onOpenBox:J,openLabel:m=>`Open ${m.title}`,onConnect:a?se:void 0,renderIcon:he})})}),e.jsx(fs,{width:Ie,maxWidth:dt,onResize:q,onCommit:ut,onReset:mt,className:i||u.kind==="index"?"lg:hidden":void 0}),e.jsx(ps,{width:Ie,metric:me,ownerSlug:t,endpointOptions:X,canAuthor:a,mode:u,onModeChange:p,isPeekOpen:i})]})]})}const Fe=12,bs=5e3;function js(t,n){const s=!!t&&!!n.organizationId&&(n.enabled??!0),o=zt({enabled:s}),{data:i}=o,c=i??[],a=h.useMemo(()=>c.map(g=>g.agentId),[c]),{threads:l,isLoading:d,isError:u}=Bt(t,a,{enabled:s&&a.length>0,limit:Fe}),x=Yn({enabled:s,limit:Fe,excludeCommandClients:!1,organizationId:n.organizationId,refetchInterval:g=>g?bs:!1}),w=n.organizationId?x.data:void 0;return{items:h.useMemo(()=>[...l.map(g=>({kind:"conversation",at:g.updatedAt,thread:g})),...(w??[]).map(g=>({kind:"mcp",at:g.lastCallAt,conversation:g}))].sort((g,L)=>L.at-g.at),[w,l]),agents:c,isLoading:s&&(o.isLoading||d||x.isLoading),isError:o.isError||u||x.isError}}const Z=(t,n)=>t?{...t,label:n}:void 0;function vs(t,n){const s=Yt(t,n,[],!1),o=new Map(s.map(d=>[d.key,d])),i=[Z(o.get("agent"),"Connect Claude Code, Codex, or Cursor"),Z(o.get("connection"),"Connect GitHub, your browser, or shell")].filter(d=>d!=null),c=[Z(o.get("connection"),"Connect Gmail or Calendar"),Z(o.get("agent"),"Connect Claude, ChatGPT, or Codex")].filter(d=>d!=null),a=[Z(o.get("connection"),"Connect Gmail, Calendar, or LinkedIn"),Z(o.get("agent"),"Connect Claude, ChatGPT, or Codex")].filter(d=>d!=null),l=(d,u,x,w,p,g)=>({id:d,eyebrow:u,title:x,description:w,icon:p,steps:g,next:g.find(L=>!L.complete)});return[l("coding-memory","For developers","Give your coding agent context","Connect Claude Code, Codex, or Cursor, give it GitHub, your browser, or shell, then let it ask what you decided instead of starting from zero.","code",i),l("inbox-crm","For customer teams","Turn your inbox into a CRM","Connect Gmail and Calendar. Lobu keeps people, companies, and every thread in one live model; your agent turns it into a working CRM.","crm",c),l("personal-network","For you","Remember everyone you meet","Connect Gmail, Calendar, or LinkedIn. Lobu builds a private people graph, and your agent reminds you when it's time to reconnect.","network",a)]}const Ns={code:Qt,crm:Xt,network:Vt};function ws({owner:t,onSkip:n}){const s=Ut(t,{requireEntityTypes:!1});if(!s.ready||!s.counts)return e.jsx(Cs,{});const o=vs(t,s.counts);return e.jsxs("section",{"aria-label":"Start here",className:"flex min-w-0 flex-col gap-4 pt-2 pb-6",children:[e.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[e.jsx("p",{className:"text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:"Start here"}),e.jsx("h2",{className:"text-xl font-semibold tracking-tight",children:"Where do you want to start?"}),e.jsx("p",{className:"max-w-2xl text-sm leading-6 text-muted-foreground",children:"Lobu is a live context layer for your agents. Connect the tools you work in; ChatGPT, Claude, Codex, and your own agents resume from the same context. Pick a starting point; everything lands in the same workspace, and you can combine them later."})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:o.map((i,c)=>e.jsx(ks,{recipe:i,className:$(c===o.length-1&&"md:col-span-2 xl:col-span-1")},i.id))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-xs text-muted-foreground",children:[e.jsx("span",{children:"None of these?"}),e.jsx(W,{to:"/$owner/connectors/create",params:{owner:t},className:"underline decoration-border underline-offset-4 transition-colors hover:text-foreground",children:"Browse all connectors"}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("button",{type:"button",onClick:n,className:"underline decoration-border underline-offset-4 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"Skip for now"})]})]})}function ks({recipe:t,className:n}){const s=Ns[t.icon];return e.jsxs("article",{className:$("flex min-w-0 flex-col gap-3 rounded-lg border bg-card p-4",n),children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-2.5",children:[e.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border bg-muted text-muted-foreground",children:e.jsx(s,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-[10px] font-medium tracking-wide text-muted-foreground uppercase",children:t.eyebrow}),e.jsx("h3",{className:"text-sm leading-5 font-semibold",children:t.title})]})]}),e.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:t.description}),e.jsx("ol",{className:"flex flex-col gap-1",children:t.steps.map(o=>{const i=o===t.next;return e.jsx("li",{children:o.complete?e.jsxs("span",{className:"flex min-h-7 items-center gap-2 px-1.5 text-xs text-muted-foreground",children:[e.jsx(qt,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0",children:o.label})]}):i?e.jsxs(W,{...o.link,"aria-current":"step",className:$("flex min-h-9 items-center gap-2 rounded-md border border-primary/30 bg-primary/10 px-2 text-xs font-medium text-foreground transition-colors","hover:bg-primary/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"),children:[e.jsx(_e,{className:"h-3.5 w-3.5 shrink-0 text-primary","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0 flex-1",children:o.label}),e.jsx(ie,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"})]}):e.jsxs("span",{className:"flex min-h-7 items-center gap-2 px-1.5 text-xs text-muted-foreground",children:[e.jsx(_e,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"min-w-0",children:o.label})]})},o.key)})})]})}function Cs(){return e.jsxs("section",{"aria-label":"Start here",className:"flex min-w-0 flex-col gap-4 pt-2 pb-6",children:[e.jsxs("div",{className:"flex flex-col gap-2 px-1",children:[e.jsx(F,{className:"h-3 w-16"}),e.jsx(F,{className:"h-6 w-full max-w-lg"}),e.jsx(F,{className:"h-4 w-full max-w-xl"})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:[0,1,2].map(t=>e.jsxs("div",{className:$("flex flex-col gap-3 rounded-lg border p-4",t===2&&"md:col-span-2 xl:col-span-1"),children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(F,{className:"h-8 w-8 rounded-md"}),e.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[e.jsx(F,{className:"h-3 w-20"}),e.jsx(F,{className:"h-4 w-40"})]})]}),e.jsx(F,{className:"h-3 w-full"}),e.jsx(F,{className:"h-3 w-5/6"}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(F,{className:"h-6 w-full"}),e.jsx(F,{className:"h-6 w-full"}),e.jsx(F,{className:"h-6 w-full"})]})]},t))})]})}function Ge({owner:t}){const{orgContext:n}=te(),s=Zt(),o=Me(n),i=s.isError||o.isError,c=s.data?.flatMap(a=>{if(a.visibility!=="public"||a.slug===t)return[];const l=(o.data??[]).filter(w=>!Jt(w)&&(w.organization_id===a.id||w.organization_slug===a.slug));if(!l.length)return[];const d=l.map(w=>w.name).sort((w,p)=>w.localeCompare(p)),u=d.slice(0,3);d.length>u.length&&u.push("more");const x=a.description?.trim()||`Includes ${new Intl.ListFormat("en",{style:"long",type:"conjunction"}).format(u)}.`;return[{...a,description:x}]});return!i&&!c?.length?null:e.jsxs("section",{"aria-label":"Public workspaces",className:"mt-6 space-y-3 pb-6",children:[e.jsxs("div",{className:"space-y-1 px-1",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:"Explore public workspaces"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Browse what others have shared. Open a workspace to look around."})]}),i?e.jsxs("div",{role:"alert",className:"px-1 text-sm text-muted-foreground",children:["Public workspaces could not be loaded."," ",e.jsx("button",{type:"button",onClick:()=>void Promise.all([s.refetch(),o.refetch()]),className:"rounded underline underline-offset-4 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:"Try again"})]}):e.jsx("ul",{className:"grid gap-x-6 sm:grid-cols-2",children:c?.map(a=>{const l=en(a.slug);return e.jsx("li",{className:"min-w-0",children:e.jsxs("a",{href:l.kind==="cross-host"?l.href:l.to,className:"group flex min-h-16 items-center gap-3 rounded-lg px-3 py-3 transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[e.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-muted-foreground",children:a.logo?e.jsx("img",{src:a.logo,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):e.jsx(tn,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-sm font-medium",children:a.name}),e.jsx("span",{className:"mt-0.5 block text-xs leading-5 text-muted-foreground",children:a.description})]}),e.jsx(ie,{className:"h-4 w-4 shrink-0 text-muted-foreground group-hover:text-foreground","aria-hidden":"true"})]})},a.id)})})]})}const Ss={automation:et,connection:Ee,agent:fn,"entity-type":Le},Ls={automation:{to:"/$owner",search:{section:"automation"}},connection:{to:"/$owner/connectors",search:{}},agent:{to:"/$owner",search:{section:"agent"}},"entity-type":{to:"/$owner",search:{section:"entity-type"}}},ve={automation:{text:"No Automations yet.",action:{to:"/$owner/automations/new",label:"Start with a template"}},connection:{text:"No connections yet.",action:{to:"/$owner/connectors/create",label:"Connect a source"}},agent:{text:"No agents connected yet.",action:{to:"/$owner/agents/connect",label:"Connect an agent"}},"entity-type":{text:"No entity types yet.",action:{to:"/$owner/entity-types/new",label:"Create one"}}};function Es({owner:t,organizationId:n,section:s,layout:o}){const{isMember:i,isPublic:c,isLoading:a}=Ke(t),l=c&&!i&&!a,[d,u]=h.useState(""),x=nn({slug:t}),w=k=>k.flatMap(K=>K.href?[K]:w(K.children)),p=(x.data??[]).flatMap(k=>w(k.items)),g=ze(l?null:t),L=we(g.attentionCards).length,r=nt(n??void 0,void 0,{includeDetails:!1}),b=Qe(n),v=qe(n),{data:f=[],isLoading:N}=Ze(n),j=js(t,{organizationId:n,enabled:!l}),S=Bn(null,{enabled:!l}),{visible:I,isTypesLoading:P}=sn(t),H=h.useMemo(()=>an({owner:t,automations:r.data??[],connections:b.data??[],feeds:v.data??[],connectors:new Map(f.map(k=>[k.key,k])),recentItems:j.items,roster:j.agents,clientGroups:Un(S.data??[]).filter(k=>k.connected),entityTypes:I,attention:we(g.attentionCards),now:Date.now()}),[t,r.data,b.data,v.data,f,j.items,j.agents,S.data,I,g.attentionCards]),M=d.trim().toLowerCase(),D=M.length>0,_=p.filter(k=>!M||k.label.toLowerCase().includes(M)),G=h.useMemo(()=>on(H.filter(k=>!M||k.name.toLowerCase().includes(M)),{filtering:D,expanded:s!=null,kinds:s?[s]:l?["automation","connection","entity-type"]:["automation","connection","agent","entity-type"]}),[H,M,D,l,s]),R=rn(l?null:n,ln()),C={automation:r.isLoading,connection:b.isLoading||v.isLoading||N,agent:!l&&(j.isLoading||S.isLoading),"entity-type":P},z=n==null||r.isLoading||b.isLoading||!l&&(j.isLoading||g.isLoading),O=x.isError||r.isError||b.isError||v.isError||j.isError||g.isError,B=G.every(k=>k.count===0)&&R.length===0,ne=`lobu:start-dismissed:${t}`,[ue,me]=h.useState(()=>{try{return window.localStorage.getItem(ne)==="1"}catch{return!1}}),U=()=>{me(!0);try{window.localStorage.setItem(ne,"1")}catch{}},V=H.some(k=>k.kind!=="entity-type"),X=o==="table",J=X&&i&&!z&&!D&&!l&&!ue&&!V&&p.length===0&&!x.isLoading&&R.length===0,se=X&&!s&&!D&&p.length>0,he=X&&!s&&_.length>0,ae=H.filter(k=>k.problem).length,oe=e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Home"}),q=k=>e.jsx(Ts,{title:oe,owner:t,organizationId:n,layout:o,layerToggles:k,query:d,onQueryChange:u,canAdd:i&&!l});return e.jsxs("section",{"aria-label":"Home",className:"flex min-h-0 min-w-0 flex-1 flex-col gap-3",children:[X?J?oe:q(null):null,X?e.jsxs(e.Fragment,{children:[O&&!J?e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Some of Home could not be loaded. Refresh to try again."}):null,he?e.jsxs(e.Fragment,{children:[!l&&L>0?e.jsxs(W,{to:"/$owner/events",params:{owner:t},className:"flex min-h-11 items-center justify-between gap-3 rounded-md border border-border px-3 py-2 text-sm font-medium hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[e.jsxs("span",{children:[L," ",L===1?"item needs":"items need"," your attention"]}),e.jsx(ie,{"aria-hidden":!0,className:"size-4 shrink-0"})]}):null,e.jsxs("nav",{"aria-label":"Workspace destinations",className:"pb-4",children:[e.jsx("h2",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Open your workspace"}),e.jsx("ul",{className:"grid gap-x-6 sm:grid-cols-2",children:_.map(k=>{const K=cn(k);return e.jsx("li",{className:"min-w-0 border-b border-border/60",children:e.jsxs(dn,{item:k,active:!1,className:"group flex min-h-16 min-w-0 items-center gap-3 rounded-md px-2 py-3 hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[e.jsx(K,{"aria-hidden":!0,className:"size-5 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"min-w-0 flex-1 break-words text-base font-medium",children:k.label}),e.jsx(ie,{"aria-hidden":!0,className:"size-4 shrink-0 text-muted-foreground"})]})},k.id)})})]})]}):null,e.jsx(Ms,{pending:x.isLoading,fold:se,problems:ae,children:z&&B?e.jsx(it,{}):B&&D?_.length?null:e.jsx(Se,{icon:un,title:"Nothing matches",description:"Nothing on Home matches this filter."}):J?e.jsx(ws,{owner:t,onSkip:U}):e.jsxs(e.Fragment,{children:[R.length>0?e.jsx("section",{"aria-label":"This page",className:"space-y-1",children:e.jsx(Be,{organizationId:n,feeds:R})}):null,G.map(k=>C[k.kind]?e.jsx(_s,{label:k.label},k.kind):e.jsx(Rs,{owner:t,organizationId:n,section:k,allRows:s===k.kind,connectorDefinitions:f},k.kind))]})}),!D&&!s?se?e.jsxs("details",{className:"mt-4 border-t border-border pt-3",children:[e.jsx("summary",{className:"cursor-pointer text-sm text-muted-foreground",children:"Explore public workspaces"}),e.jsx(Ge,{owner:t})]}):e.jsx(Ge,{owner:t}):null]}):e.jsx(ys,{ownerSlug:t,renderToolbar:q})]})}function Ms({pending:t,fold:n,problems:s,children:o}){const[i,c]=h.useState(!1);return t?e.jsx(it,{}):n?e.jsxs("details",{open:i,onToggle:a=>c(a.currentTarget.open),className:"border-t border-border pt-3",children:[e.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-muted-foreground",children:["Workspace status and setup",s>0?e.jsxs("span",{className:"ml-2 text-destructive",children:[s," ",s===1?"issue":"issues"," to review"]}):null]}),i?e.jsx("div",{className:"space-y-4 pt-4",children:o}):null]}):o}function Ts({title:t,owner:n,organizationId:s,layout:o,layerToggles:i,query:c,onQueryChange:a,canAdd:l}){const d=[{key:"table",label:"Table",Icon:gn,search:{}},{key:"graph",label:"Graph",Icon:xn,search:{layout:"graph"}}];return e.jsxs("header",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[t,e.jsxs("nav",{"aria-label":"Home views",className:"flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-2",children:[e.jsx("fieldset",{className:"flex items-center rounded-md border p-0.5","aria-label":"Home layout",children:d.map(({key:u,label:x,Icon:w,search:p})=>{const g=o===u;return e.jsx(Q,{asChild:!0,variant:"ghost",size:"sm",className:$("h-7 px-2",g&&"bg-accent text-accent-foreground"),children:e.jsx(W,{to:"/$owner",params:{owner:n},search:p,replace:!0,"aria-label":x,"aria-current":g?"page":void 0,title:x,children:e.jsx(w,{className:"h-4 w-4"})})},u)})}),i,e.jsxs("div",{className:"ml-auto flex min-w-0 flex-1 items-center justify-end gap-2",children:[o==="table"?e.jsxs("div",{className:"relative min-w-40 max-w-64 flex-1",children:[e.jsx(pn,{"aria-hidden":"true",className:"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ue,{type:"search","aria-label":"Filter list",placeholder:"Filter…",maxLength:512,value:c,onChange:u=>a(u.target.value),className:"pl-9"})]}):null,l?e.jsx(Is,{owner:n,organizationId:s}):null]})]})]})}function Is({owner:t,organizationId:n}){const{isAdmin:s}=Xe(n??void 0),o=[{to:"/$owner/automations/new",label:"Automation",Icon:et},{to:"/$owner/connectors/create",label:"Connection",Icon:Ee},{to:"/$owner/agents/new",label:"Agent",Icon:Ln},...s?[{to:"/$owner/entity-types/new",label:"Entity type",Icon:Le}]:[]];return e.jsxs(Nn,{children:[e.jsx(wn,{asChild:!0,children:e.jsxs(Q,{size:"sm",children:[e.jsx(kn,{className:"mr-1.5 h-4 w-4"}),"Add",e.jsx(Cn,{className:"ml-1 h-3.5 w-3.5"})]})}),e.jsx(Sn,{align:"end",className:"w-44",children:o.map(({to:i,label:c,Icon:a})=>e.jsx(En,{asChild:!0,children:e.jsxs(W,{to:i,params:{owner:t},children:[e.jsx(a,{}),c]})},i))})]})}function it(){return e.jsx("div",{role:"status","aria-label":"Loading Home",children:[0,1,2].map(t=>e.jsxs("div",{children:[e.jsx("div",{className:"px-1 pt-4 pb-1.5",children:e.jsx(F,{className:"h-4 w-24"})}),e.jsx("div",{className:"divide-y overflow-hidden rounded-lg border",children:[0,1,2].map(n=>e.jsx(st,{},n))})]},t))})}function _s({label:t}){return e.jsxs("section",{"aria-label":t,className:"min-w-0",children:[e.jsx("div",{className:"px-1 pt-4 pb-1.5",children:e.jsx("h2",{className:"text-sm font-semibold",children:t})}),e.jsx("div",{role:"status","aria-label":`Loading ${t}`,className:"divide-y overflow-hidden rounded-lg border",children:[0,1,2].map(n=>e.jsx(st,{},n))})]})}function Rs({owner:t,organizationId:n,section:s,allRows:o,connectorDefinitions:i}){const c=Ls[s.kind];return e.jsxs("section",{"aria-label":s.label,className:"min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-2 px-1 pt-4 pb-1.5",children:[e.jsx("h2",{className:"text-sm font-semibold",children:o?e.jsxs(e.Fragment,{children:[s.label,e.jsx("span",{className:"ml-1.5 font-normal text-muted-foreground tabular-nums",children:s.count})]}):e.jsx(W,{to:c.to,params:{owner:t},search:c.search,className:"underline-offset-4 hover:underline",children:s.label})}),o?e.jsxs(W,{to:"/$owner",params:{owner:t},search:{},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[e.jsx(mn,{"aria-hidden":"true",className:"h-3 w-3"}),"All sections"]}):s.count>s.rows.length?e.jsxs(W,{to:c.to,params:{owner:t},search:c.search,className:"text-xs text-muted-foreground hover:text-foreground",children:["See all ",s.count," →"]}):null]}),s.count===0?e.jsxs("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:[ve[s.kind].text," ",e.jsxs(W,{to:ve[s.kind].action.to,params:{owner:t},className:"underline decoration-border underline-offset-4 transition-colors hover:text-foreground",children:[ve[s.kind].action.label," →"]})]}):null,e.jsx("ul",{className:$("overflow-hidden rounded-lg border",s.rows.length===0&&"hidden"),children:s.rows.map(a=>e.jsxs("li",{className:$("flex min-w-0 items-center border-b last:border-b-0",hn),children:[e.jsx(As,{owner:t,organizationId:n,source:a,connectorDefinitions:i}),a.attention.length>0?e.jsx($s,{owner:t,source:a}):null]},a.key))})]})}function As({owner:t,organizationId:n,source:s,connectorDefinitions:o}){const i=Ss[s.kind];return e.jsx(Ps,{owner:t,organizationId:n,source:s,className:$(jn,"min-w-0 flex-1"),children:e.jsx(yn,{mark:s.kind==="entity-type"?e.jsx(Je,{icon:s.icon??null,className:"h-4 w-4 text-muted-foreground"}):e.jsx(bn,{source:s.mark,connectorDefinitions:o,label:s.name,fallback:e.jsx(i,{className:"h-4 w-4 text-muted-foreground"})}),name:s.name,tone:s.attention.length>0?"amber":s.problem?"destructive":null,details:s.status,at:s.at})})}function $s({owner:t,source:n}){const s=n.attention.length,o=tt(vn(t,n));return e.jsxs(W,{to:o.pathname,search:o.search,className:"mr-3 shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-700 transition-colors hover:bg-amber-500/20 dark:text-amber-400",children:[s," need",s===1?"s":""," you"]})}function Ps({owner:t,organizationId:n,source:s,className:o,children:i}){const c=Ve(),{open:a}=s,l=tt(a.href),d=u=>{if(!(!c||a.kind==="entity-type"||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.button!==0)&&!(a.kind==="connection"&&!n)){if(u.preventDefault(),a.kind==="automation"||a.kind==="agent"){c.open({href:a.href,title:s.name,owner:t});return}c.open({href:a.href,title:s.name,key:s.key,connectorPanel:{section:"data",connectorKey:a.connectorKey,connectionId:a.connectionId,organizationId:n,ownerSlug:t}})}};return e.jsx(W,{to:l.pathname,search:l.search,className:o,onClick:d,children:i})}function Xs({owner:t,search:n,entityScope:s,home:o=!1}){const i=typeof n.type=="string"&&n.type.trim()?Ne(n.type.trim()):void 0,c=n.section==="automation"||n.section==="agent"||n.section==="entity-type"?n.section:void 0,a=n.layout==="graph"?"graph":"table",l=Object.entries(n).some(([u,x])=>(Mn.includes(u)||u.startsWith("clf_"))&&x!=null&&x!==""),d=o&&!l&&!i&&!s;return e.jsxs(Tn,{className:"gap-6 pt-2.5 pb-8",children:[e.jsx(Vn,{}),e.jsx(In,{owner:t,children:u=>e.jsx($n,{organizationId:u.organizationId,isWorkspaceLoading:u.isWorkspaceLoading,children:e.jsx(_n,{wide:o,className:$("flex min-h-0 min-w-0 flex-1 flex-col",d&&a==="graph"&&"max-w-none"),children:d?e.jsx(Es,{owner:u.ownerSlug,organizationId:u.organizationId,section:c,layout:a}):e.jsx(Xn,{organizationId:u.organizationId,ownerSlug:u.ownerSlug,typeScope:i,entityScope:s})})})})]})}export{Xs as A};
|
|
2
|
-
//# sourceMappingURL=activity-route-view-D78Wj0RH.js.map
|