@mastra/daytona 0.8.0 → 0.8.1-alpha.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @mastra/daytona
2
2
 
3
+ ## 0.8.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Honor the sandbox runtime environment (`setEnv()`/`getEnv()` from `@mastra/core`) in every workspace sandbox provider. Environment variables set after construction now reach subsequent commands on all providers: ([#22250](https://github.com/mastra-ai/mastra/pull/22250))
8
+
9
+ - Process-manager-routed providers (E2B, Blaxel, Cloudflare, Daytona, Docker, Modal, Vercel microVM spawns) inherit the merge from the core spawn wrapper; their duplicated per-manager env plumbing is removed.
10
+ - Providers with their own exec transports (AgentCore, Apple Container, Railway, Vercel microVM and serverless `executeCommand`, Platform's private-network, WebSocket lease, and E2B lease paths) now merge `getEnv()` under per-call env.
11
+
12
+ Constructor `env` continues to behave as before: it seeds the sandbox runtime environment, and providers that bake env into the VM or container at creation time (Docker, Modal, Railway, Apple Container, Vercel, Platform) still do so. Per-call `env` on `executeCommand` still takes precedence for that command only.
13
+
14
+ Removed exported types (minor bump for these two packages): `BlaxelProcessManagerOptions` from `@mastra/blaxel` and `RailwayProcessManagerOptions` from `@mastra/railway`. Both existed only to pass `env` into a process manager constructed by hand; the core spawn wrapper now owns that merge, so the option and its type are gone.
15
+
16
+ - Updated dependencies [[`aa3a85d`](https://github.com/mastra-ai/mastra/commit/aa3a85daf094c683bb97efdf4b6a696d2e474af5), [`d29d06f`](https://github.com/mastra-ai/mastra/commit/d29d06fe00bbd35b4571150ea04c59d2ed783c71), [`e6516df`](https://github.com/mastra-ai/mastra/commit/e6516dfcdae4f4ac0e7971d84359a81385ee602f), [`0b2a3d1`](https://github.com/mastra-ai/mastra/commit/0b2a3d1783875c5b97b7b36ab3d03d7360e0dde7), [`6bb5d71`](https://github.com/mastra-ai/mastra/commit/6bb5d7193fe9166b219f0fccae17db7a5ae86e65), [`57de7d6`](https://github.com/mastra-ai/mastra/commit/57de7d644ba7146edb4e9e6111ec4fa98c3a59e9), [`e8e299c`](https://github.com/mastra-ai/mastra/commit/e8e299cc6abdfc39947e2fec25803493015d3882), [`edfc548`](https://github.com/mastra-ai/mastra/commit/edfc548886bc7bae17b681f8b6b41a47eb32bcd2), [`a8a4871`](https://github.com/mastra-ai/mastra/commit/a8a4871215f51da95c47129602157ce5372f634a), [`5165cdc`](https://github.com/mastra-ai/mastra/commit/5165cdcdcf50e144bb8113278535196cc9b07065), [`6bb5d71`](https://github.com/mastra-ai/mastra/commit/6bb5d7193fe9166b219f0fccae17db7a5ae86e65), [`9ee8120`](https://github.com/mastra-ai/mastra/commit/9ee8120ce17f76b9f617489e05a283353742690a), [`d975e92`](https://github.com/mastra-ai/mastra/commit/d975e924d4936f46c386bd3dee39c671720289f6), [`1cfa878`](https://github.com/mastra-ai/mastra/commit/1cfa8784d8da0dfaa0317e5048bc48b6084a5ea5), [`c118318`](https://github.com/mastra-ai/mastra/commit/c1183181c9804303db4b511c2e2648f8b714712b), [`fc07c64`](https://github.com/mastra-ai/mastra/commit/fc07c6465043e08e99193a6751a01c56ffc2e7a1), [`542dee2`](https://github.com/mastra-ai/mastra/commit/542dee254167f974ff8cbbbfc0ce10f9a2616a7b), [`a58483c`](https://github.com/mastra-ai/mastra/commit/a58483cff1a9d41fce7c931843f48cb0ac450f64), [`a58483c`](https://github.com/mastra-ai/mastra/commit/a58483cff1a9d41fce7c931843f48cb0ac450f64), [`895e9df`](https://github.com/mastra-ai/mastra/commit/895e9dfc17d6f34299eca64e317ded9e5f5e5ef8)]:
17
+ - @mastra/core@1.62.0-alpha.8
18
+
3
19
  ## 0.8.0
4
20
 
5
21
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -525,7 +525,7 @@ var DaytonaProcessManager = class extends _mastra_core_workspace.SandboxProcessM
525
525
  _spawnCounter = 0;
526
526
  _defaultTimeout;
527
527
  constructor(opts = {}) {
528
- super({ env: opts.env });
528
+ super();
529
529
  this._defaultTimeout = opts.defaultTimeout;
530
530
  }
531
531
  async spawn(command, options = {}) {
@@ -534,11 +534,7 @@ var DaytonaProcessManager = class extends _mastra_core_workspace.SandboxProcessM
534
534
  timeout: options.timeout ?? this._defaultTimeout,
535
535
  cwd: options.cwd ?? this.sandbox.mounts?.entries?.keys().next().value
536
536
  };
537
- const mergedEnv = {
538
- ...this.env,
539
- ...effectiveOptions.env
540
- };
541
- const envs = Object.fromEntries(Object.entries(mergedEnv).filter((entry) => entry[1] !== void 0));
537
+ const envs = Object.fromEntries(Object.entries(effectiveOptions.env ?? {}).filter((entry) => entry[1] !== void 0));
542
538
  const sessionCommand = buildSpawnCommand(command, effectiveOptions.cwd, envs);
543
539
  return this.sandbox.retryOnDead(async () => {
544
540
  const sandbox = this.sandbox.daytona;
@@ -697,7 +693,6 @@ var DaytonaSandbox = class DaytonaSandbox extends _mastra_core_workspace.MastraS
697
693
  timeout;
698
694
  language;
699
695
  resources;
700
- env;
701
696
  labels;
702
697
  snapshotId;
703
698
  image;
@@ -719,16 +714,12 @@ var DaytonaSandbox = class DaytonaSandbox extends _mastra_core_workspace.MastraS
719
714
  super({
720
715
  ...options,
721
716
  name: "DaytonaSandbox",
722
- processes: new DaytonaProcessManager({
723
- env: options.env,
724
- defaultTimeout: options.timeout ?? 3e5
725
- })
717
+ processes: new DaytonaProcessManager({ defaultTimeout: options.timeout ?? 3e5 })
726
718
  });
727
719
  this.id = options.id ?? this.generateId();
728
720
  this.timeout = options.timeout ?? 3e5;
729
721
  this.language = options.language ?? "typescript";
730
722
  this.resources = options.resources;
731
- this.env = options.env ?? {};
732
723
  this.labels = options.labels ?? {};
733
724
  this.snapshotId = options.snapshot;
734
725
  this.image = options.image;