{"record":{"id":"6612338da95fb5d0","repo":"different-ai/openwork","slug":"invalid-workspace-root","errorCode":"invalid_workspace_root","errorMessage":"Invalid Windows workspace root: ${value}","messagePattern":"Invalid Windows workspace root: (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/paths/index.mjs","lineNumber":39,"sourceCode":"\n/**\n * Normalizes Windows verbatim drive and UNC paths without consulting the\n * filesystem. Missing drives and disconnected shares must remain unchanged so\n * callers can report their real accessibility error instead of resolving them\n * against another drive.\n */\nexport function normalizeWorkspaceRootPath(value, opts) {\n  const trimmed = String(value ?? \"\").trim();\n  if (!trimmed || optionPlatform(opts) !== \"win32\") return trimmed;\n\n  const windowsPath = trimmed.replace(/\\//g, \"\\\\\");\n  let normalized = windowsPath;\n  if (windowsPath.startsWith(\"\\\\\\\\?\\\\\")) {\n    const verbatimPath = windowsPath.slice(4);\n    if (/^UNC(?:\\\\|$)/i.test(verbatimPath)) {\n      const uncPath = verbatimPath.slice(3).replace(/^\\\\/, \"\");\n      const [server, share] = uncPath.split(\"\\\\\");\n      if (!server || !share) throw invalidWindowsWorkspaceRoot(trimmed);\n      normalized = `\\\\\\\\${uncPath}`;\n    } else {\n      if (!/^[A-Za-z]:\\\\/.test(verbatimPath)) throw invalidWindowsWorkspaceRoot(trimmed);\n      normalized = verbatimPath;\n    }\n  }\n\n  if (isWindowsDeviceNamespace(normalized)) {\n    throw invalidWindowsWorkspaceRoot(trimmed);\n  }\n\n  if (/^[A-Za-z]:(?!\\\\)/.test(normalized)) {\n    throw invalidWindowsWorkspaceRoot(trimmed);\n  }\n  if (normalized.startsWith(\"\\\\\")) {\n    if (!normalized.startsWith(\"\\\\\\\\\")) throw invalidWindowsWorkspaceRoot(trimmed);\n    const [server, share] = normalized.slice(2).split(\"\\\\\");\n    if (!server || !share) throw invalidWindowsWorkspaceRoot(trimmed);","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/paths/index.mjs#L21-L57","documentation":"Error \"Invalid Windows workspace root: ${value}\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/paths/index.mjs:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}