@@ -12,15 +12,15 @@ The design intentionally supports:
1212
1313## Implementation Status
1414
15- | Package | Status | Description |
16- | -------------------- | ------- | --------------------------------------- |
17- | ` enclave-vm ` | ✅ Done | Core sandbox VM engine |
18- | ` @enclavejs /types ` | ✅ Done | Shared TypeScript types and Zod schemas |
19- | ` @enclavejs /stream ` | ✅ Done | NDJSON streaming protocol |
20- | ` @enclavejs /broker ` | ✅ Done | Middleware/tool broker with HTTP API |
21- | ` @enclavejs /client ` | ✅ Done | Browser + Node client SDK |
22- | ` @enclavejs /runtime ` | ✅ Done | Extracted runtime worker |
23- | ` @enclavejs /react ` | ✅ Done | React hooks & components |
15+ | Package | Status | Description |
16+ | --------------------- | ------- | --------------------------------------- |
17+ | ` @ enclave-vm/core ` | ✅ Done | Core sandbox VM engine |
18+ | ` @enclave-vm /types ` | ✅ Done | Shared TypeScript types and Zod schemas |
19+ | ` @enclave-vm /stream ` | ✅ Done | NDJSON streaming protocol |
20+ | ` @enclave-vm /broker ` | ✅ Done | Middleware/tool broker with HTTP API |
21+ | ` @enclave-vm /client ` | ✅ Done | Browser + Node client SDK |
22+ | ` @enclave-vm /runtime ` | ✅ Done | Extracted runtime worker |
23+ | ` @enclave-vm /react ` | ✅ Done | React hooks & components |
2424
2525## Table of contents
2626
@@ -67,7 +67,7 @@ The design intentionally supports:
6767| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
6868| ** Runtime** | The component that runs AgentScript continuously (built on ` enclave-vm ` ). |
6969| ** Client** | JS SDK used from browser/server to start a session with the middleware and consume the streamed events/results. |
70- | ** Middleware / Broker** | Node.js service (often inside a VPC) that owns secrets and executes tool calls. Implemented in ` @enclavejs /broker ` . |
70+ | ** Middleware / Broker** | Node.js service (often inside a VPC) that owns secrets and executes tool calls. Implemented in ` @enclave-vm /broker ` . |
7171| ** Session** | A long-lived, continuous execution context for a single piece of code (plus its stream + tool roundtrips). |
7272| ** Tool** | An external action callable from AgentScript via ` callTool(name, args) ` . |
7373| ** Reference Sidecar** | Per-session in-memory store of large/sensitive values addressed by ` refId ` . |
@@ -85,8 +85,8 @@ The design intentionally supports:
8585├─────────────────────────────────────────────────────────────────────────────┤
8686│ │
8787│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
88- │ │ @enclavejs / │ │ @enclavejs / │ │ enclave-vm │ │
89- │ │ client │────▶│ broker │────▶│ (runtime) │ │
88+ │ │ @enclave-vm / │ │ @enclave-vm / │ │ @ enclave-vm/ │ │
89+ │ │ client │────▶│ broker │────▶│ core (runtime) │ │
9090│ │ (browser/node) │ │ (middleware) │ │ (sandboxed) │ │
9191│ └──────────────────┘ └──────────────────┘ └──────────────────┘ │
9292│ │ │ │ │
@@ -103,15 +103,15 @@ The design intentionally supports:
103103
104104### Packages
105105
106- | Package | npm | Description |
107- | -------------------- | -------------------- | ------------------------------------------------------------------------- |
108- | ` enclave-vm ` | ` enclave-vm ` | Core sandbox VM engine. Executes untrusted code safely. |
109- | ` @enclavejs /types ` | ` @enclavejs /types ` | Shared TypeScript types, Zod schemas, protocol constants. |
110- | ` @enclavejs /stream ` | ` @enclavejs /stream ` | NDJSON streaming protocol, event parsing, reconnection logic. |
111- | ` @enclavejs /broker ` | ` @enclavejs /broker ` | Middleware: tool registry, secret management, session API, HTTP handlers. |
112- | ` @enclavejs /client ` | ` @enclavejs /client ` | Browser + Node SDK for connecting to middleware. (Planned) |
113- | ` @enclavejs /runtime ` | ` @enclavejs /runtime ` | Extracted runtime worker for Lambda/DO/containers. (Planned) |
114- | ` @enclavejs /react ` | ` @enclavejs /react ` | React hooks for session management. (Planned) |
106+ | Package | npm | Description |
107+ | --------------------- | - -------------------- | ------------------------------------------------------------------------- |
108+ | ` @ enclave-vm/core ` | ` @ enclave-vm/core ` | Core sandbox VM engine. Executes untrusted code safely. |
109+ | ` @enclave-vm /types ` | ` @enclave-vm /types ` | Shared TypeScript types, Zod schemas, protocol constants. |
110+ | ` @enclave-vm /stream ` | ` @enclave-vm /stream ` | NDJSON streaming protocol, event parsing, reconnection logic. |
111+ | ` @enclave-vm /broker ` | ` @enclave-vm /broker ` | Middleware: tool registry, secret management, session API, HTTP handlers. |
112+ | ` @enclave-vm /client ` | ` @enclave-vm /client ` | Browser + Node SDK for connecting to middleware. (Planned) |
113+ | ` @enclave-vm /runtime ` | ` @enclave-vm /runtime ` | Extracted runtime worker for Lambda/DO/containers. (Planned) |
114+ | ` @enclave-vm /react ` | ` @enclave-vm /react ` | React hooks for session management. (Planned) |
115115
116116---
117117
@@ -126,7 +126,7 @@ Browser connects to your VPC where middleware runs the runtime in-process. **Sim
126126│ Browser │ ◄────────────────────────► │ VPC / Your Server │
127127│ (Client) │ POST /sessions │ │
128128│ │ Stream events │ ┌─────────────────────────┐ │
129- └─────────────┘ │ │ @enclavejs /broker │ │
129+ └─────────────┘ │ │ @enclave-vm /broker │ │
130130 │ │ • Tool Registry │ │
131131 │ │ • Secrets (API keys) │ │
132132 │ │ • Session Manager │ │
@@ -143,7 +143,7 @@ Browser connects to your VPC where middleware runs the runtime in-process. **Sim
143143
144144``` typescript
145145import express from ' express' ;
146- import { createBroker , createSessionHandler , registerExpressRoutes } from ' @enclavejs /broker' ;
146+ import { createBroker , createSessionHandler , registerExpressRoutes } from ' @enclave-vm /broker' ;
147147import { z } from ' zod' ;
148148
149149const broker = createBroker ()
@@ -202,7 +202,7 @@ Browser connects to middleware, but code execution happens on a separate Lambda/
202202```
203203┌─────────────┐ HTTPS/NDJSON ┌─────────────────────┐ WebSocket ┌─────────────────┐
204204│ Browser │ ◄────────────────► │ VPC Middleware │ ◄─────────────► │ Lambda/Vercel │
205- │ (Client) │ POST /sessions │ @enclavejs /broker │ session channel │ Runtime │
205+ │ (Client) │ POST /sessions │ @enclave-vm /broker │ session channel │ Runtime │
206206│ │ Stream events │ │ │ │
207207└─────────────┘ │ • Tool Registry │ │ • enclave-vm │
208208 │ • Secrets │ │ • NO secrets │
@@ -260,7 +260,7 @@ Your backend server (Node.js) executes code directly. No HTTP/browser involved.
260260│ │ │
261261│ ▼ │
262262│ ┌─────────────────────────────────────────────────┐ │
263- │ │ @enclavejs /broker │ │
263+ │ │ @enclave-vm /broker │ │
264264│ │ • Tool Registry • Secrets │ │
265265│ │ • enclave-vm (sandboxed execution) │ │
266266│ └─────────────────────────────────────────────────┘ │
@@ -270,7 +270,7 @@ Your backend server (Node.js) executes code directly. No HTTP/browser involved.
270270** Example:**
271271
272272``` typescript
273- import { createBroker } from ' @enclavejs /broker' ;
273+ import { createBroker } from ' @enclave-vm /broker' ;
274274import { z } from ' zod' ;
275275
276276const broker = createBroker ()
@@ -332,7 +332,7 @@ Your server orchestrates but offloads code execution to Lambda/Vercel. **Best fo
332332```
333333┌──────────────────────────┐ WebSocket/HTTP ┌─────────────────────┐
334334│ Your Server (Node) │ ◄───────────────────────────► │ Lambda Runtime │
335- │ @enclavejs /broker │ │ @enclavejs /runtime│
335+ │ @enclave-vm /broker │ │ @enclave-vm /runtime│
336336│ │ session channel │ │
337337│ • Tool Registry │ (tool_call/tool_result) │ • enclave-vm │
338338│ • Secrets │ │ • NO secrets │
@@ -468,10 +468,10 @@ Every message includes:
468468| ` heartbeat ` | Keep-alive signal |
469469| ` error ` | Non-fatal error during execution |
470470
471- ### TypeScript Types (from ` @enclavejs /types ` )
471+ ### TypeScript Types (from ` @enclave-vm /types ` )
472472
473473``` typescript
474- import type { StreamEvent , SessionId , CallId } from ' @enclavejs /types' ;
474+ import type { StreamEvent , SessionId , CallId } from ' @enclave-vm /types' ;
475475
476476// Event union type
477477type StreamEvent =
@@ -514,7 +514,7 @@ const result = await callTool('toolName', { arg1: 'value' });
514514### Tool Registration
515515
516516``` typescript
517- import { createBroker } from ' @enclavejs /broker' ;
517+ import { createBroker } from ' @enclave-vm /broker' ;
518518import { z } from ' zod' ;
519519
520520const broker = createBroker ()
@@ -649,7 +649,7 @@ Per-hop encryption using:
649649
650650### Recommendations
651651
652- - ** Server/container** : Best for most deployments. Run Node.js with ` @enclavejs /broker ` .
652+ - ** Server/container** : Best for most deployments. Run Node.js with ` @enclave-vm /broker ` .
653653- ** Cloudflare DO** : Best for edge deployment with global distribution.
654654- ** Lambda** : Use for short-lived sessions or as extracted runtime with middleware coordination.
655655- ** Vercel Edge** : Use only as gateway/proxy to stateful runtime.
0 commit comments