"use strict";exports.id=1623,exports.ids=[1623],exports.modules={"./src/state/index.ts"(e,r,s){s.d(r,{mh:()=>i,r7:()=>a,wk:()=>d});var n=s("node:crypto"),o=s("node:path"),t=s("../cursor-config/dist/index.js");function i(){return(0,o.join)((0,t.WI)(),"chats")}function d(e){const r=(0,o.resolve)(e),s=(0,n.createHash)("md5").update(r).digest("hex");return(0,o.join)(i(),s)}function a(){return d(process.cwd())}},"./src/state/requested-session-id.ts"(e,r,s){s.r(r),s.d(r,{claimRequestedSessionId:()=>u,resolveRequestedSessionIdOption:()=>a});var n=s("node:fs"),o=s("node:path"),t=s("../../../../../../../../../../private/tmp/buildkite-job-019fcd9f-5990-4587-a03d-2002fa32284c/agent-cli-mac-macos-arm64-019fcd9f-5990-4587-a03d-2002fa32284c.ZeeOrv1W/pnpm-virtual-store/zod@3.25.76/node_modules/zod/v3/types.js"),i=s("./src/state/index.ts");const d=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 a(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 r=d.safeParse(e.newSessionId);return r.success?!0===(s=e.resume)||"string"==typeof s||!0===e.continue?{kind:"error",message:"Error: --new-session-id cannot be combined with --resume or --continue."}:{kind:"valid",sessionId:r.data}:{kind:"error",message:`Error: Invalid --new-session-id "${e.newSessionId}": expected a UUIDv4.`};var s}function c(e){return e instanceof Error?e.message:String(e)}function u(e,r=(0,i.r7)()){try{(0,n.mkdirSync)(r,{recursive:!0})}catch(r){throw new Error(`Unable to prepare storage for new session "${e}": ${c(r)}`)}const s=(0,o.join)(r,e);try{(0,n.mkdirSync)(s)}catch(r){if(function(e){return e instanceof Error&&"code"in e&&"string"==typeof e.code&&"EEXIST"===e.code}(r))throw new Error(`Session ID "${e}" is already in use.`);throw new Error(`Unable to reserve new session ID "${e}": ${c(r)}`)}return{sessionId:e,sessionDir:s}}}};