@letterblack/lbe-core 1.3.4 → 1.3.6
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/.githooks/pre-commit +2 -0
- package/.githooks/pre-push +2 -0
- package/CHANGELOG.md +81 -0
- package/LICENSE +1 -1
- package/README.md +158 -170
- package/RELEASE_WORKSPACE_RULES.md +179 -0
- package/Release-README.md +67 -0
- package/WORKSPACE.md +422 -0
- package/_proof.mjs +246 -0
- package/assets/runtime-boundary.svg +36 -36
- package/bin/lbe.js +12 -0
- package/config/identity.config.json +3 -0
- package/config/policy.default.json +24 -0
- package/dist/cli/lbe.js +4431 -0
- package/dist/hooks/register.cjs +505 -0
- package/dist/state/appendCentral.cjs +87 -0
- package/dist/state/index.cjs +101 -0
- package/exec/cli.js +472 -0
- package/exec/index.js +2 -0
- package/index.js +24 -0
- package/npm-pack.json +0 -0
- package/package.json +77 -45
- package/release/README.md +216 -0
- package/release/TRUST.md +90 -0
- package/release/exec-README.md +215 -0
- package/release/exec-types.d.ts +50 -0
- package/release-exec/LICENSE +1 -0
- package/release-exec/README.md +215 -0
- package/release-exec/assets/lbe-gates.jpg +0 -0
- package/release-exec/assets/lbe-gates.png +0 -0
- package/release-exec/assets/runtime-boundary.svg +36 -0
- package/release-exec/assets/story-allow.jpg +0 -0
- package/release-exec/assets/story-allow.png +0 -0
- package/release-exec/assets/story-deny.jpg +0 -0
- package/release-exec/assets/story-deny.png +0 -0
- package/release-exec/dist/cli.js +2841 -0
- package/release-exec/dist/index.js +1835 -0
- package/release-exec/dist/lbe_engine.wasm +0 -0
- package/{dist → release-exec/dist}/wasm.lock.json +4 -5
- package/release-exec/hooks/register.cjs +473 -0
- package/release-exec/package.json +35 -0
- package/release-exec/types.d.ts +50 -0
- package/runtime/engine.js +322 -0
- package/runtime/lbe_engine.wasm +0 -0
- package/src/cli/commands/assertConsumer.js +198 -0
- package/src/cli/commands/auditVerify.js +36 -0
- package/src/cli/commands/dryrun.js +175 -0
- package/src/cli/commands/health.js +153 -0
- package/src/cli/commands/init.js +306 -0
- package/src/cli/commands/integrityCheck.js +57 -0
- package/src/cli/commands/logs.js +53 -0
- package/src/cli/commands/openState.js +44 -0
- package/src/cli/commands/policyAdd.js +8 -0
- package/src/cli/commands/policyMode.js +7 -0
- package/src/cli/commands/policySign.js +72 -0
- package/src/cli/commands/proof.js +102 -0
- package/src/cli/commands/run.js +342 -0
- package/src/cli/commands/status.js +73 -0
- package/src/cli/commands/verify.js +144 -0
- package/src/cli/main.js +181 -0
- package/src/cli/parseArgs.js +115 -0
- package/src/exec/localExecutor.js +289 -0
- package/src/hooks/register.cjs +505 -0
- package/src/state/appendCentral.cjs +87 -0
- package/src/state/fileIndex.js +140 -0
- package/src/state/index.cjs +101 -0
- package/src/state/index.js +65 -0
- package/src/state/intentRegistry.js +84 -0
- package/src/state/migration.js +112 -0
- package/src/state/proofRunner.js +246 -0
- package/src/state/stateRoot.js +40 -0
- package/src/state/targetRegistry.js +109 -0
- package/src/state/workspaceId.js +40 -0
- package/src/state/workspaceRegistry.js +65 -0
- package/types.d.ts +175 -2
- package/dist/cli.js +0 -141
- package/dist/index.js +0 -52
- /package/dist/{lbe_engine.wasm → cli/lbe_engine.wasm} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.3.6 — 2026-06-24
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Fixed internal linting errors preventing clean CI execution.
|
|
7
|
+
- Restored and aligned the GitHub Actions release workflow.
|
|
8
|
+
|
|
9
|
+
## 1.3.3 — 2026-06-23
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- Rebuilt the docs-aligned release from a committed tree so the npm artifact
|
|
13
|
+
gitHead matches the release commit.
|
|
14
|
+
|
|
15
|
+
## 1.3.2 — 2026-06-23
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Aligned the public README surfaces and release docs with the shipped
|
|
19
|
+
`@letterblack/lbe-core` package and current CLI commands.
|
|
20
|
+
|
|
21
|
+
## 1.3.1 — 2026-06-23
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- Re-aligned the release branch and published package lineage after the 1.3.0
|
|
25
|
+
tag/artifact mismatch was detected.
|
|
26
|
+
|
|
27
|
+
## 1.3.0 — 2026-06-23
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- Central local workspace state, proof summaries, and one-time import of legacy
|
|
31
|
+
`.lbe/events.jsonl` entries while preserving the original local log.
|
|
32
|
+
|
|
33
|
+
## 1.2.0 — 2026-06-20
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- **Real JS governance engine** — `createLBE()` now uses the full 7-gate validation pipeline (schema → key lifecycle → timestamp skew → rate limit → nonce replay → policy) with backup, rollback, and audit. Previously backed by a thin WASM wrapper.
|
|
37
|
+
- **Observer mode** — `createLBE({ mode: 'observe' })` or `npx lbe observe`. All gates run silently, audit log is written, nothing is blocked. Default for new and half-built projects.
|
|
38
|
+
- **Policy file** (`lbe.policy.json`) — human-readable rule store per project. Records `effect`, `type`, `pattern`, the original user message (`from`), and timestamp (`at`). Deny always wins over allow.
|
|
39
|
+
- **New CLI commands:**
|
|
40
|
+
- `npx lbe observe` — switch to observer mode
|
|
41
|
+
- `npx lbe enforce` — switch to enforcement mode
|
|
42
|
+
- `npx lbe policy` — list all rules with source context
|
|
43
|
+
- **Universal CLI interface** — non-JS projects (Python, Rust, Go, any language) can pipe JSON to `npx lbe execute`. Exit 0 = allowed, exit 1 = denied, exit 2 = error.
|
|
44
|
+
- **Language-agnostic design** — WASM runtime path documented as the path to non-JS bindings. JS engine is the current production runtime.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
- `LBEResult` now includes `commandId`, `stage`, `risk`, `output` fields.
|
|
48
|
+
- `LBEOptions` removes `policy_mode` / `timeout_ms` — these are managed by the governance engine internally.
|
|
49
|
+
- `wrapTools().dispatch()` now returns `Promise<LBEResult>` (async) to match the real engine contract.
|
|
50
|
+
- Types updated throughout to reflect observer mode result shape (`LBEObservedResult`).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 1.0.4 — 2026-06-19
|
|
55
|
+
|
|
56
|
+
### Removed
|
|
57
|
+
- MCP execution surface — `lbe-mcp` command, MCP adapter, and configuration examples removed.
|
|
58
|
+
An MCP server only offers LBE as one optional tool; agent hosts with native tools can act outside that boundary, so it cannot enforce the governance boundary. See `docs/decisions/ADR-001-remove-mcp-execution-surface.md`.
|
|
59
|
+
- HTTP server surface — `lbe-serve` command and HTTP adapter removed.
|
|
60
|
+
An HTTP endpoint replicates governance in a separate process and creates a second attack surface without guaranteeing the calling agent routes through it. See `docs/decisions/ADR-002-remove-http-server-surface.md`.
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
- Established SDK-only product boundary: LBE ships as one local SDK and CLI embedded in the caller's application. No daemon, host platform, Docker deployment, or companion system. See `docs/decisions/ADR-003-sdk-only-product-boundary.md`.
|
|
64
|
+
- Workspace pruned to SDK-only source; all optional execution surfaces removed from `src/`, `bin/`, and CI config.
|
|
65
|
+
- Public package identity (`LBE_PUBLIC_PACKAGE_NAME`, `LBE_PUBLIC_PACKAGE_VERSION`) is now parameterised via environment variables in the build script.
|
|
66
|
+
- Test command made portable across Node.js versions (no `--experimental-vm-modules` flag needed).
|
|
67
|
+
|
|
68
|
+
### Public surface
|
|
69
|
+
The public package (`@letterblack/lbe-sdk`) exports exactly one function:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
export function execute(input: string): string;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
No server, daemon, MCP surface, or optional execution layer ships in the public package.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 1.0.3 and earlier
|
|
80
|
+
|
|
81
|
+
Pre-release development. No public changelog maintained.
|
package/LICENSE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
SEE LICENSE IN LICENSE
|
|
1
|
+
SEE LICENSE IN LICENSE
|
package/README.md
CHANGED
|
@@ -1,194 +1,182 @@
|
|
|
1
1
|
# @letterblack/lbe-core
|
|
2
2
|
|
|
3
|
-
LBE is local execution control for AI agents
|
|
4
|
-
actions routed through its execution boundary and records local evidence.
|
|
5
|
-
It is not an AI model, IDE, full OS sandbox, or cloud monitor.
|
|
3
|
+
LBE Core is **local execution control for AI agents**.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
It evaluates file and shell actions routed through its execution boundary, records local evidence, and returns an allow/deny/proof outcome before agent work is treated as complete.
|
|
6
|
+
|
|
7
|
+
LBE is not an AI model, IDE, full OS sandbox, cloud monitor, or hosted control plane. It only controls actions that are routed through LBE.
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Agent wants to act
|
|
11
|
+
↓
|
|
12
|
+
LBE validates workspace, policy, target, and evidence
|
|
13
|
+
↓
|
|
14
|
+
allow / deny / weak proof / error
|
|
15
|
+
↓
|
|
16
|
+
Host executes only if LBE approved
|
|
17
|
+
↓
|
|
18
|
+
Audit and proof records are written locally
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Recommended install
|
|
24
|
+
|
|
25
|
+
Use the current clean release:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install @letterblack/lbe-core@1.3.5
|
|
29
|
+
npx lbe init
|
|
30
|
+
npx lbe assert-consumer
|
|
31
|
+
npx lbe proof --public
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`assert-consumer` confirms this project is using LBE as an installed package dependency.
|
|
35
|
+
|
|
36
|
+
It does not certify LBE release safety.
|
|
37
|
+
|
|
38
|
+
## Install and start
|
|
8
39
|
|
|
9
40
|
```bash
|
|
10
|
-
npm install @letterblack/lbe-core
|
|
41
|
+
npm install @letterblack/lbe-core@1.3.5
|
|
11
42
|
npx lbe init
|
|
12
43
|
npx lbe status
|
|
13
44
|
npx lbe logs
|
|
14
|
-
npx lbe open-state
|
|
15
|
-
npx lbe proof
|
|
16
45
|
npx lbe proof --public
|
|
46
|
+
npx lbe open-state
|
|
17
47
|
```
|
|
18
48
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`--public` redacts sensitive proof details.
|
|
49
|
+
Requires Node.js `>= 20.9.0`.
|
|
50
|
+
|
|
51
|
+
Command summary:
|
|
23
52
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
53
|
+
| Command | Purpose |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `npx lbe init` | Initialize LBE state for the current workspace |
|
|
56
|
+
| `npx lbe status` | Show workspace policy, state, and proof status |
|
|
57
|
+
| `npx lbe logs` | Show recent local LBE audit events |
|
|
58
|
+
| `npx lbe open-state` | Open the central local state folder for this workspace |
|
|
59
|
+
| `npx lbe proof` | Show the latest private proof result |
|
|
60
|
+
| `npx lbe proof --json` | Print the latest proof as JSON |
|
|
61
|
+
| `npx lbe proof --public` | Print a redacted proof safe for public sharing |
|
|
62
|
+
| `npx lbe status --all` | List known local workspaces from the workspace registry |
|
|
28
63
|
|
|
29
64
|
---
|
|
30
65
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
66
|
+
## What LBE does
|
|
67
|
+
|
|
68
|
+
LBE gives agent builders a local execution boundary:
|
|
69
|
+
|
|
70
|
+
- validates requested file and shell actions before execution
|
|
71
|
+
- keeps governed actions inside the intended workspace
|
|
72
|
+
- records local audit evidence
|
|
73
|
+
- tracks intent, target, file-index snapshots, and proof results
|
|
74
|
+
- supports private proof and public/redacted proof output
|
|
75
|
+
- preserves legacy `.lbe/events.jsonl` logs while using central local state
|
|
76
|
+
|
|
77
|
+
Most systems ask only:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
Did the user approve this?
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
LBE asks a stricter question:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
Is this exact action allowed to reach the filesystem or terminal, and can we prove what happened?
|
|
87
|
+
```
|
|
88
|
+
|
|
37
89
|
---
|
|
38
90
|
|
|
39
|
-
##
|
|
91
|
+
## Local state and proof
|
|
40
92
|
|
|
41
|
-
|
|
42
|
-
|
|
93
|
+
LBE keeps state locally in a central per-user state folder. Each workspace has a stable workspace ID and its own event log.
|
|
94
|
+
|
|
95
|
+
In v1.3, an existing `.lbe/events.jsonl` remains local fallback truth and is imported into central state once. The source file is preserved.
|
|
96
|
+
|
|
97
|
+
Proof combines:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
intent
|
|
101
|
+
↓
|
|
102
|
+
target
|
|
103
|
+
↓
|
|
104
|
+
file-index before action
|
|
105
|
+
↓
|
|
106
|
+
LBE audit event
|
|
107
|
+
↓
|
|
108
|
+
file-index after action
|
|
109
|
+
↓
|
|
110
|
+
proof/latest.json
|
|
43
111
|
```
|
|
44
112
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Quick start
|
|
50
|
-
|
|
51
|
-
```js
|
|
52
|
-
import { execute } from '@letterblack/lbe-core';
|
|
53
|
-
|
|
54
|
-
const request = {
|
|
55
|
-
version: '1.0',
|
|
56
|
-
request_id: 'req-001',
|
|
57
|
-
timestamp: Math.floor(Date.now() / 1000),
|
|
58
|
-
actor: { id: 'agent:local', role: 'agent' },
|
|
59
|
-
intent: { type: 'command', name: 'write_file', payload: { target: 'out.txt' } },
|
|
60
|
-
context: { workspace: process.cwd(), env: {}, history: [] },
|
|
61
|
-
constraints: { policy_mode: 'strict', timeout_ms: 5000 },
|
|
62
|
-
auth: { signature: '<host-signed>', nonce: '<unique-per-request>' }
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const result = JSON.parse(execute(JSON.stringify(request)));
|
|
66
|
-
// Approved: { ok: true, decision: 'allow', ... }
|
|
67
|
-
// Blocked: { ok: false, decision: 'deny', error: { stage, message } }
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
`execute(input: string): string` — accepts JSON, returns JSON. The runtime validates and returns a decision. The host acts on the decision.
|
|
71
|
-
|
|
72
|
-
### Request fields
|
|
73
|
-
|
|
74
|
-
| Field | Required | Description |
|
|
75
|
-
|---|---:|---|
|
|
76
|
-
| `version` | Yes | `"1.0"` |
|
|
77
|
-
| `request_id` | Yes | Caller-supplied unique identifier |
|
|
78
|
-
| `timestamp` | Yes | Unix timestamp in seconds |
|
|
79
|
-
| `actor` | Yes | `{ id, role }` — identity of the requesting agent |
|
|
80
|
-
| `intent` | Yes | `{ type, name, payload }` — what the agent wants to do |
|
|
81
|
-
| `context` | Yes | Workspace path and caller context |
|
|
82
|
-
| `constraints` | Yes | `policy_mode` and `timeout_ms` |
|
|
83
|
-
| `auth` | Yes | Host-supplied `signature` and `nonce` |
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## CLI reference
|
|
113
|
+
Proof results:
|
|
88
114
|
|
|
89
|
-
|
|
|
115
|
+
| Result | Meaning |
|
|
90
116
|
|---|---|
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## When a request is approved
|
|
129
|
-
|
|
130
|
-

|
|
131
|
-
|
|
132
|
-
1. The agent produces a signed action proposal.
|
|
133
|
-
2. Identity is confirmed against a locally held key — no network call required.
|
|
134
|
-
3. The project policy is evaluated. The action is approved.
|
|
135
|
-
4. The host executes the write or command inside the allowed workspace.
|
|
136
|
-
5. The audit chain is extended — every approved action appends a hash-linked entry to the local log, permanently verifiable, impossible to silently remove.
|
|
137
|
-
6. A structured result returns: whether it succeeded, which rules matched, and the audit entry identifier.
|
|
138
|
-
|
|
139
|
-
The application stays in control. @letterblack/lbe-core decides whether the action was permitted and hands the answer back. It does not execute for you.
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## When a request is blocked
|
|
144
|
-
|
|
145
|
-

|
|
146
|
-
|
|
147
|
-
1. The agent proposes an action that is outside the permitted policy.
|
|
148
|
-
2. The policy gate closes immediately. The WASM runtime stamps the request denied before any adapter is reached.
|
|
149
|
-
3. The shell is untouched. The filesystem is unchanged.
|
|
150
|
-
4. The denial is written to the immutable audit log — chain sealed, evidence preserved.
|
|
151
|
-
|
|
152
|
-
No partial execution. No silent failures. Denial is a first-class outcome, not an error.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## What this covers
|
|
157
|
-
|
|
158
|
-
| Threat | Gate |
|
|
159
|
-
|---|---|
|
|
160
|
-
| Malformed or incomplete request | Schema |
|
|
161
|
-
| Stale or replayed request | Timestamp + Nonce |
|
|
162
|
-
| Tampered or expired key | Key lifecycle + Signature |
|
|
163
|
-
| Excessive requests from one actor | Rate limit |
|
|
164
|
-
| Action not permitted by project policy | Policy — deny-wins |
|
|
165
|
-
| Agent writing outside project root | Scope check in host after decision |
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## What ships
|
|
170
|
-
|
|
171
|
-
```
|
|
172
|
-
dist/index.js WebAssembly runtime loader and execute()
|
|
173
|
-
dist/cli.js Local CLI (npx lbe)
|
|
174
|
-
dist/lbe_engine.wasm Verified runtime binary
|
|
175
|
-
dist/wasm.lock.json Runtime integrity lock (SHA-256 of wasm binary)
|
|
176
|
-
assets/lbe-gates.jpg Gate sequence diagram
|
|
177
|
-
assets/story-allow.jpg Approved-request storyboard
|
|
178
|
-
assets/story-deny.jpg Blocked-request storyboard
|
|
179
|
-
assets/runtime-boundary.svg Runtime boundary diagram
|
|
180
|
-
assets/lbe-gates.png Gate sequence diagram (full resolution)
|
|
181
|
-
assets/story-allow.png Approved-request storyboard (full resolution)
|
|
182
|
-
assets/story-deny.png Blocked-request storyboard (full resolution)
|
|
183
|
-
types.d.ts TypeScript declarations
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
At load time the runtime verifies `lbe_engine.wasm` against `wasm.lock.json`. A missing, modified, or swapped binary fails before any request is processed.
|
|
187
|
-
|
|
188
|
-
Source code, controller implementation, adapters, tests, keys, and runtime state are not included.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
117
|
+
| `PASS` | Evidence is complete and actual changes match declared intent |
|
|
118
|
+
| `FAIL` | Evidence violates intent, policy, or expected file changes |
|
|
119
|
+
| `WEAK_PROOF` | Target evidence was uncertain or required user confirmation |
|
|
120
|
+
|
|
121
|
+
Use:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx lbe proof --public
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
for a redacted proof summary. Public proof redacts private paths, raw internal IDs, full diffs, hashes, and sensitive failure details.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## What ships
|
|
132
|
+
|
|
133
|
+
The npm package ships the packaged runtime boundary, not the private source tree.
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
bin/lbe.js CLI shim
|
|
137
|
+
dist/cli/lbe.js Bundled CLI runtime
|
|
138
|
+
dist/hooks/register.cjs Hook preload runtime
|
|
139
|
+
dist/state/index.cjs Packaged CJS state resolver
|
|
140
|
+
dist/state/appendCentral.cjs Packaged central JSONL append helper
|
|
141
|
+
README.md
|
|
142
|
+
Release-README.md
|
|
143
|
+
CHANGELOG.md
|
|
144
|
+
LICENSE
|
|
145
|
+
package.json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The npm package must not include private implementation folders such as `src/core/**`, tests, local `.lbe/**` state, AppData state, diagnostic helpers, private keys, or workspace-local proof artifacts.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
192
152
|
## Limits
|
|
193
153
|
|
|
194
|
-
|
|
154
|
+
LBE controls only actions routed through its execution boundary.
|
|
155
|
+
|
|
156
|
+
It does not provide:
|
|
157
|
+
|
|
158
|
+
- kernel-level process isolation
|
|
159
|
+
- network-egress control
|
|
160
|
+
- multi-tenant separation
|
|
161
|
+
- hosted monitoring
|
|
162
|
+
- universal control over tools outside LBE's execution boundary
|
|
163
|
+
|
|
164
|
+
Central writes are best-effort. Local logs remain local.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Release status
|
|
169
|
+
|
|
170
|
+
Current aligned release:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
@letterblack/lbe-core@1.3.5
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Earlier `1.3.0`, `1.3.1`, `1.3.2`, and `1.3.3` builds are superseded by `1.3.5`.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## One-sentence summary
|
|
181
|
+
|
|
182
|
+
LBE Core does not make the agent smarter. It makes the agent's execution path controlled, evidence-backed, and locally auditable.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# LBE Release Workspace Rules
|
|
2
|
+
|
|
3
|
+
This file defines what can and cannot be used as LBE release proof.
|
|
4
|
+
|
|
5
|
+
## Release authority boundary
|
|
6
|
+
|
|
7
|
+
Only the designated LBE release workspace may certify LBE release safety.
|
|
8
|
+
|
|
9
|
+
A downstream project, integration lab, copied repository, downloaded folder, worktree, or consumer app is not release authority for LBE.
|
|
10
|
+
|
|
11
|
+
Consumer projects may prove only their own integration behavior with the installed LBE package.
|
|
12
|
+
|
|
13
|
+
They must not claim:
|
|
14
|
+
|
|
15
|
+
- LBE release-ready
|
|
16
|
+
- LBE published
|
|
17
|
+
- full LBE proof passed
|
|
18
|
+
- npm/GitHub release alignment
|
|
19
|
+
- package release correctness
|
|
20
|
+
|
|
21
|
+
## Consumer dependency rule
|
|
22
|
+
|
|
23
|
+
Other projects must consume LBE as an installed package dependency from the public registry.
|
|
24
|
+
|
|
25
|
+
Allowed consumer model:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install @letterblack/lbe-core
|
|
29
|
+
npx lbe init
|
|
30
|
+
npx lbe status
|
|
31
|
+
npx lbe proof --public
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Do not use a copied LBE source tree as the authority for consumer projects.
|
|
35
|
+
|
|
36
|
+
Do not point consumer projects at LBE through:
|
|
37
|
+
|
|
38
|
+
- `file:`
|
|
39
|
+
- `link:`
|
|
40
|
+
- `workspace:`
|
|
41
|
+
- `git+`
|
|
42
|
+
- `github:`
|
|
43
|
+
- local relative paths
|
|
44
|
+
- local absolute paths
|
|
45
|
+
- symlinked `node_modules` packages
|
|
46
|
+
|
|
47
|
+
## assert-consumer rule
|
|
48
|
+
|
|
49
|
+
`npx lbe assert-consumer` is a downstream consumer-safety guard.
|
|
50
|
+
|
|
51
|
+
It answers:
|
|
52
|
+
|
|
53
|
+
- Is this project using `@letterblack/lbe-core` as an installed dependency?
|
|
54
|
+
- Is this project accidentally pointing at a copied source tree, workspace link, git dependency, local path, or symlink?
|
|
55
|
+
|
|
56
|
+
It must always report consumer status only.
|
|
57
|
+
|
|
58
|
+
It is not release proof.
|
|
59
|
+
|
|
60
|
+
It is not package provenance proof.
|
|
61
|
+
|
|
62
|
+
It is not a substitute for:
|
|
63
|
+
|
|
64
|
+
- full test suite
|
|
65
|
+
- `npm run proof`
|
|
66
|
+
- package runtime verification
|
|
67
|
+
- packed tarball inspection
|
|
68
|
+
- npm `gitHead` check
|
|
69
|
+
- GitHub tag alignment
|
|
70
|
+
- GitHub Release verification
|
|
71
|
+
- fresh install smoke from the registry
|
|
72
|
+
|
|
73
|
+
Expected classification for a valid consumer project:
|
|
74
|
+
|
|
75
|
+
```txt
|
|
76
|
+
consumer-project-using-installed-registry-dependency
|
|
77
|
+
releaseClaimsAllowed: false
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If a project passes `assert-consumer`, the only valid conclusion is:
|
|
81
|
+
|
|
82
|
+
```txt
|
|
83
|
+
This project consumes LBE from an installed package dependency.
|
|
84
|
+
This does not certify LBE release safety.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Release workflow stale-guard
|
|
88
|
+
|
|
89
|
+
The release workflow is the authority for public repo sync and release automation.
|
|
90
|
+
|
|
91
|
+
Agents must not manually patch the public `Letterblack-Sentinel` repo to make it look released.
|
|
92
|
+
|
|
93
|
+
If the public repo is stale, the correct fix is:
|
|
94
|
+
|
|
95
|
+
1. inspect the release workflow
|
|
96
|
+
2. verify it targets the current package: `@letterblack/lbe-core`
|
|
97
|
+
3. repair stale workflow steps
|
|
98
|
+
4. run the workflow or its explicit `sync-public-only` mode
|
|
99
|
+
5. verify public repo, tag, GitHub Release, npm `gitHead`, and fresh install smoke
|
|
100
|
+
|
|
101
|
+
## Blocked stale workflow patterns
|
|
102
|
+
|
|
103
|
+
Stop immediately if the workflow still treats these as the current release packages:
|
|
104
|
+
|
|
105
|
+
```txt
|
|
106
|
+
@letterblack/lbe-sdk
|
|
107
|
+
@letterblack/lbe-exec
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
These may appear only as legacy/deprecated notes, not active publish/sync/release jobs.
|
|
111
|
+
|
|
112
|
+
## Required workflow gates
|
|
113
|
+
|
|
114
|
+
The workflow must include:
|
|
115
|
+
|
|
116
|
+
```txt
|
|
117
|
+
node --test
|
|
118
|
+
npm run proof
|
|
119
|
+
npm run audit:public-docs
|
|
120
|
+
npm run verify:package-runtime
|
|
121
|
+
npm pack --dry-run
|
|
122
|
+
npm gitHead verification
|
|
123
|
+
GitHub tag target verification
|
|
124
|
+
fresh npm install smoke
|
|
125
|
+
public repo sync
|
|
126
|
+
sync-public-only mode for already-published versions
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Hard stop message
|
|
130
|
+
|
|
131
|
+
If the workflow is stale, report exactly:
|
|
132
|
+
|
|
133
|
+
```txt
|
|
134
|
+
RELEASE WORKFLOW STALE — BLOCKED
|
|
135
|
+
Do not publish manually.
|
|
136
|
+
Do not sync the public repo manually.
|
|
137
|
+
Fix workflow first.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Agent report format
|
|
141
|
+
|
|
142
|
+
Before touching release automation, report:
|
|
143
|
+
|
|
144
|
+
```txt
|
|
145
|
+
Release workflow classification:
|
|
146
|
+
- Workflow path:
|
|
147
|
+
- Active package target:
|
|
148
|
+
- Old package targets present: yes/no
|
|
149
|
+
- sync-public-only mode present: yes/no
|
|
150
|
+
- npm gitHead verification present: yes/no
|
|
151
|
+
- fresh install smoke present: yes/no
|
|
152
|
+
- public repo sync present: yes/no
|
|
153
|
+
- release workflow allowed: yes/no
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Hard stop conditions
|
|
157
|
+
|
|
158
|
+
Stop and report if:
|
|
159
|
+
|
|
160
|
+
- a consumer project is used to certify an LBE release
|
|
161
|
+
- focused integration tests are used as release proof
|
|
162
|
+
- a copied/lab workspace is treated as package authority
|
|
163
|
+
- local path, git, workspace, or symlink dependencies are used for LBE in a consumer project
|
|
164
|
+
- release claims are made without npm/GitHub/package provenance checks
|
|
165
|
+
|
|
166
|
+
## Agent report format
|
|
167
|
+
|
|
168
|
+
Before making any LBE-related release claim, report:
|
|
169
|
+
|
|
170
|
+
```txt
|
|
171
|
+
Workspace classification:
|
|
172
|
+
- Path:
|
|
173
|
+
- Type: LBE release workspace / consumer project / local lab / copied workspace / unknown
|
|
174
|
+
- npm run proof available: yes/no
|
|
175
|
+
- full suite exit code:
|
|
176
|
+
- release claims allowed: yes/no
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
If the workspace is a consumer project, local lab, copied workspace, or unknown, release claims are not allowed.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @letterblack/lbe-core
|
|
2
|
+
|
|
3
|
+
**Release 1.3.6**
|
|
4
|
+
|
|
5
|
+
LBE is local execution control for AI agents. It evaluates file and shell
|
|
6
|
+
actions routed through its execution boundary, records local evidence, and
|
|
7
|
+
returns an allow/deny outcome before the governed action runs.
|
|
8
|
+
|
|
9
|
+
This release documents the decision-only package. If you need the in-process
|
|
10
|
+
controller that performs governed file and shell operations, that is a separate
|
|
11
|
+
legacy/internal surface.
|
|
12
|
+
|
|
13
|
+
## Install and start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @letterblack/lbe-core
|
|
17
|
+
npx lbe init
|
|
18
|
+
npx lbe status
|
|
19
|
+
npx lbe logs
|
|
20
|
+
npx lbe proof --public
|
|
21
|
+
npx lbe open-state
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`init` creates project policy material. `status` shows the local central state
|
|
25
|
+
for the current workspace; `logs` reads its event history; `proof` shows the
|
|
26
|
+
latest proof result; and `open-state` opens the central state folder.
|
|
27
|
+
|
|
28
|
+
## Local state and proof
|
|
29
|
+
|
|
30
|
+
LBE keeps state locally in a central per-user state folder. Each workspace has
|
|
31
|
+
a stable workspace ID and its own event log. In v1.3, an existing
|
|
32
|
+
`.lbe/events.jsonl` remains local fallback truth and is imported into central
|
|
33
|
+
state once; the source file is preserved.
|
|
34
|
+
|
|
35
|
+
Proof combines an intent, optional target, file index, LBE events, and
|
|
36
|
+
`proof/latest.json`. Use `lbe proof --public` for a redacted proof summary.
|
|
37
|
+
Non-inspectable targets can produce `WEAK_PROOF` rather than a stronger claim.
|
|
38
|
+
|
|
39
|
+
## CLI reference
|
|
40
|
+
|
|
41
|
+
| Command | Purpose |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `npx lbe init` | Create project-local policy and key state |
|
|
44
|
+
| `npx lbe status` | Show workspace ID and central state paths |
|
|
45
|
+
| `npx lbe logs` | Read the central event history |
|
|
46
|
+
| `npx lbe open-state` | Open the local central state folder |
|
|
47
|
+
| `npx lbe proof` | Show the latest proof result |
|
|
48
|
+
| `npx lbe proof --public` | Show a redacted proof summary |
|
|
49
|
+
|
|
50
|
+
## What ships
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
bin/lbe.js CLI entrypoint
|
|
54
|
+
dist/cli/lbe.js Packaged CLI runtime
|
|
55
|
+
dist/hooks/register.cjs Packaged hook bridge
|
|
56
|
+
dist/state/index.cjs Packaged central-state resolver
|
|
57
|
+
dist/state/appendCentral.cjs Packaged central event appender
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Source code, controller implementation, adapters, tests, keys, and runtime
|
|
61
|
+
state are not included.
|
|
62
|
+
|
|
63
|
+
## Limits
|
|
64
|
+
|
|
65
|
+
Only actions routed through LBE are controlled. Central writes are best-effort,
|
|
66
|
+
logs remain local, and LBE does not provide process isolation or network
|
|
67
|
+
egress control.
|