agentglow 0.2.12 → 0.3.1
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/dist/chunks/KitScene-DC6xid52.js +4562 -0
- package/dist/chunks/{index-ueGnGU_X.js → index-BDKoRpg-.js} +35 -35
- package/dist/chunks/{index-BM4W1tNM.js → index-BxCQhz1w.js} +1 -1
- package/dist/chunks/index-D_pLQJb9.js +48 -0
- package/dist/chunks/{index-Cj5cs1rS.js → index-Ddw88ax_.js} +1 -1
- package/dist/chunks/{index-BTFr1mn1.js → index-oEkhKSlb.js} +1 -1
- package/dist/chunks/{index-iZBODPwI.js → index-tr3L_z5e.js} +56 -56
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/AgentScene.d.ts +1 -1
- package/dist/types/world.d.ts +258 -0
- package/package.json +1 -1
- package/dist/chunks/KitScene-Cug87OSc.js +0 -3121
- package/dist/chunks/index-B0urBeRS.js +0 -48
|
@@ -6,9 +6,9 @@ import { EffectComposer as Vt, Bloom as zt, Vignette as Gt } from "@react-three/
|
|
|
6
6
|
import { useRef as R, useMemo as z, useEffect as Et, useState as Ft } from "react";
|
|
7
7
|
import * as t from "three";
|
|
8
8
|
import { useFrame as ve } from "@react-three/fiber";
|
|
9
|
-
import { T as bt, m as Mt, w as j, L as Ie, d as Rt, a as
|
|
9
|
+
import { T as bt, m as Mt, w as j, L as Ie, d as Rt, a as Se, c as ut, h as Ce, l as Bt, F as It, p as Ot, e as Tt, f as Ae, s as Lt, S as $e, y as _t, R as Nt, j as Ut, o as be, u as Xt, E as Ht, v as Kt, K as jt, q as qt, G as Yt, t as Wt, n as $t } from "./KitScene-DC6xid52.js";
|
|
10
10
|
var wt;
|
|
11
|
-
const q = typeof window < "u" && !!((wt = window.matchMedia) != null && wt.call(window, "(prefers-reduced-motion: reduce)").matches), ft = new t.Color("#3db8ff"),
|
|
11
|
+
const q = typeof window < "u" && !!((wt = window.matchMedia) != null && wt.call(window, "(prefers-reduced-motion: reduce)").matches), ft = new t.Color("#3db8ff"), Me = new t.Color("#9fdcff"), Xe = new t.Color("#ff4fa8"), pt = new t.Color("#ff9ccf"), ne = new t.Color(1, 1, 1), Fe = new t.Color("#ffc24a"), Dt = new t.Color("#ff2d55"), Zt = new t.Color("#3a4560"), ct = Object.fromEntries(Object.entries(bt).map(([e, r]) => [e, new t.Color(r)])), W = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ke = (e) => 1 - Math.pow(1 - W(e), 3), Be = (e) => (e = W(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2);
|
|
12
12
|
let Le = null;
|
|
13
13
|
function kt() {
|
|
14
14
|
if (Le) return Le;
|
|
@@ -250,7 +250,7 @@ function io() {
|
|
|
250
250
|
const c = performance.now(), p = q ? 0 : i.elapsedTime;
|
|
251
251
|
e.begin(), a.begin();
|
|
252
252
|
const { a: b, b: h, c: G, p: E, col: v, k: A } = n, V = (f, g, x, s) => {
|
|
253
|
-
const S =
|
|
253
|
+
const S = Se(f), T = j.mcpServers.get(g), y = ut(g);
|
|
254
254
|
if (!S || !T || !y) return;
|
|
255
255
|
b.copy(S), h.copy(y), je(b, h, 1.2, G), v.set(T.color);
|
|
256
256
|
let I;
|
|
@@ -276,7 +276,7 @@ function io() {
|
|
|
276
276
|
let l = 0;
|
|
277
277
|
for (const f of j.mcpCalls) {
|
|
278
278
|
if (f.phase !== "call" || l >= Je) continue;
|
|
279
|
-
const g =
|
|
279
|
+
const g = Se(f.instance), x = j.mcpServers.get(f.server), s = ut(f.server), S = u.current[l], T = W((c - f.start) / f.dur);
|
|
280
280
|
!g || !x || !s || !S || T >= 1 || (b.copy(g), h.copy(s), je(b, h, 1.2, G), ce(b, G, h, Be(T), E), S.visible = !0, S.position.copy(E), S.scale.setScalar(0.85), o[l].color.set(x.color).lerp(ne, 0.4).multiplyScalar(1.5), l++);
|
|
281
281
|
}
|
|
282
282
|
for (let f = l; f < Je; f++) u.current[f] && (u.current[f].visible = !1);
|
|
@@ -307,7 +307,7 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
307
307
|
shell: ue(A),
|
|
308
308
|
halo: D(A),
|
|
309
309
|
ring: ue(Fe),
|
|
310
|
-
sel: ue(
|
|
310
|
+
sel: ue(Me),
|
|
311
311
|
flash: D("#fff"),
|
|
312
312
|
arrow: ue(A),
|
|
313
313
|
field: xt(A, V ? 0.028 : 0.04),
|
|
@@ -333,11 +333,11 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
333
333
|
ringK: 0,
|
|
334
334
|
linkK: 0,
|
|
335
335
|
labelK: 1,
|
|
336
|
-
seed:
|
|
337
|
-
dir:
|
|
336
|
+
seed: Ce(o.id, 3),
|
|
337
|
+
dir: Ce(o.id, 4) < 0.5 ? 1 : -1,
|
|
338
338
|
// shell plane: tilt toward the viewer (seeded per agent) -> classic atom-logo ellipses
|
|
339
|
-
tilt: 0.35 +
|
|
340
|
-
lean: 0.45 +
|
|
339
|
+
tilt: 0.35 + Ce(o.id, 5) * 0.25,
|
|
340
|
+
lean: 0.45 + Ce(o.id, 6) * 0.25
|
|
341
341
|
}),
|
|
342
342
|
[o]
|
|
343
343
|
), S = (y, I) => I.copy(s.n).addScaledVector(s.a, Math.cos(y)).addScaledVector(s.b, Math.sin(y));
|
|
@@ -345,7 +345,7 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
345
345
|
var me, oe, ie, Te, de;
|
|
346
346
|
const L = performance.now(), w = y.elapsedTime, P = o.exitAt ? (L - o.exitAt) / 1e3 / (Bt(o) / It) : -1, B = P >= 0 ? W(P / 0.8) : 0, _ = P > 0 ? P : 0;
|
|
347
347
|
if (V) {
|
|
348
|
-
const F = 0.32 *
|
|
348
|
+
const F = 0.32 * Ae.spread;
|
|
349
349
|
s.n.copy(e.pos), s.a.set(F, 0, 0), s.b.set(0, F * 0.45, F * 0.6);
|
|
350
350
|
} else {
|
|
351
351
|
const F = Pe.get(e.run.id) ?? e.run.origin;
|
|
@@ -359,7 +359,7 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
359
359
|
S(H, e.live), m !== 1 && e.live.sub(s.n).multiplyScalar(m).add(s.n);
|
|
360
360
|
const C = Ke((L - o.bornAt) / 1100);
|
|
361
361
|
if (C < 1) {
|
|
362
|
-
const F = o.parent ?
|
|
362
|
+
const F = o.parent ? Se(o.parent) : void 0;
|
|
363
363
|
F ? (s.from.copy(F), s.fromSet = !0) : s.fromSet || (s.from.copy(s.n), s.fromSet = !0), e.live.lerpVectors(s.from, e.live, V ? C : 0.3 + 0.7 * C);
|
|
364
364
|
}
|
|
365
365
|
const N = e.live;
|
|
@@ -370,7 +370,7 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
370
370
|
const Oe = q ? 0.5 : 0.5 + 0.5 * Math.sin(w * (J ? 6 : 1.6) + s.seed * 30);
|
|
371
371
|
o.llmCalls !== s.llm && (s.llm = o.llmCalls, P < 0 && po(N, Pe.get(e.run.id) ?? e.run.origin, o.pulse, A, s.seed + o.llmCalls * 0.37));
|
|
372
372
|
const se = e.scale, pe = Ke((L - o.bornAt) / 700), We = 0.3 * se * pe * (1 - B * 0.9) * (1 + re * 0.12);
|
|
373
|
-
if ((oe = n.current) == null || oe.scale.setScalar(Math.max(1e-4, We)), s.c.copy(A).multiplyScalar((J ? 1 + Oe * 0.4 : 0.55 + Oe * 0.15) + re * 0.5), P >= 0 && s.c.lerp(Zt, B), l.shell.color.copy(s.c), l.core.color.setScalar((J ? 0.9 : 0.45) * (1 - B) + re * 0.4), i.current && (i.current.scale.setScalar(Math.max(1e-4, (J ? 2.4 : 1.7) * se * pe * (1 - B * 0.7) + re * 0.9 *
|
|
373
|
+
if ((oe = n.current) == null || oe.scale.setScalar(Math.max(1e-4, We)), s.c.copy(A).multiplyScalar((J ? 1 + Oe * 0.4 : 0.55 + Oe * 0.15) + re * 0.5), P >= 0 && s.c.lerp(Zt, B), l.shell.color.copy(s.c), l.core.color.setScalar((J ? 0.9 : 0.45) * (1 - B) + re * 0.4), i.current && (i.current.scale.setScalar(Math.max(1e-4, (J ? 2.4 : 1.7) * se * pe * (1 - B * 0.7) + re * 0.9 * Ae.scale)), l.halo.color.copy(A).multiplyScalar(((J ? 0.32 : 0.16) + re * 0.25) * K)), b.current) {
|
|
374
374
|
const F = P >= 0 && P < 0.9 ? 1 - P / 0.9 : 0;
|
|
375
375
|
b.current.visible = F > 0, b.current.scale.setScalar(Math.max(1e-4, se * (1.2 + (1 - F) * 3.5))), l.flash.color.copy(o.status === "failed" ? Fe : ne).multiplyScalar(F * F * 0.9);
|
|
376
376
|
}
|
|
@@ -383,19 +383,19 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
383
383
|
const $ = H - s.dir * (F / (Ge - 1)) * O;
|
|
384
384
|
S($, s.p), m !== 1 && s.p.sub(s.n).multiplyScalar(m).add(s.n), C < 1 && s.p.lerpVectors(s.from, s.p, V ? C : 0.3 + 0.7 * C), Z.setXYZ(F, s.p.x, s.p.y, s.p.z);
|
|
385
385
|
const ze = Math.pow(1 - F / (Ge - 1), 1.8) * X;
|
|
386
|
-
M.setXYZ(F, (P >= 0 ?
|
|
386
|
+
M.setXYZ(F, (P >= 0 ? Me.r : A.r) * ze, (P >= 0 ? Me.g : A.g) * ze, (P >= 0 ? Me.b : A.b) * ze);
|
|
387
387
|
}
|
|
388
388
|
Z.needsUpdate = !0, M.needsUpdate = !0;
|
|
389
|
-
const Q = o.parent ?
|
|
389
|
+
const Q = o.parent ? Se(o.parent) : void 0, ee = o.parent ? j.instances.get(o.parent) : void 0, ae = !!Q && !!ee && !ee.exitAt && !o.exitAt;
|
|
390
390
|
s.linkK += ((ae ? 1 : 0) - s.linkK) * (ae ? 0.06 : 0.05), Q && s.par.copy(Q);
|
|
391
391
|
const te = l.field.uniforms;
|
|
392
|
-
te.uP0.value.copy(s.par), te.uP2.value.copy(N),
|
|
392
|
+
te.uP0.value.copy(s.par), te.uP2.value.copy(N), je(s.par, N, V ? 0.3 : 1.4, s.ctrl), te.uP1.value.copy(s.ctrl);
|
|
393
393
|
const ge = Be((L - o.bornAt) / 900);
|
|
394
394
|
if (te.uGrow.value = o.parent && s.linkK > 0.01 ? ge : 0, te.uOpacity.value = (J ? 0.7 : 0.45) * s.linkK, te.uFlow.value = s.linkK, te.uTime.value = q ? 0 : w, te.uHead.value = ge < 1 ? ge : -1, h.current) {
|
|
395
395
|
const F = o.parent && s.linkK > 0.05 && ge >= 1;
|
|
396
396
|
if (h.current.visible = !!F, F) {
|
|
397
397
|
ce(s.par, s.ctrl, N, 0.74, et), ce(s.par, s.ctrl, N, 0.8, vt), h.current.position.copy(et), Ee.subVectors(vt, et), Ee.lengthSq() > 1e-8 && h.current.quaternion.setFromUnitVectors(lo, Ee.normalize());
|
|
398
|
-
const $ = (V ? 0.11 : 0.15) * Math.min(1.3,
|
|
398
|
+
const $ = (V ? 0.11 : 0.15) * Math.min(1.3, Ae.scale);
|
|
399
399
|
h.current.scale.set($, $ * 2.6, $), l.arrow.color.copy(A).multiplyScalar(1.5 * s.linkK);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -444,11 +444,11 @@ function mo({ agent: e, selected: r, onSelect: a }) {
|
|
|
444
444
|
] })
|
|
445
445
|
] });
|
|
446
446
|
}
|
|
447
|
-
const
|
|
447
|
+
const xe = 36, gt = 1.5;
|
|
448
448
|
function ho() {
|
|
449
449
|
const e = z(() => {
|
|
450
450
|
const n = new t.BufferGeometry();
|
|
451
|
-
return n.setAttribute("position", new t.BufferAttribute(new Float32Array(Re *
|
|
451
|
+
return n.setAttribute("position", new t.BufferAttribute(new Float32Array(Re * xe * 6), 3)), n.setAttribute("color", new t.BufferAttribute(new Float32Array(Re * xe * 6), 3)), n.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), n;
|
|
452
452
|
}, []), r = z(() => fe("#fff", !0), []), a = z(() => it.map(() => D("#fff")), []), o = R([]), u = z(() => new t.Vector3(), []);
|
|
453
453
|
return ve(() => {
|
|
454
454
|
const n = performance.now(), i = e.getAttribute("position"), c = e.getAttribute("color");
|
|
@@ -463,17 +463,17 @@ function ho() {
|
|
|
463
463
|
const g = Math.max(0, 1 - E / 0.55);
|
|
464
464
|
G.visible = g > 0, G.position.copy(h.o), G.scale.setScalar(Math.max(1e-4, (0.8 + h.size * 1.5) * (0.6 + (1 - g) * 0.8))), a[b].color.copy(h.c).multiplyScalar(g * g * 1.1);
|
|
465
465
|
}
|
|
466
|
-
const v = 1 - E / gt, A = 0.4 + E * 7.5, V = 1.2 + h.size * 1.1, l = 0.1 + h.size * 0.07, f = p *
|
|
467
|
-
for (let g = 0; g <
|
|
466
|
+
const v = 1 - E / gt, A = 0.4 + E * 7.5, V = 1.2 + h.size * 1.1, l = 0.1 + h.size * 0.07, f = p * xe * 2;
|
|
467
|
+
for (let g = 0; g < xe; g++)
|
|
468
468
|
for (let x = 0; x < 2; x++) {
|
|
469
|
-
const s = (g + x) /
|
|
469
|
+
const s = (g + x) / xe, S = Math.max(0, A - V * (1 - s)), T = Math.sin(Math.PI * s), y = Math.sin(s * Math.PI * 2 * (3 + h.size)) * l * T;
|
|
470
470
|
u.copy(h.o).addScaledVector(h.dir, S).addScaledVector(h.perp, y), i.setXYZ(f + g * 2 + x, u.x, u.y, u.z);
|
|
471
471
|
const I = T * v * 1.4;
|
|
472
472
|
c.setXYZ(f + g * 2 + x, h.c.r * I, h.c.g * I, h.c.b * I);
|
|
473
473
|
}
|
|
474
474
|
p++;
|
|
475
475
|
}
|
|
476
|
-
e.setDrawRange(0, p *
|
|
476
|
+
e.setDrawRange(0, p * xe * 2), i.needsUpdate = !0, c.needsUpdate = !0;
|
|
477
477
|
}), /* @__PURE__ */ Y(he, { children: [
|
|
478
478
|
/* @__PURE__ */ d("lineSegments", { geometry: e, material: r, frustumCulled: !1 }),
|
|
479
479
|
a.map((n, i) => /* @__PURE__ */ d("sprite", { ref: (c) => void (o.current[i] = c), material: n, visible: !1 }, i))
|
|
@@ -487,13 +487,13 @@ function vo() {
|
|
|
487
487
|
let u = 0;
|
|
488
488
|
for (const n of j.comets) {
|
|
489
489
|
if (u >= ot) break;
|
|
490
|
-
const i =
|
|
490
|
+
const i = Se(n.from), c = Se(n.to), p = r.current[u];
|
|
491
491
|
if (!i || !c || !p) continue;
|
|
492
492
|
const b = W((o - n.start) / n.dur);
|
|
493
493
|
if (b >= 1) continue;
|
|
494
494
|
je(i, c, 1, a.c), ce(i, a.c, c, Be(b), a.h), p.visible = !0, p.position.copy(a.h), p.scale.setScalar(0.9);
|
|
495
495
|
const h = j.instances.get(n.from);
|
|
496
|
-
e[u].color.copy(h ? ct[h.type] :
|
|
496
|
+
e[u].color.copy(h ? ct[h.type] : Me).lerp(ne, 0.4).multiplyScalar(1.4 * Math.sin(Math.PI * b) + 0.2), u++;
|
|
497
497
|
}
|
|
498
498
|
for (let n = u; n < ot; n++) r.current[n] && (r.current[n].visible = !1);
|
|
499
499
|
}), /* @__PURE__ */ d(he, { children: e.map((o, u) => /* @__PURE__ */ d("sprite", { ref: (n) => void (r.current[u] = n), material: o, visible: !1 }, u)) });
|
|
@@ -526,9 +526,9 @@ void main(){
|
|
|
526
526
|
), nt = new t.Vector3();
|
|
527
527
|
function Mo(e, r) {
|
|
528
528
|
let a = 0, o = 0, u = 0, n = 1 / 0;
|
|
529
|
-
for (const p of
|
|
529
|
+
for (const p of be.agents.values())
|
|
530
530
|
p.run === e && (p.depth === 0 ? (a++, o += p.eu, u += p.ev) : n = Math.min(n, p.ev));
|
|
531
|
-
const i = 2.1 *
|
|
531
|
+
const i = 2.1 * Ae.spread;
|
|
532
532
|
if (!a) {
|
|
533
533
|
r.u = e.cu, r.v = n < 1 / 0 ? n - i : e.cv;
|
|
534
534
|
return;
|
|
@@ -552,7 +552,7 @@ function So({ run: e }) {
|
|
|
552
552
|
for (let l = 0; l < we; l++) {
|
|
553
553
|
const f = 0.36 * Math.cbrt(1 - l / we), g = 1 - 2 * (l + 0.5) / we, x = Math.sqrt(1 - g * g);
|
|
554
554
|
A.set([Math.cos(l * V) * x * f, g * f, Math.sin(l * V) * x * f], l * 3);
|
|
555
|
-
const s = (
|
|
555
|
+
const s = (Ce(e.id, 40 + l) < 0.5 ? Xe : ft).clone().lerp(ne, 0.08 + Ce(e.id, 80 + l) * 0.12).multiplyScalar(0.9);
|
|
556
556
|
G.setXYZ(l, s.r, s.g, s.b);
|
|
557
557
|
}
|
|
558
558
|
return { mesh: v, mat: E, pos: A, o: new t.Object3D() };
|
|
@@ -568,7 +568,7 @@ function So({ run: e }) {
|
|
|
568
568
|
var L;
|
|
569
569
|
const G = performance.now(), E = h.elapsedTime, v = e.run ?? j.runs.get(e.id);
|
|
570
570
|
Mo(e, rt), _t(e, rt.u, rt.v, nt), o.init ? r.lerp(nt, 0.12) : (r.copy(nt), o.init = !0);
|
|
571
|
-
const A = Math.max(0.6,
|
|
571
|
+
const A = Math.max(0.6, Ae.scale), V = v ? Ke((G - v.startedAt) / 1200) : 1, l = v != null && v.endedAt ? W(1 - (G - v.endedAt - (Nt - 2600)) / 2600) : 1, f = (v == null ? void 0 : v.status) === "started" ? 1 : 0.6;
|
|
572
572
|
c.current && (c.current.position.copy(r), c.current.scale.setScalar(Math.max(1e-4, A * (0.4 + 0.6 * V) * (0.6 + 0.4 * l))));
|
|
573
573
|
const { mesh: g, mat: x, pos: s, o: S } = u, T = q ? 0 : 0.02;
|
|
574
574
|
for (let w = 0; w < we; w++)
|
|
@@ -582,10 +582,10 @@ function So({ run: e }) {
|
|
|
582
582
|
const B = Ut(v, w), _ = w / 3 * Math.PI * 2 + (q ? 0 : E * 0.35);
|
|
583
583
|
P.position.set(Math.cos(_) * 0.72, Math.sin(_) * 0.72 * 0.42, Math.sin(_) * 0.3);
|
|
584
584
|
const U = 0.5 + 0.5 * Math.sin(E * 4);
|
|
585
|
-
P.scale.setScalar(B === "running" ? 1.25 + U * 0.3 : 1), P.rotation.y = q ? 0 : E * 0.8, i.beads[w].color.copy(B === "running" ? Fe : B === "done" ?
|
|
585
|
+
P.scale.setScalar(B === "running" ? 1.25 + U * 0.3 : 1), P.rotation.y = q ? 0 : E * 0.8, i.beads[w].color.copy(B === "running" ? Fe : B === "done" ? Me : B === "failed" ? Xe : n).multiplyScalar((B === "queued" ? 0.35 : B === "running" ? 1.2 + U * 0.6 : 0.9) * l);
|
|
586
586
|
}
|
|
587
587
|
let I = r.y + 0.95 * A;
|
|
588
|
-
for (const w of
|
|
588
|
+
for (const w of be.agents.values()) w.run === e && w.live.y + 0.95 * w.scale + 0.45 > I && (I = w.live.y + 0.95 * w.scale + 0.45);
|
|
589
589
|
o.topY = o.topSet ? o.topY + (I - o.topY) * 0.12 : I, o.topSet = !0, a.set(r.x, o.topY, 0.5), (L = b.current) == null || L.position.copy(a);
|
|
590
590
|
}), /* @__PURE__ */ Y(he, { children: [
|
|
591
591
|
/* @__PURE__ */ Y("group", { ref: c, scale: 1e-4, children: [
|
|
@@ -702,7 +702,7 @@ function Fo({ galaxy: e }) {
|
|
|
702
702
|
n.begin(), i.begin();
|
|
703
703
|
let N = 0;
|
|
704
704
|
for (const M of j.flares) {
|
|
705
|
-
const O = V(M.node), X = (x - M.start) / 1e3, Q = j.instances.get(M.instance), ee = M.op === "write", ae = ee ? pt : Q ? ct[Q.type] :
|
|
705
|
+
const O = V(M.node), X = (x - M.start) / 1e3, Q = j.instances.get(M.instance), ee = M.op === "write", ae = ee ? pt : Q ? ct[Q.type] : Me, te = X < 0.3 ? X / 0.3 : Math.exp(-(X - 0.3) * 1.3);
|
|
706
706
|
if (te > y[O] && (y[O] = te, I[O].copy(ee ? ne : ae)), ee && X < 1.6 && N < at) {
|
|
707
707
|
const oe = c.current[N];
|
|
708
708
|
if (oe) {
|
|
@@ -711,7 +711,7 @@ function Fo({ galaxy: e }) {
|
|
|
711
711
|
}
|
|
712
712
|
N++;
|
|
713
713
|
}
|
|
714
|
-
const ge =
|
|
714
|
+
const ge = Se(M.instance), me = ge ? qt(ge, A.sp) : void 0;
|
|
715
715
|
if (me && X < 2) {
|
|
716
716
|
const oe = n.next();
|
|
717
717
|
if (oe < 0) continue;
|
|
@@ -741,7 +741,7 @@ function Fo({ galaxy: e }) {
|
|
|
741
741
|
J.setXYZ(M, X.r * 0.22 + O * 0.5, X.g * 0.22 + O * 0.5, X.b * 0.22 + O * 0.55);
|
|
742
742
|
}
|
|
743
743
|
J.needsUpdate = !0;
|
|
744
|
-
const Ve = f, se = 30 * Math.max(1, Ve.position.distanceTo(
|
|
744
|
+
const Ve = f, se = 30 * Math.max(1, Ve.position.distanceTo(be.graph.pos)) * Math.tan(Ve.fov * Math.PI / 360) / Math.max(1, g.height) / Math.max(0.05, be.graph.scale), pe = be.graph.out.x < -0.5 ? "right" : be.graph.out.x > 0.5 ? "left" : G;
|
|
745
745
|
pe !== G && E(pe);
|
|
746
746
|
const We = (pe === "right" ? -1 : 1) * (le + 0.3);
|
|
747
747
|
let Z = 0;
|
|
@@ -790,9 +790,9 @@ function Ro() {
|
|
|
790
790
|
}
|
|
791
791
|
const Bo = new t.Vector3();
|
|
792
792
|
function Io(e) {
|
|
793
|
-
for (const r of
|
|
793
|
+
for (const r of be.runs.values()) {
|
|
794
794
|
const a = Pe.get(r.id);
|
|
795
|
-
a && e(a, 0.8 * Math.max(0.6,
|
|
795
|
+
a && e(a, 0.8 * Math.max(0.6, Ae.scale));
|
|
796
796
|
const o = He.get(r.id);
|
|
797
797
|
o && e(Bo.set(o.x, o.y + 0.5, o.z), 1.2);
|
|
798
798
|
}
|
|
@@ -4,7 +4,7 @@ import { EffectComposer as Ke, Bloom as Qe, Vignette as Je, Noise as et } from "
|
|
|
4
4
|
import { useFrame as N } from "@react-three/fiber";
|
|
5
5
|
import { useRef as A, useMemo as R, useEffect as tt, useState as De } from "react";
|
|
6
6
|
import * as e from "three";
|
|
7
|
-
import { h as oe, i as nt, T as le, f as ot, a as Z, p as rt, e as st, l as at, s as ct, L as ue, w as T, K as it, G as lt, m as Fe, b as Q, c as Re, d as ut, g as Me, S as ye, R as pt, j as ft, u as dt, k as mt, n as ht } from "./KitScene-
|
|
7
|
+
import { h as oe, i as nt, T as le, f as ot, a as Z, p as rt, e as st, l as at, s as ct, L as ue, w as T, K as it, G as lt, m as Fe, b as Q, c as Re, d as ut, g as Me, S as ye, R as pt, j as ft, u as dt, k as mt, n as ht } from "./KitScene-DC6xid52.js";
|
|
8
8
|
var Ye;
|
|
9
9
|
const F = typeof window < "u" && !!((Ye = window.matchMedia) != null && Ye.call(window, "(prefers-reduced-motion: reduce)").matches), _e = Math.PI * 2, Ge = [Math.PI * 0.5, Math.PI * 0.5 + _e / 3, Math.PI * 0.5 + _e * 2 / 3], Ve = nt, yt = (t) => (oe(t, 11) - 0.5) * 2.4, V = {
|
|
10
10
|
/** the galaxy's inner (tilted) group; its matrixWorld includes the kit's side placement + scale */
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as b, useContext as v, useMemo as w, Suspense as S, lazy as A } from "react";
|
|
3
|
+
const m = (e) => (e ?? "").trim().replace(/\/+$/, "");
|
|
4
|
+
function C() {
|
|
5
|
+
var t, o;
|
|
6
|
+
const e = typeof location > "u" ? new URLSearchParams() : new URLSearchParams(location.search), n = (a) => e.has(a) && !["0", "false", "no"].includes(e.get(a).toLowerCase());
|
|
7
|
+
return {
|
|
8
|
+
source: m(e.get("source")),
|
|
9
|
+
sim: ((t = e.get("sim")) == null ? void 0 : t.toLowerCase()) === "hf" ? "hf" : n("sim"),
|
|
10
|
+
hud: e.get("hud") === null ? !0 : n("hud"),
|
|
11
|
+
embedded: !1,
|
|
12
|
+
run: ((o = e.get("run")) == null ? void 0 : o.trim()) || void 0
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const d = b(null), E = d.Provider;
|
|
16
|
+
function F() {
|
|
17
|
+
return v(d) ?? C();
|
|
18
|
+
}
|
|
19
|
+
const L = ["neural", "constellation", "orbit", "atom", "flow"], T = {
|
|
20
|
+
orbit: { name: "Orbit", tagline: "Agents orbit a graph galaxy; runs are rings, MCP servers are satellites." },
|
|
21
|
+
neural: { name: "Neural", tagline: "A living brain: agents fire as neurons, messages pulse along synapses." },
|
|
22
|
+
flow: { name: "Flow", tagline: "A murmuration: agents condense as eddies out of the current." },
|
|
23
|
+
constellation: { name: "Constellation", tagline: "A night sky: agents are stars linked into constellations as they delegate." },
|
|
24
|
+
atom: { name: "Atom", tagline: "An atom: agents are electrons in shells, subagents jump orbits, LLM calls flash photons." }
|
|
25
|
+
}, M = {
|
|
26
|
+
orbit: () => import("./index-BxCQhz1w.js"),
|
|
27
|
+
neural: () => import("./index-tr3L_z5e.js"),
|
|
28
|
+
flow: () => import("./index-Ddw88ax_.js"),
|
|
29
|
+
constellation: () => import("./index-oEkhKSlb.js"),
|
|
30
|
+
atom: () => import("./index-BDKoRpg-.js")
|
|
31
|
+
}, g = /* @__PURE__ */ new Map();
|
|
32
|
+
function x(e) {
|
|
33
|
+
let n = g.get(e);
|
|
34
|
+
return n || g.set(e, n = A(M[e])), n;
|
|
35
|
+
}
|
|
36
|
+
function H({ theme: e = "neural", source: n = "", hud: t = !0, sim: o = !1, scope: a, run: r, token: l, style: f, className: i }) {
|
|
37
|
+
const c = L.includes(e) ? e : "neural", h = x(c), u = m(n), p = w(
|
|
38
|
+
() => ({ source: u, sim: o, hud: t, embedded: !0, scope: a || void 0, run: r || void 0, token: l || void 0 }),
|
|
39
|
+
[u, o, t, a, r, l]
|
|
40
|
+
);
|
|
41
|
+
return /* @__PURE__ */ s("div", { className: `agentglow-embed${i ? ` ${i}` : ""}`, style: f, "data-theme": c, children: /* @__PURE__ */ s(E, { value: p, children: /* @__PURE__ */ s(S, { fallback: null, children: /* @__PURE__ */ s(h, {}) }) }) });
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
H as A,
|
|
45
|
+
L as T,
|
|
46
|
+
T as a,
|
|
47
|
+
F as u
|
|
48
|
+
};
|
|
@@ -6,7 +6,7 @@ import { useFrame as nt, useThree as Me } from "@react-three/fiber";
|
|
|
6
6
|
import { EffectComposer as ye, Bloom as Ae, Vignette as be, Noise as we } from "@react-three/postprocessing";
|
|
7
7
|
import { useMemo as mt, useRef as V, useEffect as St } from "react";
|
|
8
8
|
import * as M from "three";
|
|
9
|
-
import { r as xe, w as W, m as Yt, K as Re, x as Se, f as st, o as Z, y as le, z as he, R as Ge, d as oe, p as ve, e as ze, j as Bt, c as Dt, T as fe, i as Ce, n as Ie, G as Pe, L as yt, u as Fe, S as Be, A as Oe, B as Ee, k as Te } from "./KitScene-
|
|
9
|
+
import { r as xe, w as W, m as Yt, K as Re, x as Se, f as st, o as Z, y as le, z as he, R as Ge, d as oe, p as ve, e as ze, j as Bt, c as Dt, T as fe, i as Ce, n as Ie, G as Pe, L as yt, u as Fe, S as Be, A as Oe, B as Ee, k as Te } from "./KitScene-DC6xid52.js";
|
|
10
10
|
const Ct = 32, It = new M.Vector3(), Ut = new M.Vector3(), wt = new M.Vector3(), xt = new M.Color(), _e = new M.Color(1, 1, 1);
|
|
11
11
|
function ke(f, e, a, r, s) {
|
|
12
12
|
let o = null;
|
|
@@ -4,7 +4,7 @@ var L = (e, n, r) => at(e, typeof n != "symbol" ? n + "" : n, r);
|
|
|
4
4
|
import { jsxs as q, Fragment as de, jsx as g } from "react/jsx-runtime";
|
|
5
5
|
import { EffectComposer as it, Bloom as ct, Vignette as lt } from "@react-three/postprocessing";
|
|
6
6
|
import * as t from "three";
|
|
7
|
-
import { T as We, h as X, K as ft, o as je, w as N, a as ce, x as ut, C as dt, L as ye, G as pt, t as ht, m as tt, c as qe, d as mt, D as Ye, R as vt, u as gt, v as bt, e as wt, s as yt, f as Ve, n as St } from "./KitScene-
|
|
7
|
+
import { T as We, h as X, K as ft, o as je, w as N, a as ce, x as ut, C as dt, L as ye, G as pt, t as ht, m as tt, c as qe, d as mt, D as Ye, R as vt, u as gt, v as bt, e as wt, s as yt, f as Ve, n as St } from "./KitScene-DC6xid52.js";
|
|
8
8
|
import { useThree as Re, useFrame as se } from "@react-three/fiber";
|
|
9
9
|
import { useMemo as P, useRef as T, useEffect as Mt } from "react";
|
|
10
10
|
var et;
|