llmz 0.0.29 → 0.0.30
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 +25 -12
- package/dist/{chunk-ERK3MOZF.js → chunk-DCYSCVQM.js} +828 -364
- package/dist/{chunk-FMOTPO76.cjs → chunk-R3LXNE5N.cjs} +829 -365
- package/dist/compiler/compiler.d.ts +1 -0
- package/dist/compiler/plugins/async-iterator.d.ts +2 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/{llmz-RZUY2RT4.cjs → llmz-DYB74G5C.cjs} +10 -10
- package/dist/{llmz-QUBEO7EF.js → llmz-N6KWKJ2Q.js} +9 -9
- package/dist/quickjs-variant.d.ts +2 -0
- package/dist/{vm-SQHETBVH.js → vm-J6UNJGIN.js} +1 -3
- package/dist/{vm-5SJN3OJI.cjs → vm-NGQ6DRS3.cjs} +2 -4
- package/dist/vm.d.ts +7 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -70,14 +70,26 @@ npm install @botpress/client llmz
|
|
|
70
70
|
|
|
71
71
|
### Platform Support
|
|
72
72
|
|
|
73
|
-
| Platform
|
|
74
|
-
|
|
|
75
|
-
| Node.js 20+
|
|
76
|
-
| Browser
|
|
77
|
-
|
|
|
78
|
-
|
|
|
73
|
+
| Platform | Support |
|
|
74
|
+
| ------------------ | ------- |
|
|
75
|
+
| Node.js 20+ | ✅ Full |
|
|
76
|
+
| Browser | ✅ Full |
|
|
77
|
+
| AWS Lambda | ✅ Full |
|
|
78
|
+
| Cloudflare Workers | ✅ Full |
|
|
79
|
+
| Bun | ✅ Full |
|
|
80
|
+
| Deno | ✅ Full |
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
#### Sandbox Execution
|
|
83
|
+
|
|
84
|
+
LLMz uses **QuickJS** (a lightweight JavaScript engine compiled to WebAssembly) to execute generated code in a secure, isolated sandbox. This provides:
|
|
85
|
+
|
|
86
|
+
- **Complete isolation**: No access to filesystem, network, or host environment
|
|
87
|
+
- **Memory limits**: Configurable heap size to prevent resource exhaustion
|
|
88
|
+
- **Execution timeouts**: Automatic termination of runaway code
|
|
89
|
+
- **Abort signals**: Support for programmatic execution cancellation
|
|
90
|
+
- **Universal compatibility**: Works everywhere WebAssembly is supported
|
|
91
|
+
|
|
92
|
+
The QuickJS sandbox is bundled as a singlefile variant with WASM inlined as base64, so it works out-of-the-box with any bundler (esbuild, webpack, vite, rollup) without configuration.
|
|
81
93
|
|
|
82
94
|
### Worker Mode: Autonomous Execution
|
|
83
95
|
|
|
@@ -386,7 +398,7 @@ LLMz has been running in production for over a year:
|
|
|
386
398
|
|
|
387
399
|
- **Millions** of active users across enterprise and consumer applications
|
|
388
400
|
- **Hundreds of thousands** of deployed agents handling real-world workloads
|
|
389
|
-
- **Secure sandbox**: Uses
|
|
401
|
+
- **Secure sandbox**: Uses QuickJS WASM for isolated code execution
|
|
390
402
|
- **Type-safe**: Full TypeScript inference and Zui validation
|
|
391
403
|
- **Observable**: Comprehensive tracing and error handling
|
|
392
404
|
|
|
@@ -399,14 +411,15 @@ LLMz has been running in production for over a year:
|
|
|
399
411
|
1. **Prompt Generation**: Injects tools, schemas, and context into dual-mode prompts
|
|
400
412
|
2. **Code Generation**: LLM generates TypeScript with tool calls and logic
|
|
401
413
|
3. **Compilation**: Babel AST transformation with custom plugins (tracking, JSX, source maps)
|
|
402
|
-
4. **Execution**: Runs in
|
|
414
|
+
4. **Execution**: Runs in QuickJS WASM sandbox with full isolation
|
|
403
415
|
5. **Result Processing**: Type-safe exit handling and error recovery
|
|
404
416
|
|
|
405
417
|
**Security:**
|
|
406
418
|
|
|
407
|
-
-
|
|
419
|
+
- QuickJS WASM sandbox with complete isolation (no filesystem/network access)
|
|
408
420
|
- Stack trace sanitization (removes internal framework details)
|
|
409
|
-
- Configurable
|
|
421
|
+
- Configurable memory limits and execution timeouts
|
|
422
|
+
- Tool-level permissions and rate limiting
|
|
410
423
|
- Automatic token limit handling
|
|
411
424
|
|
|
412
425
|
---
|
|
@@ -419,7 +432,7 @@ LLMz has been running in production for over a year:
|
|
|
419
432
|
| Multi-tool orchestration | Multiple LLM calls | Multiple LLM calls | Single LLM call |
|
|
420
433
|
| Complex logic | Limited | Limited | Full language support |
|
|
421
434
|
| Type safety | Partial | Schema-based | Full TypeScript + Zui |
|
|
422
|
-
| Execution environment | Python/JS runtime | Cross-process |
|
|
435
|
+
| Execution environment | Python/JS runtime | Cross-process | QuickJS WASM sandbox |
|
|
423
436
|
| Cost (complex workflows) | High (many roundtrips) | High (many roundtrips) | Low (one-shot generation) |
|
|
424
437
|
| Production scale | Varies | Emerging | Battle-tested (1M+ users) |
|
|
425
438
|
|