@mastra/agentcore 0.0.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 +1 -0
- package/README.md +35 -0
- package/package.json +67 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @mastra/agentcore
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @mastra/agentcore
|
|
2
|
+
|
|
3
|
+
AWS Bedrock AgentCore Runtime sandbox provider for Mastra workspaces.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/agentcore
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Workspace } from '@mastra/core/workspace';
|
|
15
|
+
import { AgentCoreRuntimeSandbox } from '@mastra/agentcore';
|
|
16
|
+
|
|
17
|
+
const workspace = new Workspace({
|
|
18
|
+
sandbox: new AgentCoreRuntimeSandbox({
|
|
19
|
+
region: 'us-west-2',
|
|
20
|
+
agentRuntimeArn: process.env.AGENTCORE_RUNTIME_ARN!,
|
|
21
|
+
runtimeSessionId: '12345678-1234-1234-1234-123456789012',
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const result = await workspace.sandbox?.executeCommand?.('npm', ['test'], {
|
|
26
|
+
cwd: '/workspace',
|
|
27
|
+
timeout: 300_000,
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`AgentCoreRuntimeSandbox` uses `InvokeAgentRuntimeCommand` to run one-shot shell commands inside an existing AgentCore Runtime session. It does not provide background process management or filesystem mounts.
|
|
32
|
+
|
|
33
|
+
By default, `destroy()` does not stop the AgentCore Runtime session because sessions can be shared with other AgentCore invocations. Call `stopRuntimeSession()` explicitly, or set `stopSessionOnLifecycle: true`, when the sandbox owns the session and should clean it up.
|
|
34
|
+
|
|
35
|
+
AgentCore Code Interpreter is a separate AgentCore service and is not part of this runtime sandbox provider.
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mastra/agentcore",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "AWS Bedrock AgentCore Runtime sandbox provider for Mastra workspaces",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup --silent --config tsup.config.ts",
|
|
23
|
+
"build:lib": "pnpm build",
|
|
24
|
+
"build:watch": "pnpm build --watch",
|
|
25
|
+
"test:unit": "vitest run --exclude '**/*.integration.test.ts'",
|
|
26
|
+
"test:watch": "vitest watch",
|
|
27
|
+
"test": "vitest run ./src/**/*.integration.test.ts",
|
|
28
|
+
"test:cloud": "pnpm test",
|
|
29
|
+
"lint": "eslint ."
|
|
30
|
+
},
|
|
31
|
+
"license": "Apache-2.0",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@aws-sdk/client-bedrock-agentcore": "^3.1045.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@internal/lint": "workspace:*",
|
|
37
|
+
"@internal/types-builder": "workspace:*",
|
|
38
|
+
"@mastra/core": "workspace:*",
|
|
39
|
+
"@types/node": "22.19.15",
|
|
40
|
+
"@vitest/coverage-v8": "catalog:",
|
|
41
|
+
"@vitest/ui": "catalog:",
|
|
42
|
+
"dotenv": "^17.3.1",
|
|
43
|
+
"eslint": "^10.2.1",
|
|
44
|
+
"tsup": "^8.5.1",
|
|
45
|
+
"typescript": "catalog:",
|
|
46
|
+
"vitest": "catalog:"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@mastra/core": ">=1.12.0-0 <2.0.0-0"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist",
|
|
53
|
+
"CHANGELOG.md"
|
|
54
|
+
],
|
|
55
|
+
"homepage": "https://mastra.ai",
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/mastra-ai/mastra.git",
|
|
59
|
+
"directory": "workspaces/agentcore"
|
|
60
|
+
},
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=22.13.0"
|
|
66
|
+
}
|
|
67
|
+
}
|