"use strict";exports.id=6068,exports.ids=[6068],exports.modules={"./src/commands/auth-status-format.ts"(s,t,e){e.d(t,{$7:()=>c,Fg:()=>r,cq:()=>o});var n=e("../../../../../../../../../../private/tmp/buildkite-job-01a03ad4-00a2-4e4f-9a4f-0e1ec809f684/agent-cli-mac-macos-x64-01a03ad4-00a2-4e4f-9a4f-0e1ec809f684.LshlV881/pnpm-virtual-store/chalk@5.6.2/node_modules/chalk/source/index.js");function r(s){const{status:t,message:e,userInfo:r,loginUrl:o}=s;switch(t){case"starting":return"Starting login process...";case"in-progress":{const s=["Authenticating with Cursor..."];return e&&s.push(e),o&&s.push(n.Ay.dim(o)),s.join("\n")}case"success":{const s=(null==r?void 0:r.email)?`Logged in as ${r.email}`:(null==r?void 0:r.userId)?`Logged in as user id ${r.userId}`:"Login successful!",t=[`${n.Ay.green("✓")} ${s}`];return e&&t.push(e),t.join("\n")}case"error":return e?n.Ay.red(e):""}}function o(s){const{status:t,message:e}=s;switch(t){case"starting":return"Preparing to log out...";case"in-progress":return"Logging out...";case"success":{const s=[n.Ay.green("✓ Logout successful")];return e&&s.push(e),s.join("\n")}case"error":{const s=[n.Ay.red("✗ Logout failed")];return e&&s.push(n.Ay.red(e)),s.join("\n")}}}function c(s){const{status:t,message:e}=s;switch(t){case"starting":{const s=["MCP Login","Preparing login..."];return e&&s.push(e),s.join("\n")}case"in-progress":{const s=["Checking status..."];return e&&s.push(e),s.join("\n")}case"success":{const s=[n.Ay.green("✓ MCP login successful")];return e&&s.push(e),s.join("\n")}case"error":{const s=[n.Ay.red("✗ MCP login failed")];return e&&s.push(n.Ay.red(e)),s.join("\n")}}}},"./src/commands/logout.ts"(s,t,e){e.r(t),e.d(t,{handleLogout:()=>a});var n=e("./src/console-io.ts"),r=e("./src/statsig.ts"),o=e("./src/utils/keychain-error.ts"),c=e("./src/commands/auth-status-format.ts");function a(s,t){return e=this,a=void 0,u=function*(){var e;(0,n.OT)((0,c.cq)({status:"starting"}));try{(0,n.OT)((0,c.cq)({status:"in-progress"})),yield s.clearAuthentication(),yield t.transform((s=>Object.assign(Object.assign({},s),{privacyCache:void 0,authInfo:void 0}))),(0,r.yX)(),(0,n.OT)((0,c.cq)({status:"success",message:"Authentication tokens removed."}))}catch(s){(0,n.p2)((0,c.cq)({status:"error",message:null!==(e=(0,o.z)(s))&&void 0!==e?e:`Failed to remove authentication tokens: ${s}`})),process.exit(1)}process.exit(0)},new((i=void 0)||(i=Promise))((function(s,t){function n(s){try{o(u.next(s))}catch(s){t(s)}}function r(s){try{o(u.throw(s))}catch(s){t(s)}}function o(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(s){s(e)}))).then(n,r)}o((u=u.apply(e,a||[])).next())}));var e,a,i,u}}};