"use strict";exports.id=8201,exports.ids=[8201],exports.modules={"./src/commands/auth-status-format.ts"(s,e,t){t.d(e,{$7:()=>c,Fg:()=>o,cq:()=>r});var n=t("../../../../var/folders/gy/wcfhjzc55d96bnvx1zv223lc0000gn/T/agent-cli-mac-macos-x64-019f6d3d-8812-4a7d-ad69-e1d1701ab9a2.1ELq4Ger/pnpm-virtual-store/chalk@5.6.2/node_modules/chalk/source/index.js");function o(s){const{status:e,message:t,userInfo:o,loginUrl:r}=s;switch(e){case"starting":return"Starting login process...";case"in-progress":{const s=["Authenticating with Cursor..."];return t&&s.push(t),r&&s.push(n.Ay.dim(r)),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!",e=[`${n.Ay.green("✓")} ${s}`];return t&&e.push(t),e.join("\n")}case"error":return t?n.Ay.red(t):""}}function r(s){const{status:e,message:t}=s;switch(e){case"starting":return"Preparing to log out...";case"in-progress":return"Logging out...";case"success":{const s=[n.Ay.green("✓ Logout successful")];return t&&s.push(t),s.join("\n")}case"error":{const s=[n.Ay.red("✗ Logout failed")];return t&&s.push(n.Ay.red(t)),s.join("\n")}}}function c(s){const{status:e,message:t}=s;switch(e){case"starting":{const s=["MCP Login","Preparing login..."];return t&&s.push(t),s.join("\n")}case"in-progress":{const s=["Checking status..."];return t&&s.push(t),s.join("\n")}case"success":{const s=[n.Ay.green("✓ MCP login successful")];return t&&s.push(t),s.join("\n")}case"error":{const s=[n.Ay.red("✗ MCP login failed")];return t&&s.push(n.Ay.red(t)),s.join("\n")}}}},"./src/commands/logout.ts"(s,e,t){t.r(e),t.d(e,{handleLogout:()=>i});var n=t("../keychain/dist/index.js"),o=t("./src/console-io.ts"),r=t("./src/statsig.ts"),c=t("./src/commands/auth-status-format.ts");function i(s,e){return t=this,i=void 0,u=function*(){(0,o.OT)((0,c.cq)({status:"starting"}));try{(yield s.getAccessToken())||((0,o.OT)((0,c.cq)({status:"success",message:"Authentication tokens removed."})),process.exit(0))}catch(s){s instanceof n.fI&&((0,o.OT)((0,c.cq)({status:"success",message:"Authentication tokens removed."})),process.exit(0))}try{(0,o.OT)((0,c.cq)({status:"in-progress"})),yield s.clearAuthentication(),yield e.transform((s=>Object.assign(Object.assign({},s),{privacyCache:void 0,authInfo:void 0}))),(0,r.yX)(),(0,o.OT)((0,c.cq)({status:"success",message:"Authentication tokens removed."}))}catch(s){(0,o.p2)((0,c.cq)({status:"error",message:`Failed to remove authentication tokens: ${s}`})),process.exit(1)}process.exit(0)},new((a=void 0)||(a=Promise))((function(s,e){function n(s){try{r(u.next(s))}catch(s){e(s)}}function o(s){try{r(u.throw(s))}catch(s){e(s)}}function r(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a((function(s){s(t)}))).then(n,o)}r((u=u.apply(t,i||[])).next())}));var t,i,a,u}}};