"use strict";exports.id=4267,exports.ids=[4267],exports.modules={"./src/commands/auth-status-format.ts"(s,t,e){e.d(t,{$7:()=>r,Fg:()=>o,cq:()=>c});var n=e("../../../../../../../../../../private/tmp/buildkite-job-019fcd9f-5990-4587-a03d-2002fa32284c/agent-cli-mac-macos-arm64-019fcd9f-5990-4587-a03d-2002fa32284c.ZeeOrv1W/pnpm-virtual-store/chalk@5.6.2/node_modules/chalk/source/index.js");function o(s){const{status:t,message:e,userInfo:o,loginUrl:c}=s;switch(t){case"starting":return"Starting login process...";case"in-progress":{const s=["Authenticating with Cursor..."];return e&&s.push(e),c&&s.push(n.Ay.dim(c)),s.join("\n")}case"success":{const s=(null==o?void 0:o.email)?`Logged in as ${o.email}`:(null==o?void 0:o.userId)?`Logged in as user id ${o.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 c(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 r(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:()=>i});var n=e("../keychain/dist/index.js"),o=e("./src/console-io.ts"),c=e("./src/statsig.ts"),r=e("./src/commands/auth-status-format.ts");function i(s,t){return e=this,i=void 0,u=function*(){(0,o.OT)((0,r.cq)({status:"starting"}));try{(yield s.getAccessToken())||((0,o.OT)((0,r.cq)({status:"success",message:"Authentication tokens removed."})),process.exit(0))}catch(s){s instanceof n.fI&&((0,o.OT)((0,r.cq)({status:"success",message:"Authentication tokens removed."})),process.exit(0))}try{(0,o.OT)((0,r.cq)({status:"in-progress"})),yield s.clearAuthentication(),yield t.transform((s=>Object.assign(Object.assign({},s),{privacyCache:void 0,authInfo:void 0}))),(0,c.yX)(),(0,o.OT)((0,r.cq)({status:"success",message:"Authentication tokens removed."}))}catch(s){(0,o.p2)((0,r.cq)({status:"error",message:`Failed to remove authentication tokens: ${s}`})),process.exit(1)}process.exit(0)},new((a=void 0)||(a=Promise))((function(s,t){function n(s){try{c(u.next(s))}catch(s){t(s)}}function o(s){try{c(u.throw(s))}catch(s){t(s)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof a?e:new a((function(s){s(e)}))).then(n,o)}c((u=u.apply(e,i||[])).next())}));var e,i,a,u}}};