@agent-relay/dashboard 2.0.37 → 2.0.39

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.
Files changed (57) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/chunks/983-598ff3b7e6dffb8f.js +1 -0
  3. package/out/_next/static/chunks/994-e927457424324a78.js +1 -0
  4. package/out/_next/static/chunks/app/providers/setup/[provider]/{page-8c5b12e1ebfd7500.js → page-c667546c4902f1b0.js} +1 -1
  5. package/out/about.html +1 -1
  6. package/out/about.txt +1 -1
  7. package/out/app/onboarding.html +1 -1
  8. package/out/app/onboarding.txt +1 -1
  9. package/out/app.html +1 -1
  10. package/out/app.txt +2 -2
  11. package/out/blog.html +1 -1
  12. package/out/blog.txt +1 -1
  13. package/out/careers.html +1 -1
  14. package/out/careers.txt +1 -1
  15. package/out/changelog.html +1 -1
  16. package/out/changelog.txt +1 -1
  17. package/out/cloud/link.html +1 -1
  18. package/out/cloud/link.txt +1 -1
  19. package/out/complete-profile.html +1 -1
  20. package/out/complete-profile.txt +1 -1
  21. package/out/connect-repos.html +1 -1
  22. package/out/connect-repos.txt +1 -1
  23. package/out/contact.html +1 -1
  24. package/out/contact.txt +1 -1
  25. package/out/docs.html +1 -1
  26. package/out/docs.txt +1 -1
  27. package/out/history.html +1 -1
  28. package/out/history.txt +1 -1
  29. package/out/index.html +1 -1
  30. package/out/index.txt +2 -2
  31. package/out/login.html +1 -1
  32. package/out/login.txt +1 -1
  33. package/out/metrics.html +1 -1
  34. package/out/metrics.txt +1 -1
  35. package/out/pricing.html +1 -1
  36. package/out/pricing.txt +1 -1
  37. package/out/privacy.html +1 -1
  38. package/out/privacy.txt +1 -1
  39. package/out/providers/setup/claude.html +1 -1
  40. package/out/providers/setup/claude.txt +2 -2
  41. package/out/providers/setup/codex.html +1 -1
  42. package/out/providers/setup/codex.txt +2 -2
  43. package/out/providers/setup/cursor.html +1 -1
  44. package/out/providers/setup/cursor.txt +2 -2
  45. package/out/providers.html +1 -1
  46. package/out/providers.txt +2 -2
  47. package/out/security.html +1 -1
  48. package/out/security.txt +1 -1
  49. package/out/signup.html +1 -1
  50. package/out/signup.txt +1 -1
  51. package/out/terms.html +1 -1
  52. package/out/terms.txt +1 -1
  53. package/package.json +1 -1
  54. package/out/_next/static/chunks/983-ae0bbf38febd0c61.js +0 -1
  55. package/out/_next/static/chunks/994-87f74ebb9c654a36.js +0 -1
  56. /package/out/_next/static/{SDLsgVuk3b08Rx-aIlWEi → xG8tshArGlnjh-5j8a3XH}/_buildManifest.js +0 -0
  57. /package/out/_next/static/{SDLsgVuk3b08Rx-aIlWEi → xG8tshArGlnjh-5j8a3XH}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[994],{1994:function(e,t,n){n.d(t,{$:function(){return i}});var r=n(7573),s=n(7653),o=n(2547),c=n(8514);let l={background:"#0d0f14",foreground:"#c9d1d9",cursor:"#58a6ff",cursorAccent:"#0d0f14",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#484f58",red:"#f85149",green:"#3fb950",yellow:"#d29922",blue:"#58a6ff",magenta:"#bc8cff",cyan:"#39c5cf",white:"#b1bac4",brightBlack:"#6e7681",brightRed:"#ff7b72",brightGreen:"#56d364",brightYellow:"#e3b341",brightBlue:"#79c0ff",brightMagenta:"#d2a8ff",brightCyan:"#56d4dd",brightWhite:"#ffffff"},a=[/https:\/\/console\.anthropic\.com\/oauth/i,/https:\/\/auth\.openai\.com/i,/https:\/\/accounts\.google\.com/i,/https:\/\/github\.com\/login\/oauth/i,/https:\/\/[^\s]+\/oauth/i,/https:\/\/[^\s]+\/auth/i,/https:\/\/[^\s]+\/login/i];function i(e){let{provider:t,workspaceId:n,csrfToken:i,maxHeight:m="400px",onSuccess:f,onError:h,onCancel:b,onConnectAnother:p,showHeader:g=!0,className:y=""}=e,v=(0,s.useRef)(null),j=(0,s.useRef)(null),k=(0,s.useRef)(null),w=(0,s.useRef)(null),N=(0,s.useRef)(null),C=(0,s.useRef)(new Set),S=(0,s.useRef)(!1),R=(0,s.useRef)(null),[E,T]=(0,s.useState)(!1),[F,O]=(0,s.useState)(!1),[_,W]=(0,s.useState)(!1),[B,D]=(0,s.useState)(null),[L,P]=(0,s.useState)(null),[A,M]=(0,s.useState)(null),[I,U]=(0,s.useState)(!1),[X,J]=(0,s.useState)(!1),[z,H]=(0,s.useState)(!1),[Y,G]=(0,s.useState)(i),$=(0,s.useCallback)(()=>{let e=Date.now().toString(36),n=Math.random().toString(36).substring(2,6);return"__setup__".concat(t.id,"-").concat(e).concat(n)},[t.id]);(0,s.useEffect)(()=>{Y||fetch("/api/auth/session",{credentials:"include"}).then(e=>{let t=e.headers.get("X-CSRF-Token");t&&G(t)}).catch(()=>{})},[Y]);let q=(0,s.useCallback)(async()=>{if(n&&L)try{let e={};Y&&(e["X-CSRF-Token"]=Y),await fetch("/api/workspaces/".concat(n,"/agents/").concat(encodeURIComponent(L)),{method:"DELETE",credentials:"include",headers:e})}catch(e){}},[n,L,Y]),K=(0,s.useCallback)(async()=>{if(!n||!Y)return;T(!0),D(null);let e=$();try{let r={"Content-Type":"application/json"};Y&&(r["X-CSRF-Token"]=Y);let s=await fetch("/api/workspaces/".concat(n,"/agents"),{method:"POST",credentials:"include",headers:r,body:JSON.stringify({name:e,provider:"anthropic"===t.id?"claude":t.id,interactive:!0})});if(!s.ok){let e=await s.json();throw Error(e.error||"Failed to spawn agent")}P(e)}catch(t){let e=t instanceof Error?t.message:"Failed to spawn agent";D(e),null==h||h(e)}finally{T(!1)}},[n,Y,t.id,$,h]);(0,s.useEffect)(()=>{if(!v.current)return;let e=new o.o({theme:l,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:12,lineHeight:1.4,convertEol:!0,scrollback:1e4,cursorBlink:!0,cursorStyle:"block",disableStdin:!1,allowProposedApi:!0}),t=new c.X;e.loadAddon(t),e.open(v.current),t.fit(),j.current=e,k.current=t;let n=new ResizeObserver(()=>{t.fit()});return n.observe(v.current),()=>{n.disconnect(),e.dispose(),j.current=null,k.current=null}},[]);let Q=(0,s.useRef)(X);Q.current=X;let V=(0,s.useCallback)(e=>{if(Q.current)return!1;for(let t of a)if(e.match(t)){let t=e.match(/https:\/\/[^\s\])"']+/i);if(t){let e=t[0];if(!C.current.has(e))return C.current.add(e),M(e),U(!0),!0}}return!1},[]);(0,s.useEffect)(()=>{if(!L||!n)return;S.current=!1;let e=()=>{var t;if((null===(t=w.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN)return;let r="https:"===window.location.protocol?"wss:":"ws:",s="".concat(r,"//").concat(window.location.host,"/ws/logs/").concat(encodeURIComponent(n),"/").concat(encodeURIComponent(L));W(!0);let o=new WebSocket(s);w.current=o,o.onopen=()=>{if(O(!0),W(!1),!S.current){var e,t;S.current=!0,null===(e=j.current)||void 0===e||e.writeln("\x1b[90m[Connected - Interactive Mode]\x1b[0m"),null===(t=j.current)||void 0===t||t.writeln("\x1b[90m[Type directly to respond to prompts]\x1b[0m\n")}},o.onclose=()=>{O(!1),W(!1),N.current=setTimeout(e,2e3)},o.onmessage=e=>{var t,n;try{let n=JSON.parse(e.data);if("history"===n.type&&Array.isArray(n.lines))n.lines.forEach(e=>{var t;null===(t=j.current)||void 0===t||t.writeln(e),V(e)});else if("log"===n.type||"output"===n.type){let e=n.content||n.data||n.message||"";e&&(null===(t=j.current)||void 0===t||t.write(e),V(e))}}catch(t){"string"==typeof e.data&&(null===(n=j.current)||void 0===n||n.write(e.data),V(e.data))}},R.current&&(R.current.dispose(),R.current=null),j.current&&(R.current=j.current.onData(e=>{o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"input",agent:L,data:e}))}))};return e(),()=>{var e;N.current&&(clearTimeout(N.current),N.current=null),R.current&&(R.current.dispose(),R.current=null),null===(e=w.current)||void 0===e||e.close(),w.current=null}},[L,n,V]),(0,s.useEffect)(()=>{!Y||L||E||K()},[Y,L,E,K]),(0,s.useEffect)(()=>()=>{q()},[q]);let Z=(0,s.useCallback)(()=>{A&&(window.open(A,"_blank","width=600,height=700"),U(!1))},[A]),ee=(0,s.useCallback)(async()=>{let e=t.name||t.id;try{let t={"Content-Type":"application/json"};Y&&(t["X-CSRF-Token"]=Y);let r=await fetch("/api/onboarding/mark-connected/".concat(e),{method:"POST",credentials:"include",headers:t,body:JSON.stringify({workspaceId:n})});r.ok||console.error("Failed to mark provider as connected:",await r.text())}catch(e){console.error("Error marking provider as connected:",e)}await q(),H(!0)},[q,t.id,t.name,Y,n]),et=(0,s.useCallback)(()=>{null==f||f()},[f]),en=(0,s.useCallback)(()=>{null==p||p()},[p]),er=(0,s.useCallback)(async()=>{await q(),null==b||b()},[q,b]);return(0,r.jsxs)("div",{className:"flex flex-col rounded-xl overflow-hidden border border-border-subtle ".concat(y),children:[g&&(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-subtle bg-bg-tertiary",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-white font-bold text-sm",style:{backgroundColor:t.color},children:t.displayName[0]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("h4",{className:"text-sm font-semibold text-text-primary",children:[t.displayName," Setup"]}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Interactive terminal"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[F&&(0,r.jsxs)("span",{className:"flex items-center gap-1 px-2 py-1 rounded-full bg-success/15 text-xs text-success",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-success animate-pulse"}),"Connected"]}),b&&(0,r.jsx)("button",{onClick:er,className:"p-1.5 rounded-lg hover:bg-bg-hover text-text-muted hover:text-text-primary transition-colors",children:(0,r.jsx)(d,{})})]})]}),z?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-6",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mb-4",style:{backgroundColor:"".concat(t.color,"20")},children:(0,r.jsx)(x,{className:"w-8 h-8",style:{color:t.color}})}),(0,r.jsxs)("h3",{className:"text-lg font-semibold text-text-primary mb-2",children:[t.displayName," Connected!"]}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-6 text-center",children:["Your ",t.displayName," account has been successfully connected."]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[p&&(0,r.jsx)("button",{onClick:en,className:"px-4 py-2 bg-bg-hover text-text-primary text-sm font-medium rounded-lg hover:bg-bg-tertiary transition-colors border border-border-subtle",children:"Connect Another Provider"}),(0,r.jsx)("button",{onClick:et,className:"px-4 py-2 bg-accent-cyan text-bg-deep text-sm font-semibold rounded-lg hover:bg-accent-cyan/90 transition-colors",children:"Continue to Dashboard"})]})]}):(0,r.jsxs)(r.Fragment,{children:[B&&(0,r.jsxs)("div",{className:"px-4 py-3 bg-error/10 border-b border-error/30 text-sm text-error flex items-center gap-2",children:[(0,r.jsx)(u,{}),(0,r.jsx)("span",{children:B}),(0,r.jsx)("button",{onClick:K,className:"ml-auto text-xs px-2 py-1 rounded bg-error/20 hover:bg-error/30 transition-colors",children:"Retry"})]}),E&&(0,r.jsxs)("div",{className:"px-4 py-3 bg-accent-cyan/10 border-b border-accent-cyan/30 text-sm text-accent-cyan flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-4 h-4 border-2 border-accent-cyan/30 border-t-accent-cyan rounded-full animate-spin"}),(0,r.jsxs)("span",{children:["Starting ",t.displayName,"..."]})]}),(0,r.jsx)("div",{ref:v,className:"flex-1 bg-[#0d0f14]",style:{minHeight:"300px",maxHeight:m},onClick:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.focus()}}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-border-subtle bg-bg-tertiary",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"Respond to prompts above to complete setup"}),(0,r.jsx)("button",{onClick:ee,className:"px-4 py-2 bg-accent-cyan text-bg-deep text-sm font-semibold rounded-lg hover:bg-accent-cyan/90 transition-colors",children:"Done - Continue"})]})]}),I&&A&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"bg-bg-primary border border-border-subtle rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold",style:{backgroundColor:t.color},children:t.displayName[0]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-white font-medium",children:"Login URL Detected"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"We found a login link in the terminal"})]})]}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:[t.displayName," is asking you to sign in. Click below to open the login page."]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("button",{onClick:Z,className:"flex-1 py-2 px-4 bg-accent-cyan text-bg-deep font-semibold rounded-lg hover:bg-accent-cyan/90 transition-colors",children:"Open Login Page"}),(0,r.jsx)("button",{onClick:()=>{U(!1),J(!0)},className:"px-4 py-2 bg-bg-hover text-text-secondary rounded-lg hover:bg-bg-tertiary transition-colors",children:"Dismiss"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-3",children:"Or copy the URL from the terminal and open it manually."})]})})]})}function d(){return(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,r.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function u(){return(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function x(e){let{className:t,style:n}=e;return(0,r.jsx)("svg",{className:t,style:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})})}}}]);