@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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
-- migrate:up
|
|
2
|
+
-- lobu:no-quiesce (the policy applies only to lobu_member_sql; no lock beyond the catalog update)
|
|
3
|
+
--
|
|
4
|
+
-- An event is visible in the workspace that owns it, and nowhere else. The
|
|
5
|
+
-- write-time bridge (`linked_org_ids`) also admitted events that tagged
|
|
6
|
+
-- another workspace's record or came through its connection. In production it
|
|
7
|
+
-- matched only relationship audits of a private workspace, surfaced inside
|
|
8
|
+
-- the public workspace whose record they link to; the relationship itself is
|
|
9
|
+
-- hidden from that workspace.
|
|
10
|
+
--
|
|
11
|
+
-- The application stops writing and reading the column in this release. The
|
|
12
|
+
-- column, its two GIN indexes and its view projection are dropped in the next
|
|
13
|
+
-- release, once no running replica references them.
|
|
14
|
+
|
|
15
|
+
SET LOCAL lock_timeout = '5s';
|
|
16
|
+
|
|
17
|
+
ALTER POLICY member_sql_scope ON public.events USING (
|
|
18
|
+
organization_id = current_setting('lobu.member_sql_org', true)
|
|
19
|
+
AND (
|
|
20
|
+
connection_id IS NULL
|
|
21
|
+
OR connection_id IN (SELECT vc.id FROM public.connections vc WHERE vc.deleted_at IS NULL)
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
-- migrate:down
|
|
26
|
+
-- lobu:no-quiesce
|
|
27
|
+
|
|
28
|
+
SET LOCAL lock_timeout = '5s';
|
|
29
|
+
|
|
30
|
+
ALTER POLICY member_sql_scope ON public.events USING (
|
|
31
|
+
(
|
|
32
|
+
organization_id = current_setting('lobu.member_sql_org', true)
|
|
33
|
+
OR linked_org_ids @> ARRAY[current_setting('lobu.member_sql_org', true)]
|
|
34
|
+
)
|
|
35
|
+
AND (
|
|
36
|
+
connection_id IS NULL
|
|
37
|
+
OR connection_id IN (SELECT vc.id FROM public.connections vc WHERE vc.deleted_at IS NULL)
|
|
38
|
+
)
|
|
39
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
-- migrate:up
|
|
2
|
+
-- lobu:no-quiesce (additive and weaker than the constraint it will replace: every row the running code inserts already satisfies it)
|
|
3
|
+
--
|
|
4
|
+
-- First of three steps that drop events.linked_org_ids, the retired
|
|
5
|
+
-- cross-workspace bridge that nothing has read or written since
|
|
6
|
+
-- 20261114120000. events_unbound_tool_audit names that column, so dropping
|
|
7
|
+
-- the column would silently drop the constraint too. This adds its
|
|
8
|
+
-- replacement, identical except for the linked_org_ids term.
|
|
9
|
+
--
|
|
10
|
+
-- OPERATIONAL COST: catalog-only. ACCESS EXCLUSIVE on events for the catalog
|
|
11
|
+
-- update, bounded by the 5s lock wait. NOT VALID skips the table scan; the
|
|
12
|
+
-- next migration validates under a lock that does not block reads or writes.
|
|
13
|
+
SET LOCAL lock_timeout = '5s';
|
|
14
|
+
|
|
15
|
+
DO $$
|
|
16
|
+
BEGIN
|
|
17
|
+
IF NOT EXISTS (
|
|
18
|
+
SELECT 1 FROM pg_constraint
|
|
19
|
+
WHERE conrelid = 'public.events'::regclass
|
|
20
|
+
AND conname = 'events_unbound_tool_audit_owned'
|
|
21
|
+
) THEN
|
|
22
|
+
ALTER TABLE public.events ADD CONSTRAINT events_unbound_tool_audit_owned CHECK (
|
|
23
|
+
organization_id IS NOT NULL OR (
|
|
24
|
+
semantic_type = 'audit' AND origin_type IS NOT DISTINCT FROM 'tool_invocation'
|
|
25
|
+
AND COALESCE(cardinality(entity_ids), 0) = 0
|
|
26
|
+
AND connector_key IS NULL AND connection_id IS NULL
|
|
27
|
+
AND feed_key IS NULL AND feed_id IS NULL AND run_id IS NULL
|
|
28
|
+
AND automation_id IS NULL AND automation_version_id IS NULL
|
|
29
|
+
AND identity_ns IS NULL AND identity_key IS NULL
|
|
30
|
+
AND supersedes_event_id IS NULL AND superseded_by IS NULL
|
|
31
|
+
AND interaction_type = 'none'
|
|
32
|
+
)
|
|
33
|
+
) NOT VALID;
|
|
34
|
+
END IF;
|
|
35
|
+
END $$;
|
|
36
|
+
|
|
37
|
+
-- migrate:down
|
|
38
|
+
-- lobu:no-quiesce
|
|
39
|
+
SET LOCAL lock_timeout = '5s';
|
|
40
|
+
ALTER TABLE public.events DROP CONSTRAINT IF EXISTS events_unbound_tool_audit_owned;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- migrate:up
|
|
2
|
+
-- lobu:no-quiesce (validation changes nothing the running code can observe)
|
|
3
|
+
--
|
|
4
|
+
-- Second step: validate the replacement constraint on its own, so the scan
|
|
5
|
+
-- does not run inside a transaction that also holds ACCESS EXCLUSIVE.
|
|
6
|
+
--
|
|
7
|
+
-- OPERATIONAL COST: one sequential scan of events under SHARE UPDATE
|
|
8
|
+
-- EXCLUSIVE, which blocks neither reads nor writes. Estimated at about 11s on
|
|
9
|
+
-- production (10 GB heap, 8.86M rows), extrapolated from a 3% sample scan that
|
|
10
|
+
-- took 339 ms; not timed end to end. The statement timeout there is 60s. If it
|
|
11
|
+
-- times out, run the statement by hand with `SET statement_timeout = 0` and
|
|
12
|
+
-- record the version.
|
|
13
|
+
-- squawk-ignore prefer-robust-stmts -- a single statement the runner wraps in its own transaction; validating twice is harmless
|
|
14
|
+
ALTER TABLE public.events VALIDATE CONSTRAINT events_unbound_tool_audit_owned;
|
|
15
|
+
|
|
16
|
+
-- migrate:down
|
|
17
|
+
-- lobu:no-quiesce
|
|
18
|
+
-- Validation has nothing to undo; the previous migration's down drops the constraint.
|
|
19
|
+
SELECT 1;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
-- migrate:up
|
|
2
|
+
-- lobu:no-quiesce -- requires 20261114120000's release to be fully deployed first: code before it inserts and reads the column.
|
|
3
|
+
--
|
|
4
|
+
-- Third step: drop events.linked_org_ids. Event visibility is owner-only
|
|
5
|
+
-- (events.organization_id), so the column, its two GIN indexes
|
|
6
|
+
-- (idx_events_linked_org_ids, idx_events_live_linked_org_ids) and its
|
|
7
|
+
-- projection in current_event_records have no reader or writer left. The
|
|
8
|
+
-- indexes and the old events_unbound_tool_audit constraint go with the column;
|
|
9
|
+
-- the validated replacement takes over the constraint's name.
|
|
10
|
+
--
|
|
11
|
+
-- The view is rebuilt because CREATE OR REPLACE VIEW cannot remove a column.
|
|
12
|
+
-- Table and surviving column grants, including grant options, are read before
|
|
13
|
+
-- the drop and reapplied, so roles granted outside the migrations keep access.
|
|
14
|
+
--
|
|
15
|
+
-- OPERATIONAL COST: catalog-only, no row rewrite. ACCESS EXCLUSIVE on events
|
|
16
|
+
-- and the view until the transaction commits, bounded by the 5s lock wait. Not
|
|
17
|
+
-- timed at production size.
|
|
18
|
+
SET LOCAL lock_timeout = '5s';
|
|
19
|
+
|
|
20
|
+
DO $rebuild$
|
|
21
|
+
DECLARE
|
|
22
|
+
regrants text[];
|
|
23
|
+
stmt text;
|
|
24
|
+
BEGIN
|
|
25
|
+
SELECT COALESCE(array_agg(format(
|
|
26
|
+
'GRANT %s ON public.current_event_records TO %s%s',
|
|
27
|
+
acl.privilege_type,
|
|
28
|
+
CASE WHEN acl.grantee = 0 THEN 'PUBLIC'
|
|
29
|
+
ELSE quote_ident(pg_get_userbyid(acl.grantee)) END,
|
|
30
|
+
CASE WHEN acl.is_grantable THEN ' WITH GRANT OPTION' ELSE '' END)), '{}')
|
|
31
|
+
INTO regrants
|
|
32
|
+
FROM pg_class c
|
|
33
|
+
CROSS JOIN LATERAL aclexplode(c.relacl) acl
|
|
34
|
+
WHERE c.oid = to_regclass('public.current_event_records')
|
|
35
|
+
AND acl.grantee <> c.relowner;
|
|
36
|
+
|
|
37
|
+
SELECT regrants || COALESCE(array_agg(format(
|
|
38
|
+
'GRANT %s (%I) ON public.current_event_records TO %s%s',
|
|
39
|
+
acl.privilege_type,
|
|
40
|
+
a.attname,
|
|
41
|
+
CASE WHEN acl.grantee = 0 THEN 'PUBLIC'
|
|
42
|
+
ELSE quote_ident(pg_get_userbyid(acl.grantee)) END,
|
|
43
|
+
CASE WHEN acl.is_grantable THEN ' WITH GRANT OPTION' ELSE '' END)), '{}')
|
|
44
|
+
INTO regrants
|
|
45
|
+
FROM pg_class c
|
|
46
|
+
JOIN pg_attribute a ON a.attrelid = c.oid
|
|
47
|
+
CROSS JOIN LATERAL aclexplode(a.attacl) acl
|
|
48
|
+
WHERE c.oid = to_regclass('public.current_event_records')
|
|
49
|
+
AND a.attnum > 0 AND NOT a.attisdropped
|
|
50
|
+
AND a.attname <> 'linked_org_ids'
|
|
51
|
+
AND acl.grantee <> c.relowner;
|
|
52
|
+
|
|
53
|
+
DROP VIEW IF EXISTS public.current_event_records;
|
|
54
|
+
|
|
55
|
+
-- squawk-ignore ban-drop-column -- contract phase; nothing reads or writes the column since 20261114120000
|
|
56
|
+
ALTER TABLE public.events DROP COLUMN IF EXISTS linked_org_ids;
|
|
57
|
+
|
|
58
|
+
IF EXISTS (
|
|
59
|
+
SELECT 1 FROM pg_constraint
|
|
60
|
+
WHERE conrelid = 'public.events'::regclass
|
|
61
|
+
AND conname = 'events_unbound_tool_audit_owned'
|
|
62
|
+
) THEN
|
|
63
|
+
ALTER TABLE public.events DROP CONSTRAINT IF EXISTS events_unbound_tool_audit;
|
|
64
|
+
ALTER TABLE public.events
|
|
65
|
+
RENAME CONSTRAINT events_unbound_tool_audit_owned TO events_unbound_tool_audit;
|
|
66
|
+
END IF;
|
|
67
|
+
|
|
68
|
+
CREATE VIEW public.current_event_records WITH (security_invoker = true) AS
|
|
69
|
+
SELECT e.id,
|
|
70
|
+
e.organization_id,
|
|
71
|
+
e.entity_ids,
|
|
72
|
+
e.origin_id,
|
|
73
|
+
e.title,
|
|
74
|
+
e.payload_type,
|
|
75
|
+
e.payload_text,
|
|
76
|
+
e.payload_data,
|
|
77
|
+
e.payload_template,
|
|
78
|
+
e.attachments,
|
|
79
|
+
e.metadata,
|
|
80
|
+
e.score,
|
|
81
|
+
e.author_name,
|
|
82
|
+
e.source_url,
|
|
83
|
+
e.occurred_at,
|
|
84
|
+
e.created_at,
|
|
85
|
+
e.origin_parent_id,
|
|
86
|
+
e.content_length,
|
|
87
|
+
e.search_tsv,
|
|
88
|
+
e.origin_type,
|
|
89
|
+
e.connector_key,
|
|
90
|
+
e.connection_id,
|
|
91
|
+
e.feed_key,
|
|
92
|
+
e.feed_id,
|
|
93
|
+
e.run_id,
|
|
94
|
+
e.semantic_type,
|
|
95
|
+
e.client_id,
|
|
96
|
+
e.created_by,
|
|
97
|
+
e.interaction_type,
|
|
98
|
+
e.interaction_status,
|
|
99
|
+
e.interaction_input_schema,
|
|
100
|
+
e.interaction_input,
|
|
101
|
+
e.interaction_output,
|
|
102
|
+
e.interaction_error,
|
|
103
|
+
e.supersedes_event_id,
|
|
104
|
+
e.identity_ns,
|
|
105
|
+
e.identity_key,
|
|
106
|
+
e.automation_id,
|
|
107
|
+
e.automation_version_id
|
|
108
|
+
FROM public.events e
|
|
109
|
+
WHERE e.superseded_by IS NULL;
|
|
110
|
+
|
|
111
|
+
FOREACH stmt IN ARRAY regrants LOOP
|
|
112
|
+
EXECUTE stmt;
|
|
113
|
+
END LOOP;
|
|
114
|
+
END $rebuild$;
|
|
115
|
+
|
|
116
|
+
-- migrate:down
|
|
117
|
+
-- Forward-only: the column was write-once, computed from other rows at insert,
|
|
118
|
+
-- and nothing read it by the time it was dropped. Restoring an empty column
|
|
119
|
+
-- would serve no code.
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
|
|
82
82
|
"@asteasolutions/zod-to-openapi": ["@asteasolutions/zod-to-openapi@9.1.0", "", { "dependencies": { "openapi3-ts": "^4.6.0" }, "peerDependencies": { "zod": "^4.0.0" } }, "sha512-pLMeRgRYS7/vZIgAAkOe2P6+XGTifR1MT9pqDoxZ11EmcJJ+DPmdPqLN8ZZF4U8R9KHCCQCS9c2wtuE8wSrfkw=="],
|
|
83
83
|
|
|
84
|
-
"@aws-sdk/client-bedrock": ["@aws-sdk/client-bedrock@3.
|
|
84
|
+
"@aws-sdk/client-bedrock": ["@aws-sdk/client-bedrock@3.1169.0", "", { "dependencies": { "@aws-sdk/core": "^3.981.0", "@aws-sdk/credential-provider-node": "^3.972.97", "@aws-sdk/token-providers": "3.1169.0", "@aws-sdk/types": "^3.975.1", "@smithy/core": "^3.40.0", "@smithy/fetch-http-handler": "^5.8.1", "@smithy/node-http-handler": "^4.14.2", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-ZeBXxZg90apw6JVn5yJ2c+k4EFq6HiuW0NT6GmRVYHg3PmjjKEgY9180LBBpPUe4Qg37r1LdyFhqGqDh8sbsoQ=="],
|
|
85
85
|
|
|
86
|
-
"@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.
|
|
86
|
+
"@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.1169.0", "", { "dependencies": { "@aws-sdk/core": "^3.981.0", "@aws-sdk/credential-provider-node": "^3.972.97", "@aws-sdk/eventstream-handler-node": "^3.972.42", "@aws-sdk/middleware-eventstream": "^3.972.38", "@aws-sdk/middleware-websocket": "^3.972.66", "@aws-sdk/token-providers": "3.1169.0", "@aws-sdk/types": "^3.975.1", "@smithy/core": "^3.40.0", "@smithy/fetch-http-handler": "^5.8.1", "@smithy/node-http-handler": "^4.14.2", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-KkMuq9IW+H8VHTEw/qV+ArI70w1WoqDuM/ZLX87MXB0yV31ihqY+2lwZ+zeD5spcZpmlLuUzXTPyMpWE2ZnbtA=="],
|
|
87
87
|
|
|
88
|
-
"@aws-sdk/client-secrets-manager": ["@aws-sdk/client-secrets-manager@3.
|
|
88
|
+
"@aws-sdk/client-secrets-manager": ["@aws-sdk/client-secrets-manager@3.1169.0", "", { "dependencies": { "@aws-sdk/core": "^3.981.0", "@aws-sdk/credential-provider-node": "^3.972.97", "@aws-sdk/types": "^3.975.1", "@smithy/core": "^3.40.0", "@smithy/fetch-http-handler": "^5.8.1", "@smithy/node-http-handler": "^4.14.2", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-BsVIFICFZ5CcpwwoBjsujHl5hRC2SUoEU5TeW3eMKoerxJPKCvitJJSGU6ddct4O6bB3/kMxWP9RPL0vJT1juQ=="],
|
|
89
89
|
|
|
90
90
|
"@aws-sdk/core": ["@aws-sdk/core@3.981.0", "", { "dependencies": { "@aws-sdk/types": "^3.975.1", "@aws-sdk/xml-builder": "^3.972.43", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.40.0", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.20.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-Mnu7gaDrC5UCdyH8uLxLfB2eWbjE/HbjKX1U1J2VQxG3TTATUDObW2wU3I8iH3e9YH5NN2CY6w1mlAIe2XJ3jg=="],
|
|
91
91
|
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
|
|
116
116
|
"@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.52", "", { "dependencies": { "@aws-sdk/types": "^3.975.1", "@smithy/signature-v4": "^5.7.5", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-6W6SjGc8OXUhMzNxU1X922ghD+PP1XvzmCk5Scui0jaYsLezycMYR1RaLp5xTIOUrhTXyb4DnAbPr3fBgmdnzg=="],
|
|
117
117
|
|
|
118
|
-
"@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.
|
|
118
|
+
"@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1169.0", "", { "dependencies": { "@aws-sdk/core": "^3.981.0", "@aws-sdk/nested-clients": "^3.998.3", "@aws-sdk/types": "^3.975.1", "@smithy/core": "^3.40.0", "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-ScQiQuJIAFevAHjCh/E159qaWeQtw8KUZ4PGUfHMeJU0VXaF4HE8PSgNXY/y4nmqrT8/gD3SoFhuFT5dy1cisA=="],
|
|
119
119
|
|
|
120
120
|
"@aws-sdk/types": ["@aws-sdk/types@3.975.1", "", { "dependencies": { "@smithy/types": "^4.20.0", "tslib": "^2.6.2" } }, "sha512-7rGxUkCB2QPoQOeJmonmAICTN2zrH+fpmi1p4Iwu72lnxNaMhOgqcbpyddifnM1DBb19TWQ1u6z/XjkaFNEDWw=="],
|
|
121
121
|
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
|
|
152
152
|
"@borewit/text-codec": ["@borewit/text-codec@0.2.3", "", {}, "sha512-49CycTz1aAZmvFcwkeFyhud1HUmRIB5Tabf7ALV+VA4Iu85MTfz2cUwzPagMFAdVBvrWdkCxG67I30tUwwpKsw=="],
|
|
153
153
|
|
|
154
|
-
"@chat-adapter/catalog": ["@chat-adapter/catalog@4.
|
|
154
|
+
"@chat-adapter/catalog": ["@chat-adapter/catalog@4.45.0", "", {}, "sha512-oP8ySvXTYRVRIusTehLTvpwynMLkEcaFZBASZRDDfNFZzSO02xQX1kVgMAz4VbtiMTMU6k01tjZE4KEDbrmonA=="],
|
|
155
155
|
|
|
156
156
|
"@chat-adapter/discord": ["@chat-adapter/discord@4.38.1", "", { "dependencies": { "@chat-adapter/shared": "4.38.1", "chat": "4.38.1", "discord-api-types": "^0.37.119", "discord-interactions": "^4.4.0", "discord.js": "^14.25.1" } }, "sha512-bSNs4wVS1sx4ZyKCD+nrTyO2xiHGMfuDiBPhmqtpyk86jZ3BjqfKrEuf9t/6VWtvSMQ1rZOt3wMmbUzmMyi1QA=="],
|
|
157
157
|
|
|
@@ -649,7 +649,7 @@
|
|
|
649
649
|
|
|
650
650
|
"character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="],
|
|
651
651
|
|
|
652
|
-
"chat": ["chat@4.
|
|
652
|
+
"chat": ["chat@4.45.0", "", { "dependencies": { "@chat-adapter/catalog": "4.45.0", "@workflow/serde": "4.1.0-beta.2", "mdast-util-to-string": "^4.0.0", "remark-gfm": "^4.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "remend": "^1.2.1", "unified": "^11.0.5" }, "peerDependencies": { "ai": "^6.0.182 || ^7.0.0", "workflow": "^5.0.0-beta.35", "zod": "^3.0.0 || ^4.0.0" }, "optionalPeers": ["ai", "workflow", "zod"] }, "sha512-7p1fkEupHEqYhXmSxLnHcK4hWEg93182/F2YxHSwqc7xtF4mekmG9EuJjRYX3aNEJJa2Rvu48A1f3ulOxxHIrA=="],
|
|
653
653
|
|
|
654
654
|
"chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="],
|
|
655
655
|
|
|
@@ -683,7 +683,7 @@
|
|
|
683
683
|
|
|
684
684
|
"crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="],
|
|
685
685
|
|
|
686
|
-
"cron-parser": ["cron-parser@5.10.
|
|
686
|
+
"cron-parser": ["cron-parser@5.10.6", "", { "dependencies": { "luxon": "^3.7.2" } }, "sha512-kpoxgQyveO1l29nw+FWdvmotyV7eOSzGHQpxiXOEZIDOjqO1iR6kfgJ0PVHTuV26uBemKq3ppzma7dHFAG7viw=="],
|
|
687
687
|
|
|
688
688
|
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
|
689
689
|
|
|
@@ -945,7 +945,7 @@
|
|
|
945
945
|
|
|
946
946
|
"isolated-vm": ["isolated-vm@7.0.2", "", { "dependencies": { "node-gyp-build": "^4.8.4" }, "hasInstallScript": true }, "sha512-Z1sYxpptGyGiKblG16EJEdP5x9/68C6AuqFFsewnrxlwSlrTLHKqtRMogOjcYZ0f8/cijMaRi+XwiHVQ1+uG+g=="],
|
|
947
947
|
|
|
948
|
-
"isomorphic-git": ["isomorphic-git@1.44.
|
|
948
|
+
"isomorphic-git": ["isomorphic-git@1.44.14", "", { "dependencies": { "async-lock": "^1.4.1", "clean-git-ref": "^2.0.1", "crc-32": "^1.2.0", "diff3": "0.0.3", "ignore": "^5.1.4", "minimisted": "^2.0.0", "pako": "^1.0.10", "pify": "^4.0.1", "sha.js": "^2.4.12", "simple-get": "^4.0.1" }, "bin": { "isogit": "cli.cjs" } }, "sha512-ZSVmLOUvzjnUrPBEpVcVOZ6w4N6NSFte2CEZ4ruTYpEIb19iwykPs7lgmh+y9+3qwmDgQePcOQzsMShcSrW5jA=="],
|
|
949
949
|
|
|
950
950
|
"jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
|
|
951
951
|
|
|
@@ -1237,7 +1237,7 @@
|
|
|
1237
1237
|
|
|
1238
1238
|
"possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],
|
|
1239
1239
|
|
|
1240
|
-
"postcss": ["postcss@8.5.
|
|
1240
|
+
"postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="],
|
|
1241
1241
|
|
|
1242
1242
|
"postgres": ["postgres@file:vendor/postgres", {}],
|
|
1243
1243
|
|
|
@@ -1405,7 +1405,7 @@
|
|
|
1405
1405
|
|
|
1406
1406
|
"strnum": ["strnum@2.5.1", "", { "dependencies": { "anynum": "^1.0.1" } }, "sha512-UM4nTLWzQiDBseVxUGxN0wJzIk0UU89Qi7pKXz9qISo+lhviJikTuikBsK/oFRlpvYHvSdz0TVoLyQ+sEpYwxA=="],
|
|
1407
1407
|
|
|
1408
|
-
"strtok3": ["strtok3@10.
|
|
1408
|
+
"strtok3": ["strtok3@10.8.0", "", { "dependencies": { "@tokenizer/token": "^0.3.0" } }, "sha512-e6bW3fD6V01DPmcbLfNtn0cjsiHvTKS/hivgbzqYMfHb/nLes4QQ0H5QBxlkPQayF4xv08AvlSgptGwN86Eemw=="],
|
|
1409
1409
|
|
|
1410
1410
|
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
|
1411
1411
|
|
|
@@ -25,7 +25,7 @@ function validateEmbeddingDimensions(embedding, expectedDimensions, context) {
|
|
|
25
25
|
// packages/embeddings/src/metadata.ts
|
|
26
26
|
var DEFAULT_MODEL_NAME = "Xenova/bge-base-en-v1.5";
|
|
27
27
|
var DEFAULT_DIMENSIONS = 768;
|
|
28
|
-
var DEFAULT_BATCH_SIZE =
|
|
28
|
+
var DEFAULT_BATCH_SIZE = 4;
|
|
29
29
|
function getLocalModelName() {
|
|
30
30
|
return process.env.EMBEDDINGS_MODEL || DEFAULT_MODEL_NAME;
|
|
31
31
|
}
|
package/dist/guest.bundle.js
CHANGED
|
@@ -16769,7 +16769,7 @@ var require_dist3 = __commonJS({
|
|
|
16769
16769
|
if (error)
|
|
16770
16770
|
return error;
|
|
16771
16771
|
hooks?.onPosted?.();
|
|
16772
|
-
return (0, plugin_toolkit_1.textResult)("Question posted
|
|
16772
|
+
return (0, plugin_toolkit_1.textResult)("Question posted. Your turn is now ending \u2014 the user's answer will arrive as a new inbound message that resumes this session: a tapped option, or, on chats that cannot show buttons, a typed reply that may be just an option's number from the list (1 = your first option). Do not call ask_user again.");
|
|
16773
16773
|
});
|
|
16774
16774
|
}
|
|
16775
16775
|
async function listConversations(gateway) {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cl as t,j as r}from"./index-BoqrvLHQ.js";import{A as e}from"./activity-route-view-msesKUwn.js";import{A as s}from"./activity-route-location-sLvKaSCa.js";import"./view-card-DiHWlypr.js";import"./filter-editors-DGVl9U4D.js";import"./subDays-9s9OEl5t.js";import"./runs-k2NpbZm8.js";import"./event-kind-options-fHAIXu24.js";import"./source-record-panels-BMut9YIA.js";import"./events-feed-DcKTkJVe.js";import"./definition-comparison-D_qP25jR.js";import"./json-diff-OjtREegr.js";import"./code-editor-z1Sy_hiX.js";import"./index-Vcq4gwWv.js";import"./schema-value-wjqGxXhv.js";import"./run-initiator-BKSgI1o0.js";import"./list-skeleton-CH0qQBYk.js";import"./use-automations-DfBtVzGa.js";import"./clients-Bf7ZgGro.js";import"./renderer-CTKNMcXP.js";import"./card-CAPpY9P5.js";import"./table-ZuYMOjVR.js";import"./copy-button-Xhh7ZnjO.js";import"./device-automation-Dp3faMvp.js";import"./client-activity-scopes-Aqdo6Pdr.js";import"./client-rows-Dd5YV8vn.js";import"./agent-loading-shells-BLNHIy-r.js";import"./member-scope-gate-Cxg2zGQT.js";import"./missing-view-xT0B-f5z.js";import"./app-bridge-B-L0rGz9.js";import"./needs-you-list-3uMsWcDv.js";import"./entity-schema-graph-Cq96SJ3c.js";import"./feed-event-kinds-BYuZCoU4.js";import"./public-shell-ready-K2R8iXSI.js";function M(){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{M as component};
|
|
2
|
+
//# sourceMappingURL=_-BDMUN9XZ.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-BOOL_vy3.js","assets/index-BoqrvLHQ.js","assets/index-Pae_f9LM.css","assets/entity-pages-_nuesgnp.js","assets/renderer-CTKNMcXP.js","assets/schema-value-wjqGxXhv.js","assets/card-CAPpY9P5.js","assets/table-ZuYMOjVR.js","assets/view-card-DiHWlypr.js","assets/filter-editors-DGVl9U4D.js","assets/subDays-9s9OEl5t.js","assets/runs-k2NpbZm8.js","assets/activity-route-location-sLvKaSCa.js","assets/event-kind-options-fHAIXu24.js","assets/source-record-panels-BMut9YIA.js","assets/events-feed-DcKTkJVe.js","assets/definition-comparison-D_qP25jR.js","assets/json-diff-OjtREegr.js","assets/code-editor-z1Sy_hiX.js","assets/index-Vcq4gwWv.js","assets/run-initiator-BKSgI1o0.js","assets/list-skeleton-CH0qQBYk.js","assets/use-automations-DfBtVzGa.js","assets/clients-Bf7ZgGro.js","assets/copy-button-Xhh7ZnjO.js","assets/device-automation-Dp3faMvp.js","assets/client-activity-scopes-Aqdo6Pdr.js","assets/client-rows-Dd5YV8vn.js","assets/agent-loading-shells-BLNHIy-r.js","assets/member-scope-gate-Cxg2zGQT.js","assets/missing-view-xT0B-f5z.js","assets/app-bridge-B-L0rGz9.js","assets/dynamic-schema-form-CRyUchXo.js","assets/views-access-required-HA-PiOwA.js","assets/record-session-BrM9cdXu.js","assets/view-param-filters-DGKxSr7r.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-BoqrvLHQ.js";import{A as P}from"./activity-route-location-sLvKaSCa.js";import{P as i}from"./public-shell-ready-K2R8iXSI.js";const S=R(async()=>({default:(await v(async()=>{const{EntityPage:s}=await import("./entity-page-BOOL_vy3.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,35]))).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=_-CF5X4ANe.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as b,P as j,H as
|
|
2
|
-
//# sourceMappingURL=_agentId-
|
|
1
|
+
import{c as b,P as j,H as v,n as N,s as k,r as S,j as s,at as L,au as $,O as C,i as E,du as P,L as l,dv as u,i6 as w}from"./index-BoqrvLHQ.js";import{A as y}from"./agent-skill-context-fqedKd0D.js";import"./core.esm-Ctg_pXLe.js";import"./skill-editor-D_W3QlRz.js";const B={skills:{label:"Skills",create:"Add a skill"},guardrails:{label:"Guardrails",create:"New custom guardrail"}};function R({owner:e,agentId:a,agentName:o,subpath:r}){const[n]=r.split("/"),t=n==="skills"||n==="guardrails"?{key:n,...B[n]}:null;return s.jsx(P,{crumbs:[s.jsx(l,{to:"/$owner",params:{owner:e},search:{section:"agent"},className:u,children:"Agents"},"agents"),s.jsx(l,{to:"/$owner/agents/$agentId",params:{owner:e,agentId:a},className:u,children:o},"agent"),...t?[s.jsx(l,{to:"/$owner/agents/$agentId",params:{owner:e,agentId:a},hash:t.key,className:u,children:t.label},"section")]:[]],current:t?t.create:"Conversation"})}function W({owner:e,agentId:a}){const o=b(),{pathname:r}=j(),{isAuthenticated:n}=v(),{isMember:t}=N(),d=n&&t,{data:p=[],isLoading:x}=k({enabled:d}),g=p.find(f=>f.agentId===a)??null,m=!g&&!x&&d;S.useEffect(()=>{m&&o({to:"/$owner",params:{owner:e},replace:!0})},[m,o,e]);const h=`/${e}/agents/${a}`,c=r.startsWith(`${h}/`)?r.slice(h.length+1):"",i=c.endsWith("/")?c.slice(0,-1):c,A=i.startsWith("conversations/");return s.jsx(y,{agentId:a,children:s.jsxs(L,{className:"gap-3 overflow-hidden pt-2.5 pb-8",children:[i?s.jsx($,{children:s.jsx(R,{owner:e,agentId:a,agentName:g?.name??"Agent",subpath:i})}):null,s.jsx("div",{className:E("flex min-h-0 min-w-0 flex-1 flex-col",A?"overflow-hidden":"overflow-y-auto"),children:s.jsx(C,{})})]})})}function I(){const{owner:e,agentId:a}=w.useParams();return s.jsx(W,{owner:e,agentId:a})}export{I as component};
|
|
2
|
+
//# sourceMappingURL=_agentId-CGScf8z_.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as L,dy as P,r as d,dz as w,j as n,i as D,H as E,n as M,s as N,bc as R,dj as O,z,dA as B,dB as H,bp as $,V as Q}from"./index-BoqrvLHQ.js";import{L as _,A as F}from"./agent-thread-Cqf9ITrT.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-BLNHIy-r.js";import"./app-bridge-B-L0rGz9.js";import"./pending-seed-BBACroge.js";import"./use-mention-search-khySpz_V.js";import"./index-Vcq4gwWv.js";import"./use-automations-DfBtVzGa.js";import"./events-feed-DcKTkJVe.js";import"./definition-comparison-D_qP25jR.js";import"./json-diff-OjtREegr.js";import"./code-editor-z1Sy_hiX.js";import"./schema-value-wjqGxXhv.js";import"./run-initiator-BKSgI1o0.js";import"./list-skeleton-CH0qQBYk.js";import"./subDays-9s9OEl5t.js";import"./clients-Bf7ZgGro.js";import"./renderer-CTKNMcXP.js";import"./card-CAPpY9P5.js";import"./table-ZuYMOjVR.js";import"./copy-button-Xhh7ZnjO.js";import"./device-automation-Dp3faMvp.js";function W({owner:e,agent:s,threadId:t,afterMessagesContent:u,className:r,initialDraft:g,newChatRequested:f=!1,preventAutoNavigate:p}){const o=L(),i=s.agentId,{data:a=[]}=P(i,{orgSlug:e}),[l,x]=d.useState(()=>b()),[h,A]=d.useState(null);d.useEffect(()=>{!f||t||(x(b()),A(null),o({...w,search:(m=>{const{new:C,...y}=m;return y}),replace:!0}))},[f,t,o]);const v=d.useMemo(()=>!h||a.some(m=>m.id===h.id)?a:[h,...a],[a,h]),c=t??l,T=!t||!v.some(m=>m.id===t),j=d.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=d.useCallback(()=>{T&&!p&&j()},[T,j,p]);return n.jsx("div",{className:D("flex min-h-0 flex-1 flex-col",r),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(_,{agentId:i,workspaceSlug:e,thread:c,loadHistory:!!t,onFirstUserMessage:k,initialDraft:g,children:n.jsx(F,{afterMessagesContent:u})},`${i}:${c}`)})})}function q({owner:e,agentId:s,threadId:t,initialDraft:u,newChatRequested:r,afterMessagesContent:g,preventAutoNavigate:f}){const{isAuthenticated:p}=E(),{isMember:o,isLoading:i}=M(),a=p&&o,{data:l=[],isLoading:x}=N({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:u,newChatRequested:r,afterMessagesContent:g,preventAutoNavigate:f,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(R,{icon:O,title:"Agent not found",description:"This agent may have been removed."})}function G(e){return[...e].sort((s,t)=>t.updatedAt-s.updatedAt)[0]}function J({owner:e,agentId:s,threadId:t,initialDraft:u,forceComposer:r=!1,newChatRequested:g=!1,afterMessagesContent:f,preventAutoNavigate:p}){const o=L(),{data:i=[],isLoading:a}=z(B(e,s,{strict:!1})),l=d.useMemo(()=>G(i),[i]);return d.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(q,{owner:e,agentId:s,threadId:t,initialDraft:u,newChatRequested:g,afterMessagesContent:f,preventAutoNavigate:p})}function At(){const{owner:e,agentId:s}=H.useParams(),{threadId:t}=$({strict:!1}),{new:u,prompt:r}=Q({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 pt-2.5 pb-4 lg:px-6 lg:pb-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(J,{owner:e,agentId:s,threadId:t,initialDraft:r,forceComposer:!t,newChatRequested:!!u})})})}export{At as component};
|
|
2
|
+
//# sourceMappingURL=_agentId-EQU2aUP0.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as b,d as P,j as t,dD as $,dE as L,dF as S,B as r,L as u,d5 as _,dG as z,c as B,M as T,aw as E,H as O,n as H,r as K,at as W,au as F,du as G,dv as N,dj as M,m as U,c9 as V,dH as q,dI as w,aS as J}from"./index-BoqrvLHQ.js";import{u as Q,R as X,a as Y,A as Z}from"./automation-run-now-C5XTS00o.js";import{a as I,b as tt}from"./use-automations-DfBtVzGa.js";import"./event-detail-DUvlqn9b.js";import"./events-feed-DcKTkJVe.js";import"./definition-comparison-D_qP25jR.js";import"./json-diff-OjtREegr.js";import"./code-editor-z1Sy_hiX.js";import"./index-Vcq4gwWv.js";import"./schema-value-wjqGxXhv.js";import"./run-initiator-BKSgI1o0.js";import"./list-skeleton-CH0qQBYk.js";import"./subDays-9s9OEl5t.js";import"./clients-Bf7ZgGro.js";import"./renderer-CTKNMcXP.js";import"./card-CAPpY9P5.js";import"./table-ZuYMOjVR.js";import"./copy-button-Xhh7ZnjO.js";import"./device-automation-Dp3faMvp.js";import"./missing-view-xT0B-f5z.js";import"./app-bridge-B-L0rGz9.js";import"./view-param-filters-DGKxSr7r.js";import"./filter-editors-DGVl9U4D.js";import"./needs-you-list-3uMsWcDv.js";import"./scoped-feed-bar-DNFL0sYX.js";import"./event-kind-options-fHAIXu24.js";import"./create-automation-form-CD6jSlWL.js";import"./entity-options-D4t-NAcg.js";import"./model-selector-D2OpDkwH.js";import"./skill-editor-D_W3QlRz.js";import"./use-mention-search-khySpz_V.js";import"./proposal-review-shell-C8ZfIAYn.js";import"./runs-k2NpbZm8.js";import"./runs-list-DUXRMkWN.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}=H(),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(),R=()=>void n({to:"/$owner/automations/$automationId",params:{owner:e,automationId:s},search:{view:"activity",run_id:void 0}}),A=()=>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]=K.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(G,{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(M,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),k&&!c?t.jsx(U,{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(V,{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:R,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:A})]})})}function Ot(){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{Ot as component};
|
|
2
|
+
//# sourceMappingURL=_automationId-PXZ33jsF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=_connectorKey._connectionId-
|
|
1
|
+
import{jq as P,j as e,aS as Q,c as X,aZ as Y,cK as K,cM as ee,d_ as ne,B as M,L as c,cx as te,a_ as se,j9 as oe,ja as ae,ba as ie,dv as u,j4 as re,aP as ce,iF as de,dt as R,du as y,aD as me,W as le,S as pe}from"./index-BoqrvLHQ.js";import{f as ue,C as he,a as xe,F as je,b as fe,c as ve,A as Ce,d as De}from"./connection-feed-detail-BYo7zdVD.js";import{c as $e,C as Ne}from"./device-pin-tombstone-Dkj7hrBE.js";import{C as b}from"./connector-page-shell-an3SYLim.js";import{a as ge}from"./connector-provenance-mSZCOud-.js";import{D as be}from"./detail-page-skeleton-CPAfZLG0.js";import{S as T,g as W}from"./status-variants-SzXYYedJ.js";import"./scoped-feed-bar-DNFL0sYX.js";import"./event-kind-options-fHAIXu24.js";import"./filter-editors-DGVl9U4D.js";import"./subDays-9s9OEl5t.js";import"./events-feed-DcKTkJVe.js";import"./definition-comparison-D_qP25jR.js";import"./json-diff-OjtREegr.js";import"./code-editor-z1Sy_hiX.js";import"./index-Vcq4gwWv.js";import"./schema-value-wjqGxXhv.js";import"./run-initiator-BKSgI1o0.js";import"./list-skeleton-CH0qQBYk.js";import"./use-automations-DfBtVzGa.js";import"./clients-Bf7ZgGro.js";import"./renderer-CTKNMcXP.js";import"./card-CAPpY9P5.js";import"./table-ZuYMOjVR.js";import"./copy-button-Xhh7ZnjO.js";import"./device-automation-Dp3faMvp.js";import"./entity-options-D4t-NAcg.js";import"./runs-list-DUXRMkWN.js";import"./feed-event-kinds-BYuZCoU4.js";import"./runs-k2NpbZm8.js";function tn(){const{owner:p,connectorKey:n,connectionId:f}=P.useParams(),{addFeed:o,feedId:i,settings:x,auth_result:a}=P.useSearch();return e.jsx(Q,{owner:p,children:d=>e.jsx(_e,{organizationId:d.organizationId,ownerSlug:d.ownerSlug,isWorkspaceLoading:d.isWorkspaceLoading,connectorKey:n,connectionId:Number(f),showAddFeed:o===!0,feedId:i,settingsView:x===!0,authResult:a})})}function _e({organizationId:p,ownerSlug:n,isWorkspaceLoading:f,connectorKey:o,connectionId:i,showAddFeed:x,feedId:a,settingsView:d,authResult:_}){const S=X(),{data:H=[]}=Y(),{data:O=[],isLoading:V,isError:v,refetch:q}=K(p??"",{connectorKey:o,connectionIds:[i]}),{data:F=[]}=ee(p??""),{data:z=[],isLoading:G,isError:U,refetch:Z}=ne(a?i:null,{eventCounts:!0}),t=O.find(r=>r.id===i),s=F.find(r=>r.key===o),m=a?z.find(r=>r.id===a):null;if(f||V||a&&G||!p)return e.jsx(be,{label:a?"Loading feed":"Loading connection"});if(v||a&&U)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsxs("p",{children:["Could not load this ",v?"connection":"feed","."]}),e.jsx(M,{variant:"outline",size:"sm",onClick:()=>void(v?q():Z()),children:"Retry"})]});if(!t)return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found."}),e.jsxs(c,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:o},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",s?.name??o]})]});const C=te({...t,connector_name:t.connector_name??s?.name??null}),D=!a&&!x,J=()=>void S({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(i)},search:{},replace:!0});let h,j=C,w,k,$;a?m?(j=ue(m,s),m.store==="channel_messages"?(h=e.jsx(xe,{feed:m,hideHeader:!0}),$="chat channel"):(w=e.jsx(je,{feed:m,ownerSlug:n}),k=e.jsx(fe,{feed:m}),h=e.jsx(ve,{feed:m,connectorDef:s,ownerSlug:n}))):(h=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),j="Feed"):x&&(h=e.jsx(Ce,{onClose:J,organizationId:p,connections:[t],connectorDefinitions:F}),j="Add feed",$=De);const l=H.find(r=>r.id===t.device_worker_id&&se(r,n)),L=l?oe(l):void 0,N=L?ae(n,L,ie()):void 0,I=[e.jsx(c,{to:"/$owner/connectors",params:{owner:n},className:u,children:"Connectors"},"connectors"),...l&&N?[e.jsx(c,{to:"/$owner/connectors/app/$appId",params:{owner:n,appId:N.id},className:u,children:N.name},"app"),e.jsx(c,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:l.id},className:u,children:re(l)},"device")]:[e.jsx(c,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:o},search:{},className:u,children:s?.name??o},"connector")]];D||I.push(e.jsx(c,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(i)},search:{},className:u,children:C},"connection"));const g=D?$e(t):null,A=$??g??void 0,E=s?e.jsx(ce,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??de(s.auth_schema)}):null,B=e.jsx(R,{breadcrumb:e.jsx(y,{crumbs:I}),icon:E,title:j,status:w??e.jsx(T,{status:W(t.status),showDot:!0,children:t.status}),meta:k,caption:A,captionTone:g?"error":"muted"});return D?l&&s&&me(s)?e.jsx(le,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:l.id},search:{connection:t.id,settings:d||void 0},hash:`connection-${t.id}`,replace:!0}):!d&&!_?e.jsx(b,{header:e.jsx(R,{breadcrumb:e.jsx(y,{crumbs:[e.jsx(c,{to:"/$owner",params:{owner:n},className:u,children:"Home"},"home")]}),icon:E,title:C,status:e.jsx(T,{status:W(t.status),showDot:!0,children:t.status}),meta:e.jsx(M,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:e.jsxs(c,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:o,connectionId:String(i)},search:{settings:!0},children:[e.jsx(pe,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),"Settings"]})}),caption:A,captionTone:g?"error":"muted"}),children:e.jsx(he,{connection:t,ownerSlug:n})}):e.jsxs(b,{header:B,children:[e.jsx(ge,{connectorDef:s,connectorKey:o,ownerSlug:n,deviceWorkerId:t.device_worker_id,deviceLabel:t.device_label}),e.jsx(Ne,{embedded:!0,connection:t,connectorDef:s,ownerSlug:n,openSettings:d,authResult:_},t.id)]}):e.jsx(b,{header:B,children:e.jsx("div",{className:"mt-0",children:h})})}export{tn as component};
|
|
2
|
+
//# sourceMappingURL=_connectorKey._connectionId-DcI29kGy.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aW as Pe,aX as Se,aY as $e,b3 as re,b0 as J,i9 as Ge,ia as Qe,j as e,ib as Ze,B as g,L as _,b2 as le,bl as Ee,dt as ee,du as se,dv as M,ic as Je,y as es,id as Z,r as u,ie as ye,ig as De,dM as ss,ih as Ne,by as I,ii as Ce,Z as k,bq as ts,br as ns,bs as as,bt as is,bu as rs,ij as os,$ as S,bR as V,al as z,A as ke,ik as ls,il as cs,ez as ds,im as us,c9 as ce,io as ms,ip as xs,iq as _e,ir as Fe,is as Le,e9 as Be,a7 as D,a8 as te,it as hs,gA as ps,iu as gs,cJ as Re,iv as Ke,i5 as R,c as X,iw as js,aE as fs,aF as vs,aH as bs,ix as W,iy as ys,aS as Ns,u as Oe,iz as Ie,iA as Cs,b5 as ks,iB as ws,iC as As,iD as Ps,aV as we,aU as Ss,cK as $s,aN as Es,au as U,f2 as Me,dz as Ds,iE as Ue,aP as de,be as _s,i as Fs,iF as Ls}from"./index-BoqrvLHQ.js";import{C as Bs,A as Rs}from"./connect-menu-BWrAhMqO.js";import{C as ne}from"./connector-page-shell-an3SYLim.js";import{C as Ks}from"./connector-provenance-mSZCOud-.js";import{R as Os,D as ue}from"./detail-page-skeleton-CPAfZLG0.js";import{L as oe}from"./list-skeleton-CH0qQBYk.js";import"./runs-k2NpbZm8.js";import"./filter-editors-DGVl9U4D.js";import"./subDays-9s9OEl5t.js";import"./runs-list-DUXRMkWN.js";import"./run-initiator-BKSgI1o0.js";import"./use-automations-DfBtVzGa.js";import"./clients-Bf7ZgGro.js";function Is({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:`${J}${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?J: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:M,children:"Connectors"},"connectors")]})}),children:e.jsx(Ze,{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(Ee,{ownerSlug:s,connectorKey:m})})})}function Ms({catalog:s,initialProvider:t,initialSlug:a,allowOAuth:n=!0,initialModel:o,onDone:d}){const x=Je(),c=es(),l=s.find(r=>r.slug===t)??s[0],p=n&&l&&Z(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??""),[E,A]=u.useState(o??l?.defaultModel??""),[$,T]=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&&Z(j),pe=j?De(j):!1,ge=he&&q==="oauth",je=pe&&!ge,P=ss().slug,Q=u.useCallback(()=>{xe(!0),c.invalidateQueries({queryKey:["inference-providers"]})},[c]),ze=u.useCallback(()=>{c.invalidateQueries({queryKey:["inference-providers"]}),d()},[c,d]),Te=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&&Z(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()),E.trim()&&(y.model=E.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:E,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=>T(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(z,{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 Te(),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:ze,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 zs({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(qs,{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(Vs,{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(z,{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 qs({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??""),E=t&&l.trim().length>0,A=i.trim()!==(m.base_url??""),$=N.trim()!==(m.model??""),T=t&&(A||$),Y={base_url:i.trim()||void 0,model:N.trim()||void 0,models_endpoint:m.models_endpoint},B=Fe(Y),q=t&&T&&Le(B),K=n.isPending||o.isPending||d.isPending,F=(w||E||T)&&!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(),T?d.mutateAsync({providerSlug:s.slug,modality:"text",block:Y}):Promise.resolve(),E?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(z,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]})}function Vs({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),E=()=>{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(D,{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:E,children:n.isPending?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]}):null]})}function Ws({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(Ys,{kind:s.providerKind}),e.jsx("span",{className:"text-sm font-medium",children:s.name}),e.jsx(D,{variant:"secondary",className:"h-4 px-1.5 py-0 text-[10px] uppercase tracking-wide",children:s.providerKind}),s.connected?e.jsx(D,{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(D,{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 Xs({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(z,{}):"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 Ys({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 Hs={data:!1,chat:!1,actions:!1,audience:!1,inference:!0,runtime:!1},Gs={data:!1,chat:!1,actions:!1,audience:!1,inference:!1,runtime:!0};function Ct(){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(Is,{ownerSlug:d,familyKind:n,familyId:o});switch(n){case"inference":return e.jsx(Js,{ownerSlug:d,providerSlug:o});case"sandbox":return e.jsx(Zs,{ownerSlug:d,sandboxId:o});case"sandbox-provider":return e.jsx(Qs,{ownerSlug:d,providerKind:o});default:return e.jsx(nt,{ownerSlug:d,organizationId:x,isWorkspaceLoading:c,connectorKey:t})}}})}function Qs({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 Zs({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(U,{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(U,{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:M,children:"Connectors"},"connectors"),e.jsx(_,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${le}${c.providerKind}`},search:{instances:!0},className:M,children:re(c.providerKind)},"family")]}),icon:e.jsx(de,{name:l,faviconDomain:_s(c.providerKind)}),title:l,badge:e.jsxs(e.Fragment,{children:[e.jsx(D,{variant:"secondary",children:c.providerKind}),c.connected?e.jsx(D,{className:"border-transparent bg-emerald-500/10 text-emerald-500",children:"Connected"}):e.jsx(D,{variant:"destructive",children:"No credential"})]}),status:e.jsx(Ue,{facets:Gs})}),children:[e.jsx(Ws,{sandbox:c}),e.jsx(R,{title:"Settings",muted:!0,children:e.jsx(Xs,{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(U,{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(U,{className:"space-y-3",children:[e.jsx(Me,{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,E=o?e.jsx(tt,{agentId:d,model:n,providerName:v}):n?e.jsx(st,{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:M,children:"Connectors"},"connectors"),...h?[e.jsx(_,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${J}${h.kind}`},search:{instances:!0},className:M,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(D,{variant:"secondary",children:"Default"}):null,h.status?e.jsx(D,{variant:"outline",children:h.status}):null,h.hasCustomUpstream?e.jsx(D,{variant:"outline",children:"Custom upstream"}):null]}):null,status:e.jsx(Ue,{facets:Hs})});return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(ne,{header:A,children:[E,e.jsx("div",{className:"space-y-6",children:h?e.jsx(zs,{provider:h,catalog:f,autoOpenEdit:!!n}):e.jsx(et,{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 et({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&&Z(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:`${J}${t}`},search:{},children:"Open existing connection"})})]}),(!l||c&&De(c))&&e.jsx(Ms,{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 st({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 tt({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 nt({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(()=>Es(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(U,{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(it,{connector:h,ownerSlug:s,organizationId:t??void 0,connectionCount:l.length}):e.jsxs("div",{className:"space-y-3",children:[e.jsx(Me,{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(at,{hero:v,connector:h,organizationId:t,ownerSlug:s,connectorKey:n,connections:l,isLoading:p,openNewApp:f==="oauth_app",onNewAppHandled:()=>void N({...Ds,search:w=>({...w,setup:void 0}),replace:!0})}):e.jsxs(U,{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(Ee,{ownerSlug:s,connectorKey:n})})]})})}function at({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(Bs,{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(ct,{connector:t,organizationId:a,ownerSlug:n}),i&&m?e.jsx(oe,{label:"Loading actions",rows:2}):i&&p?e.jsx(lt,{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(Os,{scope:{connectorKey:o},ownerSlug:n})}):null,e.jsx(rt,{connector:t,organizationId:a,ownerSlug:n})]})}function it({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:M,children:"Connectors"},"connectors")]}),icon:e.jsx(de,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??Ls(s.auth_schema),className:"h-10 w-10"}),title:s.name,badge:e.jsxs(e.Fragment,{children:[e.jsx(Ks,{connectorDef:s,ownerSlug:t}),a?e.jsx(ot,{connector:s,organizationId:a,ownerSlug:t,connectionCount:n}):null]}),caption:s.description})}function rt({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 ot({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(z,{size:"md",className:"mr-1.5"}):null,"Remove connector"]})]})]})}function lt({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:Fs(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(Rs,{status:n.status})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.slug})]},n.slug))})})}function ct({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{at as ConnectorDetailShell,ot as ConnectorRemoveButton,Ct as component};
|
|
2
|
+
//# sourceMappingURL=_connectorKey.index-Cr2NDJWX.js.map
|
package/dist/owletto/dist/assets/{_conversationId-CPpNySjO.js → _conversationId-CnmLYlVS.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,da as w,i as c,
|
|
2
|
-
//# sourceMappingURL=_conversationId-
|
|
1
|
+
import{j as e,da as w,i as c,jF as h,jG as p,jH as d,jI as u,jJ as A,r as M,n as C,cK as z,jK as N}from"./index-BoqrvLHQ.js";import{A as y}from"./agent-loading-shells-BLNHIy-r.js";import{s as b,R as k,A as I}from"./agent-thread-Cqf9ITrT.js";import{d as O}from"./events-feed-DcKTkJVe.js";import"./app-bridge-B-L0rGz9.js";import"./pending-seed-BBACroge.js";import"./use-mention-search-khySpz_V.js";import"./index-Vcq4gwWv.js";import"./use-automations-DfBtVzGa.js";import"./definition-comparison-D_qP25jR.js";import"./json-diff-OjtREegr.js";import"./code-editor-z1Sy_hiX.js";import"./schema-value-wjqGxXhv.js";import"./run-initiator-BKSgI1o0.js";import"./list-skeleton-CH0qQBYk.js";import"./subDays-9s9OEl5t.js";import"./clients-Bf7ZgGro.js";import"./renderer-CTKNMcXP.js";import"./card-CAPpY9P5.js";import"./table-ZuYMOjVR.js";import"./copy-button-Xhh7ZnjO.js";import"./device-automation-Dp3faMvp.js";const P={discord:{hex:`#${u.hex}`,path:u.path},gchat:{hex:`#${d.hex}`,path:d.path},slack:{hex:"#4A154B",path:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},teams:{imgSrc:"https://www.google.com/s2/favicons?domain=teams.microsoft.com&sz=64"},telegram:{hex:`#${p.hex}`,path:p.path},whatsapp:{hex:`#${h.hex}`,path:h.path}};function R({platform:s,className:a}){const t=s?P[s]:null;return t?"imgSrc"in t?e.jsx("img",{src:t.imgSrc,alt:"","aria-hidden":"true",className:c("rounded-sm",a),loading:"lazy"}):e.jsx("svg",{viewBox:t.viewBox??"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:a,style:{color:t.hex},children:e.jsx("path",{d:t.path})}):e.jsx(w,{className:c("text-muted-foreground",a),"aria-hidden":"true"})}function S(s,a,t){return s==="slack"&&t?.teamId&&a?`https://app.slack.com/client/${t.teamId}/${a}`:null}function T({owner:s,agentId:a,conversationId:t}){const{data:n=[],isLoading:x}=A(a,t,{orgSlug:s}),i=M.useMemo(()=>n.map(r=>b(r,{showToolCalls:!0})).filter(r=>r!==null),[n]),[o,g]=t.split(":"),m=O(o)??"the source app",{org:f}=C(),{data:j=[]}=z(f?.id??"",{connectorKey:o}),v=j[0]?.config?.chatMetadata,l=S(o,g,v);return e.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col pb-6",children:x?e.jsx(y,{readOnly:!0}):i.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No messages in this conversation."}):e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsx(k,{messages:i,children:e.jsx(I,{readOnly:!0})}),l?e.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"mt-4 flex items-center gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3 text-sm transition-colors hover:bg-muted",children:[e.jsx(R,{platform:o,className:"size-5 shrink-0"}),e.jsxs("span",{className:"text-muted-foreground",children:["This is a read-only copy. Continue the conversation with this agent in ",m,"."]}),e.jsxs("span",{className:"ml-auto shrink-0 whitespace-nowrap font-medium text-foreground",children:["Open ",m," →"]})]}):null]})})}function s2(){const{owner:s,agentId:a,conversationId:t}=N.useParams();return e.jsx(T,{owner:s,agentId:a,conversationId:t})}export{s2 as component};
|
|
2
|
+
//# sourceMappingURL=_conversationId-CnmLYlVS.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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-BoqrvLHQ.js";import{E as $}from"./event-detail-DUvlqn9b.js";import"./events-feed-DcKTkJVe.js";import"./definition-comparison-D_qP25jR.js";import"./json-diff-OjtREegr.js";import"./code-editor-z1Sy_hiX.js";import"./index-Vcq4gwWv.js";import"./schema-value-wjqGxXhv.js";import"./run-initiator-BKSgI1o0.js";import"./list-skeleton-CH0qQBYk.js";import"./subDays-9s9OEl5t.js";import"./use-automations-DfBtVzGa.js";import"./clients-Bf7ZgGro.js";import"./renderer-CTKNMcXP.js";import"./card-CAPpY9P5.js";import"./table-ZuYMOjVR.js";import"./copy-button-Xhh7ZnjO.js";import"./device-automation-Dp3faMvp.js";import"./missing-view-xT0B-f5z.js";import"./app-bridge-B-L0rGz9.js";import"./view-param-filters-DGKxSr7r.js";import"./filter-editors-DGVl9U4D.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 M(){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{M as component};
|
|
2
|
+
//# sourceMappingURL=_eventId-w5sDz5oa.js.map
|