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 CHANGED
@@ -70,14 +70,26 @@ npm install @botpress/client llmz
70
70
 
71
71
  ### Platform Support
72
72
 
73
- | Platform | Support | Notes |
74
- | ----------- | --------- | --------------------------------------- |
75
- | Node.js 20+ | Full | Includes isolated VM sandbox |
76
- | Browser | Partial\* | No sandbox (uses standard JS execution) |
77
- | Bun | Partial\* | No sandbox (uses standard JS execution) |
78
- | Deno | Partial\* | No sandbox (uses standard JS execution) |
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
- \* A WASM-based sandbox (QuickJS) is in progress and coming soon, which will provide full sandboxed execution for Browser, Bun, and Deno environments.
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 `isolated-vm` for untrusted code execution
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 isolated VM (production) or Node.js VM (development)
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
- - Sandboxed execution environment (no filesystem/network access)
419
+ - QuickJS WASM sandbox with complete isolation (no filesystem/network access)
408
420
  - Stack trace sanitization (removes internal framework details)
409
- - Configurable tool permissions and rate limiting
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 | Isolated VM |
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