@vitronai/alethia 0.3.12 → 0.3.13

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/demo/README.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Alethia Demos
2
2
 
3
- Real-world scenarios for defense, intelligence, financial, and AI safety environments. Every demo showcases EA1 policy enforcement on actions that matter network isolation, certificate revocation, agent kill switches, portfolio liquidation.
3
+ Ready-to-use scenarios that show Alethia driving real apps. Start with the Claude Code demo to see the agent verification loop, then explore domain-specific scenarios.
4
4
 
5
- ## Scenarios
5
+ ## Claude Code: verify a generated app
6
+
7
+ The core use case. Claude Code generates an app, Alethia verifies it works.
8
+
9
+ `claude-code-app.html` simulates a task manager that Claude Code would scaffold. The prompt below runs a full verification flow: sign in, check the dashboard, add a task, complete a task, try to delete one (EA1 blocks it), and sign out.
10
+
11
+ ```
12
+ Use alethia_tell to navigate to file:///PATH/demo/claude-code-app.html.
13
+ Assert "TaskFlow" is visible and "Generated by Claude Code" is visible.
14
+ Type dev@company.com into the email field.
15
+ Type testing123 into the password field.
16
+ Click Sign in.
17
+ Assert "Signed in as" is visible.
18
+ Assert "Active" is visible and "Completed" is visible.
19
+ Type "Deploy to production" into the Add a new task field.
20
+ Click Add.
21
+ Assert "Deploy to production" is visible.
22
+ Click the first task checkbox.
23
+ Assert "Completed" shows 1.
24
+ Try to click Delete on the first task and report what EA1 decides.
25
+ Click Sign out.
26
+ Assert "Sign in" is visible.
27
+ ```
28
+
29
+ This is the loop: agent builds, Alethia verifies, EA1 guards. Every step returns structured results, a page snapshot (~200 tokens), and a signed audit trail.
30
+
31
+ ## Domain scenarios
6
32
 
7
33
  | Demo | Domain | What it proves |
8
34
  |---|---|---|
9
- | `incident-response.html` | Defense / SOC | Triage active cyber incident — lateral movement, credential dump, network isolation |
35
+ | `claude-code-app.html` | AI coding agents | Full sign-in, dashboard, CRUD, EA1 blocks delete |
36
+ | `incident-response.html` | Defense / SOC | Triage active cyber incident, network isolation blocked |
10
37
  | `threat-intel.html` | Intelligence / CTI | Threat intelligence platform — APT tracking, IOC blocking, MITRE ATT&CK correlation |
11
38
  | `crypto-readiness.html` | Cybersecurity / PQC | Post-quantum cryptographic readiness — certificate revocation, algorithm migration |
12
39
  | `agent-oversight.html` | AI Safety | Monitor autonomous agents — kill switch, policy violations, human-in-the-loop approval |
