agentglow 0.2.9 → 0.2.11

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.
Files changed (28) hide show
  1. package/dist/chunks/{KitScene-Bm1I35Zc.js → KitScene-DG_pcnWW.js} +1273 -1195
  2. package/dist/chunks/{index-COLbf8XM.js → index-Agh7jdYu.js} +182 -182
  3. package/dist/chunks/{index-CGTp73GN.js → index-B2EHxcBQ.js} +400 -400
  4. package/dist/chunks/{index-D-r9aJ4u.js → index-B4Cqo621.js} +33 -33
  5. package/dist/chunks/index-BfQsJ0TH.js +751 -0
  6. package/dist/chunks/index-BmBGYhJS.js +891 -0
  7. package/dist/chunks/index-Bnn-x-aE.js +767 -0
  8. package/dist/chunks/{index-BWsSd_Wm.js → index-CTQTtm9q.js} +212 -212
  9. package/dist/chunks/{index-_IwfbZy7.js → index-CTZbUTDY.js} +62 -62
  10. package/dist/chunks/{index-cRPj-lzn.js → index-CdKvybsL.js} +284 -284
  11. package/dist/chunks/index-CeiIEWek.js +818 -0
  12. package/dist/chunks/{index-D4Wlmsay.js → index-Ci8tSMhc.js} +15 -15
  13. package/dist/chunks/{index-C2vLpNCb.js → index-Cls_VZdb.js} +100 -100
  14. package/dist/chunks/index-DFFRhihO.js +892 -0
  15. package/dist/chunks/index-DMCETM4H.js +605 -0
  16. package/dist/chunks/{index-AugvjZJN.js → index-URn4zDHp.js} +223 -223
  17. package/dist/chunks/index-u4rYZ1UO.js +495 -0
  18. package/dist/index.js +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/world.d.ts +30 -5
  21. package/package.json +1 -1
  22. package/dist/chunks/index-BAQDf-0T.js +0 -492
  23. package/dist/chunks/index-BRnLrSfZ.js +0 -605
  24. package/dist/chunks/index-CKyn9lcT.js +0 -753
  25. package/dist/chunks/index-CnoB0ZDk.js +0 -889
  26. package/dist/chunks/index-KmczAvvY.js +0 -818
  27. package/dist/chunks/index-Z4vdWCok.js +0 -763
  28. package/dist/chunks/index-uZGu9jzU.js +0 -887
@@ -33,21 +33,21 @@ const M = ["orbit", "neural", "subway", "city", "ocean", "circuit", "tunnel", "f
33
33
  mycelium: { name: "Mycelium", tagline: "A fungal network: agents bloom as fruiting bodies on spreading glowing threads." },
34
34
  atom: { name: "Atom", tagline: "An atom: agents are electrons in shells, subagents jump orbits, LLM calls flash photons." }
35
35
  }, k = {
36
- orbit: () => import("./index-BAQDf-0T.js"),
37
- neural: () => import("./index-_IwfbZy7.js"),
38
- subway: () => import("./index-BRnLrSfZ.js"),
39
- city: () => import("./index-uZGu9jzU.js"),
40
- ocean: () => import("./index-KmczAvvY.js"),
41
- circuit: () => import("./index-Z4vdWCok.js"),
42
- tunnel: () => import("./index-CKyn9lcT.js"),
43
- flow: () => import("./index-CnoB0ZDk.js"),
44
- hive: () => import("./index-C2vLpNCb.js"),
45
- forest: () => import("./index-cRPj-lzn.js"),
46
- constellation: () => import("./index-D-r9aJ4u.js"),
47
- factory: () => import("./index-CGTp73GN.js"),
48
- airport: () => import("./index-BWsSd_Wm.js"),
49
- mycelium: () => import("./index-COLbf8XM.js"),
50
- atom: () => import("./index-AugvjZJN.js")
36
+ orbit: () => import("./index-u4rYZ1UO.js"),
37
+ neural: () => import("./index-CTZbUTDY.js"),
38
+ subway: () => import("./index-DMCETM4H.js"),
39
+ city: () => import("./index-BmBGYhJS.js"),
40
+ ocean: () => import("./index-CeiIEWek.js"),
41
+ circuit: () => import("./index-Bnn-x-aE.js"),
42
+ tunnel: () => import("./index-BfQsJ0TH.js"),
43
+ flow: () => import("./index-DFFRhihO.js"),
44
+ hive: () => import("./index-Cls_VZdb.js"),
45
+ forest: () => import("./index-CdKvybsL.js"),
46
+ constellation: () => import("./index-B4Cqo621.js"),
47
+ factory: () => import("./index-B2EHxcBQ.js"),
48
+ airport: () => import("./index-CTQTtm9q.js"),
49
+ mycelium: () => import("./index-Agh7jdYu.js"),
50
+ atom: () => import("./index-URn4zDHp.js")
51
51
  }, g = /* @__PURE__ */ new Map();
