import * as path from 'path';
import { a as PROVIDERS } from './registry-D4J_CuzW.js';
import './coordinator-DMU_ADXf.js';

const VALID_SOURCES = new Set(PROVIDERS.map((p) => p.source));
function isValidProvider(value) {
  return VALID_SOURCES.has(value);
}
function isValidSessionKey(key) {
  if (/^[A-Za-z0-9_-]+$/.test(key)) {
    return true;
  }
  const home = process.env.HOME || "";
  if (home === "" || !path.isAbsolute(key)) {
    return false;
  }
  const relative = path.relative(path.resolve(home), path.resolve(key));
  return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
}

export { isValidProvider as a, isValidSessionKey as i };
//# sourceMappingURL=super-session-handler-DPyxFgmz.js.map
