@elizaos/core 2.0.0-alpha.155 → 2.0.0-alpha.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -212552,6 +212552,10 @@ function getMemoryText2(memory2, defaultValue = "") {
212552
212552
  init_logger();
212553
212553
  init_environment();
212554
212554
  var attemptedInstalls = new Set;
212555
+ function getBunRuntime() {
212556
+ const bunRuntime = globalThis.Bun;
212557
+ return bunRuntime && typeof bunRuntime.spawn === "function" ? bunRuntime : null;
212558
+ }
212555
212559
  function isAutoInstallAllowed() {
212556
212560
  if (process.env.ELIZA_NO_AUTO_INSTALL === "true")
212557
212561
  return false;
@@ -212576,12 +212580,13 @@ async function tryInstallPlugin(pluginName) {
212576
212580
  return false;
212577
212581
  }
212578
212582
  attemptedInstalls.add(pluginName);
212579
- if (typeof Bun === "undefined" || typeof Bun.spawn !== "function") {
212583
+ const bunRuntime = getBunRuntime();
212584
+ if (!bunRuntime) {
212580
212585
  logger.warn({ src: "core:plugin", pluginName }, "Bun runtime not available, cannot auto-install");
212581
212586
  return false;
212582
212587
  }
212583
212588
  try {
212584
- const check = Bun.spawn(["bun", "--version"], {
212589
+ const check = bunRuntime.spawn(["bun", "--version"], {
212585
212590
  stdout: "pipe",
212586
212591
  stderr: "pipe"
212587
212592
  });
@@ -212595,7 +212600,7 @@ async function tryInstallPlugin(pluginName) {
212595
212600
  return false;
212596
212601
  }
212597
212602
  logger.info({ src: "core:plugin", pluginName }, "Auto-installing missing plugin");
212598
- const install = Bun.spawn(["bun", "add", pluginName], {
212603
+ const install = bunRuntime.spawn(["bun", "add", pluginName], {
212599
212604
  cwd: process.cwd(),
212600
212605
  env: process.env,
212601
212606
  stdout: "inherit",
@@ -229738,5 +229743,5 @@ export {
229738
229743
  ADD_CONTACT_TEMPLATE
229739
229744
  };
229740
229745
 
229741
- //# debugId=F060D07AAB5B3F4364756E2164756E21
229746
+ //# debugId=24A7012863B11FF964756E2164756E21
229742
229747
  //# sourceMappingURL=index.node.js.map