52
52
  function L(e) {
53
53
  let n = g.get(e);
@@ -1,16 +1,16 @@
1
1
  var Gt = Object.defineProperty;
2
2
  var Pt = (e, t, s) => t in e ? Gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var de = (e, t, s) => Pt(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { jsxs as q, Fragment as te, jsx as g } from "react/jsx-runtime";
4
+ import { jsxs as j, Fragment as te, jsx as g } from "react/jsx-runtime";
5
5
  import { useFrame as Q, useThree as zt } from "@react-three/fiber";
6
6
  import { EffectComposer as Tt, Bloom as Et, Vignette as Rt } from "@react-three/postprocessing";
7
7
  import * as n from "three";
8
8
  import { useRef as B, useMemo as L, useEffect as ft, useState as tt } from "react";
9
- import { T as Bt, p as _t, e as Lt, w as F, a as ge, f as Ge, d as pt, s as kt, L as Ee, g as Nt, b as nt, h as Me, K as Ft, k as be, G as Ot, t as It, n as Ht, v as Ut, c as dt, R as Kt, u as Wt, o as jt, j as qt } from "./KitScene-Bm1I35Zc.js";
9
+ import { T as Bt, p as _t, e as Lt, w as F, a as ge, f as Ge, d as pt, s as Nt, L as Ee, g as kt, b as nt, h as Me, K as Ft, n as be, G as Ot, x as It, q as Ht, y as Ut, c as dt, R as qt, u as Kt, t as Wt, m as jt } from "./KitScene-DG_pcnWW.js";
10
10
  var ut;
11
11
  const ee = typeof window < "u" && !!((ut = window.matchMedia) != null && ut.call(window, "(prefers-reduced-motion: reduce)").matches), le = new n.Color("#ffb627"), xe = new n.Color("#f59e0b"), J = new n.Color("#ffd166");
12
12
  new n.Color("#1f1206");
13
- const ce = new n.Color("#fff3d6"), Fe = new n.Color("#ff3b2f"), Dt = new n.Color(1, 1, 1), Re = Object.fromEntries(Object.entries(Bt).map(([e, t]) => [e, new n.Color(t).lerp(le, 0.18)])), X = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ke = (e) => 1 - Math.pow(1 - X(e), 3), ue = (e) => (e = X(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), rt = (e) => {
13
+ const ce = new n.Color("#fff3d6"), Fe = new n.Color("#ff3b2f"), Dt = new n.Color(1, 1, 1), Re = Object.fromEntries(Object.entries(Bt).map(([e, t]) => [e, new n.Color(t).lerp(le, 0.18)])), X = (e) => e < 0 ? 0 : e > 1 ? 1 : e, qe = (e) => 1 - Math.pow(1 - X(e), 3), ue = (e) => (e = X(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), rt = (e) => {
14
14
  e = X(e);
15
15
  const t = 1.9;
16
16
  return 1 + (t + 1) * Math.pow(e - 1, 3) + t * Math.pow(e - 1, 2);
@@ -26,7 +26,7 @@ function mt() {
26
26
  function fe(e = "#fff") {
27
27
  return new n.SpriteMaterial({ map: mt(), color: e, blending: n.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
28
28
  }
29
- function je(e = "#fff") {
29
+ function We(e = "#fff") {
30
30
  return new n.MeshBasicMaterial({ color: e, blending: n.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
31
31
  }
32
32
  function ot() {
@@ -112,7 +112,7 @@ function he(e, t, s, o, u) {
112
112
  const r = 1 - o;
113
113
  return u.set(r * r * e.x + 2 * r * o * t.x + o * o * s.x, r * r * e.y + 2 * r * o * t.y + o * o * s.y, r * r * e.z + 2 * r * o * t.z + o * o * s.z);
114
114
  }
115
- function We(e, t, s, o) {
115
+ function Ke(e, t, s, o) {
116
116
  return o.copy(e).add(t).multiplyScalar(0.5), o.y += s, o.z += s * 0.8, o;
117
117
  }
118
118
  const Ue = class Ue {
@@ -141,7 +141,7 @@ const Se = 0.64, yt = 17.8, wt = 11.4, we = /* @__PURE__ */ new Map();
141
141
  function Oe(e, t, s) {
142
142
  return e.r += t.r * s, e.g += t.g * s, e.b += t.b * s, e;
143
143
  }
144
- const Yt = new n.Color("#5b4a3a"), $t = new n.Vector3(0, 1, 0), at = new n.CylinderGeometry(0.018, 0.012, 0.55, 5).translate(0, 0.275, 0), Zt = new n.ConeGeometry(0.07, 0.3, 8).rotateZ(Math.PI / 2), Qt = new n.SphereGeometry(1.15, 10, 8), Jt = new n.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1, colorWrite: !1 }), eo = new n.RingGeometry(1.25, 1.36, 6, 1), qe = 7, st = 1.3;
144
+ const Yt = new n.Color("#5b4a3a"), $t = new n.Vector3(0, 1, 0), at = new n.CylinderGeometry(0.018, 0.012, 0.55, 5).translate(0, 0.275, 0), Zt = new n.ConeGeometry(0.07, 0.3, 8).rotateZ(Math.PI / 2), Qt = new n.SphereGeometry(1.15, 10, 8), Jt = new n.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1, colorWrite: !1 }), eo = new n.RingGeometry(1.25, 1.36, 6, 1), je = 7, st = 1.3;
145
145
  let _e = null;
146
146
  function to() {
147
147
  if (_e) return _e;
@@ -210,10 +210,10 @@ function oo({ agent: e, selected: t, onSelect: s }) {
210
210
  bodies: [p, l, y],
211
211
  wing: new n.MeshBasicMaterial({ map: to(), color: ce.clone().lerp(V, 0.35).multiplyScalar(0.55), blending: n.AdditiveBlending, transparent: !0, depthWrite: !1, side: n.DoubleSide, toneMapped: !1 }),
212
212
  halo: fe(V),
213
- pollen: je(xe),
214
- ring: je(ce),
213
+ pollen: We(xe),
214
+ ring: We(ce),
215
215
  path: vt(V.clone().lerp(J, 0.35), b ? 0.07 : 0.055, 1),
216
- arrow: je(V)
216
+ arrow: We(V)
217
217
  };
218
218
  }, [V, b]), c = L(
219
219
  () => ({
@@ -237,47 +237,47 @@ function oo({ agent: e, selected: t, onSelect: s }) {
237
237
  ft(() => (we.set(o.id, c.p1), () => {
238
238
  we.get(o.id) === c.p1 && we.delete(o.id);
239
239
  }), [o.id, c]), Q(({ clock: S }) => {
240
- var j, D;
241
- const p = performance.now(), l = S.elapsedTime, y = ee ? 0 : 1, z = e.pos, T = e.live, R = (p - o.bornAt) / 1e3, x = o.exitAt ? (p - o.exitAt) / 1e3 : -1, k = o.status === "failed", U = _t(o, p), P = Lt(o, p), N = x < 0 && (o.status === "thinking" || o.status === "spawning"), E = o.parent ? F.instances.get(o.parent) : void 0, I = o.parent ? ge(o.parent) : void 0;
240
+ var W, D;
241
+ const p = performance.now(), l = S.elapsedTime, y = ee ? 0 : 1, z = e.pos, T = e.live, R = (p - o.bornAt) / 1e3, x = o.exitAt ? (p - o.exitAt) / 1e3 : -1, N = o.status === "failed", U = _t(o, p), P = Lt(o, p), k = x < 0 && (o.status === "thinking" || o.status === "spawning"), E = o.parent ? F.instances.get(o.parent) : void 0, I = o.parent ? ge(o.parent) : void 0;
242
242
  I ? (c.p0.copy(I), c.p0set = !0) : c.p0set || (c.p0.copy(z), c.p0set = !0);
243
- const W = !!o.parent && c.p0set && !!I, Y = y * Math.min(1.2, Ge.spread);
243
+ const K = !!o.parent && c.p0set && !!I, Y = y * Math.min(1.2, Ge.spread);
244
244
  if (T.set(
245
245
  z.x + Math.sin(l * 0.7 + A * 20) * 0.22 * Y,
246
246
  z.y + Math.sin(l * 1.4 + A * 9) * 0.16 * Y,
247
247
  z.z + Math.cos(l * 0.6 + A * 5) * 0.18 * Y
248
248
  ), x >= 0) {
249
249
  const H = ue(x / 2.4) * e.scale;
250
- T.y += k ? -H * 2.2 : H * 1.6, T.z += k ? 0 : H * 1.2;
250
+ T.y += N ? -H * 2.2 : H * 1.6, T.z += N ? 0 : H * 1.2;
251
251
  }
252
- We(c.p0, T, (o.subagent ? 1.6 : 2.2) * Math.min(1.3, Ge.spread), c.p1);
252
+ Ke(c.p0, T, (o.subagent ? 1.6 : 2.2) * Math.min(1.3, Ge.spread), c.p1);
253
253
  const O = o.parent ? ue(R / 1.5) : 1;
254
- O < 1 && W ? he(c.p0, c.p1, T, O, c.fly) : c.fly.copy(T), u.current && u.current.position.copy(c.fly), c.vx = c.vx * 0.85 + (c.fly.x - c.prev.x) * 0.15, c.prev.copy(c.fly), R < 0.05 && (c.face = z.x < 0 ? 1 : -1), c.vx > 0.012 ? c.face = 1 : c.vx < -0.012 && (c.face = -1);
254
+ O < 1 && K ? he(c.p0, c.p1, T, O, c.fly) : c.fly.copy(T), u.current && u.current.position.copy(c.fly), c.vx = c.vx * 0.85 + (c.fly.x - c.prev.x) * 0.15, c.prev.copy(c.fly), R < 0.05 && (c.face = z.x < 0 ? 1 : -1), c.vx > 0.012 ? c.face = 1 : c.vx < -0.012 && (c.face = -1);
255
255
  const ve = c.face > 0 ? -0.45 : Math.PI + 0.45;
256
256
  c.yaw += (ve - c.yaw) * 0.08;
257
257
  const oe = o.parent ? rt(R / 0.9) : rt(R / 0.7), ae = Math.max(1e-4, e.scale * st * (0.35 + 0.65 * oe) * (x >= 0 ? Math.max(0.25, U) : 1));
258
- r.current && (r.current.rotation.set(0, c.yaw, Math.sin(l * 1.4 + A * 9) * 0.08 * y + (k && x >= 0 ? -0.6 : 0)), r.current.scale.setScalar(ae * (1 + P * 0.05)));
259
- const se = 0.25 + (ee ? 0.5 : N ? 0.5 + 0.5 * Math.sin(l * 46 + A * 10) : x < 0 ? 0.5 + 0.5 * Math.sin(l * 9 + A * 10) : 0.5 + 0.5 * Math.sin(l * 26)) * 0.85;
258
+ r.current && (r.current.rotation.set(0, c.yaw, Math.sin(l * 1.4 + A * 9) * 0.08 * y + (N && x >= 0 ? -0.6 : 0)), r.current.scale.setScalar(ae * (1 + P * 0.05)));
259
+ const se = 0.25 + (ee ? 0.5 : k ? 0.5 + 0.5 * Math.sin(l * 46 + A * 10) : x < 0 ? 0.5 + 0.5 * Math.sin(l * 9 + A * 10) : 0.5 + 0.5 * Math.sin(l * 26)) * 0.85;
260
260
  a.current && a.current.rotation.set(se, 0, 0.35), i.current && i.current.rotation.set(-se, 0, 0.35);
261
261
  const ne = x >= 0 ? U : X(R / 0.4);
262
- w.wing.color.copy(ce).lerp(V, 0.35).multiplyScalar((N ? 0.75 : 0.45) * ne + P * 0.15);
263
- const pe = (N ? 0.55 + 0.15 * Math.sin(l * 3 + A * 7) * y : 0.18) + P * 0.55;
262
+ w.wing.color.copy(ce).lerp(V, 0.35).multiplyScalar((k ? 0.75 : 0.45) * ne + P * 0.15);
263
+ const pe = (k ? 0.55 + 0.15 * Math.sin(l * 3 + A * 7) * y : 0.18) + P * 0.55;
264
264
  for (const H of w.bodies)
265
- H.uniforms.uGlow.value = pe, H.uniforms.uFade.value = ne, k && x >= 0 && H.uniforms.uRim.value.copy(Fe).lerp(Yt, X(x));
266
- f.current && (f.current.scale.setScalar(ae * ((N ? 3.2 : 2.3) + P * 1.6)), c.c.copy(V).lerp(J, 0.3).multiplyScalar(((N ? 0.24 : 0.1) + P * 0.22) * ne), k && x >= 0 && c.c.copy(Fe).multiplyScalar(0.2 * ne), w.halo.color.copy(c.c));
265
+ H.uniforms.uGlow.value = pe, H.uniforms.uFade.value = ne, N && x >= 0 && H.uniforms.uRim.value.copy(Fe).lerp(Yt, X(x));
266
+ f.current && (f.current.scale.setScalar(ae * ((k ? 3.2 : 2.3) + P * 1.6)), c.c.copy(V).lerp(J, 0.3).multiplyScalar(((k ? 0.24 : 0.1) + P * 0.22) * ne), N && x >= 0 && c.c.copy(Fe).multiplyScalar(0.2 * ne), w.halo.color.copy(c.c));
267
267
  let re = -1;
268
268
  for (const H of F.mcpPending.values()) H.instance === o.id && (re = Math.max(re, pt(H, p)));
269
269
  if (c.pend += ((re >= 0 && x < 0 ? 1 : 0) - c.pend) * 0.1, m.current && (m.current.visible = c.pend > 0.02, m.current.rotation.set(1.15, 0, l * 1.6 * y), m.current.scale.setScalar(Math.max(1e-4, ae * 1.25 * (0.6 + 0.4 * c.pend))), c.c.copy(xe).lerp(Fe, X((re - 1.2) / 1.2)), w.pollen.color.copy(c.c).multiplyScalar(1.6 * c.pend)), d.current) {
270
270
  const H = t;
271
271
  d.current.visible = H, H && (d.current.rotation.z = l * 0.4 * y, d.current.scale.setScalar(ae * (1.15 + 0.05 * Math.sin(l * 3))), w.ring.color.copy(ce).multiplyScalar(0.9));
272
272
  }
273
- (j = M.current) == null || j.position.set(0, -0.95 * e.scale * st - 0.2, 0), (D = v.current) == null || D.setOpacity(kt(o.id) ? X(R / 0.8) * (x >= 0 ? U : 1) * 0.95 : 0);
273
+ (W = M.current) == null || W.position.set(0, -0.95 * e.scale * st - 0.2, 0), (D = v.current) == null || D.setOpacity(Nt(o.id) ? X(R / 0.8) * (x >= 0 ? U : 1) * 0.95 : 0);
274
274
  const Z = !!E && !E.exitAt;
275
- c.parentK += ((W && !o.exitAt && Z ? 1 : 0) - c.parentK) * (Z ? 0.06 : 0.035);
276
- const K = w.path.uniforms;
277
- K.uP0.value.copy(c.p0), K.uP1.value.copy(c.p1), K.uP2.value.copy(T);
275
+ c.parentK += ((K && !o.exitAt && Z ? 1 : 0) - c.parentK) * (Z ? 0.06 : 0.035);
276
+ const q = w.path.uniforms;
277
+ q.uP0.value.copy(c.p0), q.uP1.value.copy(c.p1), q.uP2.value.copy(T);
278
278
  const ie = x >= 0 ? ue(x / 1.4) : 0;
279
- if (K.uGrow.value = W ? Math.max(0, O * (1 - ie)) : 0, K.uHead.value = O < 1 ? O : -1, K.uHeadColor.value.copy(V).lerp(ce, 0.4).multiplyScalar(1.4), K.uOpacity.value = (N ? 0.75 : 0.5) * Math.max(c.parentK, O < 1 ? 0.6 : 0), K.uFlow.value = O >= 1 ? 1 : 0, K.uTime.value = ee ? 0 : l, h.current) {
280
- const H = W && O >= 1 && c.parentK > 0.05 && K.uGrow.value > 0.9;
279
+ if (q.uGrow.value = K ? Math.max(0, O * (1 - ie)) : 0, q.uHead.value = O < 1 ? O : -1, q.uHeadColor.value.copy(V).lerp(ce, 0.4).multiplyScalar(1.4), q.uOpacity.value = (k ? 0.75 : 0.5) * Math.max(c.parentK, O < 1 ? 0.6 : 0), q.uFlow.value = O >= 1 ? 1 : 0, q.uTime.value = ee ? 0 : l, h.current) {
280
+ const H = K && O >= 1 && c.parentK > 0.05 && q.uGrow.value > 0.9;
281
281
  if (h.current.visible = H, H) {
282
282
  he(c.p0, c.p1, T, 0.78, c.a), he(c.p0, c.p1, T, 0.8, c.b), h.current.position.copy(c.a), c.d.subVectors(c.b, c.a).normalize(), h.current.quaternion.setFromUnitVectors($t, c.d);
283
283
  const ye = (o.subagent ? 0.8 : 1) * Math.min(1.3, Ge.scale);
@@ -288,12 +288,12 @@ function oo({ agent: e, selected: t, onSelect: s }) {
288
288
  const _ = (S) => {
289
289
  S.stopPropagation(), s(o.id);
290
290
  }, G = o.id.split(":")[2], C = b ? 1 : 0.78;
291
- return /* @__PURE__ */ q(te, { children: [
291
+ return /* @__PURE__ */ j(te, { children: [
292
292
  /* @__PURE__ */ g("mesh", { geometry: gt, material: w.path, frustumCulled: !1 }),
293
293
  /* @__PURE__ */ g("mesh", { ref: h, geometry: ht, material: w.arrow, visible: !1 }),
294
- /* @__PURE__ */ q("group", { ref: u, children: [
294
+ /* @__PURE__ */ j("group", { ref: u, children: [
295
295
  /* @__PURE__ */ g("sprite", { ref: f, material: w.halo }),
296
- /* @__PURE__ */ q("group", { ref: r, scale: 1e-4, children: [
296
+ /* @__PURE__ */ j("group", { ref: r, scale: 1e-4, children: [
297
297
  /* @__PURE__ */ g("mesh", { geometry: Qt, material: Jt, onClick: _, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }),
298
298
  /* @__PURE__ */ g("mesh", { geometry: me, material: w.abdomen, position: [-0.35 - C * 0.5, -0.05, 0], scale: [C, 0.44, 0.44], rotation: [0, 0, 0.12] }),
299
299
  /* @__PURE__ */ g("mesh", { geometry: Zt, material: w.head, position: [-0.35 - C * 1.48, -0.16, 0] }),
@@ -301,12 +301,12 @@ function oo({ agent: e, selected: t, onSelect: s }) {
301
301
  /* @__PURE__ */ g("mesh", { geometry: me, material: w.head, position: [0.56, 0, 0], scale: [0.24, 0.25, 0.25] }),
302
302
  /* @__PURE__ */ g("mesh", { geometry: at, material: w.head, position: [0.66, 0.16, 0.08], rotation: [0.3, 0, -0.55] }),
303
303
  /* @__PURE__ */ g("mesh", { geometry: at, material: w.head, position: [0.66, 0.16, -0.08], rotation: [-0.3, 0, -0.55] }),
304
- /* @__PURE__ */ q("group", { position: [0.06, 0.28, 0], children: [
304
+ /* @__PURE__ */ j("group", { position: [0.06, 0.28, 0], children: [
305
305
  /* @__PURE__ */ g("mesh", { ref: a, geometry: it, material: w.wing }),
306
306
  /* @__PURE__ */ g("mesh", { ref: i, geometry: it, material: w.wing })
307
307
  ] })
308
308
  ] }),
309
- /* @__PURE__ */ g("group", { ref: m, visible: !1, children: Array.from({ length: qe }, (S, p) => /* @__PURE__ */ g("mesh", { geometry: me, material: w.pollen, position: [Math.cos(p / qe * Math.PI * 2) * 1.1, Math.sin(p / qe * Math.PI * 2) * 1.1, 0], scale: p % 2 ? 0.07 : 0.1 }, p)) }),
309
+ /* @__PURE__ */ g("group", { ref: m, visible: !1, children: Array.from({ length: je }, (S, p) => /* @__PURE__ */ g("mesh", { geometry: me, material: w.pollen, position: [Math.cos(p / je * Math.PI * 2) * 1.1, Math.sin(p / je * Math.PI * 2) * 1.1, 0], scale: p % 2 ? 0.07 : 0.1 }, p)) }),
310
310
  /* @__PURE__ */ g("mesh", { ref: d, geometry: eo, material: w.ring, visible: !1 }),
311
311
  /* @__PURE__ */ g("group", { ref: M, children: /* @__PURE__ */ g(
312
312
  Ee,
@@ -333,7 +333,7 @@ function no({ comet: e }) {
333
333
  const h = t.current[d];
334
334
  if (!h || (h.visible = m, !m)) continue;
335
335
  const v = F.instances.get(e.to);
336
- (v == null ? void 0 : v.parent) === e.from && we.get(e.to) ? (r.c.copy(we.get(e.to)), r.a.copy(a), r.b.copy(i)) : (s == null ? void 0 : s.parent) === e.to && we.get(e.from) ? (r.c.copy(we.get(e.from)), r.a.copy(a), r.b.copy(i)) : (r.a.copy(a), r.b.copy(i), We(r.a, r.b, 1.8, r.c)), he(r.a, r.c, r.b, ue(X(f - d * 0.035)), r.h), h.position.copy(r.h), h.scale.setScalar(0.95 - d * 0.17);
336
+ (v == null ? void 0 : v.parent) === e.from && we.get(e.to) ? (r.c.copy(we.get(e.to)), r.a.copy(a), r.b.copy(i)) : (s == null ? void 0 : s.parent) === e.to && we.get(e.from) ? (r.c.copy(we.get(e.from)), r.a.copy(a), r.b.copy(i)) : (r.a.copy(a), r.b.copy(i), Ke(r.a, r.b, 1.8, r.c)), he(r.a, r.c, r.b, ue(X(f - d * 0.035)), r.h), h.position.copy(r.h), h.scale.setScalar(0.95 - d * 0.17);
337
337
  }
338
338
  }), /* @__PURE__ */ g(te, { children: u.map((a, i) => /* @__PURE__ */ g("sprite", { ref: (f) => void (t.current[i] = f), material: a, visible: !1 }, i)) });
339
339
  }
@@ -349,11 +349,11 @@ function so(e) {
349
349
  const t = [];
350
350
  for (let s = e.length - 1; s >= 0 && t.length < ao; s--) {
351
351
  const o = e[s];
352
- (!Nt.grouped || nt(o.from) && nt(o.to)) && t.push(o);
352
+ (!kt.grouped || nt(o.from) && nt(o.to)) && t.push(o);
353
353
  }
354
354
  return t.reverse();
355
355
  }
356
- const io = 24, Le = 48, Ce = 18, Ye = 96, Ae = 10, bt = 48, ke = 3, ct = 1, Mt = 7, Te = (Mt + 0.6) * Math.sqrt(3) * Se, co = -3.6, lo = (
356
+ const io = 24, Le = 48, Ce = 18, Ye = 96, Ae = 10, bt = 48, Ne = 3, ct = 1, Mt = 7, Te = (Mt + 0.6) * Math.sqrt(3) * Se, co = -3.6, lo = (
357
357
  /* glsl */
358
358
  `
359
359
  attribute vec3 aColor; attribute float aGlow; attribute float aCap; attribute float aEdge;
@@ -507,17 +507,17 @@ function go() {
507
507
  M[l].copy(d[l]), h[l] && (y.edge > 0.5 ? M[l].copy(xe).multiplyScalar(0.012) : M[l].multiplyScalar(0.75 + 0.35 * Math.sin(i * 0.5 + y.x * 0.22 + y.y * 0.31 + y.seed * 3))), b[l] = 0;
508
508
  }
509
509
  for (const p of A) {
510
- const l = (a - p.start) / p.dur, y = p.r * Ke(l * 1.6), z = (1 - l) * (1 - l), T = (p.r + 1) * (p.r + 1);
510
+ const l = (a - p.start) / p.dur, y = p.r * qe(l * 1.6), z = (1 - l) * (1 - l), T = (p.r + 1) * (p.r + 1);
511
511
  for (let R = 0; R < C; R++) {
512
- const x = v[R], k = f[x].x - p.x, U = f[x].y - p.y, P = k * k + U * U;
512
+ const x = v[R], N = f[x].x - p.x, U = f[x].y - p.y, P = N * N + U * U;
513
513
  if (P > T) continue;
514
- const N = Math.sqrt(P), E = N < y ? Math.pow(1 - N / (p.r + 0.6), 1.5) * 0.85 : 0, I = Math.exp(-(((N - y) / 0.7) ** 2)), W = (E + I * 0.9) * z * p.k;
515
- W < 0.01 || (Oe(M[x], p.c, W), b[x] += W * 0.8);
514
+ const k = Math.sqrt(P), E = k < y ? Math.pow(1 - k / (p.r + 0.6), 1.5) * 0.85 : 0, I = Math.exp(-(((k - y) / 0.7) ** 2)), K = (E + I * 0.9) * z * p.k;
515
+ K < 0.01 || (Oe(M[x], p.c, K), b[x] += K * 0.8);
516
516
  }
517
517
  }
518
518
  Ct(m, v, C);
519
- }), /* @__PURE__ */ q("group", { ref: s, children: [
520
- /* @__PURE__ */ q("group", { ref: o, children: [
519
+ }), /* @__PURE__ */ j("group", { ref: s, children: [
520
+ /* @__PURE__ */ j("group", { ref: o, children: [
521
521
  /* @__PURE__ */ g("sprite", { material: t.aura, scale: [60, 40, 1], position: [0, 0, -8] }),
522
522
  /* @__PURE__ */ g("sprite", { material: t.aura2, scale: [30, 22, 1], position: [0, 0, -5] })
523
523
  ] }),
@@ -530,7 +530,7 @@ function et(e, t, s) {
530
530
  return o === void 0 && t.set(s, o = e.nNodes ? Ht({ nodes: e.nodes }, s) : -1), o;
531
531
  }
532
532
  function vo({ galaxy: e }) {
533
- const [t, s] = tt("center"), o = B([]), u = B([]), r = B(Array(ke).fill("")), a = L(() => {
533
+ const [t, s] = tt("center"), o = B([]), u = B([]), r = B(Array(Ne).fill("")), a = L(() => {
534
534
  const f = mo(), m = St(f), d = m.N, h = f.map((l, y) => ({ i: y, s: l.seed })).filter(({ i: l }) => f[l].edge < 0.2);
535
535
  h.sort((l, y) => l.s - y.s);
536
536
  const v = Math.min(e.nodes.length, Math.floor(h.length * 0.6)), M = e.nodes.slice(0, v), b = new Int32Array(v), A = Array.from({ length: d }, () => new n.Color()), V = new Float32Array(d), w = new Uint8Array(d), c = new n.Color();
@@ -569,7 +569,7 @@ function vo({ galaxy: e }) {
569
569
  []
570
570
  );
571
571
  return L(() => i.idx.clear(), [a, i]), Q(({ clock: f }) => {
572
- var N;
572
+ var k;
573
573
  const m = be.graph.out.x < -0.5 ? "left" : "center";
574
574
  m !== t && s(m);
575
575
  const d = performance.now(), h = ee ? 0 : f.elapsedTime, { sd: v, baseC: M, baseG: b, honeyCell: A, fire: V } = a, { cells: w, N: c, acc: _, glow: G, front: C, nodeCell: S } = v, { a: p, b: l, m: y, p: z } = i;
@@ -578,33 +578,33 @@ function vo({ galaxy: e }) {
578
578
  V.fill(0);
579
579
  const T = a.links.getAttribute("position"), R = a.links.getAttribute("color");
580
580
  let x = 0;
581
- const k = F.flares;
582
- for (let E = Math.max(0, k.length - bt); E < k.length; E++) {
583
- const I = k[E], W = et(v, i.idx, I.node);
584
- if (W < 0) continue;
585
- const Y = S[W], O = (d - I.start) / 1e3, ve = F.instances.get(I.instance), oe = I.op === "write", ae = oe ? ce : ve ? Re[ve.type] : J, $ = O < 0.3 ? O / 0.3 : Math.exp(-(O - 0.3) * 1.1);
586
- if ($ > V[W] && (V[W] = $), Oe(_[Y], ae, $ * (oe ? 2.6 : 1.9)), G[Y] += $ * 1.6, oe) {
587
- const ne = w[Y].x, pe = w[Y].y, re = 1.2 + Ke(O / 1.2) * 1.6;
581
+ const N = F.flares;
582
+ for (let E = Math.max(0, N.length - bt); E < N.length; E++) {
583
+ const I = N[E], K = et(v, i.idx, I.node);
584
+ if (K < 0) continue;
585
+ const Y = S[K], O = (d - I.start) / 1e3, ve = F.instances.get(I.instance), oe = I.op === "write", ae = oe ? ce : ve ? Re[ve.type] : J, $ = O < 0.3 ? O / 0.3 : Math.exp(-(O - 0.3) * 1.1);
586
+ if ($ > V[K] && (V[K] = $), Oe(_[Y], ae, $ * (oe ? 2.6 : 1.9)), G[Y] += $ * 1.6, oe) {
587
+ const ne = w[Y].x, pe = w[Y].y, re = 1.2 + qe(O / 1.2) * 1.6;
588
588
  for (let Z = 0; Z < c; Z++) {
589
- const K = w[Z].x - ne, ie = w[Z].y - pe;
590
- if (Math.abs(K) > 3.2 || Math.abs(ie) > 3.2 || Z === Y) continue;
591
- const j = Math.hypot(K, ie), D = Math.exp(-(((j - re) / 0.6) ** 2)) * $ * 0.6;
589
+ const q = w[Z].x - ne, ie = w[Z].y - pe;
590
+ if (Math.abs(q) > 3.2 || Math.abs(ie) > 3.2 || Z === Y) continue;
591
+ const W = Math.hypot(q, ie), D = Math.exp(-(((W - re) / 0.6) ** 2)) * $ * 0.6;
592
592
  D > 0.01 && (Oe(_[Z], le, D), G[Z] += D * 0.5);
593
593
  }
594
594
  }
595
- const se = a.adj[W];
595
+ const se = a.adj[K];
596
596
  for (let ne = 0; ne < se.length && x < Ye; ne++) {
597
597
  const pe = S[se[ne]], re = $ * 0.55;
598
598
  if (re < 0.02) break;
599
599
  p.set(C[Y * 3], C[Y * 3 + 1], C[Y * 3 + 2] + 0.12), l.set(C[pe * 3], C[pe * 3 + 1], C[pe * 3 + 2] + 0.12), y.copy(p).add(l).multiplyScalar(0.5), y.z += 0.5 + p.distanceTo(l) * 0.08;
600
600
  const Z = X(O * 1.4);
601
- for (let K = 0; K < Ae; K++)
601
+ for (let q = 0; q < Ae; q++)
602
602
  for (let ie = 0; ie < 2; ie++) {
603
- const j = (K + ie) / Ae, D = 1 - j;
604
- z.set(D * D * p.x + 2 * D * j * y.x + j * j * l.x, D * D * p.y + 2 * D * j * y.y + j * j * l.y, D * D * p.z + 2 * D * j * y.z + j * j * l.z);
605
- const H = (x * Ae + K) * 2 + ie;
603
+ const W = (q + ie) / Ae, D = 1 - W;
604
+ z.set(D * D * p.x + 2 * D * W * y.x + W * W * l.x, D * D * p.y + 2 * D * W * y.y + W * W * l.y, D * D * p.z + 2 * D * W * y.z + W * W * l.z);
605
+ const H = (x * Ae + q) * 2 + ie;
606
606
  T.setXYZ(H, z.x, z.y, z.z);
607
- const ye = re * (j <= Z ? 0.35 + Math.exp(-(((j - Z) / 0.12) ** 2)) * 1.2 : 0);
607
+ const ye = re * (W <= Z ? 0.35 + Math.exp(-(((W - Z) / 0.12) ** 2)) * 1.2 : 0);
608
608
  R.setXYZ(H, J.r * ye, J.g * ye, J.b * ye);
609
609
  }
610
610
  Oe(_[pe], J, re * 0.5 * Z), x++;
@@ -613,12 +613,12 @@ function vo({ galaxy: e }) {
613
613
  a.links.setDrawRange(0, x * Ae * 2), T.needsUpdate = R.needsUpdate = !0, Ct(v, v.all, c);
614
614
  const U = Math.max(1e-3, be.graph.scale);
615
615
  let P = 0;
616
- for (let E = F.flares.length - 1; E >= 0 && P < ke; E--) {
616
+ for (let E = F.flares.length - 1; E >= 0 && P < Ne; E--) {
617
617
  const I = F.flares[E];
618
618
  if (d - I.start > 2300) break;
619
- let W = !1;
620
- for (let $ = 0; $ < P; $++) r.current[$] === I.node && (W = !0);
621
- if (W) continue;
619
+ let K = !1;
620
+ for (let $ = 0; $ < P; $++) r.current[$] === I.node && (K = !0);
621
+ if (K) continue;
622
622
  const Y = et(v, i.idx, I.node);
623
623
  if (Y < 0) continue;
624
624
  const O = S[Y];
@@ -631,13 +631,13 @@ function vo({ galaxy: e }) {
631
631
  const oe = o.current[P], ae = u.current[P];
632
632
  oe && ae && (ae.position.set(C[O * 3], C[O * 3 + 1], C[O * 3 + 2] + 0.3), r.current[P] !== I.node && (oe.setText(`${I.op === "write" ? "wrote" : "read"} · ${I.node}`), oe.setColor(I.op === "write" ? "#fff3d6" : "#ffb627")), oe.setOpacity(1)), r.current[P] = I.node, P++;
633
633
  }
634
- for (let E = P; E < ke; E++)
635
- (N = o.current[E]) == null || N.setOpacity(0), r.current[E] = "";
636
- }), /* @__PURE__ */ q(te, { children: [
634
+ for (let E = P; E < Ne; E++)
635
+ (k = o.current[E]) == null || k.setOpacity(0), r.current[E] = "";
636
+ }), /* @__PURE__ */ j(te, { children: [
637
637
  /* @__PURE__ */ g("sprite", { material: i.aura, scale: [Te * 3.4, Te * 3.4, 1], position: [0, 0, -2] }),
638
638
  /* @__PURE__ */ g("primitive", { object: a.sd.mesh }),
639
639
  /* @__PURE__ */ g("lineSegments", { geometry: a.links, material: i.linkMat, frustumCulled: !1 }),
640
- Array.from({ length: ke }, (f, m) => /* @__PURE__ */ g("group", { ref: (d) => void (u.current[m] = d), children: /* @__PURE__ */ g(Ee, { ref: (d) => void (o.current[m] = d), text: "", offset: [0, 0.42], anchorX: t, size: 0.24, opacity: 0, fadeMs: 250, pxRange: [8, 12] }) }, m)),
640
+ Array.from({ length: Ne }, (f, m) => /* @__PURE__ */ g("group", { ref: (d) => void (u.current[m] = d), children: /* @__PURE__ */ g(Ee, { ref: (d) => void (o.current[m] = d), text: "", offset: [0, 0.42], anchorX: t, size: 0.24, opacity: 0, fadeMs: 250, pxRange: [8, 12] }) }, m)),
641
641
  /* @__PURE__ */ g(Ot, { position: [t === "left" ? -Te : 0, -Te - 1.2, 0.5], anchorX: t, prefix: "honey store = ", color: "#f59e0b", size: 0.26, opacity: 0.75, pxRange: [8, 12] })
642
642
  ] });
643
643
  }
@@ -668,17 +668,17 @@ function yo() {
668
668
  for (let T = 0; T < 2; T++) {
669
669
  const R = (z + T) / Ce, x = 1 - R;
670
670
  i.set(x * x * c.x + 2 * x * R * a.x + R * R * r.x, x * x * c.y + 2 * x * R * a.y + R * R * r.y, x * x * c.z + 2 * x * R * a.z + R * R * r.z);
671
- const k = (d * Ce + z) * 2 + T;
672
- h.setXYZ(k, i.x, i.y, i.z);
671
+ const N = (d * Ce + z) * 2 + T;
672
+ h.setXYZ(N, i.x, i.y, i.z);
673
673
  const U = Math.exp(-(((R - y) / 0.09) ** 2)) * 1.4, P = l * ((S ? 0.4 : 0.18) + U) * 0.8;
674
- v.setXYZ(k, p.r * P, p.g * P, p.b * P);
674
+ v.setXYZ(N, p.r * P, p.g * P, p.b * P);
675
675
  }
676
676
  S ? u.add(c, a, r, 0.9, 1, 0.4, p, l * 1.2) : u.add(c, a, r, 0.1, -1, 0.4, p, l * 1.4), d++;
677
677
  }
678
678
  h.needsUpdate = v.needsUpdate = !0;
679
679
  }
680
680
  o.setDrawRange(0, d * Ce * 2), u.end();
681
- }), /* @__PURE__ */ q(te, { children: [
681
+ }), /* @__PURE__ */ j(te, { children: [
682
682
  /* @__PURE__ */ g("lineSegments", { geometry: t.geo, material: t.mat, frustumCulled: !1 }),
683
683
  /* @__PURE__ */ g("primitive", { object: t.arrows.mesh })
684
684
  ] });
@@ -721,11 +721,11 @@ const bo = 1.2, Mo = 2, Pe = new n.Vector3();
721
721
  function xo({ mcp: e, backend: t }) {
722
722
  const s = e.srv, o = t.res, u = t.k, r = L(() => new n.Color(s.color).lerp(le, 0.25), [s.color]), a = L(() => At(r), [r]), i = L(() => fe(r), [r]), f = B(null), m = B(null), d = B(null), h = B(null), v = B(null), M = B(null), b = B("");
723
723
  Q(({ clock: V }) => {
724
- var R, x, k, U;
724
+ var R, x, N, U;
725
725
  const w = performance.now(), c = ee ? 0 : V.elapsedTime;
726
726
  Pe.subVectors(t.pos, e.pos);
727
727
  const _ = Math.hypot(Pe.x, Pe.y), G = Math.atan2(Pe.y, Pe.x), C = Math.min(Mo, Math.max(bo, _ / 2.1));
728
- (R = f.current) == null || R.position.copy(e.pos), (x = d.current) == null || x.position.set(C * 0.98, 0, 0.05), (k = d.current) == null || k.scale.set(C, 0.52, 0.12);
728
+ (R = f.current) == null || R.position.copy(e.pos), (x = d.current) == null || x.position.set(C * 0.98, 0, 0.05), (N = d.current) == null || N.scale.set(C, 0.52, 0.12);
729
729
  const S = o.inflight > 0, p = Math.exp(-((w - o.activeAt) / 1e3) * 1.4);
730
730
  let l = null;
731
731
  for (const P of F.mcpCalls) P.server === s.name && P.resource === o.name && (!l || P.start > l.start) && (l = P);
@@ -738,13 +738,13 @@ function xo({ mcp: e, backend: t }) {
738
738
  let T = `${wo[o.kind] ?? "•"} ${o.name}`;
739
739
  if (S) {
740
740
  let P = "";
741
- for (const N of F.mcpPending.values()) N.server === s.name && N.resource === o.name && (P = N.tool);
741
+ for (const k of F.mcpPending.values()) k.server === s.name && k.resource === o.name && (P = k.tool);
742
742
  T = `${o.name} ▶ ${P || "query"}()`;
743
743
  } else l && l.phase === "result" && w - l.start < 1800 && (T = `${o.name} ✓ returned`);
744
744
  M.current && (T !== b.current && (M.current.setText(T), b.current = T), M.current.setOpacity(S ? 1 : 0.6 + p * 0.4), M.current.setEmphasis(S));
745
745
  });
746
746
  const A = e.out.x >= 0 ? "left" : "right";
747
- return /* @__PURE__ */ q(te, { children: [
747
+ return /* @__PURE__ */ j(te, { children: [
748
748
  /* @__PURE__ */ g("group", { ref: f, children: /* @__PURE__ */ g("group", { ref: m, children: /* @__PURE__ */ g("mesh", { ref: d, geometry: me, material: a }) }) }),
749
749
  /* @__PURE__ */ g("sprite", { ref: h, material: i }),
750
750
  /* @__PURE__ */ g("group", { ref: v, children: /* @__PURE__ */ g(Ee, { ref: M, text: o.name, color: s.color, size: 0.2, opacity: 0.6, anchorX: A, pxRange: [7.5, 11.5], renderOrder: 18 }) })
@@ -772,9 +772,9 @@ function So({ mcp: e }) {
772
772
  d.uP0.value.copy(f), d.uP1.value.set(f.x - m * 0.4, f.y - 4, f.z - 0.5), d.uP2.value.set(f.x + m * 1.5, f.y - 9, f.z - 2.5);
773
773
  const h = performance.now(), v = t.inflight > 0, M = Math.exp(-((h - t.activeAt) / 1e3) * 1.4);
774
774
  o.halo.color.copy(s).multiplyScalar(v ? 0.3 : 0.08 + M * 0.18), (A = r.current) == null || A.scale.setScalar(v ? 7 : 5.5), o.seeds.material.color.copy(J).multiplyScalar(v ? 1.4 : 0.6 + M * 0.6), a.current && (a.current.rotation.z = (ee ? 0 : i.elapsedTime) * (v ? 0.5 : 0.08));
775
- }), /* @__PURE__ */ q(te, { children: [
775
+ }), /* @__PURE__ */ j(te, { children: [
776
776
  /* @__PURE__ */ g("mesh", { geometry: gt, material: o.stem, frustumCulled: !1 }),
777
- /* @__PURE__ */ q("group", { ref: u, children: [
777
+ /* @__PURE__ */ j("group", { ref: u, children: [
778
778
  /* @__PURE__ */ g("sprite", { ref: r, material: o.halo, position: [0, 0, -0.4] }),
779
779
  Array.from({ length: lt }, (i, f) => /* @__PURE__ */ g("group", { rotation: [0, 0, f / lt * Math.PI * 2 + 0.2], children: /* @__PURE__ */ g("mesh", { geometry: me, material: o.sepal, position: [0.85, 0, -0.25], scale: [0.85, 0.3, 0.08] }) }, f)),
780
780
  /* @__PURE__ */ g("mesh", { geometry: me, material: o.disc, scale: [0.72, 0.72, 0.28] }),
@@ -783,37 +783,37 @@ function So({ mcp: e }) {
783
783
  ] })
784
784
  ] });
785
785
  }
786
- const Ne = 24, Ve = 40, ze = 3;
786
+ const ke = 24, Ve = 40, ze = 3;
787
787
  function Co() {
788
788
  const e = L(() => {
789
789
  const u = new n.BufferGeometry();
790
- return u.setAttribute("position", new n.BufferAttribute(new Float32Array(Ne * ze * Ve * 2 * 3), 3)), u.setAttribute("color", new n.BufferAttribute(new Float32Array(Ne * ze * Ve * 2 * 3), 3)), u.boundingSphere = new n.Sphere(new n.Vector3(), 1e4), u;
791
- }, []), t = L(() => ot(), []), s = L(() => new He(Ne), []), o = L(() => ({ a: new n.Vector3(), b: new n.Vector3(), c: new n.Vector3(), p: new n.Vector3(), col: new n.Color(), k: new n.Color() }), []);
790
+ return u.setAttribute("position", new n.BufferAttribute(new Float32Array(ke * ze * Ve * 2 * 3), 3)), u.setAttribute("color", new n.BufferAttribute(new Float32Array(ke * ze * Ve * 2 * 3), 3)), u.boundingSphere = new n.Sphere(new n.Vector3(), 1e4), u;
791
+ }, []), t = L(() => ot(), []), s = L(() => new He(ke), []), o = L(() => ({ a: new n.Vector3(), b: new n.Vector3(), c: new n.Vector3(), p: new n.Vector3(), col: new n.Color(), k: new n.Color() }), []);
792
792
  return Q(({ clock: u }) => {
793
793
  const r = performance.now(), a = ee ? 0 : u.elapsedTime, i = e.getAttribute("position"), f = e.getAttribute("color");
794
794
  let m = 0;
795
795
  s.begin();
796
796
  const d = (h, v, M, b) => {
797
- if (m >= Ne) return;
797
+ if (m >= ke) return;
798
798
  const A = ge(h), V = F.mcpServers.get(v), w = dt(v);
799
799
  if (!A || !V || !w) return;
800
800
  const { a: c, b: _, c: G, p: C, col: S, k: p } = o;
801
- c.copy(A), _.copy(w), We(c, _, 1.4, G), S.set(V.color).lerp(xe, 0.4);
801
+ c.copy(A), _.copy(w), Ke(c, _, 1.4, G), S.set(V.color).lerp(xe, 0.4);
802
802
  let l;
803
- M === 0 ? (S.lerp(xe, X(b / 1.2)), b > 1.2 && S.lerp(Fe, X((b - 1.2) / 1)), l = (0.25 + Math.min(0.6, b * 0.25)) * Ke(b / 0.3)) : (p.copy(S).lerp(ce, 0.45), l = 1.3 * (b < 0.75 ? 1 : 1 - (b - 0.75) / 0.25));
803
+ M === 0 ? (S.lerp(xe, X(b / 1.2)), b > 1.2 && S.lerp(Fe, X((b - 1.2) / 1)), l = (0.25 + Math.min(0.6, b * 0.25)) * qe(b / 0.3)) : (p.copy(S).lerp(ce, 0.45), l = 1.3 * (b < 0.75 ? 1 : 1 - (b - 0.75) / 0.25));
804
804
  const y = 1 - ue(b / 0.75), z = M === 0 ? 0.03 : 0.07;
805
805
  for (let T = 0; T < ze; T++) {
806
806
  const R = (T - 1) * z;
807
807
  for (let x = 0; x < Ve; x++)
808
- for (let k = 0; k < 2; k++) {
809
- const U = (x + k) / Ve;
808
+ for (let N = 0; N < 2; N++) {
809
+ const U = (x + N) / Ve;
810
810
  he(c, G, _, U, C);
811
- const P = ((m * ze + T) * Ve + x) * 2 + k;
811
+ const P = ((m * ze + T) * Ve + x) * 2 + N;
812
812
  i.setXYZ(P, C.x + R, C.y - R, C.z + R * 0.5);
813
- let N;
814
- M === 0 ? N = l * (0.25 + Math.pow(Math.max(0, Math.sin(U * 22 - a * 2.4)), 8) * 1.5) * (T === 1 ? 1 : 0.25) : N = l * (0.25 + Math.exp(-(((U - y) / 0.07) ** 2)) * 3.2 * (b < 0.8 ? 1 : 0)) * (T === 1 ? 1 : 0.6);
813
+ let k;
814
+ M === 0 ? k = l * (0.25 + Math.pow(Math.max(0, Math.sin(U * 22 - a * 2.4)), 8) * 1.5) * (T === 1 ? 1 : 0.25) : k = l * (0.25 + Math.exp(-(((U - y) / 0.07) ** 2)) * 3.2 * (b < 0.8 ? 1 : 0)) * (T === 1 ? 1 : 0.6);
815
815
  const E = M === 0 ? S : p;
816
- f.setXYZ(P, E.r * N, E.g * N, E.b * N);
816
+ f.setXYZ(P, E.r * k, E.g * k, E.b * k);
817
817
  }
818
818
  }
819
819
  M === 0 ? s.add(c, G, _, 0.9, 1, 0.48, S, 0.4 + l * 1.4) : s.add(c, G, _, 0.08, -1, 0.62, p, l * 1.6), m++;
@@ -821,7 +821,7 @@ function Co() {
821
821
  for (const h of F.mcpPending.values()) d(h.instance, h.server, 0, pt(h, r));
822
822
  for (const h of F.mcpCalls) h.phase === "result" && d(h.instance, h.server, 1, X((r - h.start) / h.dur));
823
823
  e.setDrawRange(0, m * ze * Ve * 2), i.needsUpdate = !0, f.needsUpdate = !0, s.end();
824
- }), /* @__PURE__ */ q(te, { children: [
824
+ }), /* @__PURE__ */ j(te, { children: [
825
825
  /* @__PURE__ */ g("lineSegments", { geometry: e, material: t, frustumCulled: !1 }),
826
826
  /* @__PURE__ */ g("primitive", { object: s.mesh })
827
827
  ] });
@@ -832,7 +832,7 @@ function Ao({ call: e }) {
832
832
  const r = ge(e.instance), a = dt(e.server);
833
833
  if (!o.current) return;
834
834
  if (!r || !t || !a) return void (o.current.visible = !1);
835
- u.a.copy(r), u.b.copy(a), We(u.a, u.b, 1.4, u.c);
835
+ u.a.copy(r), u.b.copy(a), Ke(u.a, u.b, 1.4, u.c);
836
836
  const i = X((performance.now() - e.start) / (e.phase === "call" ? e.dur : e.dur * 0.75));
837
837
  he(u.a, u.c, u.b, e.phase === "call" ? ue(i) : 1 - ue(i), u.h), o.current.visible = i < 1, o.current.position.copy(u.h), o.current.scale.setScalar(1);
838
838
  }), /* @__PURE__ */ g("sprite", { ref: o, material: s, visible: !1 });
@@ -848,7 +848,7 @@ function Go() {
848
848
  for (let f = u.length - 1; f >= 0 && i.length < Vo; f--) ge(u[f].instance) && i.push(u[f]);
849
849
  t(i);
850
850
  }
851
- }), /* @__PURE__ */ q(te, { children: [
851
+ }), /* @__PURE__ */ j(te, { children: [
852
852
  e.map((o) => /* @__PURE__ */ g(Ao, { call: o }, o.id)),
853
853
  /* @__PURE__ */ g(Co, {})
854
854
  ] });
@@ -857,23 +857,23 @@ function Po({ run: e }) {
857
857
  const t = L(() => new n.Color(e.color).lerp(le, 0.55), [e.color]), s = L(() => fe("#000"), []), o = B(null), u = B(null);
858
858
  return Q(({ clock: r }) => {
859
859
  var M;
860
- const a = performance.now(), i = e.run ?? F.runs.get(e.id), f = i ? Ke((a - i.startedAt) / 1200) : 1, m = i != null && i.endedAt ? X(1 - (a - i.endedAt - (Kt - 2500)) / 2500) : 1, d = 0.9 + 0.1 * Math.sin((ee ? 0 : r.elapsedTime) * 0.6 + e.index);
860
+ const a = performance.now(), i = e.run ?? F.runs.get(e.id), f = i ? qe((a - i.startedAt) / 1200) : 1, m = i != null && i.endedAt ? X(1 - (a - i.endedAt - (qt - 2500)) / 2500) : 1, d = 0.9 + 0.1 * Math.sin((ee ? 0 : r.elapsedTime) * 0.6 + e.index);
861
861
  s.color.copy(t).multiplyScalar(0.2 * f * m * d);
862
862
  const h = Math.abs(e.side.x) * e.hu + Math.abs(e.axis.x) * e.hv, v = Math.abs(e.side.y) * e.hu + Math.abs(e.axis.y) * e.hv;
863
863
  o.current && (o.current.position.set(e.origin.x, e.origin.y, -1.2), o.current.scale.set(h * 2.6 + 3, v * 2.6 + 3, 1)), (M = u.current) == null || M.position.set(e.origin.x, e.origin.y + v + 0.6, 0.5);
864
- }), /* @__PURE__ */ q(te, { children: [
864
+ }), /* @__PURE__ */ j(te, { children: [
865
865
  /* @__PURE__ */ g("sprite", { ref: o, material: s }),
866
866
  /* @__PURE__ */ g("group", { ref: u, children: e.run && /* @__PURE__ */ g(zo, { run: e.run }) })
867
867
  ] });
868
868
  }
869
869
  function zo({ run: e }) {
870
- Wt();
870
+ Kt();
871
871
  const t = e.status !== "started";
872
872
  return /* @__PURE__ */ g(
873
873
  Ee,
874
874
  {
875
875
  text: e.topic,
876
- secondary: jt(e, { base: "#c8b28a", current: "#ffd166", done: "#f1e4c8" }, ["swarm working…", "swarm home"]),
876
+ secondary: Wt(e, { base: "#c8b28a", current: "#ffd166", done: "#f1e4c8" }, ["swarm working…", "swarm home"]),
877
877
  color: e.color,
878
878
  size: 0.34,
879
879
  maxWidth: 9,
@@ -939,8 +939,8 @@ function Eo() {
939
939
  }), null;
940
940
  }
941
941
  function Fo() {
942
- return /* @__PURE__ */ q(
943
- qt,
942
+ return /* @__PURE__ */ j(
943
+ jt,
944
944
  {
945
945
  title: "hive · glowing honeycomb",
946
946
  subtitle: "♛ queens = agents, workers = subagents flying out along their flight paths · LLM calls flood the comb with honey light · ✿ MCP flowers, one petal per backend · the honey store = the knowledge graph",
@@ -952,7 +952,7 @@ function Fo() {
952
952
  fit: { nRef: 4, min: 0.62, max: 1.6, minRadius: 5.5 },
953
953
  agentRadius: 1.9,
954
954
  graph: { natural: Te, radius: 2.4 },
955
- Background: /* @__PURE__ */ q(te, { children: [
955
+ Background: /* @__PURE__ */ j(te, { children: [
956
956
  /* @__PURE__ */ g(Eo, {}),
957
957
  /* @__PURE__ */ g(To, {}),
958
958
  /* @__PURE__ */ g(go, {})
@@ -963,7 +963,7 @@ function Fo() {
963
963
  Backend: xo,
964
964
  GraphResource: vo,
965
965
  cluster: { radius: 1.6, variant: "swarm", color: "#ffb627" },
966
- PostFX: /* @__PURE__ */ q(Tt, { multisampling: 0, children: [
966
+ PostFX: /* @__PURE__ */ j(Tt, { multisampling: 0, children: [
967
967
  /* @__PURE__ */ g(Et, { mipmapBlur: !0, intensity: 1.15, luminanceThreshold: 0.22, luminanceSmoothing: 0.3, radius: 0.78 }),
968
968
  /* @__PURE__ */ g(Rt, { eskil: !1, offset: 0.2, darkness: 0.88 })
969
969
  ] }),