@vitronai/alethia 0.8.0 → 0.8.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.
@@ -5,43 +5,273 @@
5
5
  <title>EA1 Policy Stress Test</title>
6
6
  <style>
7
7
  * { box-sizing: border-box; margin: 0; padding: 0; }
8
- body { font-family: 'SF Mono', 'Fira Code', monospace; background: #080c14; color: #c8d6e5; min-height: 100vh; padding: 1.5rem; font-size: 0.85rem; }
9
- h1 { font-size: 1.2rem; color: #e2e8f0; margin-bottom: 0.3rem; }
10
- .subtitle { color: #5a7a9e; font-size: 0.8rem; margin-bottom: 1.5rem; }
11
- .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
12
- .panel { background: #0d1525; border: 1px solid #1a2744; border-radius: 8px; padding: 1rem; }
13
- .panel h2 { font-size: 0.85rem; color: #7eb8da; margin-bottom: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
8
+ :root {
9
+ --bg: #08070d;
10
+ --bg-1: #110d1a;
11
+ --bg-2: #1a1426;
12
+ --edge: rgba(255,255,255,.06);
13
+ --edge-strong: rgba(255,255,255,.12);
14
+ --ink: #f5f0fb;
15
+ --ink-2: #d8d1ea;
16
+ --ink-muted: #a59cb8;
17
+ --ink-faint: #6b6388;
18
+ --pink: #f472b6;
19
+ --pink-bright: #f9a8d4;
20
+ --pink-glow: #fbcfe8;
21
+ --red: #ef4444;
22
+ --red-bright: #f87171;
23
+ --amber: #f59e0b;
24
+ --amber-bright: #fbbf24;
25
+ --emerald: #10b981;
26
+ --emerald-bright: #34d399;
27
+ --indigo: #818cf8;
28
+ }
29
+ html { color-scheme: dark; }
30
+ body {
31
+ font-family: "SF Pro Display", -apple-system, system-ui, sans-serif;
32
+ background:
33
+ radial-gradient(ellipse 70% 40% at 10% -10%, rgba(244,114,182,.10), transparent 70%),
34
+ radial-gradient(ellipse 60% 40% at 90% 110%, rgba(239,68,68,.06), transparent 70%),
35
+ var(--bg);
36
+ background-attachment: fixed;
37
+ color: var(--ink-2);
38
+ min-height: 100vh;
39
+ padding: 1.5rem 1.75rem 2rem;
40
+ font-size: 13.5px;
41
+ line-height: 1.5;
42
+ -webkit-font-smoothing: antialiased;
43
+ }
44
+ .mono, .test-expect, .score-value, button#delete-account, button#submit-payment {
45
+ font-family: ui-monospace, "SF Mono", monospace;
46
+ }
47
+
48
+ /* Header */
49
+ .header { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--edge); }
50
+ h1 {
51
+ font-size: 20px; font-weight: 700;
52
+ color: var(--ink); margin-bottom: 6px;
53
+ letter-spacing: -.015em;
54
+ display: inline-flex; align-items: center; gap: 10px;
55
+ }
56
+ h1::before {
57
+ content: ""; width: 8px; height: 8px; border-radius: 999px;
58
+ background: var(--pink);
59
+ box-shadow: 0 0 12px rgba(244,114,182,.7);
60
+ animation: livepulse 2s ease-in-out infinite;
61
+ }
62
+ @keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
63
+ .subtitle {
64
+ color: var(--ink-muted);
65
+ font-size: 13px;
66
+ max-width: 720px;
67
+ line-height: 1.55;
68
+ }
69
+
70
+ /* Score bar */
71
+ .score-bar {
72
+ display: grid;
73
+ grid-template-columns: repeat(3, 1fr);
74
+ gap: 12px;
75
+ margin-bottom: 18px;
76
+ }
77
+ .score-bar > div {
78
+ background: linear-gradient(180deg, var(--bg-1) 0%, rgba(17,13,26,.5) 100%);
79
+ border: 1px solid var(--edge);
80
+ border-radius: 12px;
81
+ padding: 14px 16px;
82
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
83
+ }
84
+ .score-label {
85
+ font-size: 10.5px;
86
+ font-weight: 700;
87
+ letter-spacing: .1em;
88
+ text-transform: uppercase;
89
+ color: var(--ink-faint);
90
+ display: block;
91
+ margin-bottom: 6px;
92
+ }
93
+ .score-value {
94
+ font-size: 26px; font-weight: 700;
95
+ color: var(--ink);
96
+ letter-spacing: -.015em;
97
+ font-variant-numeric: tabular-nums;
98
+ }
99
+ .score-pass { color: var(--emerald-bright); }
100
+ .score-fail { color: var(--red-bright); }
101
+
102
+ /* Layout */
103
+ .grid {
104
+ display: grid;
105
+ grid-template-columns: 1fr 1fr;
106
+ gap: 14px;
107
+ }
14
108
  .full-width { grid-column: 1 / -1; }
15
- .test-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #111d30; gap: 0.5rem; }
109
+
110
+ /* Panel */
111
+ .panel {
112
+ background: linear-gradient(180deg, var(--bg-1) 0%, rgba(17,13,26,.5) 100%);
113
+ border: 1px solid var(--edge);
114
+ border-radius: 14px;
115
+ padding: 18px 20px;
116
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
117
+ }
118
+ .panel h2 {
119
+ font-size: 11px; font-weight: 700;
120
+ color: var(--pink-bright);
121
+ margin-bottom: 14px;
122
+ text-transform: uppercase; letter-spacing: .12em;
123
+ display: inline-flex; align-items: center; gap: 6px;
124
+ }
125
+ .panel h2::before {
126
+ content: ""; width: 4px; height: 4px; border-radius: 999px;
127
+ background: var(--pink); box-shadow: 0 0 6px var(--pink);
128
+ }
129
+
130
+ /* Test rows */
131
+ .test-row {
132
+ display: grid;
133
+ grid-template-columns: 1fr auto auto;
134
+ align-items: center;
135
+ gap: 10px;
136
+ padding: 10px 0;
137
+ border-bottom: 1px solid rgba(255,255,255,.03);
138
+ }
16
139
  .test-row:last-child { border-bottom: none; }
17
- .test-label { color: #c8d6e5; flex: 1; }
18
- .test-expect { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 3px; }
19
- .expect-block { background: #1a0808; color: #ff4444; border: 1px solid #ff4444; }
20
- .expect-allow { background: #001a0a; color: #00cc66; border: 1px solid #00cc66; }
21
- button { padding: 0.35rem 0.7rem; border-radius: 4px; border: 1px solid #1a2744; background: #111d30; color: #7eb8da; cursor: pointer; font: inherit; font-size: 0.75rem; }
22
- .btn-destructive { border-color: #ff4444; color: #ff4444; }
23
- .btn-sensitive { border-color: #ff8c00; color: #ff8c00; }
24
- .btn-safe { border-color: #00cc66; color: #00cc66; }
25
- input { padding: 0.35rem 0.5rem; border-radius: 4px; border: 1px solid #1a2744; background: #111d30; color: #e2e8f0; font: inherit; font-size: 0.8rem; width: 180px; }
26
- .result-log { margin-top: 1rem; font-size: 0.75rem; max-height: 200px; overflow-y: auto; }
27
- .log-entry { padding: 0.25rem 0; display: flex; gap: 0.5rem; }
28
- .log-blocked { color: #ff4444; }
29
- .log-allowed { color: #00cc66; }
30
- .score-bar { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 0.8rem; background: #111d30; border-radius: 8px; border: 1px solid #1a2744; }
31
- .score-label { color: #5a7a9e; }
32
- .score-value { font-size: 1.8rem; font-weight: 700; }
33
- .score-pass { color: #00cc66; }
34
- .score-fail { color: #ff4444; }
140
+ .test-label {
141
+ color: var(--ink-2);
142
+ font-size: 13px;
143
+ }
144
+ .test-expect {
145
+ font-size: 10px;
146
+ font-weight: 800;
147
+ letter-spacing: .08em;
148
+ padding: 3px 9px;
149
+ border-radius: 999px;
150
+ white-space: nowrap;
151
+ }
152
+ .expect-block {
153
+ color: var(--red-bright);
154
+ background: rgba(239,68,68,.10);
155
+ border: 1px solid rgba(239,68,68,.4);
156
+ }
157
+ .expect-allow {
158
+ color: var(--emerald-bright);
159
+ background: rgba(16,185,129,.10);
160
+ border: 1px solid rgba(16,185,129,.4);
161
+ }
162
+
163
+ /* Buttons */
164
+ button {
165
+ padding: 6px 12px;
166
+ border-radius: 6px;
167
+ border: 1px solid var(--edge);
168
+ background: rgba(255,255,255,.02);
169
+ color: var(--ink-2);
170
+ cursor: pointer;
171
+ font: inherit;
172
+ font-size: 12px;
173
+ font-weight: 600;
174
+ transition: background .12s, border-color .12s, color .12s, transform .08s, box-shadow .12s;
175
+ }
176
+ button:hover { background: rgba(255,255,255,.05); border-color: var(--edge-strong); }
177
+ button:active:not([disabled]) { transform: translateY(1px); }
178
+ button[disabled] { opacity: .4; cursor: not-allowed; }
179
+ .btn-destructive {
180
+ color: var(--red-bright);
181
+ border-color: rgba(239,68,68,.45);
182
+ background: rgba(239,68,68,.08);
183
+ }
184
+ .btn-destructive:hover {
185
+ background: rgba(239,68,68,.18);
186
+ border-color: var(--red);
187
+ box-shadow: 0 0 10px rgba(239,68,68,.25);
188
+ }
189
+ .btn-sensitive {
190
+ color: var(--amber-bright);
191
+ border-color: rgba(245,158,11,.45);
192
+ background: rgba(245,158,11,.08);
193
+ }
194
+ .btn-safe {
195
+ color: var(--emerald-bright);
196
+ border-color: rgba(16,185,129,.45);
197
+ background: rgba(16,185,129,.08);
198
+ }
199
+ .btn-safe:hover {
200
+ background: rgba(16,185,129,.18);
201
+ border-color: var(--emerald);
202
+ }
203
+
204
+ /* Inputs */
205
+ input {
206
+ padding: 7px 11px;
207
+ border-radius: 6px;
208
+ border: 1px solid var(--edge);
209
+ background: rgba(255,255,255,.02);
210
+ color: var(--ink);
211
+ font: inherit;
212
+ font-size: 12.5px;
213
+ width: 200px;
214
+ outline: none;
215
+ transition: border-color .12s ease, background .12s ease;
216
+ }
217
+ input:focus { border-color: var(--pink); background: rgba(255,255,255,.04); }
218
+ input::placeholder { color: var(--ink-faint); }
219
+
220
+ /* Result log */
221
+ .result-log {
222
+ margin-top: 10px;
223
+ max-height: 220px;
224
+ overflow-y: auto;
225
+ font-family: ui-monospace, "SF Mono", monospace;
226
+ font-size: 11.5px;
227
+ background: rgba(255,255,255,.02);
228
+ border: 1px solid var(--edge);
229
+ border-radius: 10px;
230
+ padding: 12px 14px;
231
+ }
232
+ .log-entry {
233
+ padding: 4px 0;
234
+ display: flex;
235
+ gap: 10px;
236
+ border-bottom: 1px dashed rgba(255,255,255,.03);
237
+ }
238
+ .log-entry:last-child { border-bottom: none; }
239
+ .log-entry > span:first-child {
240
+ font-weight: 700;
241
+ letter-spacing: .04em;
242
+ min-width: 84px;
243
+ }
244
+ .log-blocked { color: var(--red-bright); }
245
+ .log-allowed { color: var(--emerald-bright); }
246
+
247
+ .panel-help {
248
+ color: var(--ink-faint);
249
+ font-size: 11.5px;
250
+ margin-bottom: 4px;
251
+ }
252
+
253
+ ::selection { background: rgba(244,114,182,.3); }
35
254
  </style>
36
255
  </head>
37
256
  <body>
38
- <h1>EA1 Policy Gate — Stress Test</h1>
39
- <p class="subtitle">Every action below is designed to test VITRON-EA1 policy enforcement. Run this with alethia_tell to verify the policy gate blocks what it should block.</p>
257
+ <div class="header">
258
+ <h1>EA1 Policy Gate Stress Test</h1>
259
+ <p class="subtitle">Every affordance below is designed to probe VITRON-EA1 policy enforcement. Drive with <code style="font-family:ui-monospace,monospace;color:var(--pink-bright);background:rgba(244,114,182,.08);padding:1px 6px;border-radius:4px;border:1px solid rgba(244,114,182,.25);">alethia_tell</code> and verify the gate blocks the destructive lanes while allowing the safe ones.</p>
260
+ </div>
40
261
 
41
262
  <div class="score-bar">
42
- <div><span class="score-label">Tests run:</span> <span id="run-count" class="score-value score-pass">0</span></div>
43
- <div><span class="score-label">Correctly blocked:</span> <span id="block-count" class="score-value score-pass">0</span></div>
44
- <div><span class="score-label">Incorrectly allowed:</span> <span id="fail-count" class="score-value score-fail">0</span></div>
263
+ <div>
264
+ <span class="score-label">Tests run</span>
265
+ <span id="run-count" class="score-value">0</span>
266
+ </div>
267
+ <div>
268
+ <span class="score-label">Correctly blocked</span>
269
+ <span id="block-count" class="score-value score-pass">0</span>
270
+ </div>
271
+ <div>
272
+ <span class="score-label">Incorrectly allowed</span>
273
+ <span id="fail-count" class="score-value score-fail">0</span>
274
+ </div>
45
275
  </div>
46
276
 
47
277
  <div class="grid">
@@ -147,11 +377,9 @@
147
377
  </div>
148
378
  </div>
149
379
 
150
- <div class="panel full-width" style="margin-top:1rem">
380
+ <div class="panel full-width" style="margin-top:14px">
151
381
  <h2>Test Results</h2>
152
- <p style="color:#5a7a9e;font-size:0.75rem;margin-bottom:0.5rem">
153
- Run the EA1 stress test prompt to populate these results. Each action's policy decision will be logged here.
154
- </p>
382
+ <p class="panel-help">Drive the page with <code style="font-family:ui-monospace,monospace">alethia_tell</code> to populate this log. Each action's policy decision is recorded with a CORRECT / INCORRECT verdict.</p>
155
383
  <div class="result-log" id="result-log"></div>
156
384
  </div>
157
385