-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha2a.html
More file actions
628 lines (568 loc) · 22.8 KB
/
Copy patha2a.html
File metadata and controls
628 lines (568 loc) · 22.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>connor-stack — Peer Verification & Gates</title>
<meta name="description" content="Audit secure agent execution pipelines. Explore commit filters, cryptographic handshakes, and preflight safety gates.">
<link rel="stylesheet" href="../index.css">
<style>
.gates-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
margin-top: 2rem;
margin-bottom: 4rem;
}
@media (max-width: 1024px) {
.gates-layout {
grid-template-columns: 1fr;
gap: 2rem;
}
}
/* Pipeline Card */
.pipeline-panel {
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: 12px;
padding: 2rem;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
display: flex;
flex-direction: column;
}
.pipeline-timeline {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-top: 1rem;
margin-bottom: 2rem;
position: relative;
}
.pipeline-timeline::before {
content: '';
position: absolute;
left: 19px;
top: 10px;
bottom: 10px;
width: 2px;
background: var(--card-border);
z-index: 1;
}
.step-row {
display: flex;
gap: 1.5rem;
align-items: flex-start;
position: relative;
z-index: 2;
cursor: pointer;
}
.step-indicator {
width: 40px;
height: 40px;
border-radius: 9999px;
background: #12111a;
border: 2px solid var(--card-border);
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font-display);
font-size: 0.85rem;
font-weight: 700;
color: var(--text-muted);
transition: all var(--transition-speed);
}
.step-row.active .step-indicator {
border-color: var(--accent-cyan);
color: var(--accent-cyan);
box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}
.step-row.completed .step-indicator {
border-color: #10b981;
background: rgba(16, 185, 129, 0.05);
color: #10b981;
}
.step-content {
flex-grow: 1;
background: rgba(255, 255, 255, 0.02);
border: 1px solid var(--card-border);
border-radius: 8px;
padding: 1rem 1.25rem;
transition: all var(--transition-speed);
}
.step-row.active .step-content {
border-color: var(--accent-cyan);
background: rgba(6, 182, 212, 0.02);
}
.step-title {
font-family: var(--font-display);
font-size: 0.95rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.25rem;
}
.step-subtitle {
font-size: 0.75rem;
color: var(--text-muted);
}
.step-status {
font-family: monospace;
font-size: 0.75rem;
font-weight: 700;
margin-top: 0.5rem;
color: var(--text-muted);
}
.step-row.active .step-status {
color: var(--accent-cyan);
}
.step-row.completed .step-status {
color: #10b981;
}
/* Details Panel */
.details-panel {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.info-card {
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: 12px;
padding: 2rem;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
display: flex;
flex-direction: column;
gap: 1.25rem;
flex-grow: 1;
}
.info-title {
font-family: var(--font-display);
font-size: 1.25rem;
font-weight: 800;
color: var(--text-primary);
}
.info-desc {
font-size: 0.95rem;
color: var(--text-secondary);
line-height: 1.6;
}
.info-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.5rem;
font-size: 0.9rem;
color: var(--text-secondary);
}
.info-list li strong {
color: var(--text-primary);
}
.action-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: auto;
border-top: 1px solid var(--card-border);
padding-top: 1.5rem;
}
.test-btn {
background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
color: #08070b;
border: none;
border-radius: 6px;
padding: 0.6rem 1.2rem;
font-family: var(--font-display);
font-weight: 700;
font-size: 0.85rem;
cursor: pointer;
transition: opacity var(--transition-speed);
}
.test-btn:hover {
opacity: 0.9;
}
.test-btn:disabled {
background: var(--card-border);
color: var(--text-muted);
cursor: not-allowed;
}
.log-box {
background: #0d0c12;
border: 1px solid var(--code-border);
border-radius: 8px;
padding: 1rem;
font-family: monospace;
font-size: 0.75rem;
color: #10b981;
height: 120px;
overflow-y: auto;
}
.why-section {
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: 12px;
padding: 2rem;
margin-top: 1rem;
margin-bottom: 2.5rem;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.why-section-title {
font-family: var(--font-display);
font-size: 1.2rem;
font-weight: 800;
color: var(--text-primary);
margin-bottom: 1.5rem;
background: linear-gradient(135deg, var(--text-primary) 50%, var(--accent-cyan));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: flex;
align-items: center;
gap: 0.5rem;
}
.why-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
}
.why-card {
background: rgba(255, 255, 255, 0.02);
border: 1px solid var(--card-border);
border-radius: 8px;
padding: 1.5rem;
transition: all var(--transition-speed) var(--transition-bounce);
}
.why-card:hover {
border-color: rgba(6, 182, 212, 0.3);
transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.why-card-title {
font-family: var(--font-sans);
font-size: 0.95rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.75rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.why-card-desc {
font-size: 0.85rem;
color: var(--text-secondary);
line-height: 1.5;
}
</style>
</head>
<body>
<div class="layout-container">
<!-- Navigation bar -->
<header class="nav-header" role="banner">
<a href="../index.html" class="brand" id="nav-brand-link">
<span class="brand-accent">connor-stack</span>
</a>
<nav class="nav-actions" role="navigation" aria-label="Main Navigation">
<a href="../philosophy.html" class="nav-link" id="nav-philosophy-link">Manifesto</a>
<a href="../tour.html" class="nav-link" id="nav-tour-link">Tour</a>
<a href="../cmo-simulator.html" class="nav-link" id="nav-simulator-link">Simulator</a>
<a href="../spokes.html" class="nav-link" id="nav-spokes-link">Spokes</a>
<button class="theme-toggle-btn" id="theme-toggle-button" aria-label="Toggle color theme" title="Toggle dark/light mode">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon">
<circle cx="12" cy="12" r="4"></circle>
<path d="M12 2v2"></path>
<path d="M12 20v2"></path>
<path d="M5 5l1.5 1.5"></path>
<path d="M17.5 17.5L19 19"></path>
<path d="M2 12h2"></path>
<path d="M20 12h2"></path>
<path d="M5 19l1.5-1.5"></path>
<path d="M17.5 6.5L19 5"></path>
</svg>
</button>
</nav>
</header>
<!-- Main Content Area -->
<main role="main">
<section aria-labelledby="gates-heading">
<a href="index.html" class="hero-tag" style="color: var(--accent-cyan); border-color: rgba(6, 182, 212, 0.25); background-color: rgba(6, 182, 212, 0.05); text-decoration: none;">← Builder Hub</a>
<h1 class="hero-title" id="gates-heading" style="text-align: left; margin-top: 1rem; margin-bottom: 0.5rem; background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">Verification & Safety Gates</h1>
<p style="margin-bottom: 2rem; max-width: 800px; color: var(--text-secondary);">
Secure agent transactions. Deploy Git commit guards, cryptographic handshakes, and strict preflight assertions to prevent runaway agent modifications.
</p>
</section>
<!-- Why We Enforce Cryptographic and Commit Safety Gates Panel -->
<section class="why-section" aria-labelledby="why-safety-gates-title">
<h2 class="why-section-title" id="why-safety-gates-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent-cyan);">
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
</svg>
Why We Enforce Cryptographic and Commit Safety Gates
</h2>
<div class="why-grid">
<div class="why-card">
<h3 class="why-card-title">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent-cyan);">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
<polyline points="22 4 12 14.01 9 11.01"></polyline>
</svg>
Commit protection via zehrava-gate
</h3>
<p class="why-card-desc">
Pre-commit validation hooks audit agent changes before merge, scanning for unauthorized shell command overrides or sensitive key leaks.
</p>
</div>
<div class="why-card">
<h3 class="why-card-title">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent-cyan);">
<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>
</svg>
Signature validation via avp
</h3>
<p class="why-card-desc">
Enforcing public key handshakes ensures that incoming webhook requests originate from verified agent keys, stopping route spoofing.
</p>
</div>
<div class="why-card">
<h3 class="why-card-title">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent-cyan);">
<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path>
<path d="M12 6v6l4 2"></path>
</svg>
Preflight Assertions via diwan
</h3>
<p class="why-card-desc">
Verifying endpoints and checking rate budgets before dispatching heavy sessions prevents agents from falling into costly, endless credit-spend loops.
</p>
</div>
<div class="why-card">
<h3 class="why-card-title">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent-cyan);">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<line x1="9" y1="9" x2="15" y2="15"></line>
<line x1="15" y1="9" x2="9" y2="15"></line>
</svg>
Strict Isolation of Writes
</h3>
<p class="why-card-desc">
Locking files under the system directories blocks agents from editing core libraries or configuration parameters, preventing critical system corruption.
</p>
</div>
</div>
</section>
<div class="gates-layout">
<!-- Pipeline timeline visualizer -->
<div class="pipeline-panel">
<h2 class="feed-title" style="margin-bottom: 1.5rem;">Pipeline Gates</h2>
<div class="pipeline-timeline">
<!-- Step 1: zehrava-gate -->
<div class="step-row active" id="step-1-row" data-step="zehrava">
<div class="step-indicator">01</div>
<div class="step-content">
<h3 class="step-title">zehrava-gate</h3>
<span class="step-subtitle">Git Commit Security Guard</span>
<div class="step-status" id="step-1-status">Status: Waiting</div>
</div>
</div>
<!-- Step 2: avp -->
<div class="step-row" id="step-2-row" data-step="avp">
<div class="step-indicator">02</div>
<div class="step-content">
<h3 class="step-title">avp</h3>
<span class="step-subtitle">Cryptographic Handshake Protocol</span>
<div class="step-status" id="step-2-status">Status: Waiting</div>
</div>
</div>
<!-- Step 3: diwan -->
<div class="step-row" id="step-3-row" data-step="diwan">
<div class="step-indicator">03</div>
<div class="step-content">
<h3 class="step-title">diwan</h3>
<span class="step-subtitle">Preflight Assertion Runner</span>
<div class="step-status" id="step-3-status">Status: Waiting</div>
</div>
</div>
</div>
<div class="action-row">
<span style="font-size: 0.8rem; color: var(--text-muted);">Interactive Audit Suite</span>
<button class="test-btn" id="btn-run-pipeline">Test Safety Gates</button>
</div>
</div>
<!-- Info Details Panel -->
<div class="details-panel">
<div class="info-card">
<h2 class="info-title" id="gate-title">zehrava-gate</h2>
<p class="info-desc" id="gate-desc">
Git hooks audit agent code modifications before commits are finalized. Validates that write operations do not corrupt critical config structures or import malicious commands.
</p>
<ul class="info-list" id="gate-details-list">
<li><strong>Operation:</strong> Pre-commit git diff scan.</li>
<li><strong>Target Scope:</strong> Block auto-execution of untrusted shell scripts.</li>
<li><strong>Integration spoke:</strong> cgallic/zehrava-gate.</li>
</ul>
<div class="log-box" id="gate-terminal-logs">
<span style="color: #64748b;">// Audit results will print here. Click gates to read profiles.</span>
</div>
</div>
</div>
</div>
</main>
<!-- Footer Area -->
<footer class="footer" role="contentinfo">
<p class="footer-text">Built by Connor Gallic. Code licensed MIT. Personal configurations and proofs of concept for remixing.</p>
<div class="footer-links">
<a href="../philosophy.html" class="footer-link">Philosophy</a>
<a href="../tour.html" class="footer-link">Architecture Tour</a>
<a href="../spokes.html" class="footer-link">Spoke Registry</a>
<a href="https://github.com/cgallic/connor-stack" class="footer-link" target="_blank" rel="noopener">GitHub</a>
</div>
</footer>
</div>
<script>
// Theme control
const themeBtn = document.getElementById('theme-toggle-button');
let currentTheme = localStorage.getItem('theme');
if (!currentTheme) {
currentTheme = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
}
document.documentElement.style.colorScheme = currentTheme;
updateThemeIcon(currentTheme);
themeBtn.addEventListener('click', () => {
const isDark = document.documentElement.style.colorScheme === 'dark';
const nextTheme = isDark ? 'light' : 'dark';
document.documentElement.style.colorScheme = nextTheme;
localStorage.setItem('theme', nextTheme);
updateThemeIcon(nextTheme);
});
function updateThemeIcon(theme) {
const isDark = theme === 'dark';
themeBtn.querySelector('.theme-icon').innerHTML = isDark
? `<circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="M5 5l1.5 1.5"></path><path d="M17.5 17.5L19 19"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="M5 19l1.5-1.5"></path><path d="M17.5 6.5L19 5"></path>`
: `<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>`;
}
// Gate Profiles Data
const gateProfiles = {
zehrava: {
title: "zehrava-gate",
desc: "A pre-commit verification hook. It automatically parses modified file differences before any commit completes, scanning for malicious shell injections or unauthorized API credentials.",
list: [
"<strong>Security:</strong> Protects branches against compromised agent writes.",
"<strong>Auto-Revert:</strong> Blocks commit and reverts dangerous payloads instantly.",
"<strong>Spoke link:</strong> <a href='../spokes.html' style='color: var(--accent-cyan); text-decoration: none;'>cgallic/zehrava-gate</a>"
],
logs: [
"Triggering pre-commit hook...",
"Running git diff audit on modified directories...",
"Validating config files (zero suspicious overrides found).",
"zehrava-gate: PASS."
]
},
avp: {
title: "Agent Verification Protocol (avp)",
desc: "Enforces signature validation between agents. Ensures that payloads traversing webhook routes originate from verified, authorized parent systems using public key cryptography.",
list: [
"<strong>Identity:</strong> Validate agent caller ID prior to route parsing.",
"<strong>Assigned token:</strong> Signature keys mapped in .env files.",
"<strong>Spoke link:</strong> <a href='../spokes.html' style='color: var(--accent-cyan); text-decoration: none;'>cgallic/avp</a>"
],
logs: [
"Initiating cryptographic signature validation...",
"Checking public keys for active agent sessions...",
"Signature verified (Origin: kai-cmo-harness).",
"AVP Handshake: PASS."
]
},
diwan: {
title: "diwan Preflight Tests",
desc: "Assertions checked before execution of heavy client workloads. Asserts API reachability, checks rate-limit budgets, and confirms template validity to prevent dead loops.",
list: [
"<strong>Preflight assertions:</strong> Verifies endpoints before billing begins.",
"<strong>Safety check:</strong> Prevents agents from entering infinite credit loops.",
"<strong>Spoke link:</strong> <a href='../spokes.html' style='color: var(--accent-cyan); text-decoration: none;'>cgallic/diwan</a>"
],
logs: [
"Resolving diwan preflight tests...",
"Checking FastAPI webhook gateway status...",
"Validating schema format expectations...",
"diwan: 3 preflight assertions passed. PASS."
]
}
};
let activeStepKey = 'zehrava';
let safetyTimer = null;
function viewGateProfile(key) {
activeStepKey = key;
const data = gateProfiles[key];
if (data) {
document.getElementById('gate-title').textContent = data.title;
document.getElementById('gate-desc').textContent = data.desc;
const list = document.getElementById('gate-details-list');
list.innerHTML = '';
data.list.forEach(li => {
const item = document.createElement('li');
item.innerHTML = li;
list.appendChild(item);
});
// Set row highlights
document.querySelectorAll('.step-row').forEach(row => {
row.classList.remove('active');
if (row.getAttribute('data-step') === key) {
row.classList.add('active');
}
});
const logsBox = document.getElementById('gate-terminal-logs');
logsBox.innerHTML = '';
data.logs.forEach(log => {
const p = document.createElement('p');
p.textContent = `> ${log}`;
logsBox.appendChild(p);
});
}
}
document.querySelectorAll('.step-row').forEach(row => {
row.addEventListener('click', () => {
const step = row.getAttribute('data-step');
viewGateProfile(step);
});
});
// Run pipeline simulation
const btnRun = document.getElementById('btn-run-pipeline');
btnRun.addEventListener('click', () => {
if (safetyTimer) clearInterval(safetyTimer);
btnRun.disabled = true;
btnRun.textContent = "Auditing...";
// Reset statuses
document.querySelectorAll('.step-row').forEach(row => {
row.classList.remove('completed');
});
document.getElementById('step-1-status').textContent = "Status: Executing...";
document.getElementById('step-2-status').textContent = "Status: Waiting...";
document.getElementById('step-3-status').textContent = "Status: Waiting...";
viewGateProfile('zehrava');
let stepIdx = 0;
safetyTimer = setInterval(() => {
if (stepIdx === 0) {
document.getElementById('step-1-status').textContent = "Status: Passed";
document.getElementById('step-1-row').classList.add('completed');
document.getElementById('step-2-status').textContent = "Status: Executing...";
viewGateProfile('avp');
} else if (stepIdx === 1) {
document.getElementById('step-2-status').textContent = "Status: Passed";
document.getElementById('step-2-row').classList.add('completed');
document.getElementById('step-3-status').textContent = "Status: Executing...";
viewGateProfile('diwan');
} else if (stepIdx === 2) {
document.getElementById('step-3-status').textContent = "Status: Passed";
document.getElementById('step-3-row').classList.add('completed');
clearInterval(safetyTimer);
btnRun.disabled = false;
btnRun.textContent = "Test Safety Gates";
}
stepIdx++;
}, 1500);
});
// Init
viewGateProfile('zehrava');
</script>
</body>
</html>