1import{b as a,d as h}from"./DKKyCjZm.js";const y=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/import`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({config:n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},d=async r=>{let n=null;const e=await fetch(`${a}/configs/export`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},p=async r=>{let n=null;const e=await fetch(`${a}/configs/connections`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},w=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/connections`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},g=async r=>{let n=null;const e=await fetch(`${a}/configs/tool_servers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},j=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/tool_servers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},$=async r=>{let n=null;const e=await fetch(`${a}/configs/terminal_servers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},T=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/terminal_servers`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},m=async(r,n,e,t,o,i="bearer")=>{let s=null;const l=await fetch(`${a}/configs/terminal_servers/policy`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({url:n.replace(/\/$/,""),key:e,auth_type:i,policy_id:t,policy_data:o})}).then(async c=>{if(!c.ok)throw await c.json();return c.json()}).catch(c=>(s=c.detail,null));if(s)throw s;return l},C=async(r,n,e,t,o="bearer")=>{const i=await fetch(`${a}/configs/terminal_servers/policy`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({url:n.replace(/\/$/,""),key:e,auth_type:o,policy_id:t})});if(!i.ok){const s=await i.json();throw Object.assign(new Error(s.detail||"Failed to read policy"),{status:i.status})}return i.json()},S=async(r,n,e,t,o,i="bearer")=>{let s=null;const l=await fetch(`${a}/configs/terminal_servers/lifecycle`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({url:n.replace(/\/$/,""),key:e,auth_type:i,policy_id:t,lifecycle_data:o})}).then(async c=>{if(!c.ok)throw await c.json();return c.json()}).catch(c=>(s=c.detail,null));if(s)throw s;return l},O=async(r,n,e,t,o="bearer")=>{const i=await fetch(`${a}/configs/terminal_servers/lifecycle`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({url:n.replace(/\/$/,""),key:e,auth_type:o,policy_id:t})});if(!i.ok){const s=await i.json();throw Object.assign(new Error(s.detail||"Failed to read lifecycle"),{status:i.status})}return i.json()},A=async(r,n,e,t,o="bearer")=>{let i=null;const s=await fetch(`${a}/configs/terminal_servers/refresh`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({url:n.replace(/\/$/,""),key:e,auth_type:o,...t})}).then(async l=>{if(!l.ok)throw await l.json();return l.json()}).catch(l=>(i=l.detail,null));if(i)throw i;return s},b=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/terminal_servers/verify`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},B=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/tool_servers/verify`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},_=async(r,n,e=null)=>{let t=null;const o=e?`?type=${e}`:"",i=await fetch(`${a}/configs/oauth/clients/register${o}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async s=>{if(!s.ok)throw await s.json();return s.json()}).catch(s=>(t=s.detail,null));if(t)throw t;return i},u=(r,n=null)=>{const e=n?`${n}:${r}`:r;return`${h}/oauth/clients/${e}/authorize`},z=r=>{sessionStorage.setItem("pendingOAuthToolId",r.id),sessionStorage.setItem("oauthRedirectInProgressToolId",r.id);const n=u(r.serverId,r.authType??"mcp");window.open(n,"_self","noopener")},k=async r=>{let n=null;const e=await fetch(`${a}/configs/code_execution`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},v=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/code_execution`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},P=async r=>{let n=null;const e=await fetch(`${a}/configs/models/defaults`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},E=async r=>{let n=null;const e=await fetch(`${a}/configs/models`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},J=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/models`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({...n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},N=async r=>{const n=await fetch(`${a}/configs/subagents`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});if(!n.ok)throw await n.json();return n.json()},G=async(r,n)=>{const e=await fetch(`${a}/configs/subagents`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(n)});if(!e.ok)throw await e.json();return e.json()},I=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/suggestions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({suggestions:n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t},x=async r=>{let n=null;const e=await fetch(`${a}/configs/banners`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).then(async t=>{if(!t.ok)throw await t.json();return t.json()}).catch(t=>(n=t.detail,null));if(n)throw n;return e},U=async(r,n)=>{let e=null;const t=await fetch(`${a}/configs/banners`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify({banners:n})}).then(async o=>{if(!o.ok)throw await o.json();return o.json()}).catch(o=>(e=o.detail,null));if(e)throw e;return t};export{x as A,$ as a,C as b,O as c,b as d,S as e,A as f,P as g,U as h,z as i,p as j,w as k,E as l,J as m,I as n,N as o,m as p,G as q,_ as r,T as s,g as t,j as u,B as v,k as w,v as x,d as y,y as z}; 2//# sourceMappingURL=DN4pFdL0.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.