"use strict";
/* Socket Lib - Built with esbuild */
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var agents_exports = {};
__export(agents_exports, {
  BUN: () => BUN,
  BUN_LOCK: () => BUN_LOCK,
  BUN_LOCKB: () => BUN_LOCKB,
  NPM: () => NPM,
  NPM_BIN_PATH: () => NPM_BIN_PATH,
  NPM_REAL_EXEC_PATH: () => NPM_REAL_EXEC_PATH,
  NPM_REGISTRY_URL: () => NPM_REGISTRY_URL,
  NPM_SHRINKWRAP_JSON: () => NPM_SHRINKWRAP_JSON,
  NPX: () => NPX,
  OVERRIDES: () => OVERRIDES,
  PACKAGE_LOCK: () => PACKAGE_LOCK,
  PACKAGE_LOCK_JSON: () => PACKAGE_LOCK_JSON,
  PNPM: () => PNPM,
  PNPM_LOCK: () => PNPM_LOCK,
  PNPM_LOCK_YAML: () => PNPM_LOCK_YAML,
  PNPM_WORKSPACE_YAML: () => PNPM_WORKSPACE_YAML,
  RESOLUTIONS: () => RESOLUTIONS,
  VLT: () => VLT,
  VLT_LOCK_JSON: () => VLT_LOCK_JSON,
  YARN: () => YARN,
  YARN_BERRY: () => YARN_BERRY,
  YARN_CLASSIC: () => YARN_CLASSIC,
  YARN_LOCK: () => YARN_LOCK,
  ZPM: () => ZPM
});
module.exports = __toCommonJS(agents_exports);
var import_which = __toESM(require("../external/which"));
const NPM = "npm";
const PNPM = "pnpm";
const YARN = "yarn";
const BUN = "bun";
const VLT = "vlt";
const NPX = "npx";
const _npmBinPath = /* @__PURE__ */ (() => {
  try {
    return import_which.default.sync("npm", { nothrow: true }) || void 0;
  } catch {
    return void 0;
  }
})();
const NPM_BIN_PATH = _npmBinPath || "npm";
const NPM_REAL_EXEC_PATH = /* @__PURE__ */ (() => {
  try {
    if (!_npmBinPath) {
      return void 0;
    }
    const { existsSync } = require("node:fs");
    const path = require("node:path");
    const npmDir = path.dirname(_npmBinPath);
    const nodeModulesPath = path.join(
      npmDir,
      "..",
      "lib",
      "node_modules",
      "npm",
      "lib",
      "cli.js"
    );
    if (existsSync(nodeModulesPath)) {
      return nodeModulesPath;
    }
    return void 0;
  } catch {
    return void 0;
  }
})();
const NPM_REGISTRY_URL = "https://registry.npmjs.org";
const YARN_BERRY = "yarn/berry";
const YARN_CLASSIC = "yarn/classic";
const ZPM = "zpm";
const PACKAGE_LOCK = "package-lock";
const PACKAGE_LOCK_JSON = "package-lock.json";
const NPM_SHRINKWRAP_JSON = "npm-shrinkwrap.json";
const PNPM_LOCK = "pnpm-lock";
const PNPM_LOCK_YAML = "pnpm-lock.yaml";
const YARN_LOCK = "yarn.lock";
const BUN_LOCK = "bun.lock";
const BUN_LOCKB = "bun.lockb";
const VLT_LOCK_JSON = "vlt-lock.json";
const PNPM_WORKSPACE_YAML = "pnpm-workspace.yaml";
const OVERRIDES = "overrides";
const RESOLUTIONS = "resolutions";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  BUN,
  BUN_LOCK,
  BUN_LOCKB,
  NPM,
  NPM_BIN_PATH,
  NPM_REAL_EXEC_PATH,
  NPM_REGISTRY_URL,
  NPM_SHRINKWRAP_JSON,
  NPX,
  OVERRIDES,
  PACKAGE_LOCK,
  PACKAGE_LOCK_JSON,
  PNPM,
  PNPM_LOCK,
  PNPM_LOCK_YAML,
  PNPM_WORKSPACE_YAML,
  RESOLUTIONS,
  VLT,
  VLT_LOCK_JSON,
  YARN,
  YARN_BERRY,
  YARN_CLASSIC,
  YARN_LOCK,
  ZPM
});
