@mastra/blaxel 0.0.0-codex-om-20260226233706
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 +38 -0
- package/LICENSE.md +15 -0
- package/README.md +101 -0
- package/dist/index.cjs +835 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +829 -0
- package/dist/index.js.map +1 -0
- package/dist/sandbox/index.d.ts +243 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/mounts/gcs.d.ts +20 -0
- package/dist/sandbox/mounts/gcs.d.ts.map +1 -0
- package/dist/sandbox/mounts/index.d.ts +4 -0
- package/dist/sandbox/mounts/index.d.ts.map +1 -0
- package/dist/sandbox/mounts/s3.d.ts +30 -0
- package/dist/sandbox/mounts/s3.d.ts.map +1 -0
- package/dist/sandbox/mounts/types.d.ts +43 -0
- package/dist/sandbox/mounts/types.d.ts.map +1 -0
- package/dist/utils/shell-quote.d.ts +8 -0
- package/dist/utils/shell-quote.d.ts.map +1 -0
- package/package.json +70 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @mastra/blaxel
|
|
2
|
+
|
|
3
|
+
## 0.0.0-codex-om-20260226233706
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`88de7e8`](https://github.com/mastra-ai/mastra/commit/88de7e8dfe4b7e1951a9e441bb33136e705ce24e), [`edee4b3`](https://github.com/mastra-ai/mastra/commit/edee4b37dff0af515fc7cc0e8d71ee39e6a762f0), [`09c3b18`](https://github.com/mastra-ai/mastra/commit/09c3b1802ff14e243a8a8baea327440bc8cc2e32), [`524c0f3`](https://github.com/mastra-ai/mastra/commit/524c0f3c434c3d9d18f66338dcef383d6161b59c), [`04add6c`](https://github.com/mastra-ai/mastra/commit/04add6ce8f3e3d7aecbbeb8dfe9270583ff62471), [`b03c0e0`](https://github.com/mastra-ai/mastra/commit/b03c0e0389a799523929a458b0509c9e4244d562), [`191e5bd`](https://github.com/mastra-ai/mastra/commit/191e5bd29b82f5bda35243945790da7bc7b695c2), [`31c78b3`](https://github.com/mastra-ai/mastra/commit/31c78b3eb28f58a8017f1dcc795c33214d87feac)]:
|
|
8
|
+
- @mastra/core@0.0.0-codex-om-20260226233706
|
|
9
|
+
|
|
10
|
+
## 0.0.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Adds Blaxel cloud sandbox provider ([#13015](https://github.com/mastra-ai/mastra/pull/13015))
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`df170fd`](https://github.com/mastra-ai/mastra/commit/df170fd139b55f845bfd2de8488b16435bd3d0da), [`ae55343`](https://github.com/mastra-ai/mastra/commit/ae5534397fc006fd6eef3e4f80c235bcdc9289ef), [`c290cec`](https://github.com/mastra-ai/mastra/commit/c290cec5bf9107225de42942b56b487107aa9dce), [`f03e794`](https://github.com/mastra-ai/mastra/commit/f03e794630f812b56e95aad54f7b1993dc003add), [`aa4a5ae`](https://github.com/mastra-ai/mastra/commit/aa4a5aedb80d8d6837bab8cbb2e301215d1ba3e9), [`de3f584`](https://github.com/mastra-ai/mastra/commit/de3f58408752a8d80a295275c7f23fc306cf7f4f), [`d3fb010`](https://github.com/mastra-ai/mastra/commit/d3fb010c98f575f1c0614452667396e2653815f6), [`702ee1c`](https://github.com/mastra-ai/mastra/commit/702ee1c41be67cc532b4dbe89bcb62143508f6f0), [`f495051`](https://github.com/mastra-ai/mastra/commit/f495051eb6496a720f637fc85b6d69941c12554c), [`e622f1d`](https://github.com/mastra-ai/mastra/commit/e622f1d3ab346a8e6aca6d1fe2eac99bd961e50b), [`861f111`](https://github.com/mastra-ai/mastra/commit/861f11189211b20ddb70d8df81a6b901fc78d11e), [`00f43e8`](https://github.com/mastra-ai/mastra/commit/00f43e8e97a80c82b27d5bd30494f10a715a1df9), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`96a1702`](https://github.com/mastra-ai/mastra/commit/96a1702ce362c50dda20c8b4a228b4ad1a36a17a), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`114e7c1`](https://github.com/mastra-ai/mastra/commit/114e7c146ac682925f0fb37376c1be70e5d6e6e5), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`72df4a8`](https://github.com/mastra-ai/mastra/commit/72df4a8f9bf1a20cfd3d9006a4fdb597ad56d10a)]:
|
|
17
|
+
- @mastra/core@1.8.0
|
|
18
|
+
|
|
19
|
+
## 0.0.2-alpha.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Adds Blaxel cloud sandbox provider ([#13015](https://github.com/mastra-ai/mastra/pull/13015))
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`df170fd`](https://github.com/mastra-ai/mastra/commit/df170fd139b55f845bfd2de8488b16435bd3d0da), [`ae55343`](https://github.com/mastra-ai/mastra/commit/ae5534397fc006fd6eef3e4f80c235bcdc9289ef), [`c290cec`](https://github.com/mastra-ai/mastra/commit/c290cec5bf9107225de42942b56b487107aa9dce), [`f03e794`](https://github.com/mastra-ai/mastra/commit/f03e794630f812b56e95aad54f7b1993dc003add), [`aa4a5ae`](https://github.com/mastra-ai/mastra/commit/aa4a5aedb80d8d6837bab8cbb2e301215d1ba3e9), [`de3f584`](https://github.com/mastra-ai/mastra/commit/de3f58408752a8d80a295275c7f23fc306cf7f4f), [`d3fb010`](https://github.com/mastra-ai/mastra/commit/d3fb010c98f575f1c0614452667396e2653815f6), [`702ee1c`](https://github.com/mastra-ai/mastra/commit/702ee1c41be67cc532b4dbe89bcb62143508f6f0), [`f495051`](https://github.com/mastra-ai/mastra/commit/f495051eb6496a720f637fc85b6d69941c12554c), [`e622f1d`](https://github.com/mastra-ai/mastra/commit/e622f1d3ab346a8e6aca6d1fe2eac99bd961e50b), [`861f111`](https://github.com/mastra-ai/mastra/commit/861f11189211b20ddb70d8df81a6b901fc78d11e), [`00f43e8`](https://github.com/mastra-ai/mastra/commit/00f43e8e97a80c82b27d5bd30494f10a715a1df9), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`96a1702`](https://github.com/mastra-ai/mastra/commit/96a1702ce362c50dda20c8b4a228b4ad1a36a17a), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`114e7c1`](https://github.com/mastra-ai/mastra/commit/114e7c146ac682925f0fb37376c1be70e5d6e6e5), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`72df4a8`](https://github.com/mastra-ai/mastra/commit/72df4a8f9bf1a20cfd3d9006a4fdb597ad56d10a)]:
|
|
26
|
+
- @mastra/core@1.8.0-alpha.0
|
|
27
|
+
|
|
28
|
+
## 0.0.1
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Added `@mastra/blaxel` package providing Blaxel cloud sandbox integration for Mastra workspaces. Supports S3 and GCS filesystem mounting via FUSE inside sandboxes.
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { BlaxelSandbox } from '@mastra/blaxel';
|
|
36
|
+
|
|
37
|
+
const sandbox = new BlaxelSandbox({ timeout: '5m' });
|
|
38
|
+
```
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Apache License 2.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# @mastra/blaxel
|
|
2
|
+
|
|
3
|
+
Blaxel cloud sandbox provider for Mastra workspaces. Provides secure, isolated code execution environments with support for mounting cloud storage (S3, GCS) via FUSE.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/blaxel
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Agent } from '@mastra/core/agent';
|
|
15
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
16
|
+
import { BlaxelSandbox } from '@mastra/blaxel';
|
|
17
|
+
|
|
18
|
+
const workspace = new Workspace({
|
|
19
|
+
sandbox: new BlaxelSandbox({
|
|
20
|
+
timeout: '5m', // sandbox TTL (default: 5 minutes)
|
|
21
|
+
memory: 4096, // memory in MB (default: 4096)
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const agent = new Agent({
|
|
26
|
+
name: 'my-agent',
|
|
27
|
+
model: 'anthropic/claude-opus-4-5',
|
|
28
|
+
workspace,
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Configuration Options
|
|
33
|
+
|
|
34
|
+
| Option | Type | Default | Description |
|
|
35
|
+
| ---------- | ------------------------------------- | ---------------------------- | ------------------------------------------------------ |
|
|
36
|
+
| `id` | `string` | auto-generated | Unique identifier for the sandbox instance |
|
|
37
|
+
| `image` | `string` | `'blaxel/py-app:latest'` | Docker image to use |
|
|
38
|
+
| `memory` | `number` | `4096` | Memory allocation in MB |
|
|
39
|
+
| `timeout` | `string` | `'5m'` | Sandbox TTL as a duration string (e.g. `'5m'`, `'1h'`) |
|
|
40
|
+
| `env` | `Record<string, string>` | — | Environment variables to set in the sandbox |
|
|
41
|
+
| `labels` | `Record<string, string>` | — | Custom labels for the sandbox |
|
|
42
|
+
| `runtimes` | `SandboxRuntime[]` | `['node', 'python', 'bash']` | Supported runtimes |
|
|
43
|
+
| `ports` | `Array<{ name?, target, protocol? }>` | — | Ports to expose from the sandbox |
|
|
44
|
+
|
|
45
|
+
### Mounting Cloud Storage
|
|
46
|
+
|
|
47
|
+
Blaxel sandboxes can mount S3 or GCS filesystems, making cloud storage accessible as a local directory inside the sandbox.
|
|
48
|
+
|
|
49
|
+
#### S3
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
53
|
+
import { S3Filesystem } from '@mastra/s3';
|
|
54
|
+
import { BlaxelSandbox } from '@mastra/blaxel';
|
|
55
|
+
|
|
56
|
+
const workspace = new Workspace({
|
|
57
|
+
mounts: {
|
|
58
|
+
'/data': new S3Filesystem({
|
|
59
|
+
bucket: 'my-bucket',
|
|
60
|
+
region: 'us-east-1',
|
|
61
|
+
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
62
|
+
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
sandbox: new BlaxelSandbox(),
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### GCS
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
73
|
+
import { GCSFilesystem } from '@mastra/gcs';
|
|
74
|
+
import { BlaxelSandbox } from '@mastra/blaxel';
|
|
75
|
+
|
|
76
|
+
const workspace = new Workspace({
|
|
77
|
+
mounts: {
|
|
78
|
+
'/data': new GCSFilesystem({
|
|
79
|
+
bucket: 'my-bucket',
|
|
80
|
+
serviceAccountKey: process.env.GCS_SERVICE_ACCOUNT_KEY,
|
|
81
|
+
}),
|
|
82
|
+
},
|
|
83
|
+
sandbox: new BlaxelSandbox(),
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Custom Images
|
|
88
|
+
|
|
89
|
+
For advanced use cases, you can specify a custom Docker image:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
const workspace = new Workspace({
|
|
93
|
+
sandbox: new BlaxelSandbox({
|
|
94
|
+
image: 'my-custom-image:latest',
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Documentation
|
|
100
|
+
|
|
101
|
+
For more information, see the [Mastra Workspaces documentation](https://mastra.ai/docs/workspace/overview).
|