@lobu/runtime-server 20.1.0 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component.json +1 -1
- package/dist/connectors/chat-user-identity.ts +41 -0
- package/dist/connectors/google-identity.ts +11 -0
- package/dist/connectors/slack-identity.ts +19 -0
- package/dist/db/migrations/20260915030000_owner_dm_delivery_request_platform.sql +51 -0
- package/dist/dependencies.bun.lock +28 -30
- package/dist/owletto/dist/assets/{_-DdvHIadV.js → _-Ds4DyQjj.js} +2 -2
- package/dist/owletto/dist/assets/_-VmyR6aN_.js +1 -0
- package/dist/owletto/dist/assets/{_agentId-DbTBU4KZ.js → _agentId-BAVnp0c7.js} +1 -1
- package/dist/owletto/dist/assets/_agentId-Df-3rGi5.js +1 -0
- package/dist/owletto/dist/assets/{_automationId-C7dZzg6X.js → _automationId-D696vOjd.js} +1 -1
- package/dist/owletto/dist/assets/{_connectorKey._connectionId-NQf43Ew3.js → _connectorKey._connectionId-BAJGfcy7.js} +1 -1
- package/dist/owletto/dist/assets/{_connectorKey.index-D-0ZNsgM.js → _connectorKey.index-BBF8vGJS.js} +1 -1
- package/dist/owletto/dist/assets/{_conversationId-F5YmyLV9.js → _conversationId-Ci4rgrHm.js} +1 -1
- package/dist/owletto/dist/assets/{_deploymentId-3LTMi0ZT.js → _deploymentId-Iy-D5PDq.js} +1 -1
- package/dist/owletto/dist/assets/_name-CeGwb0oK.js +1 -0
- package/dist/owletto/dist/assets/{_owner-DglbbDEx.js → _owner-CFR1G8OX.js} +1 -1
- package/dist/owletto/dist/assets/_skillKey-DuLcQWBu.js +1 -0
- package/dist/owletto/dist/assets/{_slug-CnQDfsCE.js → _slug-CDSO20ac.js} +1 -1
- package/dist/owletto/dist/assets/{accept-invitation-Dgoyublh.js → accept-invitation-Db5jklHT.js} +1 -1
- package/dist/owletto/dist/assets/{activity-route-view-BNzKO6aD.js → activity-route-view-DVW3DoB7.js} +1 -1
- package/dist/owletto/dist/assets/{agent-card-controls-VJgcB5-0.js → agent-card-controls-CZO6GI0s.js} +1 -1
- package/dist/owletto/dist/assets/{agent-client-setup-list-C5KRNRw3.js → agent-client-setup-list-_chLOorY.js} +1 -1
- package/dist/owletto/dist/assets/{agent-connect-pages-BFSb6vmW.js → agent-connect-pages-DWBgSIYT.js} +1 -1
- package/dist/owletto/dist/assets/{agent-editor-form-CajEehVn.js → agent-editor-form-BTNlg0kQ.js} +1 -1
- package/dist/owletto/dist/assets/{agent-guardrails-route-CZ_rXj-3.js → agent-guardrails-route-B5uoMC6o.js} +1 -1
- package/dist/owletto/dist/assets/{agent-loading-shells-Dczhk067.js → agent-loading-shells-CLoLeFcB.js} +1 -1
- package/dist/owletto/dist/assets/{agent-permissions-matrix-DIVHvpZG.js → agent-permissions-matrix-TP00-MYL.js} +1 -1
- package/dist/owletto/dist/assets/{agent-skill-context-CxglCznW.js → agent-skill-context-D4a2QCoZ.js} +1 -1
- package/dist/owletto/dist/assets/{agent-skills-route-CatU8soC.js → agent-skills-route-KVDDTbJB.js} +1 -1
- package/dist/owletto/dist/assets/{agent-subpage-shell-DVSUdIBn.js → agent-subpage-shell-DuVYZvBE.js} +1 -1
- package/dist/owletto/dist/assets/{agent-thread-DnLUOzXk.js → agent-thread-CzCJU3-R.js} +1 -1
- package/dist/owletto/dist/assets/agents-DFs57C3c.js +1 -0
- package/dist/owletto/dist/assets/{agents-workbench-BOKifKIO.js → agents-workbench-C2bUlJP2.js} +1 -1
- package/dist/owletto/dist/assets/{app._appId-BXmITXO7.js → app._appId-D0_LQTJU.js} +1 -1
- package/dist/owletto/dist/assets/{automation-detail-content-wJC9hhmA.js → automation-detail-content-DWkdhnv2.js} +1 -1
- package/dist/owletto/dist/assets/automations-DFs57C3c.js +1 -0
- package/dist/owletto/dist/assets/{calendar-taCoBmAh.js → calendar-C0XpOHd8.js} +1 -1
- package/dist/owletto/dist/assets/{callback-CJxC8u_x.js → callback-CO_K9eR-.js} +1 -1
- package/dist/owletto/dist/assets/{card-kpw3EaKC.js → card-DeFQuU_J.js} +1 -1
- package/dist/owletto/dist/assets/{claim-DLHRN0bA.js → claim-CUpWOSie.js} +1 -1
- package/dist/owletto/dist/assets/{clients-R4JsT_Fz.js → clients-DhYr4lyL.js} +1 -1
- package/dist/owletto/dist/assets/{code-editor-D3X0yQdI.js → code-editor-BqGUZFt6.js} +1 -1
- package/dist/owletto/dist/assets/connect-Dtb-E5An.js +1 -0
- package/dist/owletto/dist/assets/connect._clientId-DWtceAAw.js +1 -0
- package/dist/owletto/dist/assets/{connected._clientId-ByH4etku.js → connected._clientId-CMe-wTuV.js} +1 -1
- package/dist/owletto/dist/assets/{connection-DdBkXNbX.js → connection-BgAlYjeV.js} +1 -1
- package/dist/owletto/dist/assets/{connection-feed-detail-DF93zx0A.js → connection-feed-detail-B3ePAinf.js} +1 -1
- package/dist/owletto/dist/assets/{connector-provenance-N3sc0nbo.js → connector-provenance-DgsDg0Z9.js} +1 -1
- package/dist/owletto/dist/assets/{connectors-Ckn_aoNE.js → connectors-CqPQPo9U.js} +1 -1
- package/dist/owletto/dist/assets/{consent-Bi6KCVtT.js → consent-bswcIzsf.js} +1 -1
- package/dist/owletto/dist/assets/{core.esm-CFYXLQXH.js → core.esm-DsLgjoel.js} +1 -1
- package/dist/owletto/dist/assets/create-CcXUdke7.js +1 -0
- package/dist/owletto/dist/assets/create-Cp6hMoeU.js +1 -0
- package/dist/owletto/dist/assets/{create-BiHpu2f4.js → create-Dwo04oWV.js} +1 -1
- package/dist/owletto/dist/assets/{create-automation-form-Cv2RHsQ6.js → create-automation-form-CJ4meayB.js} +1 -1
- package/dist/owletto/dist/assets/{create._connectorKey-Qynix_hA.js → create._connectorKey-CCBb2pil.js} +1 -1
- package/dist/owletto/dist/assets/{cronstrue-D7xlYtGk.js → cronstrue-ChFyC9ps.js} +1 -1
- package/dist/owletto/dist/assets/deployments-CjfFxyDA.js +1 -0
- package/dist/owletto/dist/assets/{deployments-body-BPCALbQe.js → deployments-body-Cg0KiWGr.js} +1 -1
- package/dist/owletto/dist/assets/device-DpY67Jaj.js +1 -0
- package/dist/owletto/dist/assets/{device-pin-tombstone-DrTJYNKG.js → device-pin-tombstone-1ikyqSdb.js} +1 -1
- package/dist/owletto/dist/assets/{device-rows-fVm-zAiU.js → device-rows-Cp3yMcuV.js} +1 -1
- package/dist/owletto/dist/assets/{device._deviceId-CIe7taim.js → device._deviceId-DTYKGBY8.js} +1 -1
- package/dist/owletto/dist/assets/{entity-options-DOGD_EyZ.js → entity-options-1EaSGMX4.js} +1 -1
- package/dist/owletto/dist/assets/{entity-page-C8oDszRY.js → entity-page-DJmM70dv.js} +1 -1
- package/dist/owletto/dist/assets/{entity-type-page-BfxIgJLq.js → entity-type-page-C3mT7tXn.js} +1 -1
- package/dist/owletto/dist/assets/{events-feed-B9OqmSBy.js → events-feed-iliGfjit.js} +1 -1
- package/dist/owletto/dist/assets/{full-page-spinner-DTSqneUO.js → full-page-spinner-BN2G_YiM.js} +1 -1
- package/dist/owletto/dist/assets/guardrails-CLlnRRy9.js +1 -0
- package/dist/owletto/dist/assets/identity-MSLryUi8.js +1 -0
- package/dist/owletto/dist/assets/index-3o4Eepb4.js +1 -0
- package/dist/owletto/dist/assets/{index-Bfux0kHb.js → index-BUr8321-.js} +3 -3
- package/dist/owletto/dist/assets/{index-CK2-iHcz.js → index-Bulu5ldM.js} +1 -1
- package/dist/owletto/dist/assets/{index-DcWyuLQS.js → index-BvbfITqH.js} +1 -1
- package/dist/owletto/dist/assets/{index-Bq4m-sK0.js → index-C-u4yR8Z.js} +1 -1
- package/dist/owletto/dist/assets/{index-DkKALC2l.js → index-C2oCgDX7.js} +1 -1
- package/dist/owletto/dist/assets/{index-jGZeANLE.js → index-C6VAJ8Ku.js} +1 -1
- package/dist/owletto/dist/assets/index-Clw9ZBj-.js +1 -0
- package/dist/owletto/dist/assets/index-D2oL4Ydo.js +1 -0
- package/dist/owletto/dist/assets/index-D7wulT4y.js +1 -0
- package/dist/owletto/dist/assets/{index-COgBJ_ab.js → index-DOLFe19K.js} +1 -1
- package/dist/owletto/dist/assets/index-DTSA0Xh1.js +1 -0
- package/dist/owletto/dist/assets/index-DxXXVPU0.js +1 -0
- package/dist/owletto/dist/assets/{index-CMOHHdFH.js → index-hSE2E46p.js} +1 -1
- package/dist/owletto/dist/assets/index-nzvsA3hT.js +1 -0
- package/dist/owletto/dist/assets/{index-DYe_DVHa.js → index-vdqhlocx.js} +1 -1
- package/dist/owletto/dist/assets/{json-diff-CANZD4MQ.js → json-diff-DnsW7Pin.js} +1 -1
- package/dist/owletto/dist/assets/{list-skeleton-DZTUxpBx.js → list-skeleton-CHzLN7GK.js} +1 -1
- package/dist/owletto/dist/assets/{login-D53geSP7.js → login-CCKNM0gV.js} +1 -1
- package/dist/owletto/dist/assets/{logout-DKQS25qd.js → logout-B-N2aodZ.js} +1 -1
- package/dist/owletto/dist/assets/{member-scope-gate-C4QyRm2Q.js → member-scope-gate-B560Wg-t.js} +1 -1
- package/dist/owletto/dist/assets/{memory-browse-page-DOpV3vht.js → memory-browse-page-DMDqKJn7.js} +1 -1
- package/dist/owletto/dist/assets/{model-selector-CvU3VP90.js → model-selector-DfbmHjLu.js} +1 -1
- package/dist/owletto/dist/assets/models-M51OGDRE.js +1 -0
- package/dist/owletto/dist/assets/{new-B8_sRMYD.js → new-BVQS9H-Y.js} +1 -1
- package/dist/owletto/dist/assets/{new-DIjOVXrQ.js → new-Df_dY6Z5.js} +1 -1
- package/dist/owletto/dist/assets/{new-Df1q7GEj.js → new-DxDVE9nL.js} +1 -1
- package/dist/owletto/dist/assets/{oauth-workspace-access-DWfiekRz.js → oauth-workspace-access-D9GmiMfK.js} +1 -1
- package/dist/owletto/dist/assets/{organization-DHEC7kDq.js → organization-uSDYkJpX.js} +1 -1
- package/dist/owletto/dist/assets/{permissions-i7iwnE1a.js → permissions-Fe0DP6b8.js} +1 -1
- package/dist/owletto/dist/assets/{proposal-review-shell-C_LcyUEF.js → proposal-review-shell-D9HwnDda.js} +1 -1
- package/dist/owletto/dist/assets/{recent-By19_Buq.js → recent-C03LhMD7.js} +1 -1
- package/dist/owletto/dist/assets/{renderer-B1UThnk2.js → renderer-CHNejd95.js} +1 -1
- package/dist/owletto/dist/assets/{reset-password-Dsz5-Xeo.js → reset-password-CuISnlG_.js} +1 -1
- package/dist/owletto/dist/assets/{runs-BQ11PAQT.js → runs-BnYdToDc.js} +1 -1
- package/dist/owletto/dist/assets/{runs-panel-wkV1aGD9.js → runs-panel-DsdESupx.js} +1 -1
- package/dist/owletto/dist/assets/{runs-table-DzSWYkaf.js → runs-table-B7jKuILd.js} +1 -1
- package/dist/owletto/dist/assets/{schema-value-normalization--DhnhJNf.js → schema-value-normalization-B--OWDL8.js} +1 -1
- package/dist/owletto/dist/assets/settings-Bg9yCCoN.js +1 -0
- package/dist/owletto/dist/assets/{settings-Bu239SXe.js → settings-wGNHtsDP.js} +1 -1
- package/dist/owletto/dist/assets/skills-CN5Ube7A.js +1 -0
- package/dist/owletto/dist/assets/{switch-CCKllS7w.js → switch-Dzse_XFM.js} +1 -1
- package/dist/owletto/dist/assets/{use-mention-search-CldNZTiT.js → use-mention-search-uyW1Uwf6.js} +1 -1
- package/dist/owletto/dist/index.html +1 -1
- package/dist/server-main.bundle.mjs +9903 -9541
- package/npm-shrinkwrap.json +116 -140
- package/package.json +1 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/credentials.d.ts +16 -1
- package/vendor/core/dist/credentials.js +10 -1
- package/vendor/core/package.json +1 -1
- package/dist/owletto/dist/assets/_-CfcfHJO8.js +0 -1
- package/dist/owletto/dist/assets/_agentId-BTmFhpb6.js +0 -1
- package/dist/owletto/dist/assets/_name-BKeZbc-h.js +0 -1
- package/dist/owletto/dist/assets/_skillKey-DhiGYYFq.js +0 -1
- package/dist/owletto/dist/assets/agents-OLmcj-qM.js +0 -1
- package/dist/owletto/dist/assets/automations-OLmcj-qM.js +0 -1
- package/dist/owletto/dist/assets/connect-1ysEq9l0.js +0 -1
- package/dist/owletto/dist/assets/connect._clientId-BbMPs6l3.js +0 -1
- package/dist/owletto/dist/assets/create-C37QtjbJ.js +0 -1
- package/dist/owletto/dist/assets/create-kAQa5_Q7.js +0 -1
- package/dist/owletto/dist/assets/deployments-C5kSeowq.js +0 -1
- package/dist/owletto/dist/assets/device-DToHXxDM.js +0 -1
- package/dist/owletto/dist/assets/guardrails-9Mr6avxk.js +0 -1
- package/dist/owletto/dist/assets/identity-DMfCjdBz.js +0 -1
- package/dist/owletto/dist/assets/index-CkwwaMrx.js +0 -1
- package/dist/owletto/dist/assets/index-D0lZrXrY.js +0 -1
- package/dist/owletto/dist/assets/index-DZadnZpq.js +0 -1
- package/dist/owletto/dist/assets/index-DlqjyZKQ.js +0 -1
- package/dist/owletto/dist/assets/index-Dv0huHrO.js +0 -1
- package/dist/owletto/dist/assets/index-DxIDxgPJ.js +0 -1
- package/dist/owletto/dist/assets/index-bKUccXCc.js +0 -1
- package/dist/owletto/dist/assets/models-ooBIWFuB.js +0 -1
- package/dist/owletto/dist/assets/settings-FxbIvOhH.js +0 -1
- package/dist/owletto/dist/assets/skills-MBZ5ilDK.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,a0 as o}from"./index-BUr8321-.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ho as r,j as t,aV as a}from"./index-BUr8321-.js";import{a as s}from"./agent-connect-pages-DWBgSIYT.js";import"./agent-client-setup-list-_chLOorY.js";import"./clients-DhYr4lyL.js";import"./client-rows-EJSKR6z1.js";function x(){const{owner:e,clientId:o}=r.useParams();return t.jsx(a,{owner:e,children:({ownerSlug:n})=>t.jsx(s,{owner:n,clientId:o})})}export{x as component};
|
package/dist/owletto/dist/assets/{connected._clientId-ByH4etku.js → connected._clientId-CMe-wTuV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a2 as E,j as e,cy as _,cz as $,cA as w,cB as c,cC as M,cD as o,L as b,af as z,x as H,V as K,a1 as G,g as V,r as m,dL as I,S,ct as O,fi as f,B as y,s as Q,gH as W,g2 as q,bP as F,g3 as J,g4 as X,hn as Y,aV as Z}from"./index-
|
|
1
|
+
import{a2 as E,j as e,cy as _,cz as $,cA as w,cB as c,cC as M,cD as o,L as b,af as z,x as H,V as K,a1 as G,g as V,r as m,dL as I,S,ct as O,fi as f,B as y,s as Q,gH as W,g2 as q,bP as F,g3 as J,g4 as X,hn as Y,aV as Z}from"./index-BUr8321-.js";import{u as P,a as ee}from"./clients-DhYr4lyL.js";import{g as B,r as se}from"./client-rows-EJSKR6z1.js";function A(a,n){return{client_ids:a.join(","),mcp_activity_id:n}}function L(a){const n=a.title?.trim();return n||(a.activityKind==="session"?"MCP session":a.clientId)}function R({scopes:a,clientIds:n}){const l=E(),d=t=>{l({to:"/$owner/events",params:{owner:"me"},search:A(n,t.activityId)})};return e.jsx("div",{className:"rounded-lg border",children:e.jsxs(_,{children:[e.jsx($,{children:e.jsxs(w,{children:[e.jsx(c,{className:"px-3 py-1.5 text-xs",children:"Conversation"}),e.jsx(c,{className:"px-3 py-1.5 text-xs",children:"Calls"}),e.jsx(c,{className:"px-3 py-1.5 text-xs",children:"Last action"}),e.jsx(c,{className:"px-3 py-1.5 text-xs",children:"Last active"}),e.jsx(c,{className:"w-8 px-3 py-1.5"})]})}),e.jsx(M,{children:a.map(t=>e.jsxs(w,{className:"cursor-pointer transition-colors hover:bg-accent/50",onClick:()=>d(t),children:[e.jsxs(o,{className:"max-w-0 truncate px-3 py-2 text-xs font-medium",children:[e.jsx(b,{to:"/$owner/events",params:{owner:"me"},search:A(n,t.activityId),onClick:r=>r.stopPropagation(),className:"hover:underline",children:L(t)}),t.unreadNotificationCount>0?e.jsxs(z,{variant:"secondary",className:"ml-2 text-[10px]",children:[t.unreadNotificationCount," unread"]}):null]}),e.jsx(o,{className:"px-3 py-2 font-mono text-xs text-muted-foreground",children:t.callCount}),e.jsx(o,{className:"max-w-0 truncate px-3 py-2 text-xs text-muted-foreground",children:t.lastAction||"—"}),e.jsx(o,{className:"px-3 py-2 text-xs text-muted-foreground",children:H(t.lastCallAt)}),e.jsx(o,{className:"px-3 py-2 text-right",children:e.jsx("button",{type:"button","aria-label":`View ${L(t)} activity`,className:"text-muted-foreground hover:text-foreground",tabIndex:-1,children:e.jsx(K,{className:"h-3.5 w-3.5"})})})]},`${t.clientId}:${t.activityId}`))})]})})}function te({ownerSlug:a,clientId:n}){const{orgContext:l}=G(),{isAdmin:d}=V(l.organizationId),{data:t=[],isLoading:r}=P(null),x=ee(),[T,h]=m.useState(!1),s=m.useMemo(()=>B(t),[t]).find(i=>i.clientIds.includes(n)),N=s?.clientIds??[],g=I({enabled:!!s,limit:100,clientIds:N,activityKind:"conversation"}),p=I({enabled:!!s,limit:100,clientIds:N,activityKind:"session"}),u=g.data??[],v=p.data??[],U=m.useMemo(()=>t.filter(i=>s?.clientIds.includes(i.id)),[t,s]);if(r)return e.jsxs("div",{className:"space-y-4",children:[e.jsx(S,{className:"h-16 w-full rounded-lg"}),e.jsx(S,{className:"h-24 w-full rounded-lg"})]});if(!s)return e.jsx("p",{className:"text-sm text-muted-foreground",children:"This app isn't connected to this workspace, so its details aren't available."});const j=U[0],C=j?.details?.redirectUris??[],k=s.linkedUserEntitySlug?O(a,[{entity_type:"$member",slug:s.linkedUserEntitySlug}]):null,D=[{label:"Registered",value:s.title},{label:s.clientIds.length===1?"Client ID":"Client IDs",value:e.jsx("div",{className:"space-y-1",children:s.clientIds.map(i=>e.jsx("code",{className:"block break-all",children:i},i))})},...s.drivenBy&&s.drivenBy!==s.title?[{label:"Driven by",value:s.drivenBy}]:[],...j?.platform?[{label:"Software",value:j.platform}]:[],...C.length>0?[{label:"Redirects",value:C.join(", ")}]:[],{label:"Granted by",value:k&&s.linkedUser?e.jsx(b,{to:k,className:"font-medium text-primary hover:underline",children:s.linkedUser}):s.linkedUser??"—"},{label:"Last active",value:s.connected?se(s.lastSeenAt):"disconnected"},{label:"Registrations",value:String(s.clientIds.length)}];return e.jsxs("div",{className:"space-y-7",children:[e.jsx(f,{title:"Settings",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border text-xs",children:e.jsx("dl",{className:"divide-y",children:D.map(i=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-28 shrink-0 text-muted-foreground",children:i.label}),e.jsx("dd",{className:"min-w-0 flex-1 break-words",children:i.value})]},i.label))})}),d&&s.connected?e.jsxs("div",{className:"space-y-2 rounded-lg border p-3",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Revoking disconnects every registration this app holds",s.clientIds.length>1?` (${s.clientIds.length} of them)`:""," ","and kills its live sessions. It can reconnect by authorizing again."]}),T?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{variant:"destructive",size:"sm",className:"h-7 px-2 text-xs",disabled:x.isPending,onClick:()=>x.mutate({clientId:s.clientIds[0],scope:"all"},{onSettled:()=>h(!1)}),children:x.isPending?"Revoking…":"Confirm revoke"}),e.jsx(y,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",disabled:x.isPending,onClick:()=>h(!1),children:"Cancel"})]}):e.jsx(y,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs text-destructive hover:text-destructive",onClick:()=>h(!0),children:"Revoke"})]}):null]})}),e.jsx(f,{title:"Conversations",count:u.length>0?String(u.length):void 0,children:g.isLoading||p.isLoading?e.jsxs("div",{className:"flex items-center py-4 text-xs text-muted-foreground",children:[e.jsx(Q,{className:"mr-2"})," Loading client activity…"]}):g.isError||p.isError?e.jsx("p",{className:"py-3 text-xs text-destructive",children:"Could not load this app's activity."}):u.length===0?e.jsx("p",{className:"py-3 text-xs text-muted-foreground",children:"No recent conversations."}):e.jsx(R,{scopes:u,clientIds:s.clientIds})}),v.length>0?e.jsx(f,{title:"Sessions",count:String(v.length),children:e.jsx(R,{scopes:v,clientIds:s.clientIds})}):null]})}const ne="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6";function ae({owner:a,clientId:n}){const{data:l=[]}=P(null),t=m.useMemo(()=>B(l).find(r=>r.clientIds.includes(n)),[n,l])?.title??"Connected agent";return e.jsx("div",{className:ne,children:e.jsx(W,{header:e.jsx(q,{breadcrumb:e.jsx(J,{crumbs:[e.jsx(b,{to:"/$owner/agents",params:{owner:a},className:X,children:"Agents"},"agents")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(F,{name:t})}),title:t,caption:"An external agent connected to this workspace through Lobu. Review its Lobu conversations, activity, and access."}),children:e.jsx(te,{ownerSlug:a,clientId:n},n)})})}function oe(){const{owner:a,clientId:n}=Y.useParams();return e.jsx(Z,{owner:a,children:({ownerSlug:l})=>e.jsx(ae,{owner:l,clientId:n})})}export{oe as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cT as R,a7 as U,r as l,an as _,ag as z,j as e,s as y,B as x,bY as A,bZ as V,b_ as Y,b$ as F,c0 as P,ab as K,at as M,ac as W}from"./index-
|
|
1
|
+
import{cT as R,a7 as U,r as l,an as _,ag as z,j as e,s as y,B as x,bY as A,bZ as V,b_ as Y,b$ as F,c0 as P,ab as K,at as M,ac as W}from"./index-BUr8321-.js";import{C as q,a as B,b as D,c as G}from"./card-DeFQuU_J.js";const j="__new_org__";function H(r){return r.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function C(r){return r.length>0?r[0].toUpperCase()+r.slice(1):r}function J(r,i){return r==="not_admin"?`You must be an admin or owner to connect ${i} to Lobu.`:`You don't have permission to connect ${i} to Lobu.`}function L(r,i,t){switch(r){case"not_authorized":return J(i,t);case"no_pending":return`No Lobu install was found for ${t}. Add Lobu from the marketplace to get started.`;case"no_org":return`Your account has no Lobu organization to connect ${t} to.`;default:return`Something went wrong while connecting ${t}. Please try again.`}}function ee(){const{name:r}=R({from:"/connector/$name/connection"}),{ref:i}=U({from:"/connector/$name/connection"}),[t,o]=l.useState({kind:"loading"}),[d,b]=l.useState(""),[v,E]=l.useState(""),[g,w]=l.useState(!1),[k,m]=l.useState(null),[h,f]=l.useState(null),u=C(r),a=t.kind==="confirm"&&t.subjectKind||"connection",I=t.kind==="confirm"&&t.subjectName?t.subjectName:`this ${u} ${a}`,S=l.useCallback(async()=>{if(!i){o({kind:"error",message:"This connection link is missing its reference."});return}o({kind:"loading"});try{const n=await(await _(`${z}/api/connector/${encodeURIComponent(r)}/connection/claim-context?ref=${encodeURIComponent(i)}`,{credentials:"include"})).json();if("error"in n){if(n.error==="unauthenticated"){o({kind:"signin",signinProvider:r});return}if(n.error==="signin_required"){o({kind:"signin",signinProvider:n.signinProvider??r});return}o({kind:"error",message:L(n.error,n.code,`this ${u} ${a}`)});return}if("alreadyConnected"in n){o({kind:"already_connected",orgSlug:n.orgSlug});return}b(n.orgs[0]?.slug??""),o({kind:"confirm",subjectKind:n.subjectKind,subjectName:n.subjectName,orgs:n.orgs})}catch{o({kind:"error",message:"We couldn’t load this connection link. Please try again."})}},[r,i,u]);l.useEffect(()=>{S()},[S]);const O=async c=>{await M.social({provider:c,callbackURL:window.location.href})},$=async(c=!1)=>{if(!(!i||!d)){w(!0),m(null),f(null);try{let n=d;if(d===j){const N=v.trim();if(!N){m("Enter a name for the new organization.");return}const p=await W.create({name:N,slug:H(N)});if(p.error||!p.data){m(p.error?.message??"Couldn’t create the organization.");return}n=p.data.slug}const s=await(await _(`${z}/api/connector/${encodeURIComponent(r)}/connection/claim`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({ref:i,org:n,confirmMove:c})})).json();if("error"in s){if(s.error==="signin_required"){o({kind:"signin",signinProvider:s.signinProvider??r});return}if((s.error==="already_connected_elsewhere"||s.error==="enterprise_scope_overlap")&&s.existing){f({kind:s.error,existing:s.existing});return}m(L(s.error,s.code,`this ${u} ${a}`));return}window.location.href=s.orgSlug?`/${s.orgSlug}/connectors/${encodeURIComponent(r)}?connected=1`:"/"}catch{m(`Something went wrong while connecting this ${a}. Please try again.`)}finally{w(!1)}}},T=t.kind==="signin"?"Sign in to continue":t.kind==="error"?`Can’t connect this ${a}`:t.kind==="already_connected"?"Already connected":`Connect ${u} to Lobu`;return e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:e.jsx("div",{className:"w-full max-w-md p-8",children:e.jsxs(q,{children:[e.jsx(B,{children:e.jsx(D,{asChild:!0,children:e.jsx("h1",{children:T})})}),e.jsxs(G,{children:[t.kind==="loading"&&e.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[e.jsx(y,{size:"lg"}),e.jsx("span",{children:"Checking this connection link…"})]}),t.kind==="error"&&e.jsx("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:t.message}),t.kind==="already_connected"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This ",u," ",a," is already connected to Lobu."]}),e.jsx(x,{className:"w-full",asChild:!0,children:e.jsx("a",{href:t.orgSlug?`/${t.orgSlug}/connectors/${encodeURIComponent(r)}`:"/",children:"Open Lobu"})})]}),t.kind==="signin"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Sign in with ",C(t.signinProvider)," to verify you can connect this ",a,"."]}),e.jsxs(x,{className:"w-full",onClick:()=>O(t.signinProvider),children:["Sign in with ",C(t.signinProvider)]})]}),t.kind==="confirm"&&(()=>{const c=t.subjectName||I;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Connecting"," ",e.jsx("strong",{className:"font-medium text-foreground",children:c}),". Choose the organization to connect it to:"]}),e.jsxs(A,{value:d,onValueChange:n=>{f(null),b(n)},children:[e.jsx(V,{children:e.jsx(Y,{placeholder:"Select an organization"})}),e.jsxs(F,{children:[t.orgs.map(n=>e.jsxs(P,{value:n.slug,children:[n.name,n.isPersonal&&e.jsx("span",{className:"ml-1 text-muted-foreground",children:"(personal)"})]},n.id)),e.jsx(P,{value:j,children:"+ New organization"})]})]}),d===j&&e.jsx(K,{autoFocus:!0,value:v,onChange:n=>E(n.target.value),placeholder:"New organization name","aria-label":"New organization name"}),k&&e.jsx("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:k}),h&&(()=>{const n=h.existing.orgName??h.existing.orgSlug??"another organization";return h.kind==="already_connected_elsewhere"?e.jsxs("div",{className:"space-y-3 rounded-lg border border-border bg-muted/40 px-3 py-3",children:[e.jsxs("p",{className:"text-sm text-foreground",children:[c," is already connected in"," ",e.jsx("strong",{className:"font-medium",children:n}),". Move it here?"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{className:"flex-1",onClick:()=>$(!0),disabled:g,children:g?e.jsxs(e.Fragment,{children:[e.jsx(y,{size:"lg"}),e.jsx("span",{className:"ml-2",children:"Moving…"})]}):"Move it here"}),e.jsx(x,{className:"flex-1",variant:"outline",onClick:()=>f(null),disabled:g,children:"Cancel"})]})]}):e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:["This ",u," Enterprise Grid is already connected in"," ",e.jsx("strong",{className:"font-medium",children:n}),"; connecting this ",a," here may change how its messages route. Contact support to move it."]})})(),e.jsx(x,{className:"w-full",onClick:()=>$(),disabled:g||h!==null||!d||d===j&&!v.trim(),children:g?e.jsxs(e.Fragment,{children:[e.jsx(y,{size:"lg"}),e.jsx("span",{className:"ml-2",children:"Connecting…"})]}):`Connect ${c}`})]})})()]})]})})})}export{ee as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ew as K,r as o,j as e,de as U,df as H,aO as W,aj as C,B as b,eq as X,f9 as Y,k as M,eR as w,ep as F,bY as Z,bZ as G,b_ as J,b$ as Q,c0 as ee,en as O,F as R,c2 as se,s as E,fa as te,eX as ne,E as ae,fb as ce,aS as ie,fc as le,fd as re,fe as oe,ff as de,fg as ue,fh as me,eS as xe,L as P,fi as T,af as he,x as V}from"./index-Bfux0kHb.js";import{f as fe,C as ge}from"./entity-options-DOGD_EyZ.js";import{V as pe,R as je,S as $,g as L}from"./runs-table-DzSWYkaf.js";function ve({organizationId:s,value:t,onChange:a,entities:n,className:m}){const{data:i=[]}=K(n?void 0:s),u=o.useMemo(()=>n??fe(i),[n,i]),p=new Set(t),l=u.filter(c=>p.has(c.id)),d=c=>{const g=new Set(p);g.has(c)?g.delete(c):g.add(c),a(Array.from(g).sort((v,y)=>v-y))},x=l.length===0?"All entities":l.length===1?l[0].name:`${l.length} entities selected`;return e.jsx(U,{contentClassName:"w-[320px]",searchPlaceholder:"Filter entities...",emptyText:"No entities found.",trigger:c=>e.jsxs(b,{variant:"outline",role:"combobox","aria-expanded":c,className:C("justify-between",m),children:[x,e.jsx(X,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),children:()=>u.map(c=>{const g=p.has(c.id);return e.jsxs(H,{value:`${c.name} ${c.entityType}`,onSelect:()=>d(c.id),className:"cursor-pointer",children:[e.jsx(W,{className:C("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),e.jsxs("span",{children:[c.name," ",e.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",c.entityType,")"]})]})]},c.id)})})}function ye(s){return s?.feeds_schema?Object.entries(s.feeds_schema).map(([t,a])=>({key:t,name:a.name??t,description:a.description,configSchema:a.configSchema})):[]}const ke="Feeds are optional scheduled sync targets for an existing connection.";function Ce({organizationId:s,connections:t,connectorDefinitions:a,entityId:n,onClose:m}){const i=t.length===1,[u,p]=o.useState(i?String(t[0].id):""),[l,d]=o.useState(""),[x,c]=o.useState(n?[n]:[]),[g,v]=o.useState(null),y=Y(),_=o.useMemo(()=>new Map(a.map(r=>[r.key,r])),[a]),h=o.useMemo(()=>t.find(r=>String(r.id)===u),[t,u]),N=o.useMemo(()=>h?ye(_.get(h.connector_key)):[],[h,_]),S=o.useMemo(()=>N.find(r=>r.key===l)??null,[N,l]),f=M(`${u}:${l}`,w(S?.configSchema),S?.configSchema),{values:j,setValues:I}=f,D=o.useCallback(()=>{p(i?String(t[0].id):""),d(""),c(n?[n]:[]),v(null)},[n,i,t]),k=o.useCallback(()=>{D(),m()},[m,D]),B=o.useCallback(async()=>{if(!f.canSubmit||!h||!l)return;v(null);const r=F(j);try{await y.mutateAsync({connection_id:h.id,feed_key:l,config:Object.keys(r).length>0?r:void 0,entity_ids:n?[n]:x.length>0?x:void 0}),k()}catch(A){v(A instanceof Error?A.message:"Failed to create feed")}},[j,f.canSubmit,y,n,k,h,x,l]),z=e.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto py-6 pr-1",children:[!i&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Connection"}),e.jsx(ge,{connections:t,value:u,onValueChange:r=>{p(r),d(""),v(null)},placeholder:"Select a connection"})]}),h&&N.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Feed Type"}),e.jsxs(Z,{value:l,onValueChange:d,children:[e.jsx(G,{children:e.jsx(J,{placeholder:"Select feed type"})}),e.jsx(Q,{children:N.map(r=>e.jsx(ee,{value:r.key,children:e.jsxs("div",{children:[e.jsx("span",{children:r.name}),r.description&&e.jsxs("span",{className:"text-muted-foreground ml-1 text-xs",children:["— ",r.description]})]})},r.key))})]})]}),n?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entity"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This feed will be attached to the current entity."})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entities"}),e.jsx(ve,{organizationId:s,value:x,onChange:c,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Leave empty to create an unscoped feed."})]}),f.revision&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Feed Configuration"}),e.jsx(O,{schema:f.revision,values:j,onValuesChange:I})]}),h&&N.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector has no configurable feed types."}),e.jsx(R,{visible:f.hasConflict,onReload:f.reset}),g&&e.jsx("p",{className:"text-sm text-destructive",children:g})]}),q=e.jsx(se,{onCancel:k,className:"mt-2",children:e.jsxs(b,{disabled:!f.canSubmit||!l||y.isPending,onClick:()=>void B(),children:[y.isPending&&e.jsx(E,{size:"lg",className:"mr-2"}),"Create Feed"]})});return e.jsxs("div",{className:"flex flex-col",children:[z,q]})}function we({feed:s,onClose:t,hideHeader:a=!1}){const n=s.display_name?.trim()||s.feed_key,m=s.feed_key.includes(":")?s.feed_key.slice(s.feed_key.indexOf(":")+1):s.feed_key,i=s.external_tenant_id,u=s.connector_key==="slack"&&i?`https://app.slack.com/client/${i}/${m}`:void 0;return e.jsxs("div",{className:"flex max-w-xl flex-col gap-4",children:[a?null:e.jsxs(e.Fragment,{children:[t?e.jsxs("button",{type:"button",onClick:t,className:"inline-flex w-fit items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(te,{className:"h-3 w-3"}),"Back to connection"]}):null,e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("h2",{className:"text-lg font-semibold leading-tight",children:n}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"chat channel"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Messages captured for this channel are available to Lobu Automations. Open Slack to read the channel history."}),u?e.jsx(b,{asChild:!0,variant:"outline",className:"w-full justify-center",children:e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ae,{className:"mr-2 h-4 w-4"}),"Open in Slack"]})}):null,e.jsxs("div",{className:C(ie,"flex flex-col gap-3 p-4"),children:[e.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground",children:"Channel"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[e.jsx(ce,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("span",{className:"break-all",children:n})]}),i?e.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Workspace"}),e.jsx("span",{className:"break-all font-mono text-xs",children:i})]}):null,e.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages the bot sees here are captured as they arrive. Open the channel in Slack to read the full history."})]})]})}function Fe(s,t){return s.display_name?s.display_name:t?.feeds_schema?.[s.feed_key]?.name??s.feed_key}function Ne(s,t){const a=s?.feeds_schema;if(!a)return;if(a[t]?.configSchema)return a[t].configSchema;for(const m of Object.values(a))if(m?.key===t&&m.configSchema)return m.configSchema;const n=Object.values(a);if(n.length===1&&n[0]?.configSchema)return n[0].configSchema}function Ee({feed:s,ownerSlug:t}){return e.jsxs(e.Fragment,{children:[e.jsx($,{status:L(s.status),showDot:!0,children:s.status}),s.connection_status&&s.connection_status!==s.status&&e.jsxs($,{status:L(s.connection_status),showDot:!0,children:["Connection: ",s.connection_status]}),s.device_worker_id?e.jsx(P,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:s.device_worker_id},children:e.jsx(he,{variant:s.device_status==="offline"?"secondary":"outline",className:"text-xs hover:bg-accent",children:s.device_status==="offline"?`Waiting for ${s.device_label||s.device_platform||"device"}`:`On ${s.device_label||s.device_platform||"device"}`})}):null]})}function De({feed:s}){return s.operations.includes("sync")?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Last sync: ",s.last_sync_at?V(s.last_sync_at):"—"]}),e.jsxs("span",{children:["Next: ",s.next_run_at?V(s.next_run_at):"—"]}),e.jsxs("span",{className:"font-mono",children:[(s.event_count??0).toLocaleString()," events"]})]}):e.jsx("span",{children:"Read live when queried"})}function Ae({feed:s,connectorDef:t,ownerSlug:a}){const{data:n,refetch:m}=le(s.id),i=re(),u=oe(),p=n?.recent_runs?.some(j=>["running","pending","claimed"].includes(j.status));o.useEffect(()=>{if(!p)return;const j=setInterval(()=>m(),5e3);return()=>clearInterval(j)},[p,m]);const l=o.useMemo(()=>Ne(t,s.feed_key),[t,s.feed_key]),d=M(s.id,w(l,s.config??{}),l),{values:x,setValues:c,dirty:g}=d,v=o.useCallback(async()=>{d.canSubmit&&(await i.mutateAsync({feed_id:s.id,config:F(x)}),d.accept(x,w(l,F(x))))},[i,s.id,x,l,d.canSubmit,d.accept]),y=o.useCallback(async()=>{const j=s.status==="active"?"paused":"active";await i.mutateAsync({feed_id:s.id,status:j})},[i,s.id,s.status]),_=o.useCallback(async()=>{await u.mutateAsync(s.id)},[u,s.id]),h=s.status==="active",N=s.operations.includes("sync"),S=s.auth_profile_status&&s.auth_profile_status!=="active",f=i.isPending||u.isPending;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(b,{variant:"outline",size:"sm",disabled:f,onClick:()=>void y(),children:[h?e.jsx(de,{className:"h-3.5 w-3.5 mr-1.5"}):e.jsx(ue,{className:"h-3.5 w-3.5 mr-1.5"}),h?"Pause":"Resume"]}),N?e.jsxs(b,{variant:"outline",size:"sm",disabled:f||!h,onClick:()=>void _(),children:[u.isPending?e.jsx(E,{size:"md",className:"mr-1.5"}):e.jsx(me,{className:"h-3.5 w-3.5 mr-1.5"}),"Sync now"]}):null,e.jsx(pe,{ownerSlug:a,scope:{kind:"feed",id:s.id},variant:"ghost",label:"View in memory"})]}),S&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-amber-50 dark:bg-amber-950/20 px-3 py-2 text-sm",children:[e.jsx(xe,{className:"h-4 w-4 text-amber-500 shrink-0"}),e.jsxs("span",{className:"text-amber-700 dark:text-amber-400",children:["Authentication issue: ",s.auth_profile_status]}),e.jsx(b,{asChild:!0,variant:"outline",size:"sm",className:"ml-auto h-7 text-xs",children:e.jsx(P,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:a,connectorKey:s.connector_key,connectionId:String(s.connection_id)},search:{settings:!0},children:"Fix auth"})})]}),d.revision?e.jsx(T,{title:"Settings",children:e.jsxs("div",{className:"max-w-xl space-y-4",children:[e.jsx(O,{schema:d.revision,values:x,onValuesChange:c}),e.jsx(R,{visible:d.hasConflict,onReload:d.reset}),g&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{size:"sm",disabled:f||!d.canSubmit,onClick:()=>void v(),children:[i.isPending?e.jsx(E,{size:"md",className:"mr-1.5"}):null,"Save"]})})]})}):null,N?e.jsx(T,{title:"Recent syncs",children:n?.recent_runs&&n.recent_runs.length>0?e.jsx(je,{runs:n.recent_runs,ownerSlug:a}):e.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:"No syncs yet."})}):null]})}export{Ce as A,we as C,Ee as F,Ae as a,De as b,ke as c,Fe as f};
|
|
1
|
+
import{ew as K,r as o,j as e,de as U,df as H,aO as W,aj as C,B as b,eq as X,f9 as Y,k as M,eR as w,ep as F,bY as Z,bZ as G,b_ as J,b$ as Q,c0 as ee,en as O,F as R,c2 as se,s as E,fa as te,eX as ne,E as ae,fb as ce,aS as ie,fc as le,fd as re,fe as oe,ff as de,fg as ue,fh as me,eS as xe,L as P,fi as T,af as he,x as V}from"./index-BUr8321-.js";import{f as fe,C as ge}from"./entity-options-1EaSGMX4.js";import{V as pe,R as je,S as $,g as L}from"./runs-table-B7jKuILd.js";function ve({organizationId:s,value:t,onChange:a,entities:n,className:m}){const{data:i=[]}=K(n?void 0:s),u=o.useMemo(()=>n??fe(i),[n,i]),p=new Set(t),l=u.filter(c=>p.has(c.id)),d=c=>{const g=new Set(p);g.has(c)?g.delete(c):g.add(c),a(Array.from(g).sort((v,y)=>v-y))},x=l.length===0?"All entities":l.length===1?l[0].name:`${l.length} entities selected`;return e.jsx(U,{contentClassName:"w-[320px]",searchPlaceholder:"Filter entities...",emptyText:"No entities found.",trigger:c=>e.jsxs(b,{variant:"outline",role:"combobox","aria-expanded":c,className:C("justify-between",m),children:[x,e.jsx(X,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),children:()=>u.map(c=>{const g=p.has(c.id);return e.jsxs(H,{value:`${c.name} ${c.entityType}`,onSelect:()=>d(c.id),className:"cursor-pointer",children:[e.jsx(W,{className:C("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),e.jsxs("span",{children:[c.name," ",e.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",c.entityType,")"]})]})]},c.id)})})}function ye(s){return s?.feeds_schema?Object.entries(s.feeds_schema).map(([t,a])=>({key:t,name:a.name??t,description:a.description,configSchema:a.configSchema})):[]}const ke="Feeds are optional scheduled sync targets for an existing connection.";function Ce({organizationId:s,connections:t,connectorDefinitions:a,entityId:n,onClose:m}){const i=t.length===1,[u,p]=o.useState(i?String(t[0].id):""),[l,d]=o.useState(""),[x,c]=o.useState(n?[n]:[]),[g,v]=o.useState(null),y=Y(),_=o.useMemo(()=>new Map(a.map(r=>[r.key,r])),[a]),h=o.useMemo(()=>t.find(r=>String(r.id)===u),[t,u]),N=o.useMemo(()=>h?ye(_.get(h.connector_key)):[],[h,_]),S=o.useMemo(()=>N.find(r=>r.key===l)??null,[N,l]),f=M(`${u}:${l}`,w(S?.configSchema),S?.configSchema),{values:j,setValues:I}=f,D=o.useCallback(()=>{p(i?String(t[0].id):""),d(""),c(n?[n]:[]),v(null)},[n,i,t]),k=o.useCallback(()=>{D(),m()},[m,D]),B=o.useCallback(async()=>{if(!f.canSubmit||!h||!l)return;v(null);const r=F(j);try{await y.mutateAsync({connection_id:h.id,feed_key:l,config:Object.keys(r).length>0?r:void 0,entity_ids:n?[n]:x.length>0?x:void 0}),k()}catch(A){v(A instanceof Error?A.message:"Failed to create feed")}},[j,f.canSubmit,y,n,k,h,x,l]),z=e.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto py-6 pr-1",children:[!i&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Connection"}),e.jsx(ge,{connections:t,value:u,onValueChange:r=>{p(r),d(""),v(null)},placeholder:"Select a connection"})]}),h&&N.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Feed Type"}),e.jsxs(Z,{value:l,onValueChange:d,children:[e.jsx(G,{children:e.jsx(J,{placeholder:"Select feed type"})}),e.jsx(Q,{children:N.map(r=>e.jsx(ee,{value:r.key,children:e.jsxs("div",{children:[e.jsx("span",{children:r.name}),r.description&&e.jsxs("span",{className:"text-muted-foreground ml-1 text-xs",children:["— ",r.description]})]})},r.key))})]})]}),n?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entity"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This feed will be attached to the current entity."})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entities"}),e.jsx(ve,{organizationId:s,value:x,onChange:c,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Leave empty to create an unscoped feed."})]}),f.revision&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Feed Configuration"}),e.jsx(O,{schema:f.revision,values:j,onValuesChange:I})]}),h&&N.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector has no configurable feed types."}),e.jsx(R,{visible:f.hasConflict,onReload:f.reset}),g&&e.jsx("p",{className:"text-sm text-destructive",children:g})]}),q=e.jsx(se,{onCancel:k,className:"mt-2",children:e.jsxs(b,{disabled:!f.canSubmit||!l||y.isPending,onClick:()=>void B(),children:[y.isPending&&e.jsx(E,{size:"lg",className:"mr-2"}),"Create Feed"]})});return e.jsxs("div",{className:"flex flex-col",children:[z,q]})}function we({feed:s,onClose:t,hideHeader:a=!1}){const n=s.display_name?.trim()||s.feed_key,m=s.feed_key.includes(":")?s.feed_key.slice(s.feed_key.indexOf(":")+1):s.feed_key,i=s.external_tenant_id,u=s.connector_key==="slack"&&i?`https://app.slack.com/client/${i}/${m}`:void 0;return e.jsxs("div",{className:"flex max-w-xl flex-col gap-4",children:[a?null:e.jsxs(e.Fragment,{children:[t?e.jsxs("button",{type:"button",onClick:t,className:"inline-flex w-fit items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(te,{className:"h-3 w-3"}),"Back to connection"]}):null,e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("h2",{className:"text-lg font-semibold leading-tight",children:n}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"chat channel"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Messages captured for this channel are available to Lobu Automations. Open Slack to read the channel history."}),u?e.jsx(b,{asChild:!0,variant:"outline",className:"w-full justify-center",children:e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ae,{className:"mr-2 h-4 w-4"}),"Open in Slack"]})}):null,e.jsxs("div",{className:C(ie,"flex flex-col gap-3 p-4"),children:[e.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground",children:"Channel"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[e.jsx(ce,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("span",{className:"break-all",children:n})]}),i?e.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Workspace"}),e.jsx("span",{className:"break-all font-mono text-xs",children:i})]}):null,e.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages the bot sees here are captured as they arrive. Open the channel in Slack to read the full history."})]})]})}function Fe(s,t){return s.display_name?s.display_name:t?.feeds_schema?.[s.feed_key]?.name??s.feed_key}function Ne(s,t){const a=s?.feeds_schema;if(!a)return;if(a[t]?.configSchema)return a[t].configSchema;for(const m of Object.values(a))if(m?.key===t&&m.configSchema)return m.configSchema;const n=Object.values(a);if(n.length===1&&n[0]?.configSchema)return n[0].configSchema}function Ee({feed:s,ownerSlug:t}){return e.jsxs(e.Fragment,{children:[e.jsx($,{status:L(s.status),showDot:!0,children:s.status}),s.connection_status&&s.connection_status!==s.status&&e.jsxs($,{status:L(s.connection_status),showDot:!0,children:["Connection: ",s.connection_status]}),s.device_worker_id?e.jsx(P,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:s.device_worker_id},children:e.jsx(he,{variant:s.device_status==="offline"?"secondary":"outline",className:"text-xs hover:bg-accent",children:s.device_status==="offline"?`Waiting for ${s.device_label||s.device_platform||"device"}`:`On ${s.device_label||s.device_platform||"device"}`})}):null]})}function De({feed:s}){return s.operations.includes("sync")?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Last sync: ",s.last_sync_at?V(s.last_sync_at):"—"]}),e.jsxs("span",{children:["Next: ",s.next_run_at?V(s.next_run_at):"—"]}),e.jsxs("span",{className:"font-mono",children:[(s.event_count??0).toLocaleString()," events"]})]}):e.jsx("span",{children:"Read live when queried"})}function Ae({feed:s,connectorDef:t,ownerSlug:a}){const{data:n,refetch:m}=le(s.id),i=re(),u=oe(),p=n?.recent_runs?.some(j=>["running","pending","claimed"].includes(j.status));o.useEffect(()=>{if(!p)return;const j=setInterval(()=>m(),5e3);return()=>clearInterval(j)},[p,m]);const l=o.useMemo(()=>Ne(t,s.feed_key),[t,s.feed_key]),d=M(s.id,w(l,s.config??{}),l),{values:x,setValues:c,dirty:g}=d,v=o.useCallback(async()=>{d.canSubmit&&(await i.mutateAsync({feed_id:s.id,config:F(x)}),d.accept(x,w(l,F(x))))},[i,s.id,x,l,d.canSubmit,d.accept]),y=o.useCallback(async()=>{const j=s.status==="active"?"paused":"active";await i.mutateAsync({feed_id:s.id,status:j})},[i,s.id,s.status]),_=o.useCallback(async()=>{await u.mutateAsync(s.id)},[u,s.id]),h=s.status==="active",N=s.operations.includes("sync"),S=s.auth_profile_status&&s.auth_profile_status!=="active",f=i.isPending||u.isPending;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(b,{variant:"outline",size:"sm",disabled:f,onClick:()=>void y(),children:[h?e.jsx(de,{className:"h-3.5 w-3.5 mr-1.5"}):e.jsx(ue,{className:"h-3.5 w-3.5 mr-1.5"}),h?"Pause":"Resume"]}),N?e.jsxs(b,{variant:"outline",size:"sm",disabled:f||!h,onClick:()=>void _(),children:[u.isPending?e.jsx(E,{size:"md",className:"mr-1.5"}):e.jsx(me,{className:"h-3.5 w-3.5 mr-1.5"}),"Sync now"]}):null,e.jsx(pe,{ownerSlug:a,scope:{kind:"feed",id:s.id},variant:"ghost",label:"View in memory"})]}),S&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-amber-50 dark:bg-amber-950/20 px-3 py-2 text-sm",children:[e.jsx(xe,{className:"h-4 w-4 text-amber-500 shrink-0"}),e.jsxs("span",{className:"text-amber-700 dark:text-amber-400",children:["Authentication issue: ",s.auth_profile_status]}),e.jsx(b,{asChild:!0,variant:"outline",size:"sm",className:"ml-auto h-7 text-xs",children:e.jsx(P,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:a,connectorKey:s.connector_key,connectionId:String(s.connection_id)},search:{settings:!0},children:"Fix auth"})})]}),d.revision?e.jsx(T,{title:"Settings",children:e.jsxs("div",{className:"max-w-xl space-y-4",children:[e.jsx(O,{schema:d.revision,values:x,onValuesChange:c}),e.jsx(R,{visible:d.hasConflict,onReload:d.reset}),g&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{size:"sm",disabled:f||!d.canSubmit,onClick:()=>void v(),children:[i.isPending?e.jsx(E,{size:"md",className:"mr-1.5"}):null,"Save"]})})]})}):null,N?e.jsx(T,{title:"Recent syncs",children:n?.recent_runs&&n.recent_runs.length>0?e.jsx(je,{runs:n.recent_runs,ownerSlug:a}):e.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:"No syncs yet."})}):null]})}export{Ce as A,we as C,Ee as F,Ae as a,De as b,ke as c,Fe as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,ci as m,cj as u,ck as h,E as v,af as x,L as c}from"./index-
|
|
1
|
+
import{j as e,ci as m,cj as u,ck as h,E as v,af as x,L as c}from"./index-BUr8321-.js";function N({connectorDef:s,connectorKey:t,ownerSlug:n,deviceWorkerId:i,deviceLabel:o}){return s?e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5 text-[11.5px] text-muted-foreground",children:[e.jsx("span",{children:"Runs on"}),e.jsx(c,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:t},className:"underline underline-offset-2 hover:text-foreground",children:s.name}),e.jsx(f,{deviceWorkerId:i,deviceLabel:o,connectorDef:s,ownerSlug:n})]}):null}function f({connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i}){return e.jsxs(m,{children:[e.jsxs(u,{className:"rounded border px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground transition-colors hover:border-muted-foreground hover:text-foreground",children:["v",s.version||"unknown"]}),e.jsx(h,{align:"start",className:"w-80 p-0",children:e.jsx(j,{connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i})})]})}function j({connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i}){const o=s.runtime?.platforms??[],d=s.runtime?.scopes??[],r=s.source_uri?.trim()||null,p=!!r&&(r.startsWith("http://")||r.startsWith("https://")),l=[{label:"Key",value:e.jsx("span",{className:"font-mono",children:s.key})},{label:"Version",value:e.jsx("span",{className:"font-mono",children:s.version?`v${s.version}`:"unknown"})}];return s.catalog_origin&&l.push({label:"Origin",value:s.catalog_origin==="org"?e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:"Built in this workspace"}):e.jsx("span",{children:"Lobu catalog"})}),r&&l.push({label:"Source",value:p?e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex max-w-full items-start gap-1 break-all font-mono text-primary hover:underline",children:[r,e.jsx(v,{className:"mt-0.5 h-3 w-3 shrink-0"})]}):e.jsx("span",{className:"break-all font-mono",children:r})}),o.length>0&&l.push({label:"Platforms",value:e.jsx("span",{className:"flex flex-wrap gap-1",children:o.map(a=>e.jsx(x,{variant:"secondary",className:"h-4 px-1 py-0 font-mono text-[10px]",children:a},a))})}),s.required_capability&&l.push({label:"Capability",value:e.jsx("span",{className:"font-mono",children:s.required_capability})}),d.length>0&&l.push({label:"Scopes",value:e.jsx("span",{className:"flex flex-wrap gap-1",children:d.map(a=>e.jsx(x,{variant:"secondary",className:"h-4 px-1 py-0 font-mono text-[10px]",children:a},a))})}),e.jsxs("div",{className:"text-xs",children:[e.jsx("dl",{className:"divide-y",children:l.map(a=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-20 shrink-0 text-muted-foreground",children:a.label}),e.jsx("dd",{className:"min-w-0 flex-1",children:a.value})]},a.label))}),o.length>0?e.jsx("div",{className:"border-t px-3 py-2 text-muted-foreground",children:n?e.jsxs(e.Fragment,{children:["Runs on"," ",e.jsx(c,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:n},className:"text-primary hover:underline",children:i||"this device"}),"."]}):"Runs on a linked device."}):null]})}export{f as C,N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a0 as l}from"./index-
|
|
1
|
+
import{j as e,a0 as l}from"./index-BUr8321-.js";function n(){return e.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-3 px-4 pt-4 pb-8 lg:px-6",children:e.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:e.jsx(l,{})})})}export{n as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ah as I,Y as D,r,j as e,B as M,ag as T,ai as B}from"./index-
|
|
1
|
+
import{ah as I,Y as D,r,j as e,B as M,ag as T,ai as B}from"./index-BUr8321-.js";import{u as $,b as F,a as H,s as G,g as J,A as Q,W as Y}from"./oauth-workspace-access-D9GmiMfK.js";import{C as K,a as V,b as X,d as Z,c as ee}from"./card-DeFQuU_J.js";const se=["client_id","redirect_uri","scope","code_challenge","code_challenge_method"];function ce(){const s=I.useSearch(),f=s.workspace_grants==="1",{session:y,isReady:N}=D(),j=!N,{orgList:L,workspaceAccess:P,setWorkspaceAccess:q,selectedOrgIds:w,toggleSelectedOrgId:E,orgsLoading:O,orgsError:b,retryOrgs:W,workspaceSelectionReady:_}=$({allowMultiple:f}),[n,A]=r.useState(null),[k,a]=r.useState(null);F(!!y,j);const p=r.useMemo(()=>se.filter(t=>!s[t]||s[t]?.length===0),[s]),o=p.length===0,z=s.client_name?.trim()||null,i=r.useMemo(()=>Array.from(new Set((s.scope||"").split(" ").map(t=>t.trim()).filter(Boolean))),[s.scope]),g=H(i),[l,v]=r.useState(g);r.useEffect(()=>{v(g)},[g]);const d=r.useMemo(()=>G(i,l),[l,i]),S=r.useMemo(()=>d.some(t=>t.startsWith("mcp:")),[d]),x=l,u=r.useMemo(()=>J(s.resource),[s.resource]),m=S&&!u,U=()=>{const t=new URL("/auth/login",window.location.origin);t.searchParams.set("callbackUrl",window.location.href),window.location.href=t.toString()},C=async t=>{if(!o){a(`Missing required query params: ${p.join(", ")}`);return}if(t&&m&&!_){a(b?"Workspaces could not be loaded. Retry before approving.":"Choose at least one workspace before approving.");return}A(t?"approve":"deny"),a(null);try{const c=await fetch(`${T}/oauth/authorize/consent`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({client_id:s.client_id,redirect_uri:s.redirect_uri,scope:t?d.join(" "):s.scope,state:s.state??"",code_challenge:s.code_challenge,code_challenge_method:s.code_challenge_method,client_name:s.client_name,resource:s.resource,authorization_intent:s.authorization_intent,approved:t,...t&&m?{workspace_access:P,organization_ids:w}:{}})}),h=await c.json().catch(()=>null);if(c.status===401){U();return}if(!c.ok)throw new Error(h?.error_description||h?.message||h?.error||`Failed to ${t?"approve":"deny"} OAuth consent`);const R=B(h?.redirect_url);if(!R)throw new Error("Consent response did not include a valid redirect URL");window.location.href=R}catch(c){A(null),a(c instanceof Error?c.message:"Unexpected error while submitting consent")}};return j||!y?e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking authentication..."})}):e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs(K,{className:"w-full max-w-lg",children:[e.jsxs(V,{children:[e.jsx(X,{asChild:!0,children:e.jsx("h1",{children:"Authorize application"})}),e.jsx(Z,{children:"Review the application, access level, and workspaces."})]}),e.jsxs(ee,{className:"space-y-5","aria-busy":n!==null,children:[e.jsx(Q,{idPrefix:"oauth-consent",clientName:z,requestedScopes:i,accessLevel:l,onAccessLevelChange:v,disabled:n!==null}),m&&e.jsx(Y,{idPrefix:"oauth-consent",allowMultiple:f,orgList:L,selectedOrgIds:w,onWorkspaceAccessChange:q,onSelectedOrgChange:E,orgsLoading:O,orgsError:b,onRetry:W,disabled:n!==null||!o}),(u||s.resource)&&e.jsx("section",{className:"rounded-md border bg-muted/20 p-3 text-sm text-muted-foreground space-y-1",children:s.resource&&e.jsx("p",{children:e.jsx("span",{className:"font-medium text-foreground",children:s.resource})})}),S&&u&&e.jsxs("section",{className:"rounded-md border border-primary/20 bg-primary/5 p-3 text-sm space-y-2",children:[e.jsxs("p",{className:"font-medium text-foreground",children:["Workspace access: only ",u]}),e.jsxs("ul",{className:"space-y-1 text-muted-foreground",children:[e.jsx("li",{children:"If this workspace is public, the app can read public data immediately after approval."}),x==="write"&&e.jsx("li",{children:"If you are not already a member, this connection will stay read-only. Ask an organization admin to grant write access, then reconnect the MCP client."}),x==="admin"&&e.jsx("li",{children:"If you are not already an admin or owner, elevated actions will stay blocked. Ask an organization owner to grant the required role, then reconnect the MCP client."}),x==="read"&&e.jsx("li",{children:"Public read access does not require membership."})]})]}),k&&e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:k}),!o&&e.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:["Missing required query params: ",p.join(", ")]}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx(M,{type:"button",variant:"outline",onClick:()=>C(!1),disabled:n!==null||!o,children:n==="deny"?"Denying...":"Deny"}),e.jsx(M,{type:"button",onClick:()=>C(!0),disabled:n!==null||!o||d.length===0||m&&!_,children:n==="approve"?"Approving...":"Approve"})]})]})]})})}export{ce as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,aL as X,aI as me}from"./index-
|
|
1
|
+
import{r as s,aL as X,aI as me}from"./index-BUr8321-.js";function Lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Fe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ge(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function nt(e){return"nodeType"in e}function k(e){var t,n;return e?ge(e)?e:nt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function rt(e){const{Document:t}=k(e);return e instanceof t}function Ee(e){return ge(e)?!1:e instanceof k(e).HTMLElement}function $t(e){return e instanceof k(e).SVGElement}function ve(e){return e?ge(e)?e.document:nt(e)?rt(e)?e:Ee(e)||$t(e)?e.ownerDocument:document:document:document}const re=Fe?s.useLayoutEffect:s.useEffect;function ot(e){const t=s.useRef(e);return re(()=>{t.current=e}),s.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function gn(){const e=s.useRef(null),t=s.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=s.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Se(e,t){t===void 0&&(t=[e]);const n=s.useRef(e);return re(()=>{n.current!==e&&(n.current=e)},t),n}function Me(e,t){const n=s.useRef();return s.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ke(e){const t=ot(e),n=s.useRef(null),r=s.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Qe(e){const t=s.useRef();return s.useEffect(()=>{t.current=e},[e]),t.current}let Ve={};function $e(e,t){return s.useMemo(()=>{if(t)return t;const n=Ve[e]==null?0:Ve[e]+1;return Ve[e]=n,e+"-"+n},[e,t])}function Xt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,l)=>{const a=Object.entries(l);for(const[c,u]of a){const f=i[c];f!=null&&(i[c]=f+e*u)}return i},{...t})}}const he=Xt(1),ze=Xt(-1);function vn(e){return"clientX"in e&&"clientY"in e}function jt(e){if(!e)return!1;const{KeyboardEvent:t}=k(e.target);return t&&e instanceof t}function pn(e){if(!e)return!1;const{TouchEvent:t}=k(e.target);return t&&e instanceof t}function Ze(e){if(pn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return vn(e)?{x:e.clientX,y:e.clientY}:null}const Rt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Rt.Translate.toString(e),Rt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Et="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bn(e){return e.matches(Et)?e:e.querySelector(Et)}const wn={display:"none"};function yn(e){let{id:t,value:n}=e;return X.createElement("div",{id:t,style:wn},n)}function mn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return X.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function xn(){const[e,t]=s.useState("");return{announce:s.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ut=s.createContext(null);function Dn(e){const t=s.useContext(Ut);s.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Cn(){const[e]=s.useState(()=>new Set),t=s.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[s.useCallback(r=>{let{type:o,event:i}=r;e.forEach(l=>{var a;return(a=l[o])==null?void 0:a.call(l,i)})},[e]),t]}const Sn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hB as o,j as e}from"./index-BUr8321-.js";import{a}from"./agent-guardrails-route-B5uoMC6o.js";import"./model-selector-DfbmHjLu.js";import"./agent-subpage-shell-DuVYZvBE.js";import"./agent-loading-shells-CLoLeFcB.js";import"./agent-card-controls-CZO6GI0s.js";import"./switch-Dzse_XFM.js";function x(){const{owner:r,agentId:t}=o.useParams();return e.jsx(a,{owner:r,agentId:t})}export{x as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hz as r,j as e}from"./index-BUr8321-.js";import{a as m}from"./agent-skills-route-KVDDTbJB.js";import"./agent-subpage-shell-DuVYZvBE.js";import"./agent-skill-context-D4a2QCoZ.js";import"./core.esm-DsLgjoel.js";import"./skill-editor-D_W3QlRz.js";import"./agent-loading-shells-CLoLeFcB.js";import"./agent-card-controls-CZO6GI0s.js";import"./switch-Dzse_XFM.js";function c(){const{owner:t,agentId:o}=r.useParams();return e.jsx(m,{owner:t,agentId:o})}export{c as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n,aV as t,a0 as c,a as r,bc as i,g2 as l,aT as m,g3 as x,L as d,g4 as C,g5 as u,cr as j}from"./index-
|
|
1
|
+
import{j as n,aV as t,a0 as c,a as r,bc as i,g2 as l,aT as m,g3 as x,L as d,g4 as C,g5 as u,cr as j}from"./index-BUr8321-.js";function p({owner:o,initialConnectorKey:e}){return n.jsx(t,{owner:o,children:a=>n.jsx(h,{ownerSlug:a.ownerSlug,organizationId:a.organizationId,initialConnectorKey:e})})}function h({ownerSlug:o,organizationId:e,initialConnectorKey:a}){const{data:s=[]}=r(e??"");return n.jsxs(i,{className:"flex flex-1 flex-col gap-6",children:[n.jsx(l,{breadcrumb:n.jsx(x,{crumbs:[n.jsx(d,{to:"/$owner/connectors",params:{owner:o},search:{},className:C,children:"Connectors"},"connectors")]}),icon:n.jsx(m.connectors.icon,{className:"h-6 w-6"}),title:"Add a connection",caption:"Pick a connector from the catalog or drop in an MCP URL — Lobu handles auth and brings the data into memory."}),e?n.jsx(u,{ownerSlug:o,organizationId:e,connections:s,initialConnectorKey:a}):n.jsx("div",{className:"max-w-3xl",children:n.jsx(j,{rows:4})})]})}const L=()=>n.jsx(c,{});export{p as ConnectionsCreateRouteContent,L as component};
|