@mastra/quickjs 0.1.0-alpha.0 → 0.1.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/LICENSE.md +6 -4
- package/dist/transport.d.ts.map +1 -1
- package/package.json +6 -7
- package/CHANGELOG.md +0 -32
package/LICENSE.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Portions of this software are licensed as follows:
|
|
2
2
|
|
|
3
|
-
- All content that resides under any directory named
|
|
3
|
+
- All content that resides under any directory named `ee/` within this
|
|
4
4
|
repository, including but not limited to:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
|
|
5
|
+
- `@mastra/core/auth/ee`
|
|
6
|
+
- `@mastra/core/agent-builder/ee`
|
|
7
|
+
- `@mastra/editor/ee`
|
|
8
|
+
|
|
9
|
+
is licensed under the license defined in [`ee/LICENSE`](https://github.com/mastra-ai/mastra/blob/main/ee/LICENSE).
|
|
8
10
|
|
|
9
11
|
- All third-party components incorporated into the Mastra Software are
|
|
10
12
|
licensed under the original license provided by the owner of the
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,KAAK,EAAyC,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAenG,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAsBD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;;IAChE,QAAQ,CAAC,eAAe,SAAS;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,KAAK,EAAyC,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAenG,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAsBD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;;IAChE,QAAQ,CAAC,eAAe,SAAS;IAMjC,YAAY,OAAO,GAAE,+BAAoC,EAIxD;IAEK,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkXpF;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/quickjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-alpha.0",
|
|
4
4
|
"description": "In-process WebAssembly Code Mode transport for Mastra, backed by QuickJS — no native binaries and no Node flags required",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,19 +28,18 @@
|
|
|
28
28
|
"@vitest/coverage-v8": "4.1.10",
|
|
29
29
|
"eslint": "^10.7.0",
|
|
30
30
|
"tsdown": "0.22.9",
|
|
31
|
-
"typescript": "^
|
|
31
|
+
"typescript": "^7.0.2",
|
|
32
32
|
"vitest": "4.1.10",
|
|
33
33
|
"zod": "^4.4.3",
|
|
34
|
-
"@internal/lint": "0.0.
|
|
35
|
-
"@internal/types-builder": "0.0.
|
|
36
|
-
"@mastra/core": "1.
|
|
34
|
+
"@internal/lint": "0.0.129",
|
|
35
|
+
"@internal/types-builder": "0.0.104",
|
|
36
|
+
"@mastra/core": "1.64.0-alpha.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@mastra/core": ">=1.55.0-0 <2.0.0-0"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
|
-
"dist"
|
|
43
|
-
"CHANGELOG.md"
|
|
42
|
+
"dist"
|
|
44
43
|
],
|
|
45
44
|
"homepage": "https://mastra.ai",
|
|
46
45
|
"repository": {
|
package/CHANGELOG.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# @mastra/quickjs
|
|
2
|
-
|
|
3
|
-
## 0.1.0-alpha.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- Added `@mastra/quickjs`, a Code Mode transport that runs model-authored programs in an in-process QuickJS runtime compiled to WebAssembly. ([#21089](https://github.com/mastra-ai/mastra/pull/21089))
|
|
8
|
-
|
|
9
|
-
**Why**
|
|
10
|
-
|
|
11
|
-
Running Code Mode in-process previously meant `@mastra/isolated-vm`, which installs a native addon and requires the host process to start with `--no-node-snapshot`. Serverless platforms usually allow neither, leaving a full workspace sandbox as the only option. This transport needs neither, so Code Mode runs on those hosts.
|
|
12
|
-
|
|
13
|
-
**Usage**
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { createCodeMode } from '@mastra/core/tools';
|
|
17
|
-
import { QuickJsCodeModeTransport } from '@mastra/quickjs';
|
|
18
|
-
|
|
19
|
-
const { tool, instructions } = createCodeMode(
|
|
20
|
-
{ tools: { getTopProducts, getProductRatings } },
|
|
21
|
-
new QuickJsCodeModeTransport({ memoryLimitMb: 128 }),
|
|
22
|
-
);
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Programs get the same boundary as the isolated-vm transport: no filesystem, network, process, or module access, and the allow-listed tools as their only capability. They run slower than in a V8 isolate, which affects compute-heavy code far more than code that awaits tool calls.
|
|
26
|
-
|
|
27
|
-
Closes https://github.com/mastra-ai/mastra/issues/20546
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- Updated dependencies [[`66bbfb5`](https://github.com/mastra-ai/mastra/commit/66bbfb5f05b473d39f88c0e4a481ccac41634f3a)]:
|
|
32
|
-
- @mastra/core@1.58.0-alpha.10
|