agentglow 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/README.md +17 -0
  2. package/cli/agentglow.mjs +177 -0
  3. package/cli/lib/net.mjs +73 -0
  4. package/cli/lib/server.mjs +128 -0
  5. package/cli/lib/settings.mjs +192 -0
  6. package/cli/lib/uv.mjs +139 -0
  7. package/dist/chunks/{KitScene-BuFtYuhc.js → KitScene-C3SZiKL5.js} +1101 -1045
  8. package/dist/chunks/{index-DO9SAG-u.js → index--dwzdFRh.js} +1 -1
  9. package/dist/chunks/{index-DCmhxN8v.js → index-B2PGx_wt.js} +37 -37
  10. package/dist/chunks/{index-HyfZ0ePz.js → index-BZOG_CQS.js} +110 -110
  11. package/dist/chunks/{index-Bo5HRf-O.js → index-BfGluv59.js} +69 -69
  12. package/dist/chunks/{index-tonipLb2.js → index-Bm4te7Ug.js} +1 -1
  13. package/dist/chunks/{index-e6egU2Q6.js → index-Bqv_wy49.js} +1 -1
  14. package/dist/chunks/{index-ZT88hgW-.js → index-Bsmr7FwH.js} +1 -1
  15. package/dist/chunks/{index-BPyTLdiF.js → index-Bw31uayO.js} +33 -33
  16. package/dist/chunks/{index-Dn6oRasS.js → index-C4F16M9q.js} +117 -117
  17. package/dist/chunks/{index-jLXx_Wgk.js → index-CRRHsMqy.js} +15 -15
  18. package/dist/chunks/{index-Cyv7bII1.js → index-CS8eZTr_.js} +1 -1
  19. package/dist/chunks/{index-D733n3Hf.js → index-CdzGoWrn.js} +1 -1
  20. package/dist/chunks/{index-XMOz-HBf.js → index-CvDEulcq.js} +1 -1
  21. package/dist/chunks/{index-D0UvupqM.js → index-DXBfdHew.js} +1 -1
  22. package/dist/chunks/{index-C42Ihyo1.js → index-DdCs_ye9.js} +222 -222
  23. package/dist/chunks/{index-C5YqtHnC.js → index-_KrED-np.js} +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/types/world.d.ts +10 -0
  26. package/package.json +12 -2
@@ -3,7 +3,7 @@ import { EffectComposer as ht, Bloom as mt, ChromaticAberration as Mt, Vignette
3
3
  import { useMemo as x, useRef as w, useEffect as Je, useState as wt } from "react";
4
4
  import * as e from "three";
5
5
  import { useFrame as te, useThree as ot } from "@react-three/fiber";
6
- import { k as Pe, K as st, w as Q, a as he, m as xt, G as bt, L as et, n as St, c as Qe, d as At, T as tt, R as vt, S as Se, x as Le, f as Fe, p as Ct, e as ut, j as Bt, q as Gt } from "./KitScene-BuFtYuhc.js";
6
+ import { k as Pe, K as st, w as Q, a as he, m as xt, G as bt, L as et, n as St, c as Qe, d as At, T as tt, R as vt, S as Se, x as Le, f as Fe, p as Ct, e as ut, j as Bt, q as Gt } from "./KitScene-C3SZiKL5.js";
7
7
  var dt;
8
8
  const Ve = typeof window < "u" && !!((dt = window.matchMedia) != null && dt.call(window, "(prefers-reduced-motion: reduce)").matches), $ = Ve ? 0.15 : 1, re = 7, Oe = 1.3, ue = { speed: 1, paused: !1 }, we = { ax: re, ay: re }, xe = /* @__PURE__ */ new Map(), We = (r) => 1 - Math.pow(1 - Math.min(1, Math.max(0, r)), 3);
9
9
  let Ie = null;
@@ -6,7 +6,7 @@ import { useFrame as H, useThree as Yt } from "@react-three/fiber";
6
6
  import { EffectComposer as Zt, Bloom as $t, Vignette as Jt } from "@react-three/postprocessing";
7
7
  import { useRef as z, useMemo as A, useEffect as pe } from "react";
8
8
  import * as n from "three";
9
- import { a as je, h as Qt, k as ie, x as Xe, c as eo, f as Ke, r as N, T as ke, w as V, L as ve, d as to, E as oo, q as Ye, S as Se, R as no, u as Gt, o as so, s as ao, K as ro, m as io, G as lo, n as co, j as po, A as uo } from "./KitScene-BuFtYuhc.js";
9
+ import { a as je, h as Qt, k as ie, x as Xe, c as eo, f as Ke, r as N, T as ke, w as V, L as ve, d as to, F as oo, q as Ye, S as Se, R as no, u as Gt, o as so, s as ao, K as ro, m as io, G as lo, n as co, j as po, B as uo } from "./KitScene-C3SZiKL5.js";
10
10
  const Ct = 1.6, Rt = 1.1;
11
11
  function _t(e, t) {
12
12
  const o = Ke.spread;
@@ -36,7 +36,7 @@ function fo(e, t) {
36
36
  if (o)
37
37
  return t.set(o.x, 0.75, o.z);
38
38
  }
39
- const te = 16, Be = 12, Y = 1, Re = 0.92, Pe = 0.42, Ae = -15 / 2, re = 0, X = te * Be, go = Pe + Be * Re + 0.1, It = te * Y / 2 + 0.6;
39
+ const te = 16, Be = 12, Y = 1, Re = 0.92, Pe = 0.42, Ae = -15 / 2, re = 0, X = te * Be, go = Pe + Be * Re + 0.1, Ft = te * Y / 2 + 0.6;
40
40
  function Ue(e, t) {
41
41
  const o = e % te, r = Math.floor(e / te) % Be;
42
42
  return t.set(Ae + o * Y, Pe + r * Re + 0.26, re + 0.05);
@@ -76,7 +76,7 @@ function wo() {
76
76
  }), Me.colorSpace = n.NoColorSpace, Me);
77
77
  }
