mastracode 0.30.0-alpha.2 → 0.30.0

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.
@@ -4493,7 +4493,7 @@ function isInsideDirectory(targetPath, root) {
4493
4493
  function getInstallCommand(pluginRoot, packageManager, commandRoot = pluginRoot, commandPackageManager) {
4494
4494
  const manager = packageManager ?? commandPackageManager;
4495
4495
  if (manager?.startsWith("pnpm@")) {
4496
- return hasFile(pluginRoot, "pnpm-lock.yaml") ? installCommand("pnpm", ["install", "--frozen-lockfile"]) : installCommand("pnpm", ["install"]);
4496
+ return hasFile(pluginRoot, "pnpm-lock.yaml") ? installCommand("pnpm", ["install", "--ignore-workspace", "--frozen-lockfile", "--pm-on-fail=ignore"]) : installCommand("pnpm", ["install", "--ignore-workspace", "--pm-on-fail=ignore"]);
4497
4497
  }
4498
4498
  if (manager?.startsWith("npm@")) {
4499
4499
  return hasNpmLockfile(pluginRoot) ? installCommand("npm", ["ci"]) : installCommand("npm", ["install"]);
@@ -4508,10 +4508,10 @@ function getInstallCommand(pluginRoot, packageManager, commandRoot = pluginRoot,
4508
4508
  return installCommand(manager.split("@")[0] ?? manager, ["install"]);
4509
4509
  }
4510
4510
  if (hasFile(pluginRoot, "pnpm-lock.yaml")) {
4511
- return installCommand("pnpm", ["install", "--frozen-lockfile"]);
4511
+ return installCommand("pnpm", ["install", "--ignore-workspace", "--frozen-lockfile", "--pm-on-fail=ignore"]);
4512
4512
  }
4513
4513
  if (hasFile(commandRoot, "pnpm-lock.yaml")) {
4514
- return installCommand("pnpm", ["install"]);
4514
+ return installCommand("pnpm", ["install", "--ignore-workspace", "--pm-on-fail=ignore"]);
4515
4515
  }
4516
4516
  if (hasNpmLockfile(pluginRoot)) {
4517
4517
  return installCommand("npm", ["ci"]);
@@ -4921,7 +4921,24 @@ function validateManifestEntry(entry, index) {
4921
4921
  ...candidate.name ? { name: candidate.name } : {}
4922
4922
  };
4923
4923
  }
4924
- var MASTRACODE_PACKAGE_ROOT = path12__default.resolve(path12__default.dirname(fileURLToPath(import.meta.url)), "..", "..");
4924
+ var MASTRACODE_PACKAGE_ROOT = findMastraCodePackageRoot(path12__default.dirname(fileURLToPath(import.meta.url)));
4925
+ function findMastraCodePackageRoot(startDir) {
4926
+ let currentDir = path12__default.resolve(startDir);
4927
+ while (true) {
4928
+ const packageJsonPath = path12__default.join(currentDir, "package.json");
4929
+ if (fs8__default.existsSync(packageJsonPath)) {
4930
+ const packageJson = JSON.parse(fs8__default.readFileSync(packageJsonPath, "utf8"));
4931
+ if (packageJson.name === "mastracode") {
4932
+ return currentDir;
4933
+ }
4934
+ }
4935
+ const parentDir = path12__default.dirname(currentDir);
4936
+ if (parentDir === currentDir) {
4937
+ throw new Error(`Could not find mastracode package root from ${startDir}`);
4938
+ }
4939
+ currentDir = parentDir;
4940
+ }
4941
+ }
4925
4942
  function ensureMastraCodePackageLink(pluginDir) {
4926
4943
  if (declaresInstallableMastraCodeDependency(pluginDir)) {
4927
4944
  return;
@@ -6872,5 +6889,5 @@ Timeout elapsed. Aborted.
6872
6889
  }
6873
6890
 
6874
6891
  export { VALID_MODES, VALID_PERMISSION_MODES, VALID_THINKING_LEVELS, autoApprovePolicy, bootLocalAgentController, createAuthStorage, createHumanFormatState, createMastraCode, createMastraCodeAgentController, denyPolicy, ensureMastraCodePackageLink, formatHuman, formatJsonl, hasHeadlessFlag, mountAgentControllerOnMastra, parseHeadlessArgs, permissionModeToPolicy, prepareAgentControllerMount, printHeadlessUsage, renderJsonResult, renderTextResult, runMC, runMCCli, setupDebugLogging, truncate, upsertPluginManifestEntry, wireSessionConcerns };
6875
- //# sourceMappingURL=chunk-SAUQYLBP.js.map
6876
- //# sourceMappingURL=chunk-SAUQYLBP.js.map
6892
+ //# sourceMappingURL=chunk-YADYGJS7.js.map
6893
+ //# sourceMappingURL=chunk-YADYGJS7.js.map