@letterblack/lbe-sdk 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/README.md +47 -57
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  <div align="center">
2
2
 
3
+ <img src="https://raw.githubusercontent.com/Letterblack0306/letterblack-Lockstep-boundry-engine/main/assets/logo.svg" width="100" alt="LetterBlack logo"/>
4
+
3
5
  # `@letterblack/lbe-sdk`
4
6
 
5
7
  **Local-first AI execution governance.**
@@ -14,38 +16,33 @@ Sandboxed writes · Audit · Rollback · MCP · WASM engine
14
16
 
15
17
  ---
16
18
 
19
+ ## What LBE is
20
+
21
+ LBE is a local SDK that enforces a cryptographic policy gate between an AI agent and your system. It installs as an npm package, runs entirely in your process, and requires no external service, cloud connection, or hosted API. Every action an agent proposes passes through the validation engine before anything executes. Nothing phones home.
22
+
23
+ ---
24
+
25
+ ## The problem
26
+
27
+ AI agents can write files, run shell commands, and modify your system — and most frameworks let them do it without any gate.
28
+
29
+ There is no policy asking "is this agent allowed to do this?" There is no audit trail recording what happened. There is no rollback if it goes wrong. If an agent overwrites a config file, deletes the wrong directory, or runs a command it shouldn't — you find out after the fact, with no record and no recovery.
30
+
31
+ LBE is the enforcement layer that sits between an AI agent and your system. Every action the agent proposes must pass a cryptographic validation pipeline before anything executes. If it fails — nothing runs, nothing changes, and the denial is logged. If it passes — the action executes under a governed adapter, a hash-chained audit entry is written, and rollback state is saved.
32
+
33
+ <div align="center">
34
+ <img src="https://raw.githubusercontent.com/Letterblack0306/letterblack-Lockstep-boundry-engine/main/assets/storyboard-deny.png" width="680" alt="Rogue agent blocked: bypass attempt denied, shell untouched, filesystem unchanged, audit sealed"/>
35
+ </div>
36
+
37
+ ---
38
+
17
39
  ## How it works
18
40
 
19
- ```
20
- AI Agent
21
-
22
- │ propose action
23
-
24
- ┌─────────────────────────────────────┐
25
- │ @letterblack/lbe-sdk │
26
- │ │
27
- │ ┌─────────────────────────────┐ │
28
- │ │ WASM Engine │ │
29
- │ │ schema → timestamp → key │ │
30
- │ │ → signature → rate-limit │ │
31
- │ │ → nonce → policy │ │
32
- │ └────────────┬────────────────┘ │
33
- │ │ ok / deny │
34
- │ ┌────────────▼────────────────┐ │
35
- │ │ Adapter (file / shell) │ │
36
- │ └────────────┬────────────────┘ │
37
- │ │ │
38
- │ ┌────────────▼────────────────┐ │
39
- │ │ Audit log · Rollback │ │
40
- │ └─────────────────────────────┘ │
41
- └─────────────────────────────────────┘
42
-
43
- │ result + audit entry
44
-
45
- Your app
46
- ```
41
+ <div align="center">
42
+ <img src="https://raw.githubusercontent.com/Letterblack0306/letterblack-Lockstep-boundry-engine/main/assets/architecture.svg" width="680" alt="LBE SDK architecture diagram"/>
43
+ </div>
47
44
 
48
- Everything runs on your machine. No hosted service. No data leaves.
45
+ Every action proposal from an agent is validated across 7 stages — schema, timestamp, key lifecycle, Ed25519 signature, rate limit, nonce deduplication, and policy — before the adapter executes anything. All 7 stages run inside the compiled WASM engine. A denial at any stage stops execution immediately and writes an audit entry. No cloud. No data leaves the machine.
49
46
 
50
47
  ---
51
48
 
@@ -67,7 +64,7 @@ npm install @letterblack/lbe-sdk
67
64
 
68
65
  ## Quick Start
69
66
 
70
- ### Sandbox (simple)
67
+ ### Sandbox
71
68
 
72
69
  ```js
73
70
  import { sandbox } from "@letterblack/lbe-sdk";
@@ -152,31 +149,6 @@ npx lbe-mcp # Start MCP server on stdio
152
149
 
153
150
  ---
154
151
 
155
- ## API
156
-
157
- ### `sandbox(root, opts?)`
158
-
159
- | Option | Default | Description |
160
- |---|---|---|
161
- | `audit` | `false` | Record governed operations to the local audit log |
162
- | `rollback` | `false` | Back up before writes; restore on failure |
163
- | `state` | `'local'` | `'local'`, `'workspace'`, or custom adapter |
164
-
165
- ### `createLBE(options)`
166
-
167
- | Option | Description |
168
- |---|---|
169
- | `rootDir` | Workspace root |
170
- | `secretKey` | Ed25519 signing key (base64) |
171
- | `keyStore` | Trusted key registry |
172
- | `policy` | Inline policy object |
173
- | `state` | State storage mode |
174
- | `logLevel` | `DEBUG` · `INFO` · `WARN` · `ERROR` |
175
-
176
- Returns: `execute()` · `writeFile()` · `readFile()` · `exportLogs()`
177
-
178
- ---
179
-
180
152
  ## Validation pipeline
181
153
 
182
154
  Every execution proposal passes 7 stages inside the compiled WASM engine:
@@ -194,8 +166,26 @@ Every execution proposal passes 7 stages inside the compiled WASM engine:
194
166
  execute ──▶ audit entry ──▶ rollback state
195
167
  ```
196
168
 
197
- All 7 stages execute inside `runtime/lbe_engine.wasm`.
198
- The JS layer handles file IO, adapter dispatch, and the public API only.
169
+ All 7 stages execute inside `runtime/lbe_engine.wasm`. The JS layer handles file IO, adapter dispatch, and the public SDK surface only.
170
+
171
+ <div align="center">
172
+ <img src="https://raw.githubusercontent.com/Letterblack0306/letterblack-Lockstep-boundry-engine/main/assets/storyboard-allow.png" width="680" alt="Trusted agent approved: identity confirmed, policy passed, governed write executed, audit chain extended"/>
173
+ </div>
174
+
175
+ ---
176
+
177
+ ## SDK API status
178
+
179
+ The public SDK surface is intentionally minimal in v0.4.0.
180
+
181
+ Current stable entry points:
182
+ - `sandbox(root, opts?)`
183
+ - `createLBE(options)`
184
+ - `lbe.execute(proposal)`
185
+ - `lbe.readFile(path)`
186
+ - `lbe.writeFile(path, content)`
187
+
188
+ Expanded API documentation will be published after the runtime contract stabilizes.
199
189
 
200
190
  ---
201
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterblack/lbe-sdk",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Commercial SDK distribution for the Lockstep Boundary Engine.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",