Installation
Each library in the Enclave monorepo can be installed independently.Prerequisites
- Node.js: >= 22.0.0
- npm: >= 10 (or yarn/pnpm equivalent)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
How to install Enclave libraries
npm install @enclave-vm/core
npm install @enclave-vm/ast
# Server-side
npm install @enclave-vm/broker
# Client-side
npm install @enclave-vm/client @enclave-vm/react
npm install @enclave-vm/types
npm install @enclave-vm/stream
npm install @enclave-vm/broker
npm install @enclave-vm/client
npm install @enclave-vm/react
npm install @enclave-vm/runtime
import { Enclave } from '@enclave-vm/core';
const enclave = new Enclave({ securityLevel: 'SECURE' });
const result = await enclave.execute('return 1 + 1');
console.log(result.value); // 2
import { EnclaveProvider, useEnclaveSession } from '@enclave-vm/react';
function App() {
return (
<EnclaveProvider brokerUrl="http://localhost:3000">
<CodeRunner />
</EnclaveProvider>
);
}
function CodeRunner() {
const { execute, stdout, result } = useEnclaveSession();
return (
<button onClick={() => execute('console.log("Hello!")')}>
Run
</button>
);
}
# Clone the repository
git clone https://github.com/agentfront/enclave.git
cd enclave
# Install dependencies
yarn install
# Build all libraries
yarn build
# Run tests
yarn test
| Package | Version | Description |
|---|---|---|
| @enclave-vm/core | 2.7.0 | Secure sandbox runtime |
| @enclave-vm/ast | 2.4.0 | AST security validator |
| @enclave-vm/types | 0.1.0 | Protocol types |
| @enclave-vm/stream | 0.1.0 | Streaming protocol |
| @enclave-vm/broker | 0.1.0 | Tool broker |
| @enclave-vm/client | 0.1.0 | Client SDK |
| @enclave-vm/react | 0.1.0 | React integration |
| @enclave-vm/runtime | 0.1.0 | Runtime worker |