PageSourceSearch

https://www.creatorsenseai.com/app/assets/McpAuth-BOuxH_zs.js

js creatorsenseai.com collected 2026-10-02 01:28:38 UTC 7,418 bytes, 1 lines download raw bytes

1import{o as L,_ as q,e as D,z as O,Q as P,J as d,K as k,L as F,M as G,C as J}from"./index-BNPflmqD.js";import{u as K,e as Q}from"./vendor-vue-BIDZeepx.js";import{L as U}from"./loader-DU11zK5l.js";import{B as E,S as H}from"./shield-check-DFiTb6Kk.js";import{C as Y}from"./circle-check-big-Cto_rLDq.js";import{r as v,c as A,w as j,a1 as W,_ as X,z as o,K as n,Q as C,u,H as r,C as S,J as x,L as b,G as h,P as Z,A as I,y as a}from"./vendor-misc-5pJBpqhN.js";import"./vendor-tanstack-B6ELLr_Q.js";import"./vendor-sentry-84cD2ryj.js";import"./vendor-utils-CxkvrZ9U.js";async function ee(f){const{data:_}=await L.get("/mcp/oauth/pending",{params:{login_state:f}});return _}async function te(f){const{data:_}=await L.post("/mcp/oauth/approve",{login_state:f});return _}const ae={key:0,class:"loading-state"},oe={key:1,class:"error-state"},ne={class:"error-text"},se={key:2,class:"consent-state"},re={class:"icon-wrap"},ce={key:0},ie={key:1},le={key:2},ue={key:3,class:"org-badge"},de={class:"description"},_e={key:0},pe={key:1},ge={class:"meta"},me={class:"pill"},ye={class:"tool-list"},ve={key:4,class:"error-text"},he={class:"actions"},fe=["disabled"],Ce={key:1},be=["disabled"],we={key:3,class:"success-state"},ke={__name:"McpAuth",setup(f){const _={get_mcp_entitlement:"Plan & tool access",get_creator_status:"Account status",get_creator_profile_summary:"Creator profile summary",get_connected_accounts:"Connected platforms",get_connected_platforms:"Connected platforms",get_creator_dna:"Creator DNA",get_revenue_summary:"Revenue overview",get_oracle_forecast:"Revenue forecast",get_audience_insights:"Audience insights",get_posting_workload:"Posting workload",get_wellness_indicators:"Creator wellness indicators",get_youtube_analytics:"YouTube analytics",get_live_social_data:"Live social data",get_tax_estimate:"Tax estimate",assemble_creator_insights:"Creator intelligence bundle",get_content_performance:"Content performance",discover_opportunities:"Brand deal opportunities",get_nexus_schedule:"Content schedule",get_autopilot_status:"Autopilot status",get_agency_portfolio:"Agency portfolio",get_agency_overview:"The Book — portfolio summary",get_agency_roster:"Book roster rows",get_agency_invites:"Pending invitations",invite_creator_to_roster:"Invite creators",remove_creator_from_roster:"Remove creators from roster",get_agency_inbox:"Action inbox",accept_agency_inbox_item:"Accept inbox items",get_agency_outcomes:"Outcomes tracking",run_agency_aria_batch:"Aria batch runs",get_agency_finance_pnl:"Finance P&L",get_agency_contracts:"Contracts",get_agency_commissions:"Commissions",get_agency_client_portals:"Client portals",list_creators:"Platform creator roster",list_agency_accounts:"Agency accounts",get_ops_health:"Ops health",list_outbound_prospects:"Outbound agency prospects",get_cold_email_templates:"Cold email templates",get_gtm_playbook_summary:"GTM playbook",assemble_creator_context:"Owner creator context"},R=K(),N=Q(),i=D(),p=v(!0),g=v(!1),w=v(!1),c=v(null),s=v(null),m=A(()=>String(N.query.login_state??"")),l=A(()=>{var e;return(((e=s.value)==null?void 0:e.connector_name)??"").toLowerCase().includes("agency")}),y=A(()=>{var e;return(((e=s.value)==null?void 0:e.connector_name)??"").toLowerCase().includes("owner")});j(s,e=>{const t=((e==null?void 0:e.connector_name)??"").toLowerCase();t.includes("agency")||t.includes("owner")?document.documentElement.setAttribute("data-app-surface","agency"):document.documentElement.removeAttribute("data-app-surface")}),W(()=>{document.documentElement.removeAttribute("data-app-surface")});function B(){const e=m.value;return e?`/mcp-auth?login_state=${encodeURIComponent(e)}`:"/mcp-auth"}X(async()=>{if(!m.value){c.value="Missing login session. Return to Claude and try connecting again.",p.value=!1;return}if(await $())try{s.value=await ee(m.value)}catch(t){O("McpAuth","error","Failed to load pending session:",t),c.value=P(t,"This connection request expired. Try again from Claude.")}finally{p.value=!1}});async function $(){let e=!1;try{await d.refreshSession();const t=await k({noCache:!0});i.applySession(t),e=!0}catch{if(i.initialized||await i.bootstrap(),i.isAuthenticated)try{const t=await k({noCache:!0});i.applySession(t),e=!0}catch{i.clearSession(),d.clearAuth()}}if(!e)return p.value=!1,R.push(`/login?redirect=${encodeURIComponent(B())}`),!1;if(!L.getToken())try{await d.refreshSession()}catch{return i.clearSession(),d.clearAuth(),p.value=!1,R.push(`/login?redirect=${encodeURIComponent(B())}`),!1}return!0}function z(e){const t=String(e).match(/^\+(\d+)_more_desk_tools$/);return t?`+${t[1]} more desk tools`:_[e]||e.replaceAll("_"," ")}async function V(){if(m.value){g.value=!0,c.value=null;try{await F(k,async()=>{await d.refreshSession()}),G()||await d.refreshSession();const{redirect_url:e}=await te(m.value);w.value=!0,window.location.href=e}catch(e){O("McpAuth","error","Approve failed:",e),c.value=P(e,"Could not connect Claude to your account."),g.value=!1}}}function M(){window.close()}return(e,t)=>(a(),o("div",{class:I(["mcp-auth-page",{"mcp-auth-page--agency":l.value||y.value}])},[n("div",{class:I(["auth-card",{"auth-card--agency":l.value||y.value}])},[p.value?(a(),o("div",ae,[C(u(U),{class:"spinner-icon"}),t[0]||(t[0]=n("h2",null,"Preparing connection",-1)),t[1]||(t[1]=n("p",null,"Checking your session…",-1))])):c.value&&!s.value?(a(),o("div",oe,[C(u(J),{class:"error-icon-large"}),t[2]||(t[2]=n("h2",null,"Connection unavailable",-1)),n("p",ne,r(c.value),1),n("button",{class:"btn btn-secondary",type:"button",onClick:M},"Close")])):s.value&&!w.value?(a(),o("div",se,[n("div",re,[l.value?(a(),S(u(E),{key:0,class:"consent-icon"})):(a(),S(u(H),{key:1,class:"consent-icon"}))]),y.value?(a(),o("h1",ce,"Connect Claude (Owner / Admin)")):l.value?(a(),o("h1",ie,"Connect Claude to your Orolith Agency")):(a(),o("h1",le,"Connect Claude to CreatorSense")),l.value&&s.value.display_name?(a(),o("div",ue,[C(u(E),{class:"org-badge-icon"}),n("span",null,r(s.value.display_name),1)])):x("",!0),n("p",de,[y.value?(a(),o(b,{key:0},[h(r(s.value.connector_name)+" will access platform admin tools: agencies, ops health, outbound prospects, and cold-email GTM data. Use only on your owner account. ",1)],64)):l.value?(a(),o(b,{key:1},[h(r(s.value.connector_name)+" will be able to view and manage your agency roster, inv
1itations, and operations on your behalf. ",1)],64)):(a(),o(b,{key:2},[h(r(s.value.connector_name||"Claude")+" is requesting access to your creator account ",1),s.value.display_name?(a(),o("strong",_e,r(s.value.display_name),1)):(a(),o("span",pe,"data")),t[3]||(t[3]=h(". ",-1))],64))]),n("div",ge,[n("span",me,r(y.value?"Role":l.value?"Agency":"Plan")+": "+r(s.value.tier),1)]),n("ul",ye,[(a(!0),o(b,null,Z(s.value.tools_allowed,T=>(a(),o("li",{key:T},[t[4]||(t[4]=n("span",{class:"tool-check"},"✓",-1)),h(" "+r(z(T)),1)]))),128))]),c.value?(a(),o("p",ve,r(c.value),1)):x("",!0),n("div",he,[n("button",{class:"btn btn-primary",type:"button",disabled:g.value,onClick:V},[g.value?(a(),S(u(U),{key:0,class:"btn-spinner"})):(a(),o("span",Ce,"Allow access"))],8,fe),n("button",{class:"btn btn-secondary",type:"button",disabled:g.value,onClick:M}," Cancel ",8,be)])])):w.value?(a(),o("div",we,[C(u(Y),{class:"success-icon"}),t[5]||(t[5]=n("h2",null,"Connected",-1)),t[6]||(t[6]=n("p",null,"Returning you to Claude…",-1))])):x("",!0)],2)],2))}},Pe=q(ke,[["__scopeId","data-v-e17f9bb6"]]);export{Pe as default};

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.