@mastra/modal 0.6.0-alpha.0 → 0.6.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/README.md +47 -0
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @mastra/modal
|
|
2
|
+
|
|
3
|
+
Run Mastra workspace commands in isolated Modal cloud sandboxes with authentication, lifecycle controls, background processes, and reconnection.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/modal
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Set `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`, then attach the sandbox to a workspace.
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { Agent } from '@mastra/core/agent';
|
|
17
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
18
|
+
import { ModalSandbox } from '@mastra/modal';
|
|
19
|
+
|
|
20
|
+
const workspace = new Workspace({
|
|
21
|
+
sandbox: new ModalSandbox({
|
|
22
|
+
id: 'dev-sandbox',
|
|
23
|
+
baseImage: 'ubuntu:22.04',
|
|
24
|
+
timeoutMs: 60_000,
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const agent = new Agent({
|
|
29
|
+
id: 'developer-agent',
|
|
30
|
+
name: 'Developer agent',
|
|
31
|
+
instructions: 'Use the workspace to inspect and modify the project.',
|
|
32
|
+
model: 'openai/gpt-5.6-sol',
|
|
33
|
+
workspace,
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
- [Modal](https://mastra.ai/integrations/sandboxes/modal)
|
|
40
|
+
|
|
41
|
+
## Changelog
|
|
42
|
+
|
|
43
|
+
See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/workspaces/modal/CHANGELOG.md) for version history and release notes.
|
|
44
|
+
|
|
45
|
+
## Support
|
|
46
|
+
|
|
47
|
+
We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/modal",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Modal cloud sandbox provider for Mastra workspaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"tsdown": "0.22.9",
|
|
32
32
|
"typescript": "^7.0.2",
|
|
33
33
|
"vitest": "4.1.10",
|
|
34
|
-
"@internal/lint": "0.0.
|
|
35
|
-
"@internal/
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
34
|
+
"@internal/lint": "0.0.130",
|
|
35
|
+
"@internal/workspace-test-utils": "0.0.74",
|
|
36
|
+
"@mastra/core": "1.64.0",
|
|
37
|
+
"@internal/types-builder": "0.0.105"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@mastra/core": ">=1.12.0-0 <2.0.0-0"
|