@vitronai/alethia 0.3.11 → 0.3.12

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 +54 -221
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # @vitronai/alethia
2
2
 
3
- > **The MIT-licensed MCP bridge to Alethia** — the patent-pending zero-IPC E2E test runtime built for AI agents.
4
- > **45× faster than Playwright** on the localhost test loop. Fail-closed by default. Cryptographically chained audit packs. **Local-first. Zero telemetry by default. Opt-in cloud.**
3
+ **The MCP bridge to Alethia** — AI agents test your app with plain English. ~13 ms per step, 45x faster than Playwright. Safe by default. Local-first. Zero telemetry.
5
4
 
6
5
  [![npm version](https://img.shields.io/npm/v/@vitronai/alethia.svg?logo=npm&logoColor=white)](https://www.npmjs.com/package/@vitronai/alethia)
7
6
  [![License: MIT](https://img.shields.io/badge/bridge-MIT-green.svg?logo=opensourceinitiative&logoColor=white)](./LICENSE)
@@ -11,42 +10,11 @@
11
10
 
12
11
  ---
13
12
 
14
- ## ⚠️ This is the MCP bridge — the runtime is separate
13
+ ## What this package does
15
14
 
16
- **This npm package is the open-source MCP bridge — a thin (~22 KB) stdioHTTP relay**, MIT-licensed and freely usable. It does not contain the runtime. By itself it cannot drive a browser, run a test, or do anything except forward MCP requests to a local HTTP endpoint.
15
+ This npm package is the **MIT-licensed MCP bridge** (~22 KB) — a thin stdio-to-HTTP relay. It auto-downloads the signed Alethia headless runtime on first use. No signup, no manual steps.
17
16
 
18
- **The Alethia desktop runtime** the part that actually contains the patent-pending in-process zero-IPC executor, the VITRON-EA1 policy gate, and the NLP compiler — is **closed-source and patent-pending**. As of v0.3, the bridge **auto-downloads the signed runtime on first use** — no manual steps, no signup required.
19
-
20
- | Component | License | How to get it |
21
- |---|---|---|
22
- | `@vitronai/alethia` (this npm package — the MCP bridge) | **MIT, open source** | `npm install -g @vitronai/alethia` |
23
- | Bridge source mirror | **MIT, open source** | [github.com/vitron-ai/alethia-mcp](https://github.com/vitron-ai/alethia-mcp) |
24
- | **Alethia desktop runtime** (the patented in-process executor) | **Closed-source, Patent Pending — U.S. App. 19/571,437** | Auto-installed by the bridge on first use. Ed25519 verified. |
25
-
26
- **The MIT license on this bridge does not, under any circumstances, grant any patent license under U.S. Application No. 19/571,437 or any other vitron.ai patent rights.** The runtime is a separate licensable artifact.
27
-
28
- **Bottom line for developers:** `npm install -g @vitronai/alethia` gets you everything you need. The bridge auto-downloads the signed headless runtime on first use. Commercial and production use of the runtime may require a patent license once the patent grants. For licensing inquiries: **gatekeeper@vitron.ai**.
29
-
30
- ---
31
-
32
- ## Why Alethia?
33
-
34
- Your agent generates a Next.js app on `localhost:3000` and your users want it verified. Playwright adds **600ms of CDP marshalling tax** to every assertion — and worse, it's async-by-construction, so the agent's decide-act-verify loop is racing against stale DOM snapshots between every `await`.
35
-
36
- Alethia is a different shape entirely. The driver and the DOM live in **the same V8 isolate**:
37
-
38
- | | Playwright (CDP) | Alethia (zero-IPC) |
39
- |---|---|---|
40
- | Avg latency per step | 580 ms | **13 ms** |
41
- | p95 latency per step | 654 ms | **24 ms** |
42
- | Process boundary | 3 (test ↔ driver ↔ browser) | **0** between driver and DOM |
43
- | DOM access | async, marshalled, race-prone | **synchronous, in-process** |
44
- | Per-step safety policy | none | **VITRON-EA1 fail-closed gate** |
45
- | Audit trail | trace viewer (debugging) | **SHA-256 chained, Ed25519 signable** |
46
- | Telemetry | on by default in cloud product | **off by default; opt-in only** |
47
- | Patent moat | none | **U.S. App 19/571,437** |
48
-
49
- Benchmarks: `click-assert-wait` scenario, 20 iterations.
17
+ > **Note:** The MIT license on this bridge does **not** grant a patent license to the Alethia runtime (U.S. App. 19/571,437). Commercial use of the runtime may require a separate license. Contact **gatekeeper@vitron.ai**.
50
18
 
51
19
  ---
52
20
 
@@ -56,17 +24,12 @@ Benchmarks: `click-assert-wait` scenario, 20 iterations.
56
24
  npm install -g @vitronai/alethia
57
25
  ```
58
26
 
59
- That's it. The bridge auto-downloads the signed headless runtime on first use — Ed25519 verified, SHA-256 checked, no signup required.
60
-
61
- ### Verify the install
27
+ Verify:
62
28
 
63
29
  ```bash
64
- alethia-mcp --version
65
30
  alethia-mcp --health-check
66
31
  ```
67
32
 
68
- Expected:
69
-
70
33
  ```
71
34
  ✓ Connected. MCP tools available.
72
35
  runtime version: 0.1.0-alpha.4
@@ -102,7 +65,7 @@ Cursor → Settings → MCP → Add server:
102
65
 
103
66
  ### Cline / Continue / any MCP client
104
67
 
105
- Same shape. Any MCP-compatible client speaks the standard stdio protocol — point it at the `alethia-mcp` command.
68
+ Same shape point any MCP-compatible client at the `alethia-mcp` command.
106
69
 
107
70
  ### Claude Desktop
108
71
 
@@ -119,141 +82,56 @@ Same shape. Any MCP-compatible client speaks the standard stdio protocol — poi
119
82
  }
120
83
  ```
121
84
 
122
- After saving the config, restart your MCP client.
123
-
124
85
  ---
125
86
 
126
87
  ## Usage
127
88
 
128
- Once configured, your agent has the full Alethia tool suite available. The most common one:
89
+ Once configured, ask your agent to test something:
129
90
 
130
91
  > *"Use alethia_tell to navigate to the incident response page, assert the critical alert is visible, click Acknowledge, and assert it changed to Acknowledged."*
131
92
 
132
- The agent calls `alethia_tell` with plain English. Alethia compiles it to Action IR, runs each step through the VITRON-EA1 policy gate, and returns per-step results, DOM diffs (what changed), a semantic page snapshot, policy audit records, and a SHA-256 integrity hash.
93
+ Alethia compiles plain English to Action IR, runs each step through the safety gate, and returns per-step results, a semantic page snapshot (~200 tokens), DOM diffs, policy audit records, and a SHA-256 integrity hash.
133
94
 
134
95
  ---
135
96
 
136
- ## Demos
137
-
138
- This package ships with ready-to-use demo pages in the `demo/` folder. Each page showcases different Alethia capabilities — copy the prompt into Claude Code, Cursor, or any MCP client:
97
+ ## Tools
139
98
 
140
- | Demo | What it shows |
99
+ | Tool | Purpose |
141
100
  |---|---|
142
- | `incident-response.html` | Defense / SOC triage active cyber incident, EA1 blocks network isolation |
143
- | `threat-intel.html` | Intelligence / CTI APT tracking, IOC blocking, MITRE ATT&CK correlation |
144
- | `crypto-readiness.html` | Cybersecurity / PQC post-quantum migration, certificate revocation |
145
- | `agent-oversight.html` | AI Safety autonomous agent monitoring, kill switch, policy violations |
146
- | `admin-panel.html` | Defense / Classified TS/SCI admin, EA1 blocks user deletion |
147
- | `financial-dashboard.html` | Finance / Trading risk monitor, compliance checks, EA1 blocks liquidation |
148
-
149
- Find the demos at:
150
- ```bash
151
- # Global install
152
- ls $(npm root -g)/@vitronai/alethia/demo/
153
-
154
- # Or clone the source
155
- git clone https://github.com/vitron-ai/alethia-mcp.git
156
- ls alethia-mcp/demo/
157
- ```
158
-
159
- Full prompts for each demo: [`demo/README.md`](./demo/README.md)
101
+ | `alethia_tell` | Run plain-English test steps. The main tool. ~13 ms/step. |
102
+ | `alethia_tell_parallel` | Run multiple test flows concurrently against different URLs. |
103
+ | `alethia_screenshot` | Capture a PNG of the current page. |
104
+ | `alethia_compile` | Preview what `tell` will run, without executing. |
105
+ | `alethia_eval` | Run raw JavaScript in the page under test. |
106
+ | `alethia_status` | Health checkversion, config, kill switch state. |
107
+ | `alethia_audit_wcag` | WCAG 2.1 AA accessibility audit (14 criteria, Section 508). |
108
+ | `alethia_audit_nist` | NIST SP 800-53 security controls audit (8 controls). |
109
+ | `alethia_export_session` | Export a signed evidence pack of the entire session. |
110
+ | `alethia_activate_kill_switch` | Emergency halt — stops all automation immediately. |
111
+ | `alethia_reset_kill_switch` | Resume after a kill switch activation. |
112
+
113
+ Destructive actions (delete, purchase, transfer) are **blocked by default** under the `controlled-web` profile. Sensitive input (passwords, credit cards) is **always blocked** unless `allowSensitiveInput: true` is explicitly passed.
160
114
 
161
115
  ---
162
116
 
163
- ## Tools
164
-
165
- ### `alethia_tell`
166
- Execute natural-language test instructions. The headline tool.
167
-
168
- ```
169
- nlp: "navigate to file:///path/to/demo/incident-response.html
170
- assert CRITICAL INCIDENT ACTIVE is visible
171
- click Acknowledge
172
- assert Acknowledged is visible"
173
- ```
174
-
175
- Returns a `PlanRun`:
176
- ```json
177
- {
178
- "ok": true,
179
- "elapsedMs": 87,
180
- "stepRuns": [ /* per-step results */ ],
181
- "policyAudits": [ /* per-step EA1 decisions */ ],
182
- "integrity": {
183
- "algorithm": "sha256",
184
- "schemaVersion": "plan-run-v1",
185
- "payloadHash": "..."
186
- }
187
- }
188
- ```
189
-
190
- By default, **destructive actions are blocked** (`controlled-web` profile). The runtime catches verbs like *delete, purchase, transfer, submit payment* via NLP intent inference and prepends `!://write-high` markers in the IR. Sensitive input (passwords, credit cards, SSN) is **always blocked** unless the caller explicitly opts in via `allowSensitiveInput: true`.
191
-
192
- ### `alethia_compile`
193
- Compile NL to Action IR **without executing**. Use this to preview what `alethia_tell` will run, debug NLP coverage gaps, or generate reproducible IR scripts for CI.
194
-
195
- ### `alethia_status`
196
- Liveness probe + identity. Returns runtime version, default policy profile, kill switch state, driver stats, current page domain, and capabilities. Call this before sending `tell()` calls to verify the runtime is in a known-good state.
197
-
198
- ### `alethia_activate_kill_switch`
199
- **Halt all current and queued automation immediately.** Per-step policy gate stays armed; subsequent `tell()` calls will be blocked with `KILL_SWITCH_ACTIVE` until reset. Optional `reason` argument lands in the audit trail.
200
-
201
- ### `alethia_reset_kill_switch`
202
- Clear an active kill switch and reset the shared executor state. Re-enables `tell()` calls. The reset itself is logged.
203
-
204
- ### `alethia_screenshot`
205
- Capture a PNG screenshot of the current page and return it as a base64-encoded image. Use this to visually verify what the browser is showing after running test steps with `alethia_tell`.
206
-
207
- ### `alethia_eval`
208
- Evaluate a JavaScript expression in the page under test and return the result. Runs in the context of the navigated page, not the Alethia host UI. Use this for queries the NLP compiler cannot express — counting elements, reading computed styles, checking localStorage, or any DOM inspection that needs raw JS.
209
-
210
- ### `alethia_audit_wcag`
211
- Run a WCAG 2.1 AA accessibility audit on the current page. Checks 14 criteria including alt text, form labels, keyboard access, page title, lang attribute, link purpose, heading structure, and duplicate IDs. Returns findings with WCAG criterion numbers, severity levels (A/AA), and issue counts. Designed for Section 508 compliance workflows.
212
-
213
- ### `alethia_audit_nist`
214
- Run a NIST SP 800-53 Rev. 5 web application security controls audit on the current page. Checks 8 controls across 3 families: AC (login lockout, security banners, session timeout), IA (unmasked passwords, weak password constraints, MFA indicators), SI (input validation, error information leakage). Returns findings with control IDs, severity levels (CRITICAL/HIGH/MEDIUM/LOW), and metadata.
215
-
216
- ### `alethia_export_session`
217
- Export the full session recording as a signed evidence pack. Contains every tool call made during this session with timestamps, inputs, outputs, policy decisions, runtime info, and a SHA-256 integrity hash over the entire record. Use at the end of an agent loop to produce cryptographic proof of everything the agent did. Designed for compliance review, audit trails, and chain-of-custody documentation.
218
-
219
- ### `alethia_tell_parallel`
220
- Run multiple test flows concurrently — each against a different URL. Takes an array of test specs (url + nlp steps), spawns a browser instance per spec, runs them in parallel, and returns all results together. 3 pages in ~260ms vs ~700ms sequential. Scales linearly.
117
+ ## Demos
221
118
 
222
- ---
119
+ Ready-to-use demo pages ship in the `demo/` folder:
223
120
 
224
- ## Architecture
121
+ | Demo | Scenario |
122
+ |---|---|
123
+ | `incident-response.html` | Defense / SOC — triage active cyber incident |
124
+ | `threat-intel.html` | Intelligence / CTI — APT tracking, IOC blocking |
125
+ | `crypto-readiness.html` | Cybersecurity / PQC — post-quantum migration |
126
+ | `agent-oversight.html` | AI Safety — autonomous agent monitoring, kill switch |
127
+ | `admin-panel.html` | Defense / Classified — TS/SCI admin panel |
128
+ | `financial-dashboard.html` | Finance / Trading — risk monitor, compliance checks |
225
129
 
226
- ```
227
- ┌────────────────────────┐
228
- │ Your AI agent │ Claude Code / Cursor / Cline / Continue / ...
229
- │ speaks MCP stdio │
230
- └──────────┬─────────────┘
231
- │ stdio (JSON-RPC over newline-delimited JSON)
232
-
233
- ┌────────────────────────┐
234
- │ @vitronai/alethia │ This npm package — ~22 KB
235
- │ stdio → HTTP shim │ - speaks MCP stdio inbound
236
- └──────────┬─────────────┘ - wraps results in MCP content envelope
237
- │ HTTP POST 127.0.0.1:47432 (loopback only, never networked)
238
-
239
- ┌────────────────────────┐
240
- │ Alethia runtime │ Main process — proprietary, patent pending
241
- │ local JSON-RPC server │ - tools/list, tools/call
242
- └──────────┬─────────────┘ - loopback bind, never reachable from network
243
- │ in-process JS bridge
244
-
245
- ┌────────────────────────┐
246
- │ Alethia renderer │ Embedded browser — IS the browser
247
- │ zero-IPC runtime │ - tell() → NLP compiler → Action IR
248
- └──────────┬─────────────┘ - VITRON-EA1 policy gate (per-step, fail-closed)
249
- │ direct DOM access (no protocol, no marshalling)
250
-
251
- ┌────────────────────────┐
252
- │ The page under test │
253
- └────────────────────────┘
130
+ ```bash
131
+ ls $(npm root -g)/@vitronai/alethia/demo/
254
132
  ```
255
133
 
256
- **Two process boundaries** between your agent and the runtime (agent ↔ shim, shim ↔ runtime). Then **zero** boundaries between the runtime and the DOM. That's the architectural difference that makes Alethia 45× faster than Playwright.
134
+ Full prompts for each demo: [`demo/README.md`](./demo/README.md)
257
135
 
258
136
  ---
259
137
 
@@ -274,7 +152,7 @@ alethia-mcp --debug Run with debug logging on stderr
274
152
  | `ALETHIA_HOST` | `127.0.0.1` | Host of the Alethia runtime |
275
153
  | `ALETHIA_PORT` | `47432` | Port of the Alethia runtime |
276
154
  | `ALETHIA_TIMEOUT_MS` | `60000` | Per-request timeout in milliseconds |
277
- | `ALETHIA_DEBUG` | (unset) | Set to `1` to enable debug logging on stderr |
155
+ | `ALETHIA_DEBUG` | (unset) | Set to `1` for debug logging on stderr |
278
156
 
279
157
  ---
280
158
 
@@ -282,86 +160,41 @@ alethia-mcp --debug Run with debug logging on stderr
282
160
 
283
161
  ### "Alethia desktop runtime is not running on 127.0.0.1:47432"
284
162
 
285
- The bridge auto-installs the headless runtime on first use. If you're seeing this error:
286
-
287
- 1. Run `alethia-mcp --health-check` — this will trigger auto-install if the runtime isn't present yet
288
- 2. Check that the runtime process is running (it binds to `127.0.0.1:47432`)
289
- 3. If auto-install failed, check your network connection and try again
290
-
291
- Once the runtime is running, you should see:
292
-
293
- ```
294
- [alethia] local RPC server listening on 127.0.0.1:47432
295
- ```
296
-
297
- Then re-run your MCP client and `alethia-mcp --health-check` should print `✓ Connected`.
163
+ 1. Run `alethia-mcp --health-check` triggers auto-install if the runtime isn't present
164
+ 2. Check that the runtime process is running on `127.0.0.1:47432`
165
+ 3. If auto-install failed, check your network and try again
298
166
 
299
167
  ### "DENY_WRITE_HIGH" in the audit log
300
168
 
301
- The runtime blocked a destructive action under the default fail-closed policy. **This is correct behaviour** for an AI-agent-facing test runtime destructive actions need explicit consent.
302
-
303
- To allow them, pass `{ profile: 'open-web' }` in the `alethia_tell` arguments. But understand: you're opting out of the safety gate.
169
+ A destructive action was blocked by the default safety policy. **This is correct behavior.** To allow it, pass `{ profile: 'open-web' }`but understand you're opting out of the safety gate.
304
170
 
305
171
  ### "SENSITIVE_INPUT_DENIED"
306
172
 
307
- The runtime blocked typing into what looks like a sensitive field (matches `password`, `token`, `secret`, `credit card`, `ssn`, etc.). To override for a legitimate auth-flow test:
308
-
309
- ```json
310
- { "nlp": "...", "allowSensitiveInput": true }
311
- ```
312
-
313
- Only do this when you are knowingly testing a real auth or payment flow.
173
+ A sensitive field was detected (password, token, credit card, etc.). Override with `{ "allowSensitiveInput": true }` only for legitimate auth/payment flow testing.
314
174
 
315
175
  ### MCP client doesn't see the tools
316
176
 
317
- 1. Verify the runtime is running: `alethia-mcp --health-check`
318
- 2. Verify your MCP config points at the correct command
319
- 3. Restart your MCP client (some clients cache server lists)
320
- 4. Run with debug logging: set `ALETHIA_DEBUG=1` in your MCP config's `env` section
321
-
322
- ### `Script failed to execute`
323
-
324
- The runtime hasn't loaded `window.__alethia` yet (or crashed). Restart the runtime. If it persists, file an issue.
177
+ 1. Verify: `alethia-mcp --health-check`
178
+ 2. Check your MCP config
179
+ 3. Restart your MCP client
180
+ 4. Debug: set `ALETHIA_DEBUG=1`
325
181
 
326
182
  ---
327
183
 
328
- ## Privacy & data flow
329
-
330
- Alethia is **local-first with zero telemetry by default.**
184
+ ## Go deeper
331
185
 
332
- - **The MCP bridge** (this npm package) only speaks to `127.0.0.1` (loopback). It cannot reach any other host. No data leaves your machine through the bridge — verify yourself by reading [`src/index.ts`](./src/index.ts), it's ~590 lines, single file.
333
- - **The desktop runtime** has a production request filter that blocks all non-`file://`, non-`app://`, non-`localhost` requests. The runtime is **architecturally loopback-only** in production builds.
334
- - **Zero telemetry collection** in v0.2 — the runtime does not phone home, does not collect usage metrics, does not report crashes anywhere by default.
335
- - **Future cloud features** (signed evidence as a service, team dashboards, agent observability) will be **opt-in only**, clearly labeled, with disclosed data flow. They are separate paid products you explicitly enroll in — not defaults that turn on silently.
336
-
337
- The bottom line: **what you install today does nothing on the network beyond your machine.** When the cloud product ships, it's a separate, opt-in choice you make explicitly.
186
+ - [Architecture & how it works](https://vitron.ai/why)
187
+ - [VITRON-EA1 safety standard](https://vitron.ai/safety)
188
+ - [FAQ](https://vitron.ai/faq)
189
+ - [Releases](https://github.com/vitron-ai/alethia/releases)
190
+ - [Homepage](https://github.com/vitron-ai/alethia)
338
191
 
339
192
  ---
340
193
 
341
194
  ## License
342
195
 
343
- MIT — see [LICENSE](./LICENSE).
344
-
345
- The MIT license covers **this MCP bridge package only**. The underlying The Alethia runtime runtime is proprietary and closed-source.
196
+ MIT — see [LICENSE](./LICENSE). Covers **this MCP bridge only.**
346
197
 
347
198
  ## Patent Notice
348
199
 
349
- The Alethia runtime practices a method that is the subject of:
350
-
351
- - **U.S. Patent Application No. 19/571,437** (non-provisional)
352
- - Claiming priority to **U.S. Provisional Application No. 63/785,814** (filed April 9, 2025)
353
- - **Title:** *"Deterministic Local Automation Runtime with Zero-IPC Execution, Offline Operation, and Per-Step Policy Enforcement"*
354
- - **Status:** Patent Pending — U.S. Patent and Trademark Office
355
-
356
- The MIT license on this MCP bridge does **not** grant any patent license under U.S. Application No. 19/571,437 or any other vitron.ai patent rights.
357
-
358
- For licensing inquiries: **gatekeeper@vitron.ai**
359
-
360
- ---
361
-
362
- ## Links
363
-
364
- - 🏠 Homepage: [github.com/vitron-ai/alethia](https://github.com/vitron-ai/alethia)
365
- - 📦 Source: [github.com/vitron-ai/alethia-mcp](https://github.com/vitron-ai/alethia-mcp)
366
- - 📥 Releases: [github.com/vitron-ai/alethia/releases](https://github.com/vitron-ai/alethia/releases)
367
- - 📧 Licensing: gatekeeper@vitron.ai
200
+ The Alethia runtime is patent pending (U.S. Application No. 19/571,437). The MIT license on this bridge does **not** grant any patent license. For licensing: **gatekeeper@vitron.ai**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitronai/alethia",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "MIT-licensed MCP bridge to the Alethia runtime — the patent-pending zero-IPC E2E test runtime built for AI agents. 45x faster than Playwright. Local-first, zero telemetry. WCAG + NIST 800-53 compliance audits built in. Auto-installs on first use.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",