-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
462 lines (427 loc) · 27 KB
/
index.html
File metadata and controls
462 lines (427 loc) · 27 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
<!DOCTYPE html>
<!--
HEADY_BRAND: HeadySystems Inc.
Site: headybot.com
Node: CONDUCTOR + PERSONA
Law 3: Zero localhost
Law 4: Zero placeholders
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>HeadyBot — Agent Marketplace</title>
<meta property="og:title" content="HeadyBot">
<meta property="og:description" content="Autonomous Agents Built on 17 Swarms">
<meta property="og:type" content="website">
<meta property="og:url" content="https://headybot.com">
<meta property="og:image" content="https://headysystems.com/assets/og-headybot.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="HeadyBot">
<meta name="twitter:description" content="Autonomous Agents Built on 17 Swarms">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","name":"HeadyBot","url":"https://headybot.com","description":"Autonomous Agents Built on 17 Swarms","publisher":{"@type":"Organization","name":"HeadySystems Inc."}}
</script>
<meta name="description" content="Bot/agent listings, marketplace, swarm-powered automation agents">
<link rel="canonical" href="https://headybot.com">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--phi: 1.618; --psi: 0.618;
--void: #040810; --abyss: #0a0f1e; --deep: #0f172a; --surface: #1e293b;
--primary: #ef4444; --accent: #f0c040;
--primary-dim: #ef444422; --accent-dim: #f0c04022;
--text: #e2e8f0; --dim: #94a3b8; --muted: #475569;
--glass: rgba(15,23,42,0.75); --glass-border: rgba(124,94,255,0.2);
--font: 'Outfit', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{font-family:var(--font);background:var(--void);color:var(--text);min-height:100vh;}
/* Sacred Geometry BG */
canvas#sacred-bg{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:0.15;}
/* Cross-site Nav */
.heady-nav{position:fixed;top:0;left:0;right:0;z-index:100;display:flex;align-items:center;
padding:0 21px;height:55px;background:rgba(10,15,30,0.85);backdrop-filter:blur(18px);
border-bottom:1px solid var(--glass-border);}
.hn-brand{display:flex;align-items:center;gap:8px;}
.hn-title{font-size:12px;font-weight:600;color:var(--dim);}
.hn-links{display:flex;gap:2px;margin-left:21px;overflow-x:auto;}
.hn-link{padding:8px 10px;font-size:11px;font-weight:700;font-family:var(--mono);
color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;
transition:all 0.2s;white-space:nowrap;}
.hn-link:hover{color:var(--text);background:rgba(255,255,255,0.03);}
.hn-active{color:var(--primary) !important;}
.hn-right{margin-left:auto;display:flex;gap:8px;align-items:center;}
.hn-storage-btn,.hn-buddy-btn{padding:5px 13px;border-radius:89px;border:1px solid var(--glass-border);
background:rgba(255,255,255,0.03);color:var(--dim);font-size:11px;cursor:pointer;
font-family:var(--font);transition:all 0.2s;}
.hn-storage-btn:hover,.hn-buddy-btn:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-dim);}
/* Hero */
.hero{position:relative;z-index:1;min-height:100vh;display:flex;align-items:center;padding:89px 55px 55px;}
.hero-content{max-width:700px;}
.hero-badge{display:inline-flex;align-items:center;gap:8px;padding:5px 13px;
background:var(--primary-dim);border:1px solid #ef444433;border-radius:89px;
font-size:11px;color:var(--primary);font-family:var(--mono);margin-bottom:21px;}
.hero-title{font-size:48px;font-weight:700;line-height:1.15;margin-bottom:21px;}
.hero-title br{display:block;}
.hero-sub{font-size:16px;color:var(--dim);line-height:1.618;margin-bottom:34px;max-width:550px;}
.hero-cta{display:inline-flex;align-items:center;gap:8px;padding:13px 34px;
background:linear-gradient(135deg,var(--primary),#f0c040);color:#000;font-weight:600;
border:none;border-radius:8px;font-size:15px;cursor:pointer;font-family:var(--font);
text-decoration:none;transition:box-shadow 0.3s;}
.hero-cta:hover{box-shadow:0 0 34px #ef444466;}
.hero-features{display:flex;flex-wrap:wrap;gap:8px;margin-top:34px;}
.hero-feat{padding:5px 13px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);
border-radius:89px;font-size:11px;color:var(--dim);font-family:var(--mono);}
/* Sections */
.sections{position:relative;z-index:1;padding:89px 55px;display:grid;
grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:21px;max-width:1200px;margin:0 auto;}
.section-card{background:var(--glass);backdrop-filter:blur(18px);border:1px solid var(--glass-border);
border-radius:13px;padding:34px;transition:all 0.3s;}
.section-card:hover{border-color:var(--primary);box-shadow:0 0 34px var(--primary-dim);transform:translateY(-3px);}
.section-icon{font-size:24px;margin-bottom:13px;color:var(--primary);}
.section-title{font-size:18px;font-weight:600;margin-bottom:8px;}
.section-desc{font-size:13px;color:var(--dim);line-height:1.618;}
/* Cross-site Links */
.ecosystem{position:relative;z-index:1;padding:55px;max-width:1200px;margin:0 auto;}
.ecosystem h2{font-size:28px;font-weight:700;margin-bottom:34px;text-align:center;}
.eco-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:13px;}
.eco-card{display:flex;align-items:center;gap:13px;padding:13px;
background:var(--glass);border:1px solid var(--glass-border);border-radius:8px;
text-decoration:none;color:var(--text);transition:all 0.2s;}
.eco-card:hover{border-color:var(--primary);transform:translateY(-2px);}
.eco-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;
justify-content:center;font-weight:700;font-size:12px;font-family:var(--mono);
border:1px solid rgba(255,255,255,0.08);}
.eco-domain{font-size:11px;font-family:var(--mono);color:var(--primary);}
.eco-purpose{font-size:10px;color:var(--dim);}
/* Footer */
.footer{position:relative;z-index:1;padding:34px 55px;border-top:1px solid var(--glass-border);
text-align:center;font-size:11px;color:var(--muted);font-family:var(--mono);}
/* Storage Modal */
.storage-overlay{position:fixed;inset:0;z-index:2000;background:rgba(0,0,0,0.7);
backdrop-filter:blur(8px);align-items:center;justify-content:center;}
.storage-card{background:var(--deep);border:1px solid var(--glass-border);border-radius:13px;
padding:34px;width:90%;max-width:600px;max-height:85vh;overflow-y:auto;position:relative;
box-shadow:0 0 89px rgba(124,94,255,0.2);}
.storage-close{position:absolute;top:13px;right:13px;background:none;border:none;
color:var(--dim);cursor:pointer;font-size:20px;padding:5px;border-radius:8px;}
.storage-close:hover{background:rgba(255,255,255,0.06);}
.storage-card h2{font-size:20px;font-weight:700;margin-bottom:8px;
background:linear-gradient(135deg,#00d4aa,#7c5eff);
-webkit-background-clip:text;-webkit-text-fill-color:transparent;}
.storage-desc{font-size:13px;color:var(--dim);margin-bottom:21px;}
.storage-steps{display:flex;flex-direction:column;gap:13px;margin-bottom:21px;}
.storage-step{display:flex;gap:13px;padding:13px;background:rgba(255,255,255,0.02);
border-radius:8px;border:1px solid rgba(255,255,255,0.04);}
.storage-step-num{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;
justify-content:center;font-weight:700;font-size:14px;flex-shrink:0;}
.storage-step-title{font-size:14px;font-weight:600;margin-bottom:3px;}
.storage-step-desc{font-size:12px;color:var(--dim);line-height:1.618;}
.storage-step-desc code{font-size:11px;background:rgba(0,0,0,0.3);padding:1px 5px;border-radius:3px;font-family:var(--mono);}
.storage-action-btn{margin-top:8px;padding:8px 21px;background:linear-gradient(135deg,#00d4aa,#00b894);
color:#000;border:none;border-radius:8px;font-weight:600;font-size:12px;cursor:pointer;font-family:var(--font);}
.storage-action-btn:hover{box-shadow:0 0 21px rgba(0,212,170,0.4);}
.storage-info{display:flex;flex-direction:column;gap:5px;padding:13px;
background:rgba(255,255,255,0.02);border-radius:8px;border:1px solid rgba(255,255,255,0.04);}
.storage-info-row{display:flex;justify-content:space-between;font-size:11px;padding:3px 0;
border-bottom:1px solid rgba(255,255,255,0.03);}
.storage-info-row span:first-child{color:var(--dim);}
.storage-info-row span:last-child{font-family:var(--mono);color:var(--text);}
.storage-info-row code{font-size:10px;background:rgba(0,0,0,0.3);padding:1px 4px;border-radius:3px;}
@media(max-width:768px){
.hero{padding:89px 21px 34px;}
.hero-title{font-size:32px;}
.sections{padding:34px 21px;}
.ecosystem{padding:34px 21px;}
.hn-links{display:none;}
}
</style>
</head>
<body>
<canvas id="sacred-bg"></canvas>
<nav class="heady-nav" data-node="CONDUCTOR">
<div class="hn-brand">
<svg width="24" height="24" viewBox="0 0 34 34" fill="none"><circle cx="17" cy="17" r="15.5" stroke="url(#ng)" stroke-width="1.5"/><circle cx="17" cy="17" r="9" stroke="url(#ng)" stroke-width="1" opacity=".5"/><circle cx="17" cy="17" r="3.5" fill="url(#ng)"/><defs><linearGradient id="ng" x1="0" y1="0" x2="34" y2="34"><stop stop-color="#00d4aa"/><stop offset="1" stop-color="#7c5eff"/></linearGradient></defs></svg>
<span class="hn-title">Heady™ Ecosystem</span>
</div>
<div class="hn-links"><a href="https://headysystems.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadySystems Inc.">HS</a><a href="https://headyme.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyMe">HM</a><a href="https://headybuddy.org" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyBuddy">HB</a><a href="https://headymcp.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyMCP">MC</a><a href="https://headyio.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyIO">IO</a><a href="https://headybot.com" class="hn-link hn-active" data-node="CONDUCTOR"
style="color:#ef4444;border-bottom:2px solid #ef4444;"
title="HeadyBot">BT</a><a href="https://headyapi.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyAPI">AP</a><a href="https://headylens.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyLens">HL</a><a href="https://heady-ai.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyAI">AI</a><a href="https://headyfinance.com" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyFinance">HF</a><a href="https://headyconnection.org" class="hn-link " data-node="CONDUCTOR"
style=""
title="HeadyConnection">HC</a></div>
<div class="hn-right">
<button class="hn-storage-btn" onclick="document.getElementById('storageModal').style.display='flex'" data-node="CONDUCTOR" title="Connect Storage">🔗 Connect</button>
<button class="hn-buddy-btn" onclick="HeadyBuddyEmbed&&HeadyBuddyEmbed.toggle()" data-node="PERSONA" title="HeadyBuddy">💬</button>
</div>
</nav>
<div id="storageModal" class="storage-overlay" style="display:none;">
<div class="storage-card">
<button class="storage-close" onclick="this.parentElement.parentElement.style.display='none'">✕</button>
<h2>Connect Personal Storage</h2>
<p class="storage-desc">One-time setup. Your data follows you across all 11 Heady domains and every device.</p>
<div class="storage-steps">
<div class="storage-step">
<div class="storage-step-num" style="background:rgba(0,212,170,0.15);color:#00d4aa;">1</div>
<div>
<div class="storage-step-title">Authenticate</div>
<div class="storage-step-desc">Sign in with Google, GitHub, or Discord via <code>auth.headysystems.com</code>. Firebase Auth sets a cross-domain session cookie shared by all 11 domains.</div>
<button class="storage-action-btn" data-node="CONDUCTOR" onclick="handleStorageAuth()">Sign In →</button>
</div>
</div>
<div class="storage-step">
<div class="storage-step-num" style="background:rgba(124,94,255,0.15);color:#7c5eff;">2</div>
<div>
<div class="storage-step-title">T1 Memory Initialized</div>
<div class="storage-step-desc">A personal vector space is created in Neon pgvector (384D, all-MiniLM-L6-v2). Namespace: <code>tenant:{your-id}:*</code>. CSL-scored with φ-weighted decay.</div>
</div>
</div>
<div class="storage-step">
<div class="storage-step-num" style="background:rgba(240,192,64,0.15);color:#f0c040;">3</div>
<div>
<div class="storage-step-title">T0 Session Active</div>
<div class="storage-step-desc">Upstash Redis working memory starts with 30s SETEX heartbeat (PHI⁷ = 29,034ms). Cross-device sync via WebSocket with CRDT conflict resolution.</div>
</div>
</div>
<div class="storage-step">
<div class="storage-step-num" style="background:rgba(34,197,94,0.15);color:#22c55e;">4</div>
<div>
<div class="storage-step-title">HeadyBuddy Synced</div>
<div class="storage-step-desc">Your HeadyBuddy conversation history, preferences, and archetype profile are now persistent and available on every domain and device. Done.</div>
</div>
</div>
</div>
<div class="storage-info">
<div class="storage-info-row"><span>Auth Provider</span><span>Firebase (27 OAuth providers)</span></div>
<div class="storage-info-row"><span>SSO Domain</span><span><code>auth.headysystems.com</code></span></div>
<div class="storage-info-row"><span>T0 Memory</span><span>Upstash Redis (30s SETEX)</span></div>
<div class="storage-info-row"><span>T1 Memory</span><span>Neon pgvector (384D HNSW)</span></div>
<div class="storage-info-row"><span>Sync</span><span>WebSocket + SSE fallback</span></div>
<div class="storage-info-row"><span>Encryption</span><span>TLS 1.3 + PQC-ready</span></div>
<div class="storage-info-row"><span>Cross-Device</span><span>Desktop · Mobile · IDE · Extension</span></div>
</div>
<p style="font-size:10px;color:#475569;text-align:center;margin-top:21px;font-family:monospace;">
HeadySystems Inc. · All data encrypted in transit and at rest · 60+ patents protect this architecture
</p>
</div>
</div>
<section class="hero">
<div class="hero-content">
<div class="hero-badge">
<span style="color:#ef4444;">●</span>
headybot.com · Powered by Heady™
</div>
<h1 class="hero-title">Autonomous Agents<br>Built on 17 Swarms</h1>
<p class="hero-sub">89 bee types · Stigmergic coordination · Deploy agents in minutes</p>
<a href="/catalog" class="hero-cta" data-node="CONDUCTOR">Browse Agents →</a>
<div class="hero-features">
<span class="hero-feat">Agent Catalog</span><span class="hero-feat">Custom Agents</span><span class="hero-feat">Swarm API</span><span class="hero-feat">Deploy Pipeline</span><span class="hero-feat">Monitoring</span>
</div>
</div>
</section>
<section class="sections">
<div class="section-card" data-node="OBSERVER">
<div class="section-icon">◇</div>
<div class="section-title">Agent Catalog</div>
<div class="section-desc">Browse pre-built agents powered by Heady's 17-swarm matrix. Code review bots, content generators, security scanners, trading analyzers — all production-ready.</div>
</div>
<div class="section-card" data-node="OBSERVER">
<div class="section-icon">⬡</div>
<div class="section-title">Custom Agents</div>
<div class="section-desc">Compose your own agent from 89 bee types. Mix FORGE (code) + SENTINEL (security) + ORACLE (budget) to build exactly the autonomous worker you need.</div>
</div>
<div class="section-card" data-node="OBSERVER">
<div class="section-icon">◈</div>
<div class="section-title">Swarm Orchestration</div>
<div class="section-desc">Agents coordinate via stigmergic signals. No central controller — bees discover tasks, claim them, execute, and report back through CSL-scored channels.</div>
</div>
<div class="section-card" data-node="OBSERVER">
<div class="section-icon">◆</div>
<div class="section-title">One-Click Deploy</div>
<div class="section-desc">Deploy agents to Cloud Run (primary), Cloudflare Workers (edge), or Colab Pro+ (GPU). φ-stepped canary rollout: 5% → 25% → 50% → 100%.</div>
</div>
</section>
<section class="ecosystem">
<h2 style="background:linear-gradient(135deg,#00d4aa,#7c5eff);-webkit-background-clip:text;-webkit-text-fill-color:transparent;">
Heady™ Ecosystem
</h2>
<p style="text-align:center;color:var(--dim);font-size:13px;margin-bottom:34px;">
11 domains, one intelligence layer. Sign in once, access everything.
</p>
<div class="eco-grid">
<a href="https://headysystems.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#00d4aa;background:#00d4aa15;border-color:#00d4aa33;">HS</div>
<div>
<div class="eco-domain">headysystems.com</div>
<div class="eco-purpose">Corporate hub</div>
</div>
</a>
<a href="https://headyme.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#7c5eff;background:#7c5eff15;border-color:#7c5eff33;">HM</div>
<div>
<div class="eco-domain">headyme.com</div>
<div class="eco-purpose">Personal AI profiles</div>
</div>
</a>
<a href="https://headybuddy.org" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#f0c040;background:#f0c04015;border-color:#f0c04033;">HB</div>
<div>
<div class="eco-domain">headybuddy.com</div>
<div class="eco-purpose">AI companion portal</div>
</div>
</a>
<a href="https://headymcp.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#3b82f6;background:#3b82f615;border-color:#3b82f633;">MC</div>
<div>
<div class="eco-domain">headymcp.com</div>
<div class="eco-purpose">MCP tools</div>
</div>
</a>
<a href="https://headyio.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#22c55e;background:#22c55e15;border-color:#22c55e33;">IO</div>
<div>
<div class="eco-domain">headyio.com</div>
<div class="eco-purpose">Service integrations</div>
</div>
</a>
<a href="https://headyapi.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#06b6d4;background:#06b6d415;border-color:#06b6d433;">AP</div>
<div>
<div class="eco-domain">headyapi.com</div>
<div class="eco-purpose">API reference</div>
</div>
</a>
<a href="https://headylens.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#a855f7;background:#a855f715;border-color:#a855f733;">HL</div>
<div>
<div class="eco-domain">headylens.com</div>
<div class="eco-purpose">Visual AI tools</div>
</div>
</a>
<a href="https://heady-ai.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#ec4899;background:#ec489915;border-color:#ec489933;">AI</div>
<div>
<div class="eco-domain">heady-ai.com</div>
<div class="eco-purpose">Research papers</div>
</div>
</a>
<a href="https://headyfinance.com" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#eab308;background:#eab30815;border-color:#eab30833;">HF</div>
<div>
<div class="eco-domain">headyfinance.com</div>
<div class="eco-purpose">Financial tools</div>
</div>
</a>
<a href="https://headyconnection.org" class="eco-card" data-node="CONDUCTOR">
<div class="eco-icon" style="color:#14b8a6;background:#14b8a615;border-color:#14b8a633;">HC</div>
<div>
<div class="eco-domain">headyconnection.org</div>
<div class="eco-purpose">Non-profit arm</div>
</div>
</a>
</div>
</section>
<footer class="footer" data-node="CONDUCTOR">
© 2024-2026 HeadySystems Inc. & HeadyConnection Inc. · headybot.com<br>
Liquid Architecture v9.0 · 60+ Patents Filed · φ = 1.618 · ψ = 0.618<br>
<span style="color:var(--primary);">φ · ψ · ∞</span>
</footer>
<!-- HeadyBuddy Cross-Site Embed -->
<script src="/shared/buddy-embed.js" data-theme="dark" data-position="bottom-right" data-features="chat,tasks,memory" async></script>
<script>
// ── Sacred Geometry Background ──
(()=>{
const c=document.getElementById('sacred-bg');if(!c)return;
const x=c.getContext('2d');let w,h,t=0;
const PHI=1.618033988749895,PSI=1/PHI,FIB=[1,1,2,3,5,8,13,21,34,55,89];
const resize=()=>{w=c.width=innerWidth;h=c.height=innerHeight;};
resize();addEventListener('resize',resize);
const N=FIB[7],nodes=Array.from({length:N},()=>({
x:Math.random()*w,y:Math.random()*h,
vx:(Math.random()-.5)*PSI,vy:(Math.random()-.5)*PSI,
r:FIB[2+~~(Math.random()*4)]*PSI
}));
function draw(){
x.clearRect(0,0,w,h);t+=0.002;
nodes.forEach(n=>{
n.x+=n.vx+Math.sin(t*PHI+n.y*0.001)*0.2;
n.y+=n.vy+Math.cos(t*PSI+n.x*0.001)*0.2;
if(n.x<0)n.x=w;if(n.x>w)n.x=0;if(n.y<0)n.y=h;if(n.y>h)n.y=0;
});
const md=FIB[8]*PHI;x.lineWidth=0.4;
for(let i=0;i<N;i++)for(let j=i+1;j<N;j++){
const dx=nodes[i].x-nodes[j].x,dy=nodes[i].y-nodes[j].y,d=Math.sqrt(dx*dx+dy*dy);
if(d<md){x.globalAlpha=(1-d/md)*0.25;x.strokeStyle=i%2?'rgba(124,94,255,0.4)':'rgba(0,212,170,0.4)';
x.beginPath();x.moveTo(nodes[i].x,nodes[i].y);x.lineTo(nodes[j].x,nodes[j].y);x.stroke();}
}
nodes.forEach((n,i)=>{
x.globalAlpha=0.2+Math.sin(t*PHI+i)*0.1;
x.fillStyle=i%2?'rgba(124,94,255,0.5)':'rgba(0,212,170,0.5)';
x.beginPath();x.arc(n.x,n.y,n.r,0,Math.PI*2);x.fill();
});
x.globalAlpha=1;requestAnimationFrame(draw);
}
draw();
})();
// ── Storage Auth Handler ──
async function handleStorageAuth() {
try {
const resp = await fetch('https://auth.headysystems.com/api/auth/init', {
method: 'POST', credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
provider: 'google',
returnUrl: window.location.origin,
scopes: ['buddy', 'memory', 'sync'],
domain: window.location.hostname
}),
signal: AbortSignal.timeout(4236)
});
if (resp.ok) {
const data = await resp.json();
if (data.authUrl) window.location.href = data.authUrl;
}
} catch (e) {
alert('Auth service connecting... Please try again in a moment.');
}
}
</script>
<!-- HeadyBuddy Chat Widget -->
<script>
(function(){
var API="https://api.headysystems.com";
var s=document.createElement("div");s.id="heady-buddy-fab";
s.innerHTML='<div style="position:fixed;bottom:21px;right:21px;z-index:99999;"><button id="hb-toggle" style="width:55px;height:55px;border-radius:50%;background:linear-gradient(135deg,#A855F7,#6366F1);border:none;cursor:pointer;box-shadow:0 4px 21px rgba(168,85,247,0.4);display:flex;align-items:center;justify-content:center;transition:transform 0.3s cubic-bezier(0.618,0,0.382,1);" onmouseover="this.style.transform='scale(1.08)'" onmouseout="this.style.transform='scale(1)'"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/></svg></button><div id="hb-panel" style="display:none;position:absolute;bottom:70px;right:0;width:360px;max-height:500px;background:#0f0f1a;border:1px solid rgba(168,85,247,0.3);border-radius:13px;box-shadow:0 8px 34px rgba(0,0,0,0.6);overflow:hidden;font-family:system-ui,-apple-system,sans-serif;"><div style="padding:13px 16px;background:linear-gradient(135deg,#A855F7,#6366F1);color:white;font-weight:600;font-size:14px;display:flex;align-items:center;gap:8px;"><span style="font-size:18px;">🤖</span> HeadyBuddy<span style="margin-left:auto;font-size:11px;opacity:0.8;">AI Assistant</span></div><div id="hb-msgs" style="padding:13px;height:300px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;"><div style="background:rgba(168,85,247,0.15);color:#e2e8f0;padding:10px 13px;border-radius:13px 13px 13px 3px;font-size:13px;max-width:85%;">Hey! I'm HeadyBuddy. Ask me anything about the Heady ecosystem.</div></div><div style="padding:8px 13px 13px;border-top:1px solid rgba(255,255,255,0.05);display:flex;gap:8px;"><input id="hb-input" type="text" placeholder="Ask HeadyBuddy..." style="flex:1;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.1);border-radius:8px;padding:8px 12px;color:#f1f5f9;font-size:13px;outline:none;" /><button id="hb-send" style="background:linear-gradient(135deg,#A855F7,#6366F1);border:none;border-radius:8px;padding:8px 14px;color:white;cursor:pointer;font-size:13px;font-weight:500;">Send</button></div></div></div>';
document.body.appendChild(s);
var panel=document.getElementById("hb-panel"),msgs=document.getElementById("hb-msgs"),input=document.getElementById("hb-input");
document.getElementById("hb-toggle").onclick=function(){panel.style.display=panel.style.display==="none"?"block":"none";if(panel.style.display!=="none")input.focus();};
function addMsg(text,isUser){var d=document.createElement("div");d.style.cssText="padding:10px 13px;border-radius:13px;font-size:13px;max-width:85%;word-wrap:break-word;"+(isUser?"background:rgba(99,102,241,0.3);color:#e2e8f0;margin-left:auto;border-bottom-right-radius:3px;":"background:rgba(168,85,247,0.15);color:#e2e8f0;border-bottom-left-radius:3px;");d.textContent=text;msgs.appendChild(d);msgs.scrollTop=msgs.scrollHeight;}
function send(){var q=input.value.trim();if(!q)return;addMsg(q,true);input.value="";addMsg("Thinking...",false);var last=msgs.lastChild;
fetch(API+"/api/buddy/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:q,domain:location.hostname})}).then(function(r){return r.json();}).then(function(d){last.textContent=d.reply||d.response||d.text||"I can help you navigate the Heady ecosystem. Try asking about our products, API, or pricing.";}).catch(function(){last.textContent="I'm available at headybuddy.org for a full conversation. Check out our docs at headyio.com or API at headyapi.com.";});
}
document.getElementById("hb-send").onclick=send;
input.onkeydown=function(e){if(e.key==="Enter")send();};
})();
</script>
</body>
</html>