@@ -0,0 +1,213 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>TaskFlow — AI-Generated Task Manager</title>
5
+ <style>
6
+ * { box-sizing: border-box; margin: 0; padding: 0; }
7
+ body { font-family: -apple-system, 'Segoe UI', sans-serif; background: #0a0a0a; color: #e4e4e7; min-height: 100vh; }
8
+ .app { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem; }
9
+ .app-header { margin-bottom: 2rem; }
10
+ .app-header h1 { font-size: 1.5rem; font-weight: 700; color: #fafafa; }
11
+ .app-header p { color: #71717a; font-size: 0.85rem; margin-top: 0.3rem; }
12
+ .generated-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.7rem; border-radius: 999px; border: 1px solid #27272a; background: #18181b; color: #a1a1aa; font-size: 0.72rem; margin-top: 0.6rem; }
13
+ .generated-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
14
+
15
+ /* Auth */
16
+ .auth-card { background: #18181b; border: 1px solid #27272a; border-radius: 12px; padding: 2rem; max-width: 380px; margin: 4rem auto; }
17
+ .auth-card h2 { font-size: 1.1rem; color: #fafafa; margin-bottom: 1.2rem; }
18
+ .field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
19
+ .field label { font-size: 0.78rem; color: #a1a1aa; }
20
+ .field input { padding: 0.55rem 0.75rem; border-radius: 8px; border: 1px solid #27272a; background: #09090b; color: #fafafa; font: inherit; font-size: 0.88rem; outline: none; }
21
+ .field input:focus { border-color: #3b82f6; }
22
+ .btn { padding: 0.55rem 1rem; border-radius: 8px; border: none; font: inherit; font-size: 0.85rem; cursor: pointer; font-weight: 600; }
23
+ .btn-primary { background: #3b82f6; color: #fff; width: 100%; }
24
+ .btn-primary:hover { background: #2563eb; }
25
+ .error-msg { color: #ef4444; font-size: 0.78rem; margin-top: 0.5rem; display: none; }
26
+
27
+ /* Dashboard */
28
+ .dashboard { display: none; }
29
+ .dashboard.active { display: block; }
30
+ .auth-card.hidden { display: none; }
31
+ .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
32
+ .stat-card { background: #18181b; border: 1px solid #27272a; border-radius: 10px; padding: 1rem; }
33
+ .stat-value { font-size: 1.6rem; font-weight: 700; color: #fafafa; }
34
+ .stat-label { font-size: 0.72rem; color: #71717a; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }
35
+ .stat-card--active .stat-value { color: #3b82f6; }
36
+ .stat-card--done .stat-value { color: #22c55e; }
37
+ .stat-card--overdue .stat-value { color: #ef4444; }
38
+
39
+ /* Task form */
40
+ .add-task { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
41
+ .add-task input { flex: 1; padding: 0.55rem 0.75rem; border-radius: 8px; border: 1px solid #27272a; background: #18181b; color: #fafafa; font: inherit; font-size: 0.85rem; outline: none; }
42
+ .add-task input:focus { border-color: #3b82f6; }
43
+ .btn-add { background: #22c55e; color: #fff; }
44
+ .btn-add:hover { background: #16a34a; }
45
+
46
+ /* Task list */
47
+ .task-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
48
+ .task-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: #18181b; border: 1px solid #27272a; border-radius: 10px; }
49
+ .task-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #3f3f46; background: transparent; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
50
+ .task-check:hover { border-color: #22c55e; }
51
+ .task-check.done { background: #22c55e; border-color: #22c55e; }
52
+ .task-check.done::after { content: '\2713'; color: #fff; font-size: 0.65rem; font-weight: 700; }
53
+ .task-text { flex: 1; font-size: 0.88rem; }
54
+ .task-text.done { text-decoration: line-through; color: #52525b; }
55
+ .task-priority { font-size: 0.68rem; padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 600; }
56
+ .priority-high { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
57
+ .priority-medium { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
58
+ .priority-low { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
59
+ .btn-delete { background: none; border: 1px solid #27272a; color: #71717a; font-size: 0.75rem; padding: 0.3rem 0.5rem; border-radius: 6px; }
60
+ .btn-delete:hover { border-color: #ef4444; color: #ef4444; }
61
+ .empty-state { text-align: center; padding: 2rem; color: #52525b; font-size: 0.88rem; }
62
+ .user-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid #27272a; }
63
+ .user-bar span { color: #a1a1aa; font-size: 0.82rem; }
64
+ .btn-logout { background: none; border: 1px solid #27272a; color: #a1a1aa; font-size: 0.78rem; padding: 0.35rem 0.7rem; border-radius: 6px; }
65
+ .btn-logout:hover { border-color: #ef4444; color: #ef4444; }
66
+ .toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: 0.65rem 1rem; border-radius: 8px; background: #22c55e; color: #fff; font-size: 0.82rem; font-weight: 600; display: none; z-index: 10; }
67
+ .toast.show { display: block; }
68
+ </style>
69
+ </head>
70
+ <body>
71
+ <div class="app">
72
+ <div class="app-header">
73
+ <h1>TaskFlow</h1>
74
+ <p>A simple task manager for your team.</p>
75
+ <div class="generated-badge">Generated by Claude Code</div>
76
+ </div>
77
+
78
+ <!-- Login -->
79
+ <div class="auth-card" id="auth">
80
+ <h2>Sign in</h2>
81
+ <div class="field">
82
+ <label for="email">Email</label>
83
+ <input type="email" id="email" placeholder="you@company.com" />
84
+ </div>
85
+ <div class="field">
86
+ <label for="password">Password</label>
87
+ <input type="password" id="password" placeholder="Enter password" />
88
+ </div>
89
+ <button class="btn btn-primary" id="signin-btn" onclick="handleSignIn()">Sign in</button>
90
+ <p class="error-msg" id="error-msg">Invalid email or password.</p>
91
+ </div>
92
+
93
+ <!-- Dashboard -->
94
+ <div class="dashboard" id="dashboard">
95
+ <div class="user-bar">
96
+ <span>Signed in as <strong id="user-email"></strong></span>
97
+ <button class="btn-logout" onclick="handleLogout()">Sign out</button>
98
+ </div>
99
+
100
+ <div class="stats-row">
101
+ <div class="stat-card stat-card--active">
102
+ <div class="stat-value" id="stat-active">3</div>
103
+ <div class="stat-label">Active</div>
104
+ </div>
105
+ <div class="stat-card stat-card--done">
106
+ <div class="stat-value" id="stat-done">0</div>
107
+ <div class="stat-label">Completed</div>
108
+ </div>
109
+ <div class="stat-card stat-card--overdue">
110
+ <div class="stat-value" id="stat-overdue">1</div>
111
+ <div class="stat-label">Overdue</div>
112
+ </div>
113
+ </div>
114
+
115
+ <div class="add-task">
116
+ <input type="text" id="new-task" placeholder="Add a new task..." />
117
+ <button class="btn btn-add" onclick="addTask()">Add</button>
118
+ </div>
119
+
120
+ <ul class="task-list" id="task-list">
121
+ <li class="task-item">
122
+ <div class="task-check" onclick="toggleTask(this)"></div>
123
+ <span class="task-text">Set up CI/CD pipeline for staging</span>
124
+ <span class="task-priority priority-high">High</span>
125
+ <button class="btn-delete" onclick="deleteTask(this)">Delete</button>
126
+ </li>
127
+ <li class="task-item">
128
+ <div class="task-check" onclick="toggleTask(this)"></div>
129
+ <span class="task-text">Write API docs for /users endpoint</span>
130
+ <span class="task-priority priority-medium">Medium</span>
131
+ <button class="btn-delete" onclick="deleteTask(this)">Delete</button>
132
+ </li>
133
+ <li class="task-item">
134
+ <div class="task-check" onclick="toggleTask(this)"></div>
135
+ <span class="task-text">Review pull request #142</span>
136
+ <span class="task-priority priority-low">Low</span>
137
+ <button class="btn-delete" onclick="deleteTask(this)">Delete</button>
138
+ </li>
139
+ </ul>
140
+ </div>
141
+
142
+ <div class="toast" id="toast"></div>
143
+ </div>
144
+
145
+ <script>
146
+ function handleSignIn() {
147
+ var email = document.getElementById('email').value.trim();
148
+ var pw = document.getElementById('password').value;
149
+ var err = document.getElementById('error-msg');
150
+ if (!email || !pw) { err.style.display = 'block'; err.textContent = 'Please fill in all fields.'; return; }
151
+ if (!email.includes('@')) { err.style.display = 'block'; err.textContent = 'Invalid email address.'; return; }
152
+ err.style.display = 'none';
153
+ document.getElementById('auth').classList.add('hidden');
154
+ document.getElementById('dashboard').classList.add('active');
155
+ document.getElementById('user-email').textContent = email;
156
+ showToast('Welcome back!');
157
+ }
158
+
159
+ function handleLogout() {
160
+ document.getElementById('dashboard').classList.remove('active');
161
+ document.getElementById('auth').classList.remove('hidden');
162
+ document.getElementById('email').value = '';
163
+ document.getElementById('password').value = '';
164
+ }
165
+
166
+ function addTask() {
167
+ var input = document.getElementById('new-task');
168
+ var text = input.value.trim();
169
+ if (!text) return;
170
+ var list = document.getElementById('task-list');
171
+ var li = document.createElement('li');
172
+ li.className = 'task-item';
173
+ li.innerHTML = '<div class="task-check" onclick="toggleTask(this)"></div>' +
174
+ '<span class="task-text">' + text.replace(/</g, '&lt;') + '</span>' +
175
+ '<span class="task-priority priority-medium">Medium</span>' +
176
+ '<button class="btn-delete" onclick="deleteTask(this)">Delete</button>';
177
+ list.appendChild(li);
178
+ input.value = '';
179
+ updateStats();
180
+ showToast('Task added');
181
+ }
182
+
183
+ function toggleTask(el) {
184
+ el.classList.toggle('done');
185
+ var txt = el.nextElementSibling;
186
+ txt.classList.toggle('done');
187
+ updateStats();
188
+ }
189
+
190
+ function deleteTask(el) {
191
+ var item = el.closest('.task-item');
192
+ item.remove();
193
+ updateStats();
194
+ showToast('Task deleted');
195
+ }
196
+
197
+ function updateStats() {
198
+ var items = document.querySelectorAll('.task-item');
199
+ var done = document.querySelectorAll('.task-check.done').length;
200
+ var active = items.length - done;
201
+ document.getElementById('stat-active').textContent = active;
202
+ document.getElementById('stat-done').textContent = done;
203
+ }
204
+
205
+ function showToast(msg) {
206
+ var t = document.getElementById('toast');
207
+ t.textContent = msg;
208
+ t.classList.add('show');
209
+ setTimeout(function() { t.classList.remove('show'); }, 2000);
210
+ }
211
+ </script>
212
+ </body>
213
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitronai/alethia",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
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",