import * as path from 'path';

// src/rest/handlers/scope-resolver.ts
function resolveScopePath(baseCwd, scopeId = "root", scopes) {
  const scopeDef = scopes?.find((s) => s.id === scopeId);
  const relativePath = scopeDef?.path ?? (scopeId === "root" ? "." : scopeId);
  return relativePath === "." ? baseCwd : path.join(baseCwd, relativePath);
}

export { resolveScopePath };
//# sourceMappingURL=scope-resolver.js.map
//# sourceMappingURL=scope-resolver.js.map