@1mcp/agent 0.40.0-beta.1 → 0.40.0-beta.2

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.
@@ -1 +1 @@
1
- import{n as e}from"./admin-rolldown-runtime-Bh1tDfsg.js";import{D as t,E as n,S as r,T as i,b as a,j as o,s,y as c}from"./admin-mantine-xwbfu5Gd.js";import{i as l,r as u}from"./admin-react-BSaWeqgv.js";import{O as d,h as f,p,x as m}from"./admin-icons-wOzB38gm.js";import{n as h,t as g}from"./admin-console-lrFAX4EQ.js";var _=e(l(),1),v=u();function y({model:e,oauth:t,configureServer:r}){let{state:c,configuredServers:l}=e,u=c.status?.oauth.services??[],[d,p]=(0,_.useState)(null);async function m(e){try{await l.copy(`serviceId`,e.id),p(`Service id copied.`)}catch{p(`Could not copy service id. Select the value manually.`)}}return(0,v.jsxs)(`section`,{"aria-label":`OAuth services`,className:`operations-workspace`,children:[(0,v.jsx)(g,{title:`OAuth services`,description:`${u.length} reported services · runtime status ${c.status?.oauth.status??`unavailable`}`}),t.callbackFeedback?(0,v.jsx)(C,{feedback:t.callbackFeedback}):null,t.operationFeedback?(0,v.jsx)(C,{feedback:t.operationFeedback}):null,u.length===0?(0,v.jsx)(o,{className:`operations-panel`,withBorder:!0,children:(0,v.jsxs)(s,{gap:`sm`,className:`actionable-empty-state`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(i,{fw:800,children:`No OAuth services reported`}),(0,v.jsx)(i,{c:`dimmed`,size:`sm`,children:`OAuth services appear when a configured server requires provider authorization.`})]}),(0,v.jsx)(a,{component:`a`,href:`/admin/servers/new`,leftSection:(0,v.jsx)(f,{size:16}),onClick:e=>{b(e)&&(e.preventDefault(),r())},children:`Configure server`})]})}):(0,v.jsx)(s,{gap:`sm`,children:u.map(e=>(0,v.jsx)(x,{service:e,busy:t.busy?.serviceId===e.id?t.busy.action:null,operationBlocked:t.busy!==null,onCopy:()=>void m(e),onOperate:n=>void t.operate(e.id,n)},e.id))}),d?(0,v.jsx)(n,{"aria-live":`polite`,color:d.startsWith(`Could not`)?`red`:`teal`,mt:`sm`,children:d}):null]})}function b(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function x({service:e,busy:n,operationBlocked:l,onCopy:u,onOperate:f}){let g=S(e),_=g===`authorize`?`Authorize`:`Restart`;return(0,v.jsx)(o,{component:`article`,className:`oauth-service-row`,withBorder:!0,children:(0,v.jsxs)(t,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,v.jsxs)(`div`,{className:`oauth-service-main`,children:[(0,v.jsxs)(t,{gap:`xs`,children:[(0,v.jsx)(i,{fw:800,children:e.displayName}),(0,v.jsx)(r,{color:e.status===`connected`?`teal`:`yellow`,variant:`light`,children:e.status})]}),(0,v.jsx)(i,{size:`xs`,c:`dimmed`,children:e.requiresOAuth?`OAuth required`:`No OAuth action required`}),e.lastError?(0,v.jsx)(i,{size:`sm`,c:`red`,children:h(e.lastError)??`Backend OAuth failed. Check local OAuth diagnostics.`}):null,(0,v.jsxs)(`details`,{className:`oauth-service-identity`,children:[(0,v.jsx)(`summary`,{children:`Full service ID`}),(0,v.jsxs)(t,{gap:`xs`,wrap:`nowrap`,children:[(0,v.jsx)(c,{className:`oauth-service-id`,children:e.id}),(0,v.jsx)(a,{"aria-label":`Copy full service ID for ${e.displayName}`,size:`compact-xs`,variant:`subtle`,onClick:u,children:(0,v.jsx)(d,{size:14,"aria-hidden":`true`})})]})]})]}),g?(0,v.jsxs)(s,{gap:4,align:`flex-end`,className:`oauth-service-action`,children:[(0,v.jsx)(a,{"aria-label":`${_} ${e.displayName}`,leftSection:g===`authorize`?(0,v.jsx)(m,{size:15}):(0,v.jsx)(p,{size:15}),loading:n===g,disabled:l,onClick:()=>f(g),children:_}),(0,v.jsx)(i,{size:`xs`,c:`dimmed`,"aria-live":`polite`,children:n?n===`authorize`?`Starting authorization...`:`Restarting authorization...`:``})]}):null]})})}function S(e){return e.requiresOAuth?e.status===`awaiting_oauth`?`authorize`:`restart`:null}function C({feedback:e}){return(0,v.jsx)(n,{color:e.kind===`success`?`teal`:`red`,role:e.kind===`success`?`status`:`alert`,mb:`sm`,children:e.message})}export{y as OAuthServicesWorkspace};
1
+ import{n as e}from"./admin-rolldown-runtime-Bh1tDfsg.js";import{D as t,E as n,S as r,T as i,b as a,j as o,s,y as c}from"./admin-mantine-xwbfu5Gd.js";import{i as l,r as u}from"./admin-react-BSaWeqgv.js";import{O as d,h as f,p,x as m}from"./admin-icons-wOzB38gm.js";import{n as h,t as g}from"./admin-console-XzkKAJze.js";var _=e(l(),1),v=u();function y({model:e,oauth:t,configureServer:r}){let{state:c,configuredServers:l}=e,u=c.status?.oauth.services??[],[d,p]=(0,_.useState)(null);async function m(e){try{await l.copy(`serviceId`,e.id),p(`Service id copied.`)}catch{p(`Could not copy service id. Select the value manually.`)}}return(0,v.jsxs)(`section`,{"aria-label":`OAuth services`,className:`operations-workspace`,children:[(0,v.jsx)(g,{title:`OAuth services`,description:`${u.length} reported services · runtime status ${c.status?.oauth.status??`unavailable`}`}),t.callbackFeedback?(0,v.jsx)(C,{feedback:t.callbackFeedback}):null,t.operationFeedback?(0,v.jsx)(C,{feedback:t.operationFeedback}):null,u.length===0?(0,v.jsx)(o,{className:`operations-panel`,withBorder:!0,children:(0,v.jsxs)(s,{gap:`sm`,className:`actionable-empty-state`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(i,{fw:800,children:`No OAuth services reported`}),(0,v.jsx)(i,{c:`dimmed`,size:`sm`,children:`OAuth services appear when a configured server requires provider authorization.`})]}),(0,v.jsx)(a,{component:`a`,href:`/admin/servers/new`,leftSection:(0,v.jsx)(f,{size:16}),onClick:e=>{b(e)&&(e.preventDefault(),r())},children:`Configure server`})]})}):(0,v.jsx)(s,{gap:`sm`,children:u.map(e=>(0,v.jsx)(x,{service:e,busy:t.busy?.serviceId===e.id?t.busy.action:null,operationBlocked:t.busy!==null,onCopy:()=>void m(e),onOperate:n=>void t.operate(e.id,n)},e.id))}),d?(0,v.jsx)(n,{"aria-live":`polite`,color:d.startsWith(`Could not`)?`red`:`teal`,mt:`sm`,children:d}):null]})}function b(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function x({service:e,busy:n,operationBlocked:l,onCopy:u,onOperate:f}){let g=S(e),_=g===`authorize`?`Authorize`:`Restart`;return(0,v.jsx)(o,{component:`article`,className:`oauth-service-row`,withBorder:!0,children:(0,v.jsxs)(t,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,v.jsxs)(`div`,{className:`oauth-service-main`,children:[(0,v.jsxs)(t,{gap:`xs`,children:[(0,v.jsx)(i,{fw:800,children:e.displayName}),(0,v.jsx)(r,{color:e.status===`connected`?`teal`:`yellow`,variant:`light`,children:e.status})]}),(0,v.jsx)(i,{size:`xs`,c:`dimmed`,children:e.requiresOAuth?`OAuth required`:`No OAuth action required`}),e.lastError?(0,v.jsx)(i,{size:`sm`,c:`red`,children:h(e.lastError)??`Backend OAuth failed. Check local OAuth diagnostics.`}):null,(0,v.jsxs)(`details`,{className:`oauth-service-identity`,children:[(0,v.jsx)(`summary`,{children:`Full service ID`}),(0,v.jsxs)(t,{gap:`xs`,wrap:`nowrap`,children:[(0,v.jsx)(c,{className:`oauth-service-id`,children:e.id}),(0,v.jsx)(a,{"aria-label":`Copy full service ID for ${e.displayName}`,size:`compact-xs`,variant:`subtle`,onClick:u,children:(0,v.jsx)(d,{size:14,"aria-hidden":`true`})})]})]})]}),g?(0,v.jsxs)(s,{gap:4,align:`flex-end`,className:`oauth-service-action`,children:[(0,v.jsx)(a,{"aria-label":`${_} ${e.displayName}`,leftSection:g===`authorize`?(0,v.jsx)(m,{size:15}):(0,v.jsx)(p,{size:15}),loading:n===g,disabled:l,onClick:()=>f(g),children:_}),(0,v.jsx)(i,{size:`xs`,c:`dimmed`,"aria-live":`polite`,children:n?n===`authorize`?`Starting authorization...`:`Restarting authorization...`:``})]}):null]})})}function S(e){return e.requiresOAuth?e.status===`awaiting_oauth`?`authorize`:`restart`:null}function C({feedback:e}){return(0,v.jsx)(n,{color:e.kind===`success`?`teal`:`red`,role:e.kind===`success`?`status`:`alert`,mb:`sm`,children:e.message})}export{y as OAuthServicesWorkspace};