try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5cdf78b0-e5cb-4b01-afd1-27c6aae4b8c5",e._sentryDebugIdIdentifier="sentry-dbid-5cdf78b0-e5cb-4b01-afd1-27c6aae4b8c5")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"agent-cli@2026.06.02-8c11d9f"}}catch(e){}}(),exports.id=4212,exports.ids=[4212],exports.modules={"./src/commands/worker-directory.ts":(e,o,r)=>{r.r(o),r.d(o,{createInvalidWorkerDirectoryError:()=>c,findClosestCommonAncestor:()=>d,resolveWorkerDirectoryPaths:()=>i});var t=r("node:fs"),n=r("node:path"),s=r.n(n);function i(e){if(void 0===e||0===e.length){const e=process.cwd();return{isValid:!0,workspacePaths:[e],workerCwd:e}}const o=[];for(const r of e){const e=s().resolve(r);if(!(0,t.existsSync)(e))return{isValid:!1,workspacePath:e,reason:"does-not-exist"};if(!(0,t.statSync)(e).isDirectory())return{isValid:!1,workspacePath:e,reason:"not-directory"};o.includes(e)||o.push(e)}return{isValid:!0,workspacePaths:o,workerCwd:d(o)}}function d(e){if(0===e.length)throw new Error("Cannot compute common ancestor for an empty path list");if(1===e.length)return s().resolve(e[0]);const o=e.map((e=>s().resolve(e))),r=s().parse(o[0]).root;if(!o.every((e=>s().parse(e).root===r)))return o[0];const t=o[0].slice(r.length).split(s().sep).filter(Boolean);let n=t.length;for(const e of o.slice(1)){const o=e.slice(r.length).split(s().sep).filter(Boolean);let i=0;for(;i<n&&i<o.length&&t[i]===o[i];)i++;n=i}return 0===n?r:s().join(r,...t.slice(0,n))}function c(e,o){return"does-not-exist"===e?new Error(`Invalid worker directory: does not exist (${o})`):new Error(`Invalid worker directory: path is not a directory (${o})`)}}};