78
78
  let Ge = null;
79
- function Ft() {
79
+ function It() {
80
80
  return Ge || (Ge = lt(
81
81
  128,
82
82
  32,
@@ -290,8 +290,8 @@ function Co({ child: e }) {
290
290
  o.current.scale.set(w, 1, g);
291
291
  const m = a.uniforms;
292
292
  m.uLen.value = w, m.uGrow.value = b * (1 - T), m.uOp.value = x, m.uFlow.value = N ? 0 : 1, m.uTime.value += (M ? 1 : 0.25) * Math.min(c, 0.05), m.uHot.value.copy(E).multiplyScalar(0.6 + (M ? 0.4 : 0));
293
- const I = Math.max(1e-3, b * (1 - T));
294
- r.current.scale.set(w * I, De - 0.02, g * 1.13), r.current.position.x = u.a.x + y * I / 2, r.current.position.z = u.a.z + P * I / 2, r.current.position.y = (De - 0.02) / 2, l.opacity = x, o.current.visible = r.current.visible = x > 0.01 && I > 2e-3;
293
+ const F = Math.max(1e-3, b * (1 - T));
294
+ r.current.scale.set(w * F, De - 0.02, g * 1.13), r.current.position.x = u.a.x + y * F / 2, r.current.position.z = u.a.z + P * F / 2, r.current.position.y = (De - 0.02) / 2, l.opacity = x, o.current.visible = r.current.visible = x > 0.01 && F > 2e-3;
295
295
  }), /* @__PURE__ */ R(ye, { children: [
296
296
  /* @__PURE__ */ s("mesh", { ref: r, geometry: S, material: l }),
297
297
  /* @__PURE__ */ s("mesh", { ref: o, geometry: Ao, material: a })
@@ -333,7 +333,7 @@ const me = new n.MeshStandardMaterial({ color: "#26201d", metalness: 0.65, rough
333
333
  let et = null;
334
334
  const Bt = () => {
335
335
  if (et) return et;
336
- const e = Ft().clone();
336
+ const e = It().clone();
337
337
  return e.repeat.set(3, 1), e.needsUpdate = !0, et = new n.MeshBasicMaterial({ map: e, color: new n.Color(0.55, 0.55, 0.55), toneMapped: !1 });
338
338
  }, Vt = new n.MeshBasicMaterial({ color: new n.Color("#ffb020").multiplyScalar(0.32), toneMapped: !1 }), ct = (e, t, o) => t > 0 ? 1 : U(1 - (o - e) / 1400);
339
339
  function Po({ mcp: e, backend: t }) {
@@ -576,9 +576,9 @@ void main() {
576
576
  ), Uo = new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2), Tt = new n.MeshStandardMaterial({ color: "#2a2320", metalness: 0.6, roughness: 0.4 }), tt = { queued: 0, running: 1, done: 2, failed: 3 }, Et = new n.Vector3(0, 1, 0), ot = new n.Vector3(), xe = new n.Vector3(), Go = new n.Vector3(), Ot = new n.Matrix4(), se = { b1: 0, b2: 0 };
577
577
  function _o({ run: e }) {
578
578
  const t = e.run ?? V.runs.get(e.id);
579
- return t ? /* @__PURE__ */ s(Io, { kr: e, run: t }) : null;
579
+ return t ? /* @__PURE__ */ s(Fo, { kr: e, run: t }) : null;
580
580
  }
581
- function Io({ kr: e, run: t }) {
581
+ function Fo({ kr: e, run: t }) {
582
582
  const o = A(
583
583
  () => new n.ShaderMaterial({
584
584
  vertexShader: Eo,
@@ -622,15 +622,15 @@ function Io({ kr: e, run: t }) {
622
622
  const k = (Pt(t.handoffFrom, c, se) - c.u0) / f, oe = (Pt(t.handoffTo, c, se) - c.u0) / f;
623
623
  M.uSweep.value = k + (oe - k) * Ve(g / 1.1), M.uSweepK.value = 1 - U((g - 0.9) / 0.5);
624
624
  } else M.uSweepK.value = 0;
625
- const m = N ? 0 : v.elapsedTime, I = Math.max(0.75, Ke.spread * 0.9);
625
+ const m = N ? 0 : v.elapsedTime, F = Math.max(0.75, Ke.spread * 0.9);
626
626
  for (let k = 0; k < Se.length; k++) {
627
- const oe = Se[k], F = t.steps[oe], $ = r[k], we = F === "running" ? ee : F === "done" ? Te : F === "failed" ? Z("#ff2d2d") : E, Ee = F === "running" ? 1.2 + 0.4 * Math.sin(m * 5) : F === "done" ? 0.55 : F === "failed" ? 1 : 0.12;
627
+ const oe = Se[k], I = t.steps[oe], $ = r[k], we = I === "running" ? ee : I === "done" ? Te : I === "failed" ? Z("#ff2d2d") : E, Ee = I === "running" ? 1.2 + 0.4 * Math.sin(m * 5) : I === "done" ? 0.55 : I === "failed" ? 1 : 0.12;
628
628
  $.lamp.color.copy(we).multiplyScalar(Ee * L * x), $.glow.color.copy(we).multiplyScalar(Ee * 0.35 * L * x);
629
629
  const D = u.current[k];
630
630
  if (D) {
631
631
  D.visible = t.hasSteps && L * x > 0.02;
632
632
  const K = k === 0 ? c.u0 + 1.2 : k === 1 ? se.b1 + 0.6 : se.b2 + 0.6;
633
- D.position.set(K, 0, C), D.scale.setScalar(I);
633
+ D.position.set(K, 0, C), D.scale.setScalar(F);
634
634
  }
635
635
  }
636
636
  }), /* @__PURE__ */ R("group", { ref: a, children: [
@@ -640,12 +640,12 @@ function Io({ kr: e, run: t }) {
640
640
  /* @__PURE__ */ s("mesh", { geometry: S, material: Tt, scale: [0.5, 0.18, 0.08], "position-y": 1.55 }),
641
641
  /* @__PURE__ */ s("mesh", { geometry: B, material: r[h].lamp, scale: [0.1, 0.14, 0.1], "position-y": 1.72 }),
642
642
  /* @__PURE__ */ s("sprite", { material: r[h].glow, scale: 1.2, "position-y": 1.72 }),
643
- t.hasSteps ? /* @__PURE__ */ s(Fo, { run: t, k: h }) : null
643
+ t.hasSteps ? /* @__PURE__ */ s(Io, { run: t, k: h }) : null
644
644
  ] }, v)),
645
645
  /* @__PURE__ */ s("group", { ref: i, children: /* @__PURE__ */ s(Wo, { run: t }) })
646
646
  ] });
647
647
  }
648
- function Fo({ run: e, k: t }) {
648
+ function Io({ run: e, k: t }) {
649
649
  Gt();
650
650
  const o = Se[t], r = e.steps[o];
651
651
  return /* @__PURE__ */ s(
@@ -691,11 +691,11 @@ function Do(e) {
691
691
  _t(t, ae), e(Ye(t, ae.u0 + 3, ae.v0 - 1.4, nt), 1.6), e(Ye(t, ae.u1, ae.v1, nt), 0.6), e(Ye(t, ae.u0, ae.v1, nt), 0.6);
692
692
  }
693
693
  const jo = new n.MeshStandardMaterial({ color: "#1c1714", metalness: 0.55, roughness: 0.42 }), qo = new n.MeshStandardMaterial({ color: "#0f0c0b", metalness: 0.4, roughness: 0.6 }), Q = new n.MeshStandardMaterial({ color: "#2a2320", metalness: 0.7, roughness: 0.35 }), st = new n.MeshStandardMaterial({ color: "#e88a1a", metalness: 0.5, roughness: 0.35, emissive: new n.Color("#ff7a00"), emissiveIntensity: 0.18 });
694
- let Ie = null;
694
+ let Fe = null;
695
695
  const Ko = () => {
696
- if (Ie) return Ie;
697
- const e = Ft().clone();
698
- return e.repeat.set(6, 1), e.needsUpdate = !0, Ie = new n.MeshBasicMaterial({ map: e, color: new n.Color(0.75, 0.75, 0.75), toneMapped: !1 }), Ie;
696
+ if (Fe) return Fe;
697
+ const e = It().clone();
698
+ return e.repeat.set(6, 1), e.needsUpdate = !0, Fe = new n.MeshBasicMaterial({ map: e, color: new n.Color(0.75, 0.75, 0.75), toneMapped: !1 }), Fe;
699
699
  }, No = new n.EdgesGeometry(new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2)), Ho = new n.Color("#2a2627");
700
700
  function Xo({ agent: e, selected: t, onSelect: o }) {
701
701
  const r = e.inst, a = !r.subagent, l = A(() => Z(ke[r.type]), [r.type]), u = A(() => vo(r.id), [r.id]), i = z(null), c = z(null), p = z(null), v = A(() => (u - 0.5) * 0.35, [u]), h = z(null), y = z(null), P = z(null), w = z(null), f = z(null), b = z(null), C = z(null), T = z(null), L = z(null), x = z(null), M = z(null), g = A(
@@ -736,20 +736,20 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
736
736
  );
737
737
  pe(() => () => void it.delete(r.id), [r.id]), H(({ clock: k }, oe) => {
738
738
  var bt, Mt, xt, St, At;
739
- const F = performance.now(), $ = N ? 0 : k.elapsedTime, we = (F - r.bornAt) / 1e3, Ee = r.parent ? 0.55 : 0.1, D = Ve((we - Ee) / 0.9), K = r.exitAt ? (F - r.exitAt) / 1e3 : -1, pt = K >= 0 ? 1 - U(K / 0.5) : 1, ut = K >= 0 ? yo((K - 0.45) / 1.9) : 0, Ne = K < 0;
739
+ const I = performance.now(), $ = N ? 0 : k.elapsedTime, we = (I - r.bornAt) / 1e3, Ee = r.parent ? 0.55 : 0.1, D = Ve((we - Ee) / 0.9), K = r.exitAt ? (I - r.exitAt) / 1e3 : -1, pt = K >= 0 ? 1 - U(K / 0.5) : 1, ut = K >= 0 ? yo((K - 0.45) / 1.9) : 0, Ne = K < 0;
740
740
  let ue = !1;
741
741
  for (const J of V.mcpPending.values()) J.instance === r.id && (ue = !0);
742
742
  const mt = Ne && (r.status === "thinking" || r.status === "spawning");
743
- m.think += ((mt ? 1 : 0) - m.think) * 0.08, r.llmCalls !== m.llm && (m.llm = r.llmCalls, m.llmAt = F, m.llmK = r.pulse, x.current && (x.current.getWorldPosition(m.tmp), Je(m.tmp, Math.round(10 + m.llmK * 26), ee, 3.2 + m.llmK * 1.4, 0.9 + m.llmK * 0.5)));
743
+ m.think += ((mt ? 1 : 0) - m.think) * 0.08, r.llmCalls !== m.llm && (m.llm = r.llmCalls, m.llmAt = I, m.llmK = r.pulse, x.current && (x.current.getWorldPosition(m.tmp), Je(m.tmp, Math.round(10 + m.llmK * 26), ee, 3.2 + m.llmK * 1.4, 0.9 + m.llmK * 0.5)));
744
744
  const ht = r.toolCalls + r.mcpCalls;
745
- ht !== m.tools && (m.armMcp = r.mcpCalls > 0 && ((bt = r.recent[0]) == null ? void 0 : bt.type) === "mcp", m.tools = ht, m.armAt = F), r.status === "failed" && K >= 0 && !m.failedBurst && (m.failedBurst = !0, m.tmp.copy(m.top), Je(m.tmp, 40, Ce, 4, 2.2));
745
+ ht !== m.tools && (m.armMcp = r.mcpCalls > 0 && ((bt = r.recent[0]) == null ? void 0 : bt.type) === "mcp", m.tools = ht, m.armAt = I), r.status === "failed" && K >= 0 && !m.failedBurst && (m.failedBurst = !0, m.tmp.copy(m.top), Je(m.tmp, 40, Ce, 4, 2.2));
746
746
  const ft = -2.3 * (1 - D) - 2.4 * ut;
747
747
  h.current && (h.current.position.y = ft);
748
748
  const He = e.scale;
749
749
  (Mt = i.current) == null || Mt.position.copy(e.live), (xt = c.current) == null || xt.scale.setScalar(He), (St = p.current) == null || St.position.set(0, 2.95 * He + (a ? 0.15 : 0.05), 0);
750
750
  const dt = Math.max(0.2, (ft + ho) * He);
751
751
  it.set(r.id, dt), m.top.set(e.live.x, dt, e.live.z);
752
- const gt = (F - m.llmAt) / 1e3, Oe = Math.exp(-gt * 3.2) * m.llmK, Kt = mt ? 0.85 + 0.15 * Math.sin($ * 9 + u * 7) : 0.32 + 0.06 * Math.sin($ * 1.3 + u * 5), j = pt * D;
752
+ const gt = (I - m.llmAt) / 1e3, Oe = Math.exp(-gt * 3.2) * m.llmK, Kt = mt ? 0.85 + 0.15 * Math.sin($ * 9 + u * 7) : 0.32 + 0.06 * Math.sin($ * 1.3 + u * 5), j = pt * D;
753
753
  m.c.copy(l).multiplyScalar((Kt + Oe * 0.7) * 1.25), r.status === "failed" && m.c.lerp(Ce, 0.7), g.screen.color.copy(m.c).multiplyScalar(j).lerp(Ho, 1 - pt), g.vent.color.copy(l).multiplyScalar((0.35 + m.think * 0.5 + Oe * 0.4) * j), g.trim.color.copy(E).multiplyScalar((0.55 + m.think * 0.45 + (t ? 0.8 : 0)) * j), g.halo.color.copy(l).multiplyScalar((0.1 + m.think * 0.12 + Oe * 0.25) * j), g.rim.color.copy(ee).multiplyScalar((0.25 + Oe * 2.4) * j);
754
754
  const yt = ue && Ne ? Math.sin($ * 7) > 0 || N ? 1 : 0.15 : 0;
755
755
  if (ue && Ne ? g.beacon.color.copy(Ce).lerp(E, 0.25).multiplyScalar(0.4 + yt * 1.4) : g.beacon.color.copy(E).multiplyScalar((0.25 + m.think * 1.2) * j), y.current && (m.spin += oe * (N ? 0 : 5.5), y.current.rotation.y = m.spin, y.current.visible = j > 0.05 && (m.think > 0.05 || ue), g.beam.color.copy(ue ? Ce : E).multiplyScalar((ue ? 0.5 * yt : 0.42 * m.think) * j)), P.current) {
@@ -761,10 +761,10 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
761
761
  f.current.visible = J > 0.02, g.hatch.color.copy(E).multiplyScalar(J * 1.6);
762
762
  }
763
763
  w.current && (w.current.visible = t && j > 0.05, w.current.rotation.y = $ * 0.6, g.sel.color.copy(ee).multiplyScalar(0.8 + 0.25 * Math.sin($ * 3)));
764
- const vt = U((F - m.armAt) / 1500), be = vt < 1 ? Math.sin(Math.PI * de(vt)) : 0, wt = 0.9, Nt = m.armMcp ? Math.PI - v : -Math.PI / 2 + 0.25;
765
- b.current && (b.current.rotation.y = wt + (Nt - wt) * be + Math.sin($ * 0.7 + u * 9) * 0.04), C.current && (C.current.rotation.z = -0.15 - be * 0.85), T.current && (T.current.rotation.z = -2.1 + be * 1.05), g.tip.color.copy(ee).multiplyScalar(be * 1.2 * j), be > 0.65 && L.current && F - m.lastWeld > 45 && (m.lastWeld = F, L.current.getWorldPosition(m.tmp), Je(m.tmp, 3, E, 1.6, 1.4, 0.6)), (At = M.current) == null || At.setOpacity(ao(r.id) ? U(D * 1.4 - 0.2) * (1 - U(K / 1.2)) : 0);
764
+ const vt = U((I - m.armAt) / 1500), be = vt < 1 ? Math.sin(Math.PI * de(vt)) : 0, wt = 0.9, Nt = m.armMcp ? Math.PI - v : -Math.PI / 2 + 0.25;
765
+ b.current && (b.current.rotation.y = wt + (Nt - wt) * be + Math.sin($ * 0.7 + u * 9) * 0.04), C.current && (C.current.rotation.z = -0.15 - be * 0.85), T.current && (T.current.rotation.z = -2.1 + be * 1.05), g.tip.color.copy(ee).multiplyScalar(be * 1.2 * j), be > 0.65 && L.current && I - m.lastWeld > 45 && (m.lastWeld = I, L.current.getWorldPosition(m.tmp), Je(m.tmp, 3, E, 1.6, 1.4, 0.6)), (At = M.current) == null || At.setOpacity(ao(r.id) ? U(D * 1.4 - 0.2) * (1 - U(K / 1.2)) : 0);
766
766
  });
767
- const I = (k) => {
767
+ const F = (k) => {
768
768
  k.stopPropagation(), o(r.id);
769
769
  }, W = () => document.body.style.cursor = "pointer", G = () => document.body.style.cursor = "", _ = r.id.split(":")[2];
770
770
  return /* @__PURE__ */ R("group", { ref: i, children: [
@@ -773,9 +773,9 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
773
773
  /* @__PURE__ */ s("mesh", { ref: w, geometry: Lt, material: g.sel, scale: 1.85, "position-y": 0.02, visible: !1 }),
774
774
  /* @__PURE__ */ s("mesh", { ref: P, geometry: Lt, material: g.shock, "position-y": 0.03, visible: !1 }),
775
775
  /* @__PURE__ */ R("group", { ref: h, "position-y": -2.3, children: [
776
- /* @__PURE__ */ s("mesh", { geometry: S, material: qo, scale: [2.2, 0.22, 2], "position-y": 0.11, onClick: I, onPointerOver: W, onPointerOut: G }),
776
+ /* @__PURE__ */ s("mesh", { geometry: S, material: qo, scale: [2.2, 0.22, 2], "position-y": 0.11, onClick: F, onPointerOver: W, onPointerOut: G }),
777
777
  /* @__PURE__ */ s("mesh", { geometry: S, material: Ko(), scale: [2.24, 0.07, 2.04], "position-y": 0.19 }),
778
- /* @__PURE__ */ s("mesh", { geometry: S, material: jo, scale: [1.7, 1.25, 1.5], "position-y": 0.845, onClick: I, onPointerOver: W, onPointerOut: G }),
778
+ /* @__PURE__ */ s("mesh", { geometry: S, material: jo, scale: [1.7, 1.25, 1.5], "position-y": 0.845, onClick: F, onPointerOver: W, onPointerOut: G }),
779
779
  /* @__PURE__ */ s("lineSegments", { geometry: bo, material: g.trim, scale: [1.71, 1.26, 1.51], "position-y": 0.845 }),
780
780
  /* @__PURE__ */ s("mesh", { geometry: S, material: Q, scale: [1.82, 0.09, 1.62], "position-y": 1.51 }),
781
781
  /* @__PURE__ */ s("mesh", { geometry: S, material: g.screen, scale: [1.18, 0.4, 0.02], position: [0, 0.98, 0.755] }),
@@ -828,7 +828,7 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
828
828
  ) })
829
829
  ] });
830
830
  }
831
- const Fe = 4, at = new n.MeshStandardMaterial({ color: "#c2560f", metalness: 0.6, roughness: 0.4, emissive: new n.Color("#ff6a00"), emissiveIntensity: 0.35 }), Ut = new n.MeshStandardMaterial({ color: "#2b2420", metalness: 0.6, roughness: 0.5 }), Yo = 64;
831
+ const Ie = 4, at = new n.MeshStandardMaterial({ color: "#c2560f", metalness: 0.6, roughness: 0.4, emissive: new n.Color("#ff6a00"), emissiveIntensity: 0.35 }), Ut = new n.MeshStandardMaterial({ color: "#2b2420", metalness: 0.6, roughness: 0.5 }), Yo = 64;
832
832
  function Zo({ galaxy: e }) {
833
833
  const t = A(() => {
834
834
  const f = new n.MeshBasicMaterial({ map: Wt(), toneMapped: !1 }), b = new n.InstancedMesh(S, f, X), C = new n.Object3D(), T = new n.Vector3();
@@ -867,13 +867,13 @@ function Zo({ galaxy: e }) {
867
867
  []
868
868
  );
869
869
  pe(() => void i.dirty.fill(1), [o, i]);
870
- const c = z([]), p = z([]), v = z(Array(Fe).fill(""));
870
+ const c = z([]), p = z([]), v = z(Array(Ie).fill(""));
871
871
  H(() => {
872
872
  const f = performance.now();
873
873
  i.fire.fill(0), i.white.fill(0), i.push.fill(0), l.begin(), u.begin();
874
874
  const b = V.flares;
875
875
  for (let x = Math.max(0, b.length - Yo); x < b.length; x++) {
876
- const M = b[x], g = a(M.node), m = (f - M.start) / 1e3, I = V.instances.get(M.instance) ?? V.archive.get(M.instance), W = I ? Z(ke[I.type]) : E, G = M.op === "write", _ = m < 0.3 ? m / 0.3 : Math.exp(-(m - 0.3) * 1.3);
876
+ const M = b[x], g = a(M.node), m = (f - M.start) / 1e3, F = V.instances.get(M.instance) ?? V.archive.get(M.instance), W = F ? Z(ke[F.type]) : E, G = M.op === "write", _ = m < 0.3 ? m / 0.3 : Math.exp(-(m - 0.3) * 1.3);
877
877
  if (_ > i.fire[g] && (i.fire[g] = _, i.fireC[g].copy(G ? Te : W), i.white[g] = G ? 1 : 0), G && (i.push[g] = Math.max(i.push[g], Math.sin(Math.PI * U(m / 0.9)))), i.dirty[g] = 1, m < 2.2 && he(M.instance, i.w)) {
878
878
  Ue(g, i.b), i.b.z += 0.4, io(i.w, i.a), ze(i.a, i.b, 4, i.c);
879
879
  const k = Math.min(1, m / 0.25) * Math.pow(1 - m / 2.2, 1.4), oe = G ? Math.min(1, m * 0.9) : 1 - Math.min(1, m * 0.9);
@@ -893,7 +893,7 @@ function Zo({ galaxy: e }) {
893
893
  }
894
894
  T && (t.instanceMatrix.needsUpdate = !0, t.instanceColor && (t.instanceColor.needsUpdate = !0));
895
895
  let L = 0;
896
- for (let x = V.flares.length - 1; x >= 0 && L < Fe; x--) {
896
+ for (let x = V.flares.length - 1; x >= 0 && L < Ie; x--) {
897
897
  const M = V.flares[x];
898
898
  if (f - M.start > 2200) break;
899
899
  let g = !1;
@@ -901,16 +901,16 @@ function Zo({ galaxy: e }) {
901
901
  if (g) continue;
902
902
  const m = a(M.node);
903
903
  Ue(m, i.p);
904
- let I = !1;
904
+ let F = !1;
905
905
  for (let _ = 0; _ < L; _++) {
906
906
  const k = p.current[_];
907
- k && Math.abs(k.position.y - (i.p.y + 0.55)) < 0.6 && Math.abs(k.position.x - i.p.x) < 3.4 && (I = !0);
907
+ k && Math.abs(k.position.y - (i.p.y + 0.55)) < 0.6 && Math.abs(k.position.x - i.p.x) < 3.4 && (F = !0);
908
908
  }
909
- if (I) continue;
909
+ if (F) continue;
910
910
  const W = c.current[L], G = p.current[L];
911
911
  W && G && (G.position.set(i.p.x, i.p.y + 0.55, i.p.z + 0.5), v.current[L] !== M.node && (W.setText(`${M.op === "write" ? "wrote" : "read"} · ${M.node}`), W.setColor(M.op === "write" ? "#ffd23f" : "#ffab1a")), W.setOpacity(1)), v.current[L] = M.node, L++;
912
912
  }
913
- for (let x = L; x < Fe; x++) {
913
+ for (let x = L; x < Ie; x++) {
914
914
  const M = c.current[x];
915
915
  M == null || M.setOpacity(0), v.current[x] = "";
916
916
  }
@@ -933,7 +933,7 @@ function Zo({ galaxy: e }) {
933
933
  /* @__PURE__ */ s("mesh", { geometry: S, material: Ut, scale: [y + 2, w + 1.4, 0.15], position: [P, (w + 1.4) / 2, re - 0.7] }),
934
934
  /* @__PURE__ */ s("primitive", { object: l.lines }),
935
935
  /* @__PURE__ */ s("primitive", { object: u.mesh }),
936
- Array.from({ length: Fe }, (f, b) => /* @__PURE__ */ s("group", { ref: (C) => void (p.current[b] = C), children: /* @__PURE__ */ s(ve, { ref: (C) => void (c.current[b] = C), text: "", plate: "box", size: 0.22, opacity: 0, fadeMs: 250, pxRange: [7.5, 11.5] }) }, b)),
936
+ Array.from({ length: Ie }, (f, b) => /* @__PURE__ */ s("group", { ref: (C) => void (p.current[b] = C), children: /* @__PURE__ */ s(ve, { ref: (C) => void (c.current[b] = C), text: "", plate: "box", size: 0.22, opacity: 0, fadeMs: 250, pxRange: [7.5, 11.5] }) }, b)),
937
937
  /* @__PURE__ */ s(lo, { position: [P, w + 1.6, re], suffix: " · rack", color: "#ffab1a", plate: "box", letterSpacing: 0.04, size: 0.7, opacity: 0.85, pxRange: [9, 13] })
938
938
  ] });
939
939
  }
@@ -948,7 +948,7 @@ function Jo(e) {
948
948
  for (const t of uo()) e(rt.copy(ie.clusterTarget[t]).setY(1.4), 3.6);
949
949
  if (ie.graphWanted) {
950
950
  const t = ie.graph;
951
- e(rt.set(t.target.x, (go + 2) * (qt / It), t.target.z), 1.6);
951
+ e(rt.set(t.target.x, (go + 2) * (qt / Ft), t.target.z), 1.6);
952
952
  }
953
953
  }
954
954
  function Qo() {
@@ -981,7 +981,7 @@ function ln() {
981
981
  fit: { nRef: 4, min: 0.62, max: 1.45, minRadius: 6.5 },
982
982
  agentRadius: 1.6,
983
983
  agentHeight: 3.1,
984
- graph: { natural: It, radius: qt },
984
+ graph: { natural: Ft, radius: qt },
985
985
  peripheryGap: 5,
986
986
  Background: en,
987
987
  Agent: Xo,