"use strict";exports.id=5165,exports.ids=[5165],exports.modules={"./src/state/index.ts"(e,s,r){r.d(s,{mh:()=>i,r7:()=>d,wk:()=>a});var n=r("node:crypto"),o=r("node:path"),t=r("../cursor-config/dist/paths.js");function i(){return(0,o.join)((0,t.WI)(),"chats")}function a(e){const s=(0,o.resolve)(e),r=(0,n.createHash)("md5").update(s).digest("hex");return(0,o.join)(i(),r)}function d(){return a(process.cwd())}},"./src/state/requested-session-id.ts"(e,s,r){r.r(s),r.d(s,{claimRequestedSessionId:()=>u,resolveRequestedSessionIdOption:()=>d});var n=r("node:fs"),o=r("node:path"),t=r("../../../../../../../../../../private/tmp/buildkite-job-01a03ad4-00a2-4e4f-9a4f-0e1ec809f684/agent-cli-mac-macos-x64-01a03ad4-00a2-4e4f-9a4f-0e1ec809f684.LshlV881/pnpm-virtual-store/zod@3.25.76/node_modules/zod/v3/types.js"),i=r("./src/state/index.ts");const a=t.Yj().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i).brand();function d(e){if(void 0===e.newSessionId)return{kind:"none"};if("string"!=typeof e.newSessionId)return{kind:"error",message:"Error: --new-session-id requires a UUIDv4 value."};const s=a.safeParse(e.newSessionId);return s.success?!0===(r=e.resume)||"string"==typeof r||!0===e.continue?{kind:"error",message:"Error: --new-session-id cannot be combined with --resume or --continue."}:{kind:"valid",sessionId:s.data}:{kind:"error",message:`Error: Invalid --new-session-id "${e.newSessionId}": expected a UUIDv4.`};var r}function c(e){return e instanceof Error?e.message:String(e)}function u(e,s=(0,i.r7)()){try{(0,n.mkdirSync)(s,{recursive:!0})}catch(s){throw new Error(`Unable to prepare storage for new session "${e}": ${c(s)}`)}const r=(0,o.join)(s,e);try{(0,n.mkdirSync)(r)}catch(s){if(function(e){return e instanceof Error&&"code"in e&&"string"==typeof e.code&&"EEXIST"===e.code}(s))throw new Error(`Session ID "${e}" is already in use.`);throw new Error(`Unable to reserve new session ID "${e}": ${c(s)}`)}return{sessionId:e,sessionDir:r}}}};