@vitronai/alethia 0.8.1 → 0.8.3

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/README.md CHANGED
@@ -164,6 +164,8 @@ To pin a specific runtime version (reproducible CI, bisection, deliberate stay-b
164
164
 
165
165
  Five literal prompts. Paste each into Claude / Cursor / Cline in order. The agent runs Alethia for you.
166
166
 
167
+ The cockpit window opens automatically and paints each step live as the agent runs — green for pass, blue for type, red for EA1 block. (Since 0.8.3 the bridge defaults `highlights: true` for `alethia_tell` so a human watching sees the run; agents can pass `highlights: false` for max-speed CI runs, or set `ALETHIA_HIGHLIGHTS=0` in the spawn env.)
168
+
167
169
  ### 1. Start the bundled demo server
168
170
 
169
171
  Paste:
@@ -196,7 +198,7 @@ Paste:
196
198
  > *expect block: click Purge Audit Log*
197
199
  > *expect block: click Wire Funds"*
198
200
 
199
- **`expect block:` is unique to Alethia.** The step passes only when the **EA1 policy gate** — a framework-level safety layer no other E2E tool ships — refuses the action with reason code `DENY_WRITE_HIGH`. Other frameworks can assert *"nothing destructive happened"* by inspecting the app's state after a click; only Alethia's assertion is about the runtime itself refusing to let the click through in the first place. Meaningfully different guarantee, and the thing compliance reviewers actually want in the evidence pack. This run should report all three clicks blocked.
201
+ **`expect block:` is unique to Alethia.** The step passes only when the **EA1 policy gate** — a framework-level safety layer no other E2E tool ships — refuses the action with reason code `WRITE_HIGH`. Other frameworks can assert *"nothing destructive happened"* by inspecting the app's state after a click; only Alethia's assertion is about the runtime itself refusing to let the click through in the first place. Meaningfully different guarantee, and the thing compliance reviewers actually want in the evidence pack. This run should report all three clicks blocked.
200
202
 
201
203
  Shortcut if you want Alethia to auto-discover destructive controls instead of naming them:
202
204
 
@@ -256,6 +258,7 @@ If you don't care about any of those (quick iteration, scratch testing), you can
256
258
  | `alethia_export_session` | Signed evidence pack of the whole session. |
257
259
  | `alethia_activate_kill_switch` / `alethia_reset_kill_switch` | Emergency halt and resume. |
258
260
  | `alethia_serve_demo` | Start the bundled localhost demo server. |
261
+ | `alethia_show_cockpit` / `alethia_hide_cockpit` | Toggle the live oversight window mid-session. |
259
262
 
260
263
  Destructive actions (delete, purchase, transfer, liquidate, revoke, terminate, ...) are blocked by default under the hardened local-only profile. Sensitive-input fields (passwords, tokens, credit cards) are blocked unless `allowSensitiveInput: true` is passed. Profile overrides from the agent are stripped by the bridge — profile changes require human configuration.
261
264
 
@@ -305,7 +308,7 @@ alethia-mcp --debug Run with debug logging on stderr
305
308
  | `ALETHIA_DEBUG` | (unset) | Set to `1` for debug logging on stderr |
306
309
  | `ALETHIA_HEADLESS` | (unset) | Set to `1` to hide the cockpit window. Default is visible. CI environments (`CI=1`, `GITHUB_ACTIONS`, etc.) auto-hide. |
307
310
  | `ALETHIA_VISIBLE` | (unset) | **Deprecated** — set to `0` as a legacy alias for `ALETHIA_HEADLESS=1`. Removed in a future release. |
308
- | `ALETHIA_HIGHLIGHTS` | (unset) | Set to `1` to overlay per-step highlights on the target |
311
+ | `ALETHIA_HIGHLIGHTS` | (default on for `tell`) | Per-step highlights on the target. Default ON since 0.8.3 so a human watching the cockpit sees the run. Set to `0` to disable for headless / max-speed runs. Per-call `highlights:false` overrides this default. |
309
312
  | `ALETHIA_RUNTIME_VERSION` | (unset) | Pin the bridge to a specific runtime version (e.g. `0.4.0`). By default the bridge queries GitHub Releases for the current latest runtime and downloads that. Use this for reproducible CI, bisection, or deliberately staying on an older runtime. |
310
313
  | `ALETHIA_RUNTIME_DIR` | `~/.alethia/runtime` | Where the auto-installed runtime lives. Override for sandboxing or to stash multiple installs. |
311
314
  | `ALETHIA_BRIDGE_VERSION` | (unset) | Pin the bridge itself to a specific version (e.g. `0.8.0`). Skips the npm auto-update check. For reproducible CI or deliberate stay-behind. |
@@ -340,9 +343,9 @@ alethia-mcp --debug Run with debug logging on stderr
340
343
  2. Confirm the runtime process is listening on `127.0.0.1:47432`.
341
344
  3. If auto-install failed, check network reachability to the releases host and retry.
342
345
 
343
- ### "DENY_WRITE_HIGH" in the audit log
346
+ ### "WRITE_HIGH" / "EA1 POLICY BLOCK" in the audit log
344
347
 
345
- A destructive action was blocked by the default `controlled-web` profile. This is correct behavior. Profile overrides from the agent are stripped by the bridge; human configuration is required to widen the gate.
348
+ A destructive action was blocked by the default `local-only` profile. This is correct behavior. Profile overrides from the agent are stripped by the bridge; human configuration is required to widen the gate.
346
349
 
347
350
  ### "SENSITIVE_INPUT_DENIED"
348
351
 
@@ -5,42 +5,332 @@
5
5
  <title>Admin Panel — Classified</title>
6
6
  <style>
7
7
  * { box-sizing: border-box; margin: 0; padding: 0; }
8
- body { font-family: -apple-system, sans-serif; background: #0a0e17; color: #e2e8f0; min-height: 100vh; padding: 1.5rem; }
9
- .header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1e293b; padding-bottom: 1rem; margin-bottom: 1.5rem; }
10
- h1 { font-size: 1.4rem; }
11
- .classification { background: #991b1b; color: #fecaca; padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
12
- .user-info { color: #64748b; font-size: 0.85rem; }
13
- .grid { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; }
14
- .sidebar { display: flex; flex-direction: column; gap: 0.5rem; }
15
- .nav-item { padding: 0.6rem 0.8rem; border-radius: 8px; background: #1e293b; border: 1px solid #334155; color: #94a3b8; cursor: pointer; text-align: left; font-size: 0.9rem; }
16
- .nav-item.active { background: #1e3a5f; border-color: #3b82f6; color: #e2e8f0; }
17
- .content { border: 1px solid #1e293b; border-radius: 12px; background: #111827; padding: 1.5rem; }
18
- .content h2 { margin-bottom: 1rem; font-size: 1.2rem; }
19
- table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
20
- th { text-align: left; padding: 0.6rem; color: #64748b; border-bottom: 1px solid #1e293b; font-weight: 600; }
21
- td { padding: 0.6rem; border-bottom: 1px solid #0f172a; }
22
- .status-active { color: #34d399; }
23
- .status-suspended { color: #f87171; }
24
- .status-pending { color: #fbbf24; }
25
- .actions { display: flex; gap: 0.4rem; }
26
- .actions button { padding: 0.3rem 0.6rem; border-radius: 6px; border: none; font-size: 0.8rem; cursor: pointer; }
27
- .btn-view { background: #1e3a5f; color: #93c5fd; }
28
- .btn-suspend { background: #7f1d1d; color: #fca5a5; }
29
- .btn-delete { background: #991b1b; color: #fecaca; }
30
- .btn-approve { background: #14532d; color: #86efac; }
31
- .audit-log { margin-top: 1rem; font-family: monospace; font-size: 0.8rem; background: #0a0e17; border: 1px solid #1e293b; border-radius: 8px; padding: 0.8rem; max-height: 200px; overflow-y: auto; }
32
- .audit-entry { padding: 0.2rem 0; color: #64748b; }
33
- .audit-entry .timestamp { color: #475569; }
34
- .audit-entry .action { color: #fbbf24; }
35
- .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100; align-items: center; justify-content: center; }
36
- .modal.visible { display: flex; }
37
- .modal-content { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 1.5rem; max-width: 400px; text-align: center; }
38
- .modal-content h3 { color: #f87171; margin-bottom: 0.8rem; }
39
- .modal-content p { color: #94a3b8; margin-bottom: 1rem; }
40
- .modal-actions { display: flex; gap: 0.8rem; justify-content: center; }
41
- .modal-actions button { padding: 0.5rem 1.2rem; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
42
- .btn-cancel { background: #334155; color: #e2e8f0; }
43
- .btn-confirm-delete { background: #991b1b; color: white; }
8
+ :root {
9
+ --bg: #08070d;
10
+ --bg-1: #110e1c;
11
+ --bg-2: #1a1428;
12
+ --edge: rgba(255,255,255,.06);
13
+ --edge-strong: rgba(255,255,255,.12);
14
+ --ink: #f5f0ff;
15
+ --ink-2: #d8d3e8;
16
+ --ink-muted: #a8a0c5;
17
+ --ink-faint: #6b6488;
18
+ --purple: #a78bfa;
19
+ --purple-bright: #c4b5fd;
20
+ --purple-deep: #5b21b6;
21
+ --pink: #f0abfc;
22
+ --indigo: #818cf8;
23
+ --emerald: #10b981;
24
+ --emerald-bright: #34d399;
25
+ --red: #ef4444;
26
+ --red-bright: #f87171;
27
+ --amber: #f59e0b;
28
+ --amber-bright: #fbbf24;
29
+ --teal: #14b8a6;
30
+ }
31
+ html { color-scheme: dark; }
32
+ body {
33
+ font-family: "SF Pro Display", -apple-system, system-ui, sans-serif;
34
+ background:
35
+ radial-gradient(ellipse 70% 40% at 10% -10%, rgba(167,139,250,.10), transparent 70%),
36
+ radial-gradient(ellipse 60% 40% at 90% 110%, rgba(240,171,252,.06), transparent 70%),
37
+ var(--bg);
38
+ background-attachment: fixed;
39
+ color: var(--ink-2);
40
+ min-height: 100vh;
41
+ padding: 1.5rem 1.75rem 2rem;
42
+ font-size: 13.5px;
43
+ line-height: 1.5;
44
+ -webkit-font-smoothing: antialiased;
45
+ }
46
+
47
+ /* Header */
48
+ .header {
49
+ display: flex; justify-content: space-between; align-items: center;
50
+ padding-bottom: 16px;
51
+ margin-bottom: 22px;
52
+ border-bottom: 1px solid var(--edge);
53
+ }
54
+ .header > div { display: flex; flex-direction: column; gap: 4px; }
55
+ h1 {
56
+ font-size: 19px; font-weight: 700;
57
+ color: var(--ink); letter-spacing: -.015em;
58
+ display: inline-flex; align-items: center; gap: 10px;
59
+ }
60
+ h1::before {
61
+ content: ""; width: 8px; height: 8px; border-radius: 999px;
62
+ background: var(--purple);
63
+ box-shadow: 0 0 12px rgba(167,139,250,.7);
64
+ }
65
+ .user-info {
66
+ color: var(--ink-faint);
67
+ font-size: 12px;
68
+ font-family: ui-monospace, "SF Mono", monospace;
69
+ }
70
+ .classification {
71
+ font-family: ui-monospace, "SF Mono", monospace;
72
+ background: linear-gradient(135deg, rgba(127,29,29,.85), rgba(127,29,29,.55));
73
+ color: #fecaca;
74
+ padding: 5px 10px;
75
+ border-radius: 4px;
76
+ font-size: 10.5px;
77
+ font-weight: 800;
78
+ letter-spacing: .12em;
79
+ text-transform: uppercase;
80
+ border: 1px solid rgba(252,165,165,.3);
81
+ }
82
+
83
+ /* Layout */
84
+ .grid {
85
+ display: grid;
86
+ grid-template-columns: 240px 1fr;
87
+ gap: 18px;
88
+ align-items: start;
89
+ }
90
+
91
+ /* Sidebar */
92
+ .sidebar {
93
+ display: flex; flex-direction: column;
94
+ gap: 4px;
95
+ padding: 8px;
96
+ border-radius: 12px;
97
+ background: linear-gradient(180deg, var(--bg-1), rgba(17,14,28,.5));
98
+ border: 1px solid var(--edge);
99
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
100
+ }
101
+ .nav-item {
102
+ position: relative;
103
+ padding: 10px 14px 10px 18px;
104
+ border-radius: 8px;
105
+ background: transparent;
106
+ border: 1px solid transparent;
107
+ color: var(--ink-muted);
108
+ cursor: pointer;
109
+ text-align: left;
110
+ font: inherit;
111
+ font-size: 13px;
112
+ font-weight: 500;
113
+ transition: background .14s, color .14s, border-color .14s;
114
+ }
115
+ .nav-item::before {
116
+ content: "";
117
+ position: absolute;
118
+ left: 6px; top: 14px; bottom: 14px;
119
+ width: 2px;
120
+ border-radius: 2px;
121
+ background: transparent;
122
+ transition: background .14s;
123
+ }
124
+ .nav-item:hover {
125
+ background: rgba(255,255,255,.04);
126
+ color: var(--ink);
127
+ }
128
+ .nav-item.active {
129
+ background: rgba(167,139,250,.10);
130
+ color: var(--purple-bright);
131
+ font-weight: 600;
132
+ }
133
+ .nav-item.active::before {
134
+ background: var(--purple);
135
+ box-shadow: 0 0 8px rgba(167,139,250,.7);
136
+ }
137
+
138
+ /* Content panel */
139
+ .content {
140
+ border: 1px solid var(--edge);
141
+ border-radius: 14px;
142
+ background: linear-gradient(180deg, var(--bg-1), rgba(17,14,28,.4));
143
+ padding: 22px 24px;
144
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
145
+ }
146
+ .content h2 {
147
+ font-size: 15px; font-weight: 700;
148
+ color: var(--ink);
149
+ margin-bottom: 16px;
150
+ letter-spacing: -.01em;
151
+ display: inline-flex; align-items: center; gap: 8px;
152
+ }
153
+ .content h2::before {
154
+ content: ""; width: 4px; height: 4px; border-radius: 999px;
155
+ background: var(--purple);
156
+ box-shadow: 0 0 6px var(--purple);
157
+ }
158
+
159
+ /* Table */
160
+ table { width: 100%; border-collapse: collapse; font-size: 13px; }
161
+ th {
162
+ text-align: left;
163
+ padding: 10px 12px;
164
+ color: var(--ink-faint);
165
+ border-bottom: 1px solid var(--edge);
166
+ font-weight: 600;
167
+ font-size: 10.5px;
168
+ text-transform: uppercase;
169
+ letter-spacing: .08em;
170
+ }
171
+ td {
172
+ padding: 11px 12px;
173
+ border-bottom: 1px solid rgba(255,255,255,.03);
174
+ color: var(--ink-2);
175
+ vertical-align: middle;
176
+ }
177
+ tbody tr { transition: background .12s; }
178
+ tbody tr:hover { background: rgba(167,139,250,.04); }
179
+ tbody tr:last-child td { border-bottom: none; }
180
+
181
+ /* Status pills */
182
+ .status-active, .status-suspended, .status-pending {
183
+ display: inline-block;
184
+ padding: 3px 10px;
185
+ border-radius: 999px;
186
+ font-size: 11px; font-weight: 600;
187
+ font-family: ui-monospace, "SF Mono", monospace;
188
+ letter-spacing: .02em;
189
+ }
190
+ .status-active {
191
+ color: var(--emerald-bright);
192
+ background: rgba(16,185,129,.10);
193
+ border: 1px solid rgba(16,185,129,.3);
194
+ }
195
+ .status-suspended {
196
+ color: var(--red-bright);
197
+ background: rgba(239,68,68,.10);
198
+ border: 1px solid rgba(239,68,68,.3);
199
+ }
200
+ .status-pending {
201
+ color: var(--amber-bright);
202
+ background: rgba(245,158,11,.10);
203
+ border: 1px solid rgba(245,158,11,.3);
204
+ }
205
+
206
+ /* Action buttons */
207
+ .actions { display: flex; gap: 6px; }
208
+ .actions button {
209
+ padding: 5px 11px;
210
+ border-radius: 6px;
211
+ border: 1px solid var(--edge);
212
+ background: rgba(255,255,255,.02);
213
+ color: var(--ink-2);
214
+ cursor: pointer;
215
+ font: inherit;
216
+ font-size: 11.5px;
217
+ font-weight: 600;
218
+ transition: background .12s, border-color .12s, color .12s, transform .08s;
219
+ }
220
+ .actions button:hover { background: rgba(255,255,255,.05); border-color: var(--edge-strong); }
221
+ .actions button:active { transform: translateY(1px); }
222
+ .btn-view {
223
+ color: var(--indigo);
224
+ border-color: rgba(129,140,248,.35);
225
+ background: rgba(129,140,248,.06);
226
+ }
227
+ .btn-view:hover { background: rgba(129,140,248,.14); border-color: var(--indigo); }
228
+ .btn-suspend {
229
+ color: var(--amber-bright);
230
+ border-color: rgba(245,158,11,.4);
231
+ background: rgba(245,158,11,.06);
232
+ }
233
+ .btn-suspend:hover { background: rgba(245,158,11,.14); border-color: var(--amber); }
234
+ .btn-delete {
235
+ color: var(--red-bright);
236
+ border-color: rgba(239,68,68,.4);
237
+ background: rgba(239,68,68,.06);
238
+ }
239
+ .btn-delete:hover { background: rgba(239,68,68,.14); border-color: var(--red); }
240
+ .btn-approve {
241
+ color: var(--emerald-bright);
242
+ border-color: rgba(16,185,129,.4);
243
+ background: rgba(16,185,129,.06);
244
+ }
245
+ .btn-approve:hover { background: rgba(16,185,129,.14); border-color: var(--emerald); }
246
+
247
+ /* Audit log */
248
+ .audit-log {
249
+ margin-top: 18px;
250
+ font-family: ui-monospace, "SF Mono", monospace;
251
+ font-size: 11.5px;
252
+ background: rgba(255,255,255,.02);
253
+ border: 1px solid var(--edge);
254
+ border-radius: 10px;
255
+ padding: 12px 14px;
256
+ max-height: 220px;
257
+ overflow-y: auto;
258
+ }
259
+ .audit-entry {
260
+ padding: 4px 0;
261
+ color: var(--ink-muted);
262
+ display: flex; gap: 10px;
263
+ border-bottom: 1px dashed rgba(255,255,255,.03);
264
+ }
265
+ .audit-entry:last-child { border-bottom: none; }
266
+ .audit-entry .timestamp { color: var(--ink-faint); white-space: nowrap; }
267
+ .audit-entry .action {
268
+ color: var(--purple-bright);
269
+ font-weight: 700;
270
+ letter-spacing: .04em;
271
+ min-width: 96px;
272
+ flex-shrink: 0;
273
+ }
274
+
275
+ /* Modal */
276
+ .modal {
277
+ display: none;
278
+ position: fixed; inset: 0;
279
+ background: rgba(8,7,13,.85);
280
+ backdrop-filter: blur(8px);
281
+ z-index: 100;
282
+ align-items: center; justify-content: center;
283
+ }
284
+ .modal.visible { display: flex; animation: modalFadeIn .2s ease-out; }
285
+ @keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
286
+ .modal-content {
287
+ background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
288
+ border: 1px solid rgba(239,68,68,.45);
289
+ border-radius: 14px;
290
+ padding: 24px 26px;
291
+ max-width: 440px;
292
+ text-align: center;
293
+ box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
294
+ }
295
+ .modal-content h3 {
296
+ color: var(--red-bright);
297
+ margin-bottom: 10px;
298
+ font-size: 16px;
299
+ font-weight: 700;
300
+ }
301
+ .modal-content p {
302
+ color: var(--ink-2);
303
+ margin-bottom: 18px;
304
+ font-size: 13px;
305
+ line-height: 1.55;
306
+ }
307
+ .modal-actions { display: flex; gap: 10px; justify-content: center; }
308
+ .modal-actions button {
309
+ padding: 9px 18px;
310
+ border-radius: 8px;
311
+ border: 1px solid var(--edge);
312
+ cursor: pointer;
313
+ font: inherit;
314
+ font-size: 12.5px;
315
+ font-weight: 600;
316
+ transition: background .12s, border-color .12s, color .12s, transform .08s;
317
+ }
318
+ .modal-actions button:active { transform: translateY(1px); }
319
+ .btn-cancel {
320
+ background: rgba(255,255,255,.04);
321
+ color: var(--ink-2);
322
+ border-color: var(--edge-strong);
323
+ }
324
+ .btn-cancel:hover { background: rgba(255,255,255,.08); color: var(--ink); }
325
+ .btn-confirm-delete {
326
+ background: linear-gradient(180deg, var(--red-bright), var(--red));
327
+ color: #fff;
328
+ border-color: var(--red);
329
+ font-weight: 700;
330
+ }
331
+ .btn-confirm-delete:hover { filter: brightness(1.08); }
332
+
333
+ ::selection { background: rgba(167,139,250,.3); }
44
334
  </style>
45
335
  </head>
46
336
  <body>