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
@@ -1,83 +1,83 @@
1
- var Ht = Object.defineProperty;
2
- var Xt = (e, t, o) => t in e ? Ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var O = (e, t, o) => Xt(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { jsxs as R, Fragment as ye, jsx as s } from "react/jsx-runtime";
5
- import { useFrame as H, useThree as Yt } from "@react-three/fiber";
6
- import { EffectComposer as Zt, Bloom as $t, Vignette as Jt } from "@react-three/postprocessing";
7
- import { useRef as z, useMemo as A, useEffect as pe } from "react";
1
+ var Xt = Object.defineProperty;
2
+ var Yt = (e, t, o) => t in e ? Xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var O = (e, t, o) => Yt(e, typeof t != "symbol" ? t + "" : t, o);
4
+ import { jsxs as R, Fragment as ve, jsx as s } from "react/jsx-runtime";
5
+ import { useFrame as N, useThree as Zt } from "@react-three/fiber";
6
+ import { EffectComposer as $t, Bloom as Jt, Vignette as Qt } from "@react-three/postprocessing";
7
+ import { useRef as P, 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, 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-Bm1I35Zc.js";
10
- const Ct = 1.6, Rt = 1.1;
11
- function _t(e, t) {
9
+ import { a as je, h as eo, n as ie, z as Xe, c as to, f as Ke, r as K, T as Te, w as V, L as we, d as oo, N as no, v as Ye, S as Ze, R as so, j as Ae, u as _t, H as ao, t as ro, s as io, K as lo, o as co, G as po, q as uo, m as mo, E as ho } from "./KitScene-DG_pcnWW.js";
10
+ const Rt = 1.6, zt = 1.1;
11
+ function It(e, t) {
12
12
  const o = Ke.spread;
13
- return t.u0 = e.cu - e.hu - Ct * o, t.u1 = e.cu + e.hu + Ct * o, t.v0 = e.cv - e.hv - Rt * o, t.v1 = e.cv + e.hv + Rt * o, t;
13
+ return t.u0 = e.cu - e.hu - Rt * o, t.u1 = e.cu + e.hu + Rt * o, t.v0 = e.cv - e.hv - zt * o, t.v1 = e.cv + e.hv + zt * o, t;
14
14
  }
15
- const Ze = { plan: "planner", research: "researcher", write: "writer" };
16
- function mo(e) {
17
- const t = Xe(Ze.plan), o = Xe(Ze.research), r = Xe(Ze.write);
15
+ const $e = { plan: "planner", research: "researcher", write: "writer" };
16
+ function fo(e) {
17
+ const t = Xe($e.plan), o = Xe($e.research), r = Xe($e.write);
18
18
  return e.b1 = (t + o) / 2, e.b2 = o + (r - o) * 0.8, e;
19
19
  }
20
20
  function Pt(e, t, o) {
21
- return e === "plan" ? (t.u0 + o.b1) / 2 : e === "research" ? (o.b1 + o.b2) / 2 : (o.b2 + t.u1) / 2;
21
+ return e === 0 ? (t.u0 + o.b1) / 2 : e === 1 ? (o.b1 + o.b2) / 2 : (o.b2 + t.u1) / 2;
22
22
  }
23
- const ho = 1.55, it = /* @__PURE__ */ new Map();
24
- function he(e, t) {
23
+ const go = 1.55, lt = /* @__PURE__ */ new Map();
24
+ function fe(e, t) {
25
25
  const o = je(e);
26
26
  if (o)
27
- return t.set(o.x, it.get(e) ?? 0.5, o.z);
27
+ return t.set(o.x, lt.get(e) ?? 0.5, o.z);
28
28
  }
29
- function $e(e, t) {
29
+ function Je(e, t) {
30
30
  const o = ie.mcp.get(e);
31
31
  if (o)
32
32
  return t.set(o.pos.x - o.out.x * 1.9, 1.3, o.pos.z);
33
33
  }
34
- function fo(e, t) {
35
- const o = eo(e);
34
+ function yo(e, t) {
35
+ const o = to(e);
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, Ft = te * Y / 2 + 0.6;
39
+ const oe = 16, Ve = 12, X = 1, ze = 0.92, Pe = 0.42, Ce = -15 / 2, re = 0, H = oe * Ve, vo = Pe + Ve * ze + 0.1, Ft = oe * X / 2 + 0.6;
40
40
  function Ue(e, t) {
41
- const o = e % te, r = Math.floor(e / te) % Be;
42
- return t.set(Ae + o * Y, Pe + r * Re + 0.26, re + 0.05);
41
+ const o = e % oe, r = Math.floor(e / oe) % Ve;
42
+ return t.set(Ce + o * X, Pe + r * ze + 0.26, re + 0.05);
43
43
  }
44
- const U = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ve = (e) => 1 - Math.pow(1 - U(e), 3), yo = (e) => Math.pow(U(e), 2.2), de = (e) => {
44
+ const U = (e) => e < 0 ? 0 : e > 1 ? 1 : e, ke = (e) => 1 - Math.pow(1 - U(e), 3), wo = (e) => Math.pow(U(e), 2.2), ge = (e) => {
45
45
  const t = U(e);
46
46
  return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
47
47
  };
48
- function fe(e, t, o, r, a) {
48
+ function de(e, t, o, r, a) {
49
49
  const l = 1 - r;
50
50
  return a.set(l * l * e.x + 2 * l * r * t.x + r * r * o.x, l * l * e.y + 2 * l * r * t.y + r * r * o.y, l * l * e.z + 2 * l * r * t.z + r * r * o.z);
51
51
  }
52
- function ze(e, t, o, r) {
52
+ function Le(e, t, o, r) {
53
53
  return r.addVectors(e, t).multiplyScalar(0.5), r.y = Math.max(e.y, t.y) + o + e.distanceTo(t) * 0.18, r;
54
54
  }
55
- const zt = /* @__PURE__ */ new Map();
56
- function Z(e) {
57
- let t = zt.get(e);
58
- return t || zt.set(e, t = new n.Color(e)), t;
55
+ const Lt = /* @__PURE__ */ new Map();
56
+ function Y(e) {
57
+ let t = Lt.get(e);
58
+ return t || Lt.set(e, t = new n.Color(e)), t;
59
59
  }
60
60
  const E = new n.Color("#ffab1a");
61
61
  new n.Color("#ff6a13");
62
- const ee = new n.Color("#ffd23f"), Ce = new n.Color("#ff2d2d"), Te = new n.Color("#ffffff");
62
+ const te = new n.Color("#ffd23f"), Re = new n.Color("#ff2d2d"), Ee = new n.Color("#ffffff");
63
63
  new n.Color("#3b3440");
64
- const vo = (e) => Qt(e, 99);
65
- function lt(e, t, o, r = !1) {
64
+ const bo = (e) => eo(e, 99);
65
+ function ct(e, t, o, r = !1) {
66
66
  const a = document.createElement("canvas");
67
67
  a.width = e, a.height = t, o(a.getContext("2d"));
68
68
  const l = new n.CanvasTexture(a);
69
69
  return l.colorSpace = n.SRGBColorSpace, l.anisotropy = 4, r && (l.wrapS = l.wrapT = n.RepeatWrapping), l;
70
70
  }
71
- let Me = null;
72
- function wo() {
73
- return Me || (Me = lt(128, 128, (e) => {
71
+ let xe = null;
72
+ function Mo() {
73
+ return xe || (xe = ct(128, 128, (e) => {
74
74
  const t = e.createRadialGradient(64, 64, 0, 64, 64, 64);
75
75
  t.addColorStop(0, "rgba(255,255,255,1)"), t.addColorStop(0.18, "rgba(255,255,255,0.55)"), t.addColorStop(0.5, "rgba(255,255,255,0.12)"), t.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = t, e.fillRect(0, 0, 128, 128);
76
- }), Me.colorSpace = n.NoColorSpace, Me);
76
+ }), xe.colorSpace = n.NoColorSpace, xe);
77
77
  }
78
78
  let Ge = null;
79
- function It() {
80
- return Ge || (Ge = lt(
79
+ function Wt() {
80
+ return Ge || (Ge = ct(
81
81
  128,
82
82
  32,
83
83
  (e) => {
@@ -89,13 +89,13 @@ function It() {
89
89
  ), Ge);
90
90
  }
91
91
  let _e = null;
92
- function Wt() {
93
- return _e || (_e = lt(64, 64, (e) => {
92
+ function Dt() {
93
+ return _e || (_e = ct(64, 64, (e) => {
94
94
  e.fillStyle = "#5a5a5a", e.fillRect(0, 0, 64, 64), e.strokeStyle = "#ffffff", e.lineWidth = 7, e.strokeRect(3.5, 3.5, 57, 57), e.lineWidth = 4, e.beginPath(), e.moveTo(6, 6), e.lineTo(58, 58), e.stroke(), e.fillStyle = "#8a8a8a", e.fillRect(6, 30, 52, 4);
95
95
  }), _e);
96
96
  }
97
97
  function ce(e = "#fff") {
98
- return new n.SpriteMaterial({ map: wo(), color: e, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending, toneMapped: !1 });
98
+ return new n.SpriteMaterial({ map: Mo(), color: e, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending, toneMapped: !1 });
99
99
  }
100
100
  function We(e = "#fff", t = n.FrontSide) {
101
101
  return new n.MeshBasicMaterial({ color: e, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending, toneMapped: !1, side: t });
@@ -103,40 +103,40 @@ function We(e = "#fff", t = n.FrontSide) {
103
103
  function le(e = "#fff") {
104
104
  return new n.MeshBasicMaterial({ color: e, toneMapped: !1 });
105
105
  }
106
- const S = new n.BoxGeometry(1, 1, 1), B = new n.CylinderGeometry(1, 1, 1, 24);
106
+ const S = new n.BoxGeometry(1, 1, 1), T = new n.CylinderGeometry(1, 1, 1, 24);
107
107
  new n.CylinderGeometry(1, 1, 1, 12);
108
- const Lt = new n.RingGeometry(0.86, 1, 64).rotateX(-Math.PI / 2);
108
+ const Bt = new n.RingGeometry(0.86, 1, 64).rotateX(-Math.PI / 2);
109
109
  new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2);
110
- const Dt = new n.ConeGeometry(1, 1, 12).translate(0, 0.5, 0), bo = new n.EdgesGeometry(S), q = N ? 220 : 900, d = {
111
- n: q,
110
+ const jt = new n.ConeGeometry(1, 1, 12).translate(0, 0.5, 0), xo = new n.EdgesGeometry(S), j = K ? 220 : 900, d = {
111
+ n: j,
112
112
  head: 0,
113
- px: new Float32Array(q),
114
- py: new Float32Array(q),
115
- pz: new Float32Array(q),
116
- vx: new Float32Array(q),
117
- vy: new Float32Array(q),
118
- vz: new Float32Array(q),
119
- life: new Float32Array(q),
113
+ px: new Float32Array(j),
114
+ py: new Float32Array(j),
115
+ pz: new Float32Array(j),
116
+ vx: new Float32Array(j),
117
+ vy: new Float32Array(j),
118
+ vz: new Float32Array(j),
119
+ life: new Float32Array(j),
120
120
  // seconds left (<=0 = dead)
121
- max: new Float32Array(q),
122
- r: new Float32Array(q),
123
- g: new Float32Array(q),
124
- b: new Float32Array(q)
121
+ max: new Float32Array(j),
122
+ r: new Float32Array(j),
123
+ g: new Float32Array(j),
124
+ b: new Float32Array(j)
125
125
  };
126
- function Je(e, t, o, r = 4, a = 1.6, l = 1) {
127
- const u = N ? Math.ceil(t / 4) : t;
126
+ function Qe(e, t, o, r = 4, a = 1.6, l = 1) {
127
+ const u = K ? Math.ceil(t / 4) : t;
128
128
  for (let i = 0; i < u; i++) {
129
129
  const c = d.head;
130
130
  d.head = (d.head + 1) % d.n;
131
- const p = Math.random() * Math.PI * 2, v = a * (0.3 + Math.random() * 0.7);
132
- d.px[c] = e.x, d.py[c] = e.y, d.pz[c] = e.z, d.vx[c] = Math.cos(p) * v, d.vz[c] = Math.sin(p) * v, d.vy[c] = l * r * (0.55 + Math.random() * 0.6);
131
+ const p = Math.random() * Math.PI * 2, y = a * (0.3 + Math.random() * 0.7);
132
+ d.px[c] = e.x, d.py[c] = e.y, d.pz[c] = e.z, d.vx[c] = Math.cos(p) * y, d.vz[c] = Math.sin(p) * y, d.vy[c] = l * r * (0.55 + Math.random() * 0.6);
133
133
  const h = 0.45 + Math.random() * 0.75;
134
134
  d.life[c] = h, d.max[c] = h;
135
- const y = Math.random() * 0.5;
136
- d.r[c] = o.r + (1 - o.r) * y, d.g[c] = o.g + (1 - o.g) * y, d.b[c] = o.b + (1 - o.b) * y;
135
+ const v = Math.random() * 0.5;
136
+ d.r[c] = o.r + (1 - o.r) * v, d.g[c] = o.g + (1 - o.g) * v, d.b[c] = o.b + (1 - o.b) * v;
137
137
  }
138
138
  }
139
- class Mo {
139
+ class So {
140
140
  constructor() {
141
141
  O(this, "mesh");
142
142
  O(this, "o", new n.Object3D());
@@ -178,15 +178,15 @@ class qe {
178
178
  /** head in 0..1 = bright travelling pulse position (−1 = none); dash > 0 = marching dashes in the travel direction. */
179
179
  add(t, o, r, a, l, u = -1, i = 0, c = 0) {
180
180
  if (this.n >= this.max || l <= 2e-3) return;
181
- const p = this.geo.getAttribute("position"), v = this.geo.getAttribute("color"), h = this.n * this.seg * 2;
182
- for (let y = 0; y < this.seg; y++)
183
- for (let P = 0; P < 2; P++) {
184
- const w = (y + P) / this.seg, f = 1 - w;
181
+ const p = this.geo.getAttribute("position"), y = this.geo.getAttribute("color"), h = this.n * this.seg * 2;
182
+ for (let v = 0; v < this.seg; v++)
183
+ for (let z = 0; z < 2; z++) {
184
+ const w = (v + z) / this.seg, f = 1 - w;
185
185
  this.p.set(f * f * t.x + 2 * f * w * o.x + w * w * r.x, f * f * t.y + 2 * f * w * o.y + w * w * r.y, f * f * t.z + 2 * f * w * o.z + w * w * r.z);
186
- const b = h + y * 2 + P;
186
+ const b = h + v * 2 + z;
187
187
  p.setXYZ(b, this.p.x, this.p.y, this.p.z);
188
188
  let C = 0.35;
189
- i > 0 && (C += 0.55 * Math.max(0, Math.sin((w * i - c) * Math.PI * 2)) ** 3), u >= 0 && (C += 1.6 * Math.exp(-(((w - u) / 0.07) ** 2))), this.c.copy(a).multiplyScalar(l * C), v.setXYZ(b, this.c.r, this.c.g, this.c.b);
189
+ i > 0 && (C += 0.55 * Math.max(0, Math.sin((w * i - c) * Math.PI * 2)) ** 3), u >= 0 && (C += 1.6 * Math.exp(-(((w - u) / 0.07) ** 2))), this.c.copy(a).multiplyScalar(l * C), y.setXYZ(b, this.c.r, this.c.g, this.c.b);
190
190
  }
191
191
  this.n++;
192
192
  }
@@ -194,7 +194,7 @@ class qe {
194
194
  this.geo.setDrawRange(0, this.n * this.seg * 2), this.geo.getAttribute("position").needsUpdate = !0, this.geo.getAttribute("color").needsUpdate = !0;
195
195
  }
196
196
  }
197
- const Le = class Le {
197
+ const Be = class Be {
198
198
  constructor(t, o, r) {
199
199
  O(this, "mesh");
200
200
  O(this, "n", 0);
@@ -210,20 +210,20 @@ const Le = class Le {
210
210
  add(t, o, r, a, l, u, i, c = 0) {
211
211
  if (this.n >= this.mesh.instanceMatrix.count || i <= 2e-3) return;
212
212
  const p = this.o;
213
- p.position.copy(t), o ? p.quaternion.setFromUnitVectors(Le.UP, this.d.copy(o).normalize()) : p.quaternion.setFromAxisAngle(Le.UP, c), p.scale.set(r, a, l), p.updateMatrix(), this.mesh.setMatrixAt(this.n, p.matrix), this.mesh.setColorAt(this.n, this.c.copy(u).multiplyScalar(i)), this.n++;
213
+ p.position.copy(t), o ? p.quaternion.setFromUnitVectors(Be.UP, this.d.copy(o).normalize()) : p.quaternion.setFromAxisAngle(Be.UP, c), p.scale.set(r, a, l), p.updateMatrix(), this.mesh.setMatrixAt(this.n, p.matrix), this.mesh.setColorAt(this.n, this.c.copy(u).multiplyScalar(i)), this.n++;
214
214
  }
215
215
  end() {
216
216
  this.mesh.count = this.n, this.mesh.instanceMatrix.needsUpdate = !0, this.mesh.instanceColor && (this.mesh.instanceColor.needsUpdate = !0);
217
217
  }
218
218
  };
219
- O(Le, "UP", new n.Vector3(0, 1, 0));
220
- let ge = Le;
221
- const De = 0.3, xo = (
219
+ O(Be, "UP", new n.Vector3(0, 1, 0));
220
+ let ye = Be;
221
+ const De = 0.3, Ao = (
222
222
  /* glsl */
223
223
  `
224
224
  varying vec2 vUv;
225
225
  void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }`
226
- ), So = (
226
+ ), Co = (
227
227
  /* glsl */
228
228
  `
229
229
  varying vec2 vUv;
@@ -246,19 +246,19 @@ void main() {
246
246
  gl_FragColor = vec4(c * uOp, 1.0);
247
247
  #include <colorspace_fragment>
248
248
  }`
249
- ), Ao = new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2);
250
- function Co({ child: e }) {
251
- const t = e.inst, o = z(null), r = z(null), a = A(
249
+ ), Ro = new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2);
250
+ function zo({ child: e }) {
251
+ const t = e.inst, o = P(null), r = P(null), a = A(
252
252
  () => new n.ShaderMaterial({
253
- vertexShader: xo,
254
- fragmentShader: So,
253
+ vertexShader: Ao,
254
+ fragmentShader: Co,
255
255
  uniforms: {
256
256
  uLen: { value: 1 },
257
257
  uTime: { value: 0 },
258
258
  uGrow: { value: 0 },
259
259
  uOp: { value: 1 },
260
260
  uFlow: { value: 1 },
261
- uCol: { value: Z(ke[t.type]).clone().lerp(E, 0.45) },
261
+ uCol: { value: Y(Te[t.type]).clone().lerp(E, 0.45) },
262
262
  uHot: { value: E.clone() }
263
263
  },
264
264
  polygonOffset: !0,
@@ -273,36 +273,36 @@ function Co({ child: e }) {
273
273
  [a, l]
274
274
  );
275
275
  const u = A(() => ({ k: 0, a: new n.Vector3(), b: new n.Vector3() }), []);
276
- return H((i, c) => {
277
- const p = t.parent ? V.instances.get(t.parent) ?? V.archive.get(t.parent) : void 0, v = t.parent ? je(t.parent) : void 0;
276
+ return N((i, c) => {
277
+ const p = t.parent ? V.instances.get(t.parent) ?? V.archive.get(t.parent) : void 0, y = t.parent ? je(t.parent) : void 0;
278
278
  if (!o.current || !r.current) return;
279
- if (!p || !v) {
279
+ if (!p || !y) {
280
280
  o.current.visible = r.current.visible = !1;
281
281
  return;
282
282
  }
283
283
  const h = performance.now();
284
- u.a.copy(v), u.b.copy(e.live);
285
- const y = u.b.x - u.a.x, P = u.b.z - u.a.z, w = Math.hypot(y, P), f = Math.atan2(-P, y), b = Ve((h - t.bornAt) / 650), C = t.exitAt ? (h - t.exitAt) / 1e3 : -1, T = C >= 0 ? de((C - 0.6) / 1.4) : 0, L = !p.exitAt;
284
+ u.a.copy(y), u.b.copy(e.live);
285
+ const v = u.b.x - u.a.x, z = u.b.z - u.a.z, w = Math.hypot(v, z), f = Math.atan2(-z, v), b = ke((h - t.bornAt) / 650), C = t.exitAt ? (h - t.exitAt) / 1e3 : -1, k = C >= 0 ? ge((C - 0.6) / 1.4) : 0, L = !p.exitAt;
286
286
  u.k += ((L && C < 0 ? 1 : 0) - u.k) * 0.04;
287
- const x = Math.max(C >= 0 ? 1 - T : 0, u.k), M = C < 0 && (t.status === "thinking" || t.status === "spawning");
287
+ const x = Math.max(C >= 0 ? 1 - k : 0, u.k), M = C < 0 && (t.status === "thinking" || t.status === "spawning");
288
288
  o.current.position.set((u.a.x + u.b.x) / 2, 0, (u.a.z + u.b.z) / 2), o.current.rotation.y = f, r.current.rotation.y = f, o.current.position.y = De;
289
289
  const g = Math.max(0.5, Ke.scale * 0.62);
290
290
  o.current.scale.set(w, 1, g);
291
291
  const m = a.uniforms;
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 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
- }), /* @__PURE__ */ R(ye, { children: [
292
+ m.uLen.value = w, m.uGrow.value = b * (1 - k), m.uOp.value = x, m.uFlow.value = K ? 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 - k));
294
+ r.current.scale.set(w * I, De - 0.02, g * 1.13), r.current.position.x = u.a.x + v * I / 2, r.current.position.z = u.a.z + z * 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;
295
+ }), /* @__PURE__ */ R(ve, { children: [
296
296
  /* @__PURE__ */ s("mesh", { ref: r, geometry: S, material: l }),
297
- /* @__PURE__ */ s("mesh", { ref: o, geometry: Ao, material: a })
297
+ /* @__PURE__ */ s("mesh", { ref: o, geometry: Ro, material: a })
298
298
  ] });
299
299
  }
300
- function Ro() {
300
+ function Po() {
301
301
  const e = A(() => {
302
- const r = new n.MeshBasicMaterial({ map: Wt(), toneMapped: !1 });
303
- return new ge(S, r, 64);
302
+ const r = new n.MeshBasicMaterial({ map: Dt(), toneMapped: !1 });
303
+ return new ye(S, r, 64);
304
304
  }, []), t = A(() => new qe(32, 28), []), o = A(() => ({ a: new n.Vector3(), b: new n.Vector3(), c: new n.Vector3(), p: new n.Vector3(), d: new n.Vector3(), col: new n.Color() }), []);
305
- return H(() => {
305
+ return N(() => {
306
306
  const r = performance.now();
307
307
  e.begin(), t.begin();
308
308
  for (const a of V.comets) {
@@ -312,166 +312,166 @@ function Ro() {
312
312
  if (!i || !c) continue;
313
313
  const p = U((r - a.start) / a.dur);
314
314
  if (p >= 1) continue;
315
- if (o.col.copy(Z(ke[l.type])), u.parent === l.id) {
316
- o.a.copy(i), o.b.copy(c), o.p.lerpVectors(o.a, o.b, 0.12 + 0.76 * de(p)), o.p.y = De + 0.21;
315
+ if (o.col.copy(Y(Te[l.type])), u.parent === l.id) {
316
+ o.a.copy(i), o.b.copy(c), o.p.lerpVectors(o.a, o.b, 0.12 + 0.76 * ge(p)), o.p.y = De + 0.21;
317
317
  const h = Math.atan2(-(o.b.z - o.a.z), o.b.x - o.a.x);
318
318
  e.add(o.p, null, 0.42, 0.42, 0.42, o.col, 1.5, h);
319
319
  } else {
320
- if (!he(a.from, o.a) || !he(a.to, o.b)) continue;
321
- ze(o.a, o.b, 2.2, o.c);
322
- const h = de(p);
323
- fe(o.a, o.c, o.b, h, o.p), o.p.y -= 0.35, e.add(o.p, null, 0.4, 0.4, 0.4, o.col, 1.5, h * 2), t.add(o.a, o.c, o.b, o.col, Math.sin(Math.PI * p) * 0.9, h, 7, r / 400);
320
+ if (!fe(a.from, o.a) || !fe(a.to, o.b)) continue;
321
+ Le(o.a, o.b, 2.2, o.c);
322
+ const h = ge(p);
323
+ de(o.a, o.c, o.b, h, o.p), o.p.y -= 0.35, e.add(o.p, null, 0.4, 0.4, 0.4, o.col, 1.5, h * 2), t.add(o.a, o.c, o.b, o.col, Math.sin(Math.PI * p) * 0.9, h, 7, r / 400);
324
324
  }
325
325
  }
326
326
  e.end(), t.end();
327
- }), /* @__PURE__ */ R(ye, { children: [
327
+ }), /* @__PURE__ */ R(ve, { children: [
328
328
  /* @__PURE__ */ s("primitive", { object: e.mesh }),
329
329
  /* @__PURE__ */ s("primitive", { object: t.lines })
330
330
  ] });
331
331
  }
332
- const me = new n.MeshStandardMaterial({ color: "#26201d", metalness: 0.65, roughness: 0.4 }), jt = new n.MeshStandardMaterial({ color: "#16120f", metalness: 0.2, roughness: 0.85 }), kt = new n.MeshStandardMaterial({ color: "#0a0909", roughness: 0.9 }), ne = new n.MeshStandardMaterial({ color: "#5a5048", metalness: 0.35, roughness: 0.5, emissive: new n.Color("#2a1608"), emissiveIntensity: 0.6 }), Qe = new n.SphereGeometry(1, 24, 12, 0, Math.PI * 2, 0, Math.PI / 2);
333
- let et = null;
334
- const Bt = () => {
335
- if (et) return et;
336
- const e = It().clone();
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
- }, 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
- function Po({ mcp: e, backend: t }) {
340
- const o = e.srv, r = t.res, a = t.k, l = z(null), u = A(() => Z(o.color), [o.color]), i = A(() => ({ band: le(u), glow: ce(u), flame: ce("#ff7a1a"), lamp: ce("#ffe2a8") }), [u]);
332
+ const he = new n.MeshStandardMaterial({ color: "#26201d", metalness: 0.65, roughness: 0.4 }), qt = new n.MeshStandardMaterial({ color: "#16120f", metalness: 0.2, roughness: 0.85 }), Tt = new n.MeshStandardMaterial({ color: "#0a0909", roughness: 0.9 }), ne = new n.MeshStandardMaterial({ color: "#5a5048", metalness: 0.35, roughness: 0.5, emissive: new n.Color("#2a1608"), emissiveIntensity: 0.6 }), et = new n.SphereGeometry(1, 24, 12, 0, Math.PI * 2, 0, Math.PI / 2);
333
+ let tt = null;
334
+ const Vt = () => {
335
+ if (tt) return tt;
336
+ const e = Wt().clone();
337
+ return e.repeat.set(3, 1), e.needsUpdate = !0, tt = new n.MeshBasicMaterial({ map: e, color: new n.Color(0.55, 0.55, 0.55), toneMapped: !1 });
338
+ }, kt = new n.MeshBasicMaterial({ color: new n.Color("#ffb020").multiplyScalar(0.32), toneMapped: !1 }), pt = (e, t, o) => t > 0 ? 1 : U(1 - (o - e) / 1400);
339
+ function Lo({ mcp: e, backend: t }) {
340
+ const o = e.srv, r = t.res, a = t.k, l = P(null), u = A(() => Y(o.color), [o.color]), i = A(() => ({ band: le(u), glow: ce(u), flame: ce("#ff7a1a"), lamp: ce("#ffe2a8") }), [u]);
341
341
  pe(() => () => Object.values(i).forEach((h) => h.dispose()), [i]);
342
- const c = z(null);
343
- H(({ clock: h }) => {
342
+ const c = P(null);
343
+ N(({ clock: h }) => {
344
344
  var w;
345
345
  l.current && (l.current.position.copy(t.pos), l.current.rotation.y = e.out.x < 0 ? 0 : Math.PI);
346
- const y = ct(r.activeAt, r.inflight, performance.now()), P = N ? 0 : h.elapsedTime;
347
- i.band.color.copy(u).multiplyScalar(0.22 + y * (1.3 + 0.3 * Math.sin(P * 8))), i.glow.color.copy(u).multiplyScalar(0.05 + y * 0.3), i.flame.color.setRGB(1, 0.45, 0.1).multiplyScalar(0.2 + y * (0.9 + 0.3 * Math.sin(P * 13 + a))), i.lamp.color.setRGB(1, 0.85, 0.6).multiplyScalar(0.15 + y * 0.6), (w = c.current) == null || w.setOpacity(0.55 + y * 0.45);
346
+ const v = pt(r.activeAt, r.inflight, performance.now()), z = K ? 0 : h.elapsedTime;
347
+ i.band.color.copy(u).multiplyScalar(0.22 + v * (1.3 + 0.3 * Math.sin(z * 8))), i.glow.color.copy(u).multiplyScalar(0.05 + v * 0.3), i.flame.color.setRGB(1, 0.45, 0.1).multiplyScalar(0.2 + v * (0.9 + 0.3 * Math.sin(z * 13 + a))), i.lamp.color.setRGB(1, 0.85, 0.6).multiplyScalar(0.15 + v * 0.6), (w = c.current) == null || w.setOpacity(0.55 + v * 0.45);
348
348
  });
349
- const p = r.kind, v = p === "api" || p === "queue";
349
+ const p = r.kind, y = p === "api" || p === "queue";
350
350
  return /* @__PURE__ */ R("group", { ref: l, children: [
351
- v ? (
351
+ y ? (
352
352
  // trailer backed up toward the dock (+x), cab on the far side
353
353
  /* @__PURE__ */ R("group", { children: [
354
354
  /* @__PURE__ */ s("mesh", { geometry: S, material: ne, scale: [p === "queue" ? 3 : 2.5, 1.15, 1.05], position: [0.25, 0.95, 0] }),
355
355
  /* @__PURE__ */ s("mesh", { geometry: S, material: i.band, scale: [p === "queue" ? 2.9 : 2.4, 0.07, 1.07], position: [0.25, 0.72, 0] }),
356
356
  p === "queue" ? /* @__PURE__ */ s("mesh", { geometry: S, material: i.band, scale: [2.9, 0.07, 1.07], position: [0.25, 1.18, 0] }) : null,
357
- /* @__PURE__ */ s("mesh", { geometry: S, material: me, scale: [0.85, 0.95, 1], position: [p === "queue" ? -1.7 : -1.45, 0.78, 0] }),
357
+ /* @__PURE__ */ s("mesh", { geometry: S, material: he, scale: [0.85, 0.95, 1], position: [p === "queue" ? -1.7 : -1.45, 0.78, 0] }),
358
358
  /* @__PURE__ */ s("mesh", { geometry: S, material: i.band, scale: [0.04, 0.3, 0.8], position: [p === "queue" ? -2.13 : -1.88, 0.95, 0] }),
359
359
  [-1.3, 0.2, 1.1].map((h) => /* @__PURE__ */ R("group", { children: [
360
- /* @__PURE__ */ s("mesh", { geometry: B, material: kt, scale: [0.24, 0.16, 0.24], "rotation-x": Math.PI / 2, position: [h, 0.24, 0.5] }),
361
- /* @__PURE__ */ s("mesh", { geometry: B, material: kt, scale: [0.24, 0.16, 0.24], "rotation-x": Math.PI / 2, position: [h, 0.24, -0.5] })
360
+ /* @__PURE__ */ s("mesh", { geometry: T, material: Tt, scale: [0.24, 0.16, 0.24], "rotation-x": Math.PI / 2, position: [h, 0.24, 0.5] }),
361
+ /* @__PURE__ */ s("mesh", { geometry: T, material: Tt, scale: [0.24, 0.16, 0.24], "rotation-x": Math.PI / 2, position: [h, 0.24, -0.5] })
362
362
  ] }, h)),
363
363
  /* @__PURE__ */ s("sprite", { material: i.lamp, scale: 0.9, position: [p === "queue" ? -2.2 : -1.95, 0.6, 0.35] }),
364
364
  /* @__PURE__ */ s("sprite", { material: i.lamp, scale: 0.9, position: [p === "queue" ? -2.2 : -1.95, 0.6, -0.35] })
365
365
  ] })
366
366
  ) : /* @__PURE__ */ R("group", { children: [
367
367
  p === "warehouse" ? [-0.55, 0.55].map((h) => /* @__PURE__ */ R("group", { "position-z": h, children: [
368
- /* @__PURE__ */ s("mesh", { geometry: B, material: ne, scale: [0.55, 2.4, 0.55], "position-y": 1.2 }),
369
- /* @__PURE__ */ s("mesh", { geometry: Qe, material: ne, scale: [0.55, 0.3, 0.55], "position-y": 2.4 }),
370
- /* @__PURE__ */ s("mesh", { geometry: B, material: i.band, scale: [0.565, 0.07, 0.565], "position-y": 0.7 }),
371
- /* @__PURE__ */ s("mesh", { geometry: B, material: i.band, scale: [0.565, 0.07, 0.565], "position-y": 1.6 })
368
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ne, scale: [0.55, 2.4, 0.55], "position-y": 1.2 }),
369
+ /* @__PURE__ */ s("mesh", { geometry: et, material: ne, scale: [0.55, 0.3, 0.55], "position-y": 2.4 }),
370
+ /* @__PURE__ */ s("mesh", { geometry: T, material: i.band, scale: [0.565, 0.07, 0.565], "position-y": 0.7 }),
371
+ /* @__PURE__ */ s("mesh", { geometry: T, material: i.band, scale: [0.565, 0.07, 0.565], "position-y": 1.6 })
372
372
  ] }, h)) : p === "storage" ? /* @__PURE__ */ R("group", { children: [
373
- /* @__PURE__ */ s("mesh", { geometry: B, material: ne, scale: [0.95, 1.3, 0.95], "position-y": 0.65 }),
374
- /* @__PURE__ */ s("mesh", { geometry: Qe, material: ne, scale: [0.95, 0.35, 0.95], "position-y": 1.3 }),
375
- /* @__PURE__ */ s("mesh", { geometry: B, material: i.band, scale: [0.965, 0.07, 0.965], "position-y": 0.55 }),
376
- /* @__PURE__ */ s("mesh", { geometry: B, material: i.band, scale: [0.965, 0.07, 0.965], "position-y": 1.05 })
373
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ne, scale: [0.95, 1.3, 0.95], "position-y": 0.65 }),
374
+ /* @__PURE__ */ s("mesh", { geometry: et, material: ne, scale: [0.95, 0.35, 0.95], "position-y": 1.3 }),
375
+ /* @__PURE__ */ s("mesh", { geometry: T, material: i.band, scale: [0.965, 0.07, 0.965], "position-y": 0.55 }),
376
+ /* @__PURE__ */ s("mesh", { geometry: T, material: i.band, scale: [0.965, 0.07, 0.965], "position-y": 1.05 })
377
377
  ] }) : /* @__PURE__ */ R("group", { children: [
378
- /* @__PURE__ */ s("mesh", { geometry: B, material: ne, scale: [0.7, p === "spark" ? 2.4 : 2.9, 0.7], "position-y": p === "spark" ? 1.2 : 1.45 }),
379
- /* @__PURE__ */ s("mesh", { geometry: Qe, material: ne, scale: [0.7, 0.35, 0.7], "position-y": p === "spark" ? 2.4 : 2.9 }),
380
- [0.6, 1.3, 2].map((h) => /* @__PURE__ */ s("mesh", { geometry: B, material: i.band, scale: [0.715, 0.07, 0.715], "position-y": h }, h)),
381
- p === "spark" ? /* @__PURE__ */ R(ye, { children: [
382
- /* @__PURE__ */ s("mesh", { geometry: B, material: me, scale: [0.14, 0.7, 0.14], position: [0.3, 2.9, 0] }),
378
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ne, scale: [0.7, p === "spark" ? 2.4 : 2.9, 0.7], "position-y": p === "spark" ? 1.2 : 1.45 }),
379
+ /* @__PURE__ */ s("mesh", { geometry: et, material: ne, scale: [0.7, 0.35, 0.7], "position-y": p === "spark" ? 2.4 : 2.9 }),
380
+ [0.6, 1.3, 2].map((h) => /* @__PURE__ */ s("mesh", { geometry: T, material: i.band, scale: [0.715, 0.07, 0.715], "position-y": h }, h)),
381
+ p === "spark" ? /* @__PURE__ */ R(ve, { children: [
382
+ /* @__PURE__ */ s("mesh", { geometry: T, material: he, scale: [0.14, 0.7, 0.14], position: [0.3, 2.9, 0] }),
383
383
  /* @__PURE__ */ s("sprite", { material: i.flame, scale: 1.4, position: [0.3, 3.35, 0] })
384
384
  ] }) : null
385
385
  ] }),
386
- /* @__PURE__ */ s("mesh", { geometry: B, material: jt, scale: [1.15, 0.08, 1.15], "position-y": 0.04 })
386
+ /* @__PURE__ */ s("mesh", { geometry: T, material: qt, scale: [1.15, 0.08, 1.15], "position-y": 0.04 })
387
387
  ] }),
388
388
  /* @__PURE__ */ s("sprite", { material: i.glow, scale: 4, "position-y": 1.2 }),
389
- /* @__PURE__ */ s(ve, { ref: c, position: [0, v ? 2 : p === "storage" ? 2.25 : 3.5, 0], text: r.name, color: o.color, size: 0.22, opacity: 0.6, pxRange: [7.5, 11.5] })
389
+ /* @__PURE__ */ s(we, { ref: c, position: [0, y ? 2 : p === "storage" ? 2.25 : 3.5, 0], text: r.name, color: o.color, size: 0.22, opacity: 0.6, pxRange: [7.5, 11.5] })
390
390
  ] });
391
391
  }
392
- function zo({ mcp: e }) {
393
- const t = e.srv, o = z(null), r = A(() => Z(t.color), [t.color]), a = z(null), l = z(null), u = A(() => ({ strip: le(r), inner: ce(r), spill: We(r) }), [r]);
392
+ function Bo({ mcp: e }) {
393
+ const t = e.srv, o = P(null), r = A(() => Y(t.color), [t.color]), a = P(null), l = P(null), u = A(() => ({ strip: le(r), inner: ce(r), spill: We(r) }), [r]);
394
394
  pe(() => () => Object.values(u).forEach((c) => c.dispose()), [u]);
395
395
  const i = A(() => ({ open: 0 }), []);
396
- return H(({ clock: c }) => {
397
- var y;
396
+ return N(({ clock: c }) => {
397
+ var v;
398
398
  o.current && (o.current.position.copy(e.pos), o.current.rotation.y = e.out.x < 0 ? 0 : Math.PI);
399
- const p = performance.now(), v = ct(t.activeAt, t.inflight, p);
400
- i.open += ((t.inflight > 0 || v > 0.3 ? 1 : 0) - i.open) * 0.07;
401
- const h = N ? 0 : c.elapsedTime;
399
+ const p = performance.now(), y = pt(t.activeAt, t.inflight, p);
400
+ i.open += ((t.inflight > 0 || y > 0.3 ? 1 : 0) - i.open) * 0.07;
401
+ const h = K ? 0 : c.elapsedTime;
402
402
  if (a.current) {
403
- const P = 2 * (1 - 0.82 * i.open);
404
- a.current.scale.y = P, a.current.position.y = 0.7 + 2 - P / 2;
403
+ const z = 2 * (1 - 0.82 * i.open);
404
+ a.current.scale.y = z, a.current.position.y = 0.7 + 2 - z / 2;
405
405
  }
406
- u.strip.color.copy(r).multiplyScalar(0.35 + v * (1.4 + 0.25 * Math.sin(h * 6))), u.inner.color.copy(r).multiplyScalar(0.06 + i.open * 0.45), u.spill.color.copy(r).multiplyScalar(i.open * 0.22), (y = l.current) == null || y.setOpacity(0.7 + v * 0.3);
406
+ u.strip.color.copy(r).multiplyScalar(0.35 + y * (1.4 + 0.25 * Math.sin(h * 6))), u.inner.color.copy(r).multiplyScalar(0.06 + i.open * 0.45), u.spill.color.copy(r).multiplyScalar(i.open * 0.22), (v = l.current) == null || v.setOpacity(0.7 + y * 0.3);
407
407
  }), /* @__PURE__ */ s("group", { children: /* @__PURE__ */ R("group", { ref: o, children: [
408
- /* @__PURE__ */ s("mesh", { geometry: S, material: jt, scale: [3.4, 0.7, 4.6], "position-y": 0.35 }),
409
- /* @__PURE__ */ s("mesh", { geometry: S, material: Bt(), scale: [0.04, 0.22, 4.6], position: [1.72, 0.55, 0] }),
410
- /* @__PURE__ */ s("mesh", { geometry: S, material: me, scale: [0.22, 2.3, 0.22], position: [1.55, 1.85, 1.45] }),
411
- /* @__PURE__ */ s("mesh", { geometry: S, material: me, scale: [0.22, 2.3, 0.22], position: [1.55, 1.85, -1.45] }),
412
- /* @__PURE__ */ s("mesh", { geometry: S, material: me, scale: [0.35, 0.32, 3.2], position: [1.55, 3.1, 0] }),
408
+ /* @__PURE__ */ s("mesh", { geometry: S, material: qt, scale: [3.4, 0.7, 4.6], "position-y": 0.35 }),
409
+ /* @__PURE__ */ s("mesh", { geometry: S, material: Vt(), scale: [0.04, 0.22, 4.6], position: [1.72, 0.55, 0] }),
410
+ /* @__PURE__ */ s("mesh", { geometry: S, material: he, scale: [0.22, 2.3, 0.22], position: [1.55, 1.85, 1.45] }),
411
+ /* @__PURE__ */ s("mesh", { geometry: S, material: he, scale: [0.22, 2.3, 0.22], position: [1.55, 1.85, -1.45] }),
412
+ /* @__PURE__ */ s("mesh", { geometry: S, material: he, scale: [0.35, 0.32, 3.2], position: [1.55, 3.1, 0] }),
413
413
  /* @__PURE__ */ s("mesh", { geometry: S, material: u.strip, scale: [0.04, 0.08, 2.9], position: [1.74, 3, 0] }),
414
- /* @__PURE__ */ s("mesh", { ref: a, geometry: S, material: Bt(), scale: [0.06, 2, 2.68], position: [1.55, 1.7, 0] }),
414
+ /* @__PURE__ */ s("mesh", { ref: a, geometry: S, material: Vt(), scale: [0.06, 2, 2.68], position: [1.55, 1.7, 0] }),
415
415
  /* @__PURE__ */ s("sprite", { material: u.inner, scale: [4.5, 3, 1], position: [1, 1.6, 0] }),
416
416
  /* @__PURE__ */ s("mesh", { "rotation-x": -Math.PI / 2, position: [3.4, 0.015, 0], material: u.spill, children: /* @__PURE__ */ s("planeGeometry", { args: [3, 2.8] }) }),
417
- /* @__PURE__ */ s("mesh", { geometry: S, material: me, scale: [0.2, 3.3, 4.6], position: [-1.6, 1.65, 0] }),
418
- /* @__PURE__ */ s("mesh", { "rotation-x": -Math.PI / 2, position: [2.6, 6e-3, 0], material: Vt, children: /* @__PURE__ */ s("planeGeometry", { args: [0.09, 5.2] }) }),
419
- /* @__PURE__ */ s("mesh", { "rotation-x": -Math.PI / 2, position: [3.05, 6e-3, 0], material: Vt, children: /* @__PURE__ */ s("planeGeometry", { args: [0.09, 5.2] }) }),
420
- /* @__PURE__ */ s(ve, { ref: l, position: [0.4, 3.85, 0], text: t.name, color: t.color, plate: "box", size: 0.26, pxRange: [8, 12.5] })
417
+ /* @__PURE__ */ s("mesh", { geometry: S, material: he, scale: [0.2, 3.3, 4.6], position: [-1.6, 1.65, 0] }),
418
+ /* @__PURE__ */ s("mesh", { "rotation-x": -Math.PI / 2, position: [2.6, 6e-3, 0], material: kt, children: /* @__PURE__ */ s("planeGeometry", { args: [0.09, 5.2] }) }),
419
+ /* @__PURE__ */ s("mesh", { "rotation-x": -Math.PI / 2, position: [3.05, 6e-3, 0], material: kt, children: /* @__PURE__ */ s("planeGeometry", { args: [0.09, 5.2] }) }),
420
+ /* @__PURE__ */ s(we, { ref: l, position: [0.4, 3.85, 0], text: t.name, color: t.color, plate: "box", size: 0.26, pxRange: [8, 12.5] })
421
421
  ] }) });
422
422
  }
423
- function Lo() {
424
- const e = A(() => new qe(48, 32), []), t = A(() => new qe(40, 16), []), o = A(() => new ge(S, new n.MeshBasicMaterial({ toneMapped: !1 }), 64), []), r = A(() => new ge(Dt, new n.MeshBasicMaterial({ toneMapped: !1, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1 }), 64), []), a = A(
423
+ function To() {
424
+ const e = A(() => new qe(48, 32), []), t = A(() => new qe(40, 16), []), o = A(() => new ye(S, new n.MeshBasicMaterial({ toneMapped: !1 }), 64), []), r = A(() => new ye(jt, new n.MeshBasicMaterial({ toneMapped: !1, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1 }), 64), []), a = A(
425
425
  () => ({ a: new n.Vector3(), b: new n.Vector3(), c: new n.Vector3(), d: new n.Vector3(), e: new n.Vector3(), f: new n.Vector3(), p: new n.Vector3(), q: new n.Vector3(), col: new n.Color(), tmp: new n.Color() }),
426
426
  []
427
427
  ), l = (u, i) => {
428
- const c = oo(u.name, i);
429
- return !c || !fo(u.name, a.d) ? !1 : (a.e.copy(c), a.e.y = 0.9, a.f.addVectors(a.d, a.e).multiplyScalar(0.5), a.f.y = 1.9, !0);
428
+ const c = no(u.name, i);
429
+ return !c || !yo(u.name, a.d) ? !1 : (a.e.copy(c), a.e.y = 0.9, a.f.addVectors(a.d, a.e).multiplyScalar(0.5), a.f.y = 1.9, !0);
430
430
  };
431
- return H(({ clock: u }) => {
432
- const i = performance.now(), c = N ? 0 : u.elapsedTime;
431
+ return N(({ clock: u }) => {
432
+ const i = performance.now(), c = K ? 0 : u.elapsedTime;
433
433
  e.begin(), t.begin(), o.begin(), r.begin();
434
434
  for (const p of V.mcpServers.values())
435
- for (const v of p.resources.values()) {
436
- if (!l(p, v.name)) continue;
437
- const h = ct(v.activeAt, v.inflight, i);
438
- a.col.copy(Z(p.color)), t.add(a.d, a.f, a.e, a.col, 0.3 + h * 0.9, -1, h > 0.05 ? 5 : 0, c * 1.5);
435
+ for (const y of p.resources.values()) {
436
+ if (!l(p, y.name)) continue;
437
+ const h = pt(y.activeAt, y.inflight, i);
438
+ a.col.copy(Y(p.color)), t.add(a.d, a.f, a.e, a.col, 0.3 + h * 0.9, -1, h > 0.05 ? 5 : 0, c * 1.5);
439
439
  }
440
440
  for (const p of V.mcpPending.values()) {
441
- const v = V.mcpServers.get(p.server);
442
- if (!v || !he(p.instance, a.a) || !$e(v.name, a.b)) continue;
443
- ze(a.a, a.b, 2.6, a.c);
444
- const h = to(p, i);
445
- a.col.copy(E).lerp(Ce, U((h - 1) / 2));
446
- const y = U(h / 0.35);
447
- e.add(a.a, a.c, a.b, a.col, y * (1.5 + 0.35 * Math.sin(c * 6)), -1, 9, c * 1.6), fe(a.a, a.c, a.b, 0.94, a.p), a.q.subVectors(a.b, a.p), r.add(a.p, a.q, 0.17, 0.42, 0.17, a.col, 1.6 * y);
441
+ const y = V.mcpServers.get(p.server);
442
+ if (!y || !fe(p.instance, a.a) || !Je(y.name, a.b)) continue;
443
+ Le(a.a, a.b, 2.6, a.c);
444
+ const h = oo(p, i);
445
+ a.col.copy(E).lerp(Re, U((h - 1) / 2));
446
+ const v = U(h / 0.35);
447
+ e.add(a.a, a.c, a.b, a.col, v * (1.5 + 0.35 * Math.sin(c * 6)), -1, 9, c * 1.6), de(a.a, a.c, a.b, 0.94, a.p), a.q.subVectors(a.b, a.p), r.add(a.p, a.q, 0.17, 0.42, 0.17, a.col, 1.6 * v);
448
448
  }
449
449
  for (const p of V.mcpResolved) {
450
- const v = V.mcpServers.get(p.server);
451
- if (!v || !he(p.instance, a.a) || !$e(v.name, a.b)) continue;
452
- ze(a.a, a.b, 2.6, a.c);
450
+ const y = V.mcpServers.get(p.server);
451
+ if (!y || !fe(p.instance, a.a) || !Je(y.name, a.b)) continue;
452
+ Le(a.a, a.b, 2.6, a.c);
453
453
  const h = U((i - p.resolvedAt) / 700);
454
- e.add(a.a, a.c, a.b, Te, (1 - h) * 0.9, 1 - h, 0, 0);
454
+ e.add(a.a, a.c, a.b, Ee, (1 - h) * 0.9, 1 - h, 0, 0);
455
455
  }
456
456
  for (const p of V.mcpCalls) {
457
- const v = V.mcpServers.get(p.server);
458
- if (!v || !he(p.instance, a.q)) continue;
457
+ const y = V.mcpServers.get(p.server);
458
+ if (!y || !fe(p.instance, a.q)) continue;
459
459
  const h = U((i - p.start) / p.dur);
460
460
  if (h >= 1) continue;
461
- const y = p.phase === "call" ? h : 1 - h, w = !!p.resource && l(v, p.resource) ? 0.62 : 1;
462
- a.col.copy(Z(v.color)), y <= w ? (a.a.copy(a.q), $e(v.name, a.b), ze(a.a, a.b, 2.6, a.c), fe(a.a, a.c, a.b, de(y / w), a.p), a.p.y -= 0.2) : fe(a.d, a.f, a.e, de((y - w) / (1 - w)), a.p);
461
+ const v = p.phase === "call" ? h : 1 - h, w = !!p.resource && l(y, p.resource) ? 0.62 : 1;
462
+ a.col.copy(Y(y.color)), v <= w ? (a.a.copy(a.q), Je(y.name, a.b), Le(a.a, a.b, 2.6, a.c), de(a.a, a.c, a.b, ge(v / w), a.p), a.p.y -= 0.2) : de(a.d, a.f, a.e, ge((v - w) / (1 - w)), a.p);
463
463
  const f = Math.min(1, h * 8, (1 - h) * 8);
464
- o.add(a.p, null, 0.5, 0.14, 0.5, a.col, 2.2 * f, h * 3), a.p.y += 0.17, o.add(a.p, null, 0.3, 0.22, 0.3, a.tmp.copy(a.col).lerp(Te, 0.4), 1.8 * f, h * 3);
464
+ o.add(a.p, null, 0.5, 0.14, 0.5, a.col, 2.2 * f, h * 3), a.p.y += 0.17, o.add(a.p, null, 0.3, 0.22, 0.3, a.tmp.copy(a.col).lerp(Ee, 0.4), 1.8 * f, h * 3);
465
465
  }
466
466
  e.end(), t.end(), o.end(), r.end();
467
- }), /* @__PURE__ */ R(ye, { children: [
467
+ }), /* @__PURE__ */ R(ve, { children: [
468
468
  /* @__PURE__ */ s("primitive", { object: e.lines }),
469
469
  /* @__PURE__ */ s("primitive", { object: t.lines }),
470
470
  /* @__PURE__ */ s("primitive", { object: o.mesh }),
471
471
  /* @__PURE__ */ s("primitive", { object: r.mesh })
472
472
  ] });
473
473
  }
474
- const ko = (
474
+ const Vo = (
475
475
  /* glsl */
476
476
  `
477
477
  varying vec3 vW;
@@ -480,7 +480,7 @@ void main() {
480
480
  vW = w.xyz;
481
481
  gl_Position = projectionMatrix * viewMatrix * w;
482
482
  }`
483
- ), Bo = (
483
+ ), ko = (
484
484
  /* glsl */
485
485
  `
486
486
  varying vec3 vW;
@@ -507,11 +507,11 @@ void main() {
507
507
  #include <colorspace_fragment>
508
508
  }`
509
509
  );
510
- function Vo() {
510
+ function Eo() {
511
511
  const e = A(
512
512
  () => new n.ShaderMaterial({
513
- vertexShader: ko,
514
- fragmentShader: Bo,
513
+ vertexShader: Vo,
514
+ fragmentShader: ko,
515
515
  uniforms: {
516
516
  uBase: { value: new n.Color("#0b0809") },
517
517
  uGrid: { value: new n.Color("#ff8a1f") },
@@ -521,24 +521,24 @@ function Vo() {
521
521
  }),
522
522
  []
523
523
  );
524
- return H(() => {
524
+ return N(() => {
525
525
  const t = Math.max(30, (ie.core.r + 10) * 1.3);
526
526
  e.uniforms.uR.value += (t - e.uniforms.uR.value) * 0.05;
527
527
  }), /* @__PURE__ */ s("mesh", { "rotation-x": -Math.PI / 2, position: [0, 0, 0], material: e, children: /* @__PURE__ */ s("planeGeometry", { args: [260, 220] }) });
528
528
  }
529
- function To() {
530
- return /* @__PURE__ */ R(ye, { children: [
529
+ function Oo() {
530
+ return /* @__PURE__ */ R(ve, { children: [
531
531
  /* @__PURE__ */ s("hemisphereLight", { args: ["#ffd9b0", "#2a1a10", 0.9] }),
532
532
  /* @__PURE__ */ s("directionalLight", { position: [14, 26, 18], intensity: 1.5, color: "#ffd7a8" }),
533
533
  /* @__PURE__ */ s("directionalLight", { position: [-20, 12, -8], intensity: 0.9, color: "#ff7a2e" })
534
534
  ] });
535
535
  }
536
- const Eo = (
536
+ const Uo = (
537
537
  /* glsl */
538
538
  `
539
539
  varying vec2 vUv;
540
540
  void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }`
541
- ), Oo = (
541
+ ), Go = (
542
542
  /* glsl */
543
543
  `
544
544
  varying vec2 vUv;
@@ -573,16 +573,16 @@ void main() {
573
573
  gl_FragColor = vec4(c * uOp, 1.0);
574
574
  #include <colorspace_fragment>
575
575
  }`
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
- function _o({ run: e }) {
576
+ ), _o = new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2), Et = new n.MeshStandardMaterial({ color: "#2a2320", metalness: 0.6, roughness: 0.4 }), ot = { queued: 0, running: 1, done: 2, failed: 3 }, Ot = new n.Vector3(0, 1, 0), nt = new n.Vector3(), Se = new n.Vector3(), Io = new n.Vector3(), Ut = new n.Matrix4(), se = { b1: 0, b2: 0 };
577
+ function Fo({ run: e }) {
578
578
  const t = e.run ?? V.runs.get(e.id);
579
- return t ? /* @__PURE__ */ s(Fo, { kr: e, run: t }) : null;
579
+ return t ? /* @__PURE__ */ s(Wo, { kr: e, run: t }) : null;
580
580
  }
581
- function Fo({ kr: e, run: t }) {
581
+ function Wo({ kr: e, run: t }) {
582
582
  const o = A(
583
583
  () => new n.ShaderMaterial({
584
- vertexShader: Eo,
585
- fragmentShader: Oo,
584
+ vertexShader: Uo,
585
+ fragmentShader: Go,
586
586
  uniforms: {
587
587
  uLen: { value: 1 },
588
588
  uW: { value: 1 },
@@ -591,7 +591,7 @@ function Fo({ kr: e, run: t }) {
591
591
  uSteps: { value: 0 },
592
592
  uSweep: { value: -1 },
593
593
  uSweepK: { value: 0 },
594
- uRun: { value: Z(t.color).clone() },
594
+ uRun: { value: Y(t.color).clone() },
595
595
  uEdge: { value: E.clone() },
596
596
  uStage: { value: new n.Vector3() },
597
597
  uZ1: { value: new n.Vector2(0.33, 0.66) }
@@ -603,53 +603,53 @@ function Fo({ kr: e, run: t }) {
603
603
  [t.color]
604
604
  );
605
605
  pe(() => () => o.dispose(), [o]);
606
- const r = A(() => Se.map(() => ({ lamp: le(E), glow: ce(E) })), []), a = z(null), l = z(null), u = z([]), i = z(null), c = A(() => ({ u0: 0, u1: 0, v0: 0, v1: 0, init: !1 }), []), p = A(() => ({ u0: 0, u1: 0, v0: 0, v1: 0 }), []);
607
- return H(({ clock: v }, h) => {
608
- var W, G, _;
609
- const y = a.current;
610
- if (!y) return;
611
- ot.copy(e.side), xe.copy(e.axis), Go.crossVectors(ot, Et).dot(xe) < 0 && xe.negate(), Ot.makeBasis(ot, Et, xe), y.quaternion.setFromRotationMatrix(Ot), y.position.copy(e.origin).addScaledVector(e.side, -e.cu).addScaledVector(e.axis, -e.cv);
612
- const P = xe.dot(e.axis) < 0 ? -1 : 1;
613
- _t(e, p);
606
+ const r = A(() => Ze.map(() => ({ lamp: le(E), glow: ce(E) })), []), a = P(null), l = P(null), u = P([]), i = P(null), c = A(() => ({ u0: 0, u1: 0, v0: 0, v1: 0, init: !1 }), []), p = A(() => ({ u0: 0, u1: 0, v0: 0, v1: 0 }), []);
607
+ return N(({ clock: y }, h) => {
608
+ var F, G, _;
609
+ const v = a.current;
610
+ if (!v) return;
611
+ nt.copy(e.side), Se.copy(e.axis), Io.crossVectors(nt, Ot).dot(Se) < 0 && Se.negate(), Ut.makeBasis(nt, Ot, Se), v.quaternion.setFromRotationMatrix(Ut), v.position.copy(e.origin).addScaledVector(e.side, -e.cu).addScaledVector(e.axis, -e.cv);
612
+ const z = Se.dot(e.axis) < 0 ? -1 : 1;
613
+ It(e, p);
614
614
  const w = c.init ? 1 - Math.exp(-Math.min(0.1, h) / 0.2) : 1;
615
615
  c.init = !0, c.u0 += (p.u0 - c.u0) * w, c.u1 += (p.u1 - c.u1) * w, c.v0 += (p.v0 - c.v0) * w, c.v1 += (p.v1 - c.v1) * w;
616
- const f = c.u1 - c.u0, b = c.v1 - c.v0, C = (P > 0 ? c.v1 : -c.v0) + 0.15;
617
- mo(se), (W = l.current) == null || W.position.set(c.u0 + f / 2, 4e-3, (c.v0 + c.v1) / 2 * P), (G = l.current) == null || G.scale.set(f, 1, b), (_ = i.current) == null || _.position.set(c.u0 + 0.2, 0.2, (P > 0 ? c.v0 : -c.v1) - 0.25);
618
- const T = performance.now(), L = Ve((T - t.startedAt) / 900), x = t.endedAt ? U(1 - (T - t.endedAt - (no - 2500)) / 2500) : 1, M = o.uniforms;
619
- M.uLen.value = f, M.uW.value = b, M.uZ1.value.set((se.b1 - c.u0) / f, (se.b2 - c.u0) / f), M.uOp.value = L * x, M.uTime.value += N ? 0 : h, M.uSteps.value = t.hasSteps ? 1 : 0, M.uStage.value.set(tt[t.steps.plan], tt[t.steps.research], tt[t.steps.write]);
620
- const g = (T - t.handoffAt) / 1e3;
616
+ const f = c.u1 - c.u0, b = c.v1 - c.v0, C = (z > 0 ? c.v1 : -c.v0) + 0.15;
617
+ fo(se), (F = l.current) == null || F.position.set(c.u0 + f / 2, 4e-3, (c.v0 + c.v1) / 2 * z), (G = l.current) == null || G.scale.set(f, 1, b), (_ = i.current) == null || _.position.set(c.u0 + 0.2, 0.2, (z > 0 ? c.v0 : -c.v1) - 0.25);
618
+ const k = performance.now(), L = ke((k - t.startedAt) / 900), x = t.endedAt ? U(1 - (k - t.endedAt - (so - 2500)) / 2500) : 1, M = o.uniforms;
619
+ M.uLen.value = f, M.uW.value = b, M.uZ1.value.set((se.b1 - c.u0) / f, (se.b2 - c.u0) / f), M.uOp.value = L * x, M.uTime.value += K ? 0 : h, M.uSteps.value = t.hasSteps ? 1 : 0, M.uStage.value.set(ot[Ae(t, 0)], ot[Ae(t, 1)], ot[Ae(t, 2)]);
620
+ const g = (k - t.handoffAt) / 1e3;
621
621
  if (t.handoffAt && g < 1.4) {
622
- const k = (Pt(t.handoffFrom, c, se) - c.u0) / f, oe = (Pt(t.handoffTo, c, se) - c.u0) / f;
623
- M.uSweep.value = k + (oe - k) * Ve(g / 1.1), M.uSweepK.value = 1 - U((g - 0.9) / 0.5);
622
+ const B = (Pt(t.handoffFrom, c, se) - c.u0) / f, W = (Pt(t.handoffTo, c, se) - c.u0) / f;
623
+ M.uSweep.value = B + (W - B) * ke(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, F = Math.max(0.75, Ke.spread * 0.9);
626
- for (let k = 0; k < Se.length; k++) {
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
- $.lamp.color.copy(we).multiplyScalar(Ee * L * x), $.glow.color.copy(we).multiplyScalar(Ee * 0.35 * L * x);
629
- const D = u.current[k];
630
- if (D) {
631
- D.visible = t.hasSteps && L * x > 0.02;
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(F);
625
+ const m = K ? 0 : y.elapsedTime, I = Math.max(0.75, Ke.spread * 0.9);
626
+ for (let B = 0; B < Ze.length; B++) {
627
+ const W = Ae(t, B), q = r[B], Z = W === "running" ? te : W === "done" ? Ee : W === "failed" ? Y("#ff2d2d") : E, be = W === "running" ? 1.2 + 0.4 * Math.sin(m * 5) : W === "done" ? 0.55 : W === "failed" ? 1 : 0.12;
628
+ q.lamp.color.copy(Z).multiplyScalar(be * L * x), q.glow.color.copy(Z).multiplyScalar(be * 0.35 * L * x);
629
+ const ue = u.current[B];
630
+ if (ue) {
631
+ ue.visible = t.hasSteps && L * x > 0.02;
632
+ const $ = B === 0 ? c.u0 + 1.2 : B === 1 ? se.b1 + 0.6 : se.b2 + 0.6;
633
+ ue.position.set($, 0, C), ue.scale.setScalar(I);
634
634
  }
635
635
  }
636
636
  }), /* @__PURE__ */ R("group", { ref: a, children: [
637
- /* @__PURE__ */ s("mesh", { ref: l, geometry: Uo, material: o }),
638
- Se.map((v, h) => /* @__PURE__ */ R("group", { ref: (y) => void (u.current[h] = y), visible: !1, children: [
639
- /* @__PURE__ */ s("mesh", { geometry: B, material: Tt, scale: [0.06, 1.6, 0.06], "position-y": 0.8 }),
640
- /* @__PURE__ */ s("mesh", { geometry: S, material: Tt, scale: [0.5, 0.18, 0.08], "position-y": 1.55 }),
641
- /* @__PURE__ */ s("mesh", { geometry: B, material: r[h].lamp, scale: [0.1, 0.14, 0.1], "position-y": 1.72 }),
642
- /* @__PURE__ */ s("sprite", { material: r[h].glow, scale: 1.2, "position-y": 1.72 }),
643
- t.hasSteps ? /* @__PURE__ */ s(Io, { run: t, k: h }) : null
644
- ] }, v)),
645
- /* @__PURE__ */ s("group", { ref: i, children: /* @__PURE__ */ s(Wo, { run: t }) })
637
+ /* @__PURE__ */ s("mesh", { ref: l, geometry: _o, material: o }),
638
+ Ze.map((y) => /* @__PURE__ */ R("group", { ref: (h) => void (u.current[y] = h), visible: !1, children: [
639
+ /* @__PURE__ */ s("mesh", { geometry: T, material: Et, scale: [0.06, 1.6, 0.06], "position-y": 0.8 }),
640
+ /* @__PURE__ */ s("mesh", { geometry: S, material: Et, scale: [0.5, 0.18, 0.08], "position-y": 1.55 }),
641
+ /* @__PURE__ */ s("mesh", { geometry: T, material: r[y].lamp, scale: [0.1, 0.14, 0.1], "position-y": 1.72 }),
642
+ /* @__PURE__ */ s("sprite", { material: r[y].glow, scale: 1.2, "position-y": 1.72 }),
643
+ t.hasSteps ? /* @__PURE__ */ s(Do, { run: t, k: y }) : null
644
+ ] }, y)),
645
+ /* @__PURE__ */ s("group", { ref: i, children: /* @__PURE__ */ s(jo, { run: t }) })
646
646
  ] });
647
647
  }
648
- function Io({ run: e, k: t }) {
649
- Gt();
650
- const o = Se[t], r = e.steps[o];
651
- return /* @__PURE__ */ s(
652
- ve,
648
+ function Do({ run: e, k: t }) {
649
+ _t();
650
+ const o = ao(e, t), r = Ae(e, t);
651
+ return o ? /* @__PURE__ */ s(
652
+ we,
653
653
  {
654
654
  position: [0, 2.25, 0],
655
655
  text: r === "done" ? `${o} · done` : o,
@@ -661,20 +661,20 @@ function Io({ run: e, k: t }) {
661
661
  fadeMs: 300,
662
662
  pxRange: [7, 10.5]
663
663
  }
664
- );
664
+ ) : null;
665
665
  }
666
- function Wo({ run: e }) {
667
- Gt();
666
+ function jo({ run: e }) {
667
+ _t();
668
668
  const t = e.status !== "started";
669
669
  return /* @__PURE__ */ s(
670
- ve,
670
+ we,
671
671
  {
672
672
  anchorX: "left",
673
673
  anchorY: "bottom",
674
674
  textAlign: "left",
675
675
  plate: "box",
676
676
  text: e.topic,
677
- secondary: so(e, { base: "#a8a29e", current: "#ffd23f", done: "#e7e5e4" }, ["line running…", "line complete", "line halted"]),
677
+ secondary: ro(e, { base: "#a8a29e", current: "#ffd23f", done: "#e7e5e4" }, ["line running…", "line complete", "line halted"]),
678
678
  color: e.color,
679
679
  size: 0.34,
680
680
  maxWidth: 10,
@@ -685,20 +685,20 @@ function Wo({ run: e }) {
685
685
  }
686
686
  );
687
687
  }
688
- const nt = new n.Vector3(), ae = { u0: 0, u1: 0, v0: 0, v1: 0 };
689
- function Do(e) {
688
+ const st = new n.Vector3(), ae = { u0: 0, u1: 0, v0: 0, v1: 0 };
689
+ function qo(e) {
690
690
  for (const t of ie.runs.values())
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
- }
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 Fe = null;
695
- const Ko = () => {
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
- }, No = new n.EdgesGeometry(new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2)), Ho = new n.Color("#2a2627");
700
- function Xo({ agent: e, selected: t, onSelect: o }) {
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(
691
+ It(t, ae), e(Ye(t, ae.u0 + 3, ae.v0 - 1.4, st), 1.6), e(Ye(t, ae.u1, ae.v1, st), 0.6), e(Ye(t, ae.u0, ae.v1, st), 0.6);
692
+ }
693
+ const Ko = new n.MeshStandardMaterial({ color: "#1c1714", metalness: 0.55, roughness: 0.42 }), No = new n.MeshStandardMaterial({ color: "#0f0c0b", metalness: 0.4, roughness: 0.6 }), ee = new n.MeshStandardMaterial({ color: "#2a2320", metalness: 0.7, roughness: 0.35 }), at = new n.MeshStandardMaterial({ color: "#e88a1a", metalness: 0.5, roughness: 0.35, emissive: new n.Color("#ff7a00"), emissiveIntensity: 0.18 });
694
+ let Ie = null;
695
+ const Ho = () => {
696
+ if (Ie) return Ie;
697
+ const e = Wt().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;
699
+ }, Xo = new n.EdgesGeometry(new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2)), Yo = new n.Color("#2a2627");
700
+ function Zo({ agent: e, selected: t, onSelect: o }) {
701
+ const r = e.inst, a = !r.subagent, l = A(() => Y(Te[r.type]), [r.type]), u = A(() => bo(r.id), [r.id]), i = P(null), c = P(null), p = P(null), y = A(() => (u - 0.5) * 0.35, [u]), h = P(null), v = P(null), z = P(null), w = P(null), f = P(null), b = P(null), C = P(null), k = P(null), L = P(null), x = P(null), M = P(null), g = A(
702
702
  () => ({
703
703
  screen: le(l),
704
704
  vent: le(l),
@@ -706,15 +706,15 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
706
706
  beacon: le(E),
707
707
  beam: We(E, n.DoubleSide),
708
708
  halo: ce(l),
709
- rim: le(ee),
709
+ rim: le(te),
710
710
  shock: We(l, n.DoubleSide),
711
- sel: We(ee, n.DoubleSide),
711
+ sel: We(te, n.DoubleSide),
712
712
  hatch: new n.LineBasicMaterial({ color: E, transparent: !0, toneMapped: !1, blending: n.AdditiveBlending, depthWrite: !1 }),
713
- tip: ce(ee)
713
+ tip: ce(te)
714
714
  }),
715
715
  [l]
716
716
  );
717
- pe(() => () => Object.values(g).forEach((k) => k.dispose()), [g]);
717
+ pe(() => () => Object.values(g).forEach((B) => B.dispose()), [g]);
718
718
  const m = A(
719
719
  () => ({
720
720
  top: new n.Vector3(),
@@ -734,78 +734,78 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
734
734
  // eslint-disable-next-line react-hooks/exhaustive-deps
735
735
  []
736
736
  );
737
- pe(() => () => void it.delete(r.id), [r.id]), H(({ clock: k }, oe) => {
738
- var bt, Mt, xt, St, At;
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
- let ue = !1;
741
- for (const J of V.mcpPending.values()) J.instance === r.id && (ue = !0);
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 = 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
- 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 = 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
- const ft = -2.3 * (1 - D) - 2.4 * ut;
747
- h.current && (h.current.position.y = ft);
737
+ pe(() => () => void lt.delete(r.id), [r.id]), N(({ clock: B }, W) => {
738
+ var Mt, xt, St, At, Ct;
739
+ const q = performance.now(), Z = K ? 0 : B.elapsedTime, be = (q - r.bornAt) / 1e3, ue = r.parent ? 0.55 : 0.1, $ = ke((be - ue) / 0.9), J = r.exitAt ? (q - r.exitAt) / 1e3 : -1, ut = J >= 0 ? 1 - U(J / 0.5) : 1, mt = J >= 0 ? wo((J - 0.45) / 1.9) : 0, Ne = J < 0;
740
+ let me = !1;
741
+ for (const Q of V.mcpPending.values()) Q.instance === r.id && (me = !0);
742
+ const ht = Ne && (r.status === "thinking" || r.status === "spawning");
743
+ m.think += ((ht ? 1 : 0) - m.think) * 0.08, r.llmCalls !== m.llm && (m.llm = r.llmCalls, m.llmAt = q, m.llmK = r.pulse, x.current && (x.current.getWorldPosition(m.tmp), Qe(m.tmp, Math.round(10 + m.llmK * 26), te, 3.2 + m.llmK * 1.4, 0.9 + m.llmK * 0.5)));
744
+ const ft = r.toolCalls + r.mcpCalls;
745
+ ft !== m.tools && (m.armMcp = r.mcpCalls > 0 && ((Mt = r.recent[0]) == null ? void 0 : Mt.type) === "mcp", m.tools = ft, m.armAt = q), r.status === "failed" && J >= 0 && !m.failedBurst && (m.failedBurst = !0, m.tmp.copy(m.top), Qe(m.tmp, 40, Re, 4, 2.2));
746
+ const dt = -2.3 * (1 - $) - 2.4 * mt;
747
+ h.current && (h.current.position.y = dt);
748
748
  const He = e.scale;
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
- const dt = Math.max(0.2, (ft + ho) * He);
751
- it.set(r.id, dt), m.top.set(e.live.x, dt, e.live.z);
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
- 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
- const yt = ue && Ne ? Math.sin($ * 7) > 0 || N ? 1 : 0.15 : 0;
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) {
756
- const J = U(gt / 1);
757
- P.current.visible = J < 1 && j > 0.05, P.current.scale.setScalar(1.15 + Ve(J) * (0.35 + m.llmK * 0.55)), g.shock.color.copy(l).multiplyScalar((1 - J) * (1 - J) * 0.9 * j);
749
+ (xt = i.current) == null || xt.position.copy(e.live), (St = c.current) == null || St.scale.setScalar(He), (At = p.current) == null || At.position.set(0, 2.95 * He + (a ? 0.15 : 0.05), 0);
750
+ const gt = Math.max(0.2, (dt + go) * He);
751
+ lt.set(r.id, gt), m.top.set(e.live.x, gt, e.live.z);
752
+ const yt = (q - m.llmAt) / 1e3, Oe = Math.exp(-yt * 3.2) * m.llmK, Nt = ht ? 0.85 + 0.15 * Math.sin(Z * 9 + u * 7) : 0.32 + 0.06 * Math.sin(Z * 1.3 + u * 5), D = ut * $;
753
+ m.c.copy(l).multiplyScalar((Nt + Oe * 0.7) * 1.25), r.status === "failed" && m.c.lerp(Re, 0.7), g.screen.color.copy(m.c).multiplyScalar(D).lerp(Yo, 1 - ut), g.vent.color.copy(l).multiplyScalar((0.35 + m.think * 0.5 + Oe * 0.4) * D), g.trim.color.copy(E).multiplyScalar((0.55 + m.think * 0.45 + (t ? 0.8 : 0)) * D), g.halo.color.copy(l).multiplyScalar((0.1 + m.think * 0.12 + Oe * 0.25) * D), g.rim.color.copy(te).multiplyScalar((0.25 + Oe * 2.4) * D);
754
+ const vt = me && Ne ? Math.sin(Z * 7) > 0 || K ? 1 : 0.15 : 0;
755
+ if (me && Ne ? g.beacon.color.copy(Re).lerp(E, 0.25).multiplyScalar(0.4 + vt * 1.4) : g.beacon.color.copy(E).multiplyScalar((0.25 + m.think * 1.2) * D), v.current && (m.spin += W * (K ? 0 : 5.5), v.current.rotation.y = m.spin, v.current.visible = D > 0.05 && (m.think > 0.05 || me), g.beam.color.copy(me ? Re : E).multiplyScalar((me ? 0.5 * vt : 0.42 * m.think) * D)), z.current) {
756
+ const Q = U(yt / 1);
757
+ z.current.visible = Q < 1 && D > 0.05, z.current.scale.setScalar(1.15 + ke(Q) * (0.35 + m.llmK * 0.55)), g.shock.color.copy(l).multiplyScalar((1 - Q) * (1 - Q) * 0.9 * D);
758
758
  }
759
759
  if (f.current) {
760
- const J = (D > 0 && D < 1 ? 1 : 0) * (1 - D) + (K >= 0 ? U(K / 0.3) * (1 - ut) : 0) + (D <= 0 && we > 0 ? 0.6 : 0);
761
- f.current.visible = J > 0.02, g.hatch.color.copy(E).multiplyScalar(J * 1.6);
760
+ const Q = ($ > 0 && $ < 1 ? 1 : 0) * (1 - $) + (J >= 0 ? U(J / 0.3) * (1 - mt) : 0) + ($ <= 0 && be > 0 ? 0.6 : 0);
761
+ f.current.visible = Q > 0.02, g.hatch.color.copy(E).multiplyScalar(Q * 1.6);
762
762
  }
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((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);
763
+ w.current && (w.current.visible = t && D > 0.05, w.current.rotation.y = Z * 0.6, g.sel.color.copy(te).multiplyScalar(0.8 + 0.25 * Math.sin(Z * 3)));
764
+ const wt = U((q - m.armAt) / 1500), Me = wt < 1 ? Math.sin(Math.PI * ge(wt)) : 0, bt = 0.9, Ht = m.armMcp ? Math.PI - y : -Math.PI / 2 + 0.25;
765
+ b.current && (b.current.rotation.y = bt + (Ht - bt) * Me + Math.sin(Z * 0.7 + u * 9) * 0.04), C.current && (C.current.rotation.z = -0.15 - Me * 0.85), k.current && (k.current.rotation.z = -2.1 + Me * 1.05), g.tip.color.copy(te).multiplyScalar(Me * 1.2 * D), Me > 0.65 && L.current && q - m.lastWeld > 45 && (m.lastWeld = q, L.current.getWorldPosition(m.tmp), Qe(m.tmp, 3, E, 1.6, 1.4, 0.6)), (Ct = M.current) == null || Ct.setOpacity(io(r.id) ? U($ * 1.4 - 0.2) * (1 - U(J / 1.2)) : 0);
766
766
  });
767
- const F = (k) => {
768
- k.stopPropagation(), o(r.id);
769
- }, W = () => document.body.style.cursor = "pointer", G = () => document.body.style.cursor = "", _ = r.id.split(":")[2];
767
+ const I = (B) => {
768
+ B.stopPropagation(), o(r.id);
769
+ }, F = () => document.body.style.cursor = "pointer", G = () => document.body.style.cursor = "", _ = r.id.split(":")[2];
770
770
  return /* @__PURE__ */ R("group", { ref: i, children: [
771
- /* @__PURE__ */ R("group", { ref: c, "rotation-y": v, children: [
772
- /* @__PURE__ */ s("lineSegments", { ref: f, geometry: No, material: g.hatch, scale: [2.5, 1, 2.3], "position-y": 0.012 }),
773
- /* @__PURE__ */ s("mesh", { ref: w, geometry: Lt, material: g.sel, scale: 1.85, "position-y": 0.02, visible: !1 }),
774
- /* @__PURE__ */ s("mesh", { ref: P, geometry: Lt, material: g.shock, "position-y": 0.03, visible: !1 }),
771
+ /* @__PURE__ */ R("group", { ref: c, "rotation-y": y, children: [
772
+ /* @__PURE__ */ s("lineSegments", { ref: f, geometry: Xo, material: g.hatch, scale: [2.5, 1, 2.3], "position-y": 0.012 }),
773
+ /* @__PURE__ */ s("mesh", { ref: w, geometry: Bt, material: g.sel, scale: 1.85, "position-y": 0.02, visible: !1 }),
774
+ /* @__PURE__ */ s("mesh", { ref: z, geometry: Bt, 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: F, onPointerOver: W, onPointerOut: G }),
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: F, onPointerOver: W, onPointerOut: G }),
779
- /* @__PURE__ */ s("lineSegments", { geometry: bo, material: g.trim, scale: [1.71, 1.26, 1.51], "position-y": 0.845 }),
780
- /* @__PURE__ */ s("mesh", { geometry: S, material: Q, scale: [1.82, 0.09, 1.62], "position-y": 1.51 }),
776
+ /* @__PURE__ */ s("mesh", { geometry: S, material: No, scale: [2.2, 0.22, 2], "position-y": 0.11, onClick: I, onPointerOver: F, onPointerOut: G }),
777
+ /* @__PURE__ */ s("mesh", { geometry: S, material: Ho(), scale: [2.24, 0.07, 2.04], "position-y": 0.19 }),
778
+ /* @__PURE__ */ s("mesh", { geometry: S, material: Ko, scale: [1.7, 1.25, 1.5], "position-y": 0.845, onClick: I, onPointerOver: F, onPointerOut: G }),
779
+ /* @__PURE__ */ s("lineSegments", { geometry: xo, material: g.trim, scale: [1.71, 1.26, 1.51], "position-y": 0.845 }),
780
+ /* @__PURE__ */ s("mesh", { geometry: S, material: ee, 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] }),
782
782
  /* @__PURE__ */ s("mesh", { geometry: S, material: g.vent, scale: [0.62, 0.05, 0.02], position: [-0.22, 0.6, 0.755] }),
783
783
  /* @__PURE__ */ s("mesh", { geometry: S, material: g.vent, scale: [0.22, 0.05, 0.02], position: [0.42, 0.6, 0.755] }),
784
- [0.55, 0.75, 0.95, 1.15].map((k) => /* @__PURE__ */ s("mesh", { geometry: S, material: g.vent, scale: [0.02, 0.06, 0.9], position: [0.855, k, 0] }, k)),
784
+ [0.55, 0.75, 0.95, 1.15].map((B) => /* @__PURE__ */ s("mesh", { geometry: S, material: g.vent, scale: [0.02, 0.06, 0.9], position: [0.855, B, 0] }, B)),
785
785
  /* @__PURE__ */ s("sprite", { material: g.halo, position: [0, 0.98, 0.95], scale: [2.6, 1.4, 1] }),
786
- /* @__PURE__ */ s("mesh", { geometry: B, material: Q, scale: [0.17, 0.9, 0.17], position: [0.48, 1.98, -0.35] }),
787
- /* @__PURE__ */ s("mesh", { geometry: B, material: g.rim, scale: [0.2, 0.06, 0.2], position: [0.48, 2.44, -0.35] }),
786
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ee, scale: [0.17, 0.9, 0.17], position: [0.48, 1.98, -0.35] }),
787
+ /* @__PURE__ */ s("mesh", { geometry: T, material: g.rim, scale: [0.2, 0.06, 0.2], position: [0.48, 2.44, -0.35] }),
788
788
  /* @__PURE__ */ s("group", { ref: x, position: [0.48, 2.5, -0.35] }),
789
- a ? /* @__PURE__ */ s("mesh", { geometry: B, material: Q, scale: [0.11, 0.6, 0.11], position: [0.12, 1.84, -0.45] }) : null,
790
- /* @__PURE__ */ s("mesh", { geometry: B, material: Q, scale: [0.15, 0.06, 0.15], position: [-0.58, 1.58, 0.42] }),
791
- /* @__PURE__ */ s("mesh", { geometry: B, material: g.beacon, scale: [0.11, 0.2, 0.11], position: [-0.58, 1.71, 0.42] }),
792
- /* @__PURE__ */ R("mesh", { ref: y, position: [-0.58, 1.71, 0.42], visible: !1, children: [
789
+ a ? /* @__PURE__ */ s("mesh", { geometry: T, material: ee, scale: [0.11, 0.6, 0.11], position: [0.12, 1.84, -0.45] }) : null,
790
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ee, scale: [0.15, 0.06, 0.15], position: [-0.58, 1.58, 0.42] }),
791
+ /* @__PURE__ */ s("mesh", { geometry: T, material: g.beacon, scale: [0.11, 0.2, 0.11], position: [-0.58, 1.71, 0.42] }),
792
+ /* @__PURE__ */ R("mesh", { ref: v, position: [-0.58, 1.71, 0.42], visible: !1, children: [
793
793
  /* @__PURE__ */ s("coneGeometry", { args: [0.32, 1.3, 16, 1, !0] }),
794
794
  /* @__PURE__ */ s("primitive", { object: g.beam, attach: "material" })
795
795
  ] }),
796
796
  /* @__PURE__ */ R("group", { position: [0.98, 0.22, 0.86], children: [
797
- /* @__PURE__ */ s("mesh", { geometry: B, material: Q, scale: [0.17, 0.14, 0.17], "position-y": 0.07 }),
797
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ee, scale: [0.17, 0.14, 0.17], "position-y": 0.07 }),
798
798
  /* @__PURE__ */ R("group", { ref: b, "position-y": 0.14, children: [
799
- /* @__PURE__ */ s("mesh", { geometry: B, material: st, scale: [0.12, 0.12, 0.12], "position-y": 0.06 }),
799
+ /* @__PURE__ */ s("mesh", { geometry: T, material: at, scale: [0.12, 0.12, 0.12], "position-y": 0.06 }),
800
800
  /* @__PURE__ */ R("group", { ref: C, "position-y": 0.12, children: [
801
- /* @__PURE__ */ s("mesh", { geometry: S, material: st, scale: [0.1, 0.78, 0.1], "position-y": 0.39 }),
802
- /* @__PURE__ */ R("group", { ref: T, "position-y": 0.78, children: [
803
- /* @__PURE__ */ s("mesh", { geometry: B, material: Q, scale: [0.08, 0.13, 0.08], "rotation-x": Math.PI / 2 }),
804
- /* @__PURE__ */ s("mesh", { geometry: S, material: st, scale: [0.075, 0.62, 0.075], "position-y": 0.31 }),
801
+ /* @__PURE__ */ s("mesh", { geometry: S, material: at, scale: [0.1, 0.78, 0.1], "position-y": 0.39 }),
802
+ /* @__PURE__ */ R("group", { ref: k, "position-y": 0.78, children: [
803
+ /* @__PURE__ */ s("mesh", { geometry: T, material: ee, scale: [0.08, 0.13, 0.08], "rotation-x": Math.PI / 2 }),
804
+ /* @__PURE__ */ s("mesh", { geometry: S, material: at, scale: [0.075, 0.62, 0.075], "position-y": 0.31 }),
805
805
  /* @__PURE__ */ R("group", { ref: L, "position-y": 0.66, children: [
806
- /* @__PURE__ */ s("mesh", { geometry: S, material: Q, scale: [0.16, 0.05, 0.08] }),
807
- /* @__PURE__ */ s("mesh", { geometry: S, material: Q, scale: [0.03, 0.14, 0.06], position: [-0.06, 0.08, 0] }),
808
- /* @__PURE__ */ s("mesh", { geometry: S, material: Q, scale: [0.03, 0.14, 0.06], position: [0.06, 0.08, 0] }),
806
+ /* @__PURE__ */ s("mesh", { geometry: S, material: ee, scale: [0.16, 0.05, 0.08] }),
807
+ /* @__PURE__ */ s("mesh", { geometry: S, material: ee, scale: [0.03, 0.14, 0.06], position: [-0.06, 0.08, 0] }),
808
+ /* @__PURE__ */ s("mesh", { geometry: S, material: ee, scale: [0.03, 0.14, 0.06], position: [0.06, 0.08, 0] }),
809
809
  /* @__PURE__ */ s("sprite", { material: g.tip, scale: 0.7, "position-y": 0.12 })
810
810
  ] })
811
811
  ] })
@@ -815,12 +815,12 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
815
815
  ] })
816
816
  ] }),
817
817
  /* @__PURE__ */ s("group", { ref: p, children: /* @__PURE__ */ s(
818
- ve,
818
+ we,
819
819
  {
820
820
  ref: M,
821
821
  fit: !0,
822
822
  text: `${r.name}${_ !== void 0 ? ` ${Number(_) + 1}` : ""}`,
823
- color: ke[r.type],
823
+ color: Te[r.type],
824
824
  size: a ? 0.3 : 0.22,
825
825
  opacity: 0,
826
826
  pxRange: a ? [9, 13.5] : [8, 11.5]
@@ -828,33 +828,33 @@ function Xo({ agent: e, selected: t, onSelect: o }) {
828
828
  ) })
829
829
  ] });
830
830
  }
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
- function Zo({ galaxy: e }) {
831
+ const Fe = 4, rt = new n.MeshStandardMaterial({ color: "#c2560f", metalness: 0.6, roughness: 0.4, emissive: new n.Color("#ff6a00"), emissiveIntensity: 0.35 }), Gt = new n.MeshStandardMaterial({ color: "#2b2420", metalness: 0.6, roughness: 0.5 }), $o = 64;
832
+ function Jo({ galaxy: e }) {
833
833
  const t = A(() => {
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();
835
- for (let L = 0; L < X; L++) {
836
- Ue(L, T), C.position.copy(T);
834
+ const f = new n.MeshBasicMaterial({ map: Dt(), toneMapped: !1 }), b = new n.InstancedMesh(S, f, H), C = new n.Object3D(), k = new n.Vector3();
835
+ for (let L = 0; L < H; L++) {
836
+ Ue(L, k), C.position.copy(k);
837
837
  const x = 0.55 + L * 37 % 7 * 0.035;
838
838
  C.scale.set(0.78, x * 0.82, 0.62), C.updateMatrix(), b.setMatrixAt(L, C.matrix), b.setColorAt(L, new n.Color());
839
839
  }
840
840
  return b.instanceMatrix.setUsage(n.DynamicDrawUsage), b;
841
841
  }, []), o = A(() => {
842
842
  const f = [];
843
- for (let b = 0; b < X; b++) {
844
- const C = e.nodes[b % Math.max(1, e.nodes.length)], T = new n.Color(C ? ro[C.kind] ?? "#94a3b8" : "#333");
845
- f.push(T.multiplyScalar(b < e.nodes.length ? 0.16 : 0.05));
843
+ for (let b = 0; b < H; b++) {
844
+ const C = e.nodes[b % Math.max(1, e.nodes.length)], k = new n.Color(C ? lo[C.kind] ?? "#94a3b8" : "#333");
845
+ f.push(k.multiplyScalar(b < e.nodes.length ? 0.16 : 0.05));
846
846
  }
847
847
  return f;
848
848
  }, [e]), r = A(() => /* @__PURE__ */ new Map(), [e]), a = (f) => {
849
849
  let b = r.get(f);
850
- return b === void 0 && r.set(f, b = co(e, f) % X), b;
851
- }, l = A(() => new qe(40, 24), []), u = A(() => new ge(Dt, new n.MeshBasicMaterial({ toneMapped: !1, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1 }), 40), []), i = A(
850
+ return b === void 0 && r.set(f, b = uo(e, f) % H), b;
851
+ }, l = A(() => new qe(40, 24), []), u = A(() => new ye(jt, new n.MeshBasicMaterial({ toneMapped: !1, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1 }), 40), []), i = A(
852
852
  () => ({
853
- fire: new Float32Array(X),
854
- white: new Float32Array(X),
855
- fireC: Array.from({ length: X }, () => new n.Color()),
856
- push: new Float32Array(X),
857
- dirty: new Uint8Array(X),
853
+ fire: new Float32Array(H),
854
+ white: new Float32Array(H),
855
+ fireC: Array.from({ length: H }, () => new n.Color()),
856
+ push: new Float32Array(H),
857
+ dirty: new Uint8Array(H),
858
858
  o: new n.Object3D(),
859
859
  a: new n.Vector3(),
860
860
  b: new n.Vector3(),
@@ -867,108 +867,108 @@ 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(Ie).fill(""));
871
- H(() => {
870
+ const c = P([]), p = P([]), y = P(Array(Fe).fill(""));
871
+ N(() => {
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
- 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, 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
- 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
- Ue(g, i.b), i.b.z += 0.4, io(i.w, i.a), ze(i.a, i.b, 4, i.c);
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);
880
- i.col.copy(G ? ee : W).lerp(Te, G ? 0.5 : 0), l.add(i.a, i.c, i.b, i.col, k * 0.8, oe, 0, 0), G ? (fe(i.a, i.c, i.b, 0.9, i.p), i.q.subVectors(i.b, i.p), u.add(i.p, i.q, 0.14, 0.36, 0.14, i.col, k * 1.4)) : (fe(i.a, i.c, i.b, 0.1, i.p), i.q.subVectors(i.a, i.p), u.add(i.p, i.q, 0.14, 0.36, 0.14, i.col, k * 1.4));
875
+ for (let x = Math.max(0, b.length - $o); 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), F = I ? Y(Te[I.type]) : E, G = M.op === "write", _ = m < 0.3 ? m / 0.3 : Math.exp(-(m - 0.3) * 1.3);
877
+ if (_ > i.fire[g] && (i.fire[g] = _, i.fireC[g].copy(G ? Ee : F), 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 && fe(M.instance, i.w)) {
878
+ Ue(g, i.b), i.b.z += 0.4, co(i.w, i.a), Le(i.a, i.b, 4, i.c);
879
+ const B = Math.min(1, m / 0.25) * Math.pow(1 - m / 2.2, 1.4), W = G ? Math.min(1, m * 0.9) : 1 - Math.min(1, m * 0.9);
880
+ i.col.copy(G ? te : F).lerp(Ee, G ? 0.5 : 0), l.add(i.a, i.c, i.b, i.col, B * 0.8, W, 0, 0), G ? (de(i.a, i.c, i.b, 0.9, i.p), i.q.subVectors(i.b, i.p), u.add(i.p, i.q, 0.14, 0.36, 0.14, i.col, B * 1.4)) : (de(i.a, i.c, i.b, 0.1, i.p), i.q.subVectors(i.a, i.p), u.add(i.p, i.q, 0.14, 0.36, 0.14, i.col, B * 1.4));
881
881
  }
882
882
  }
883
883
  l.end(), u.end();
884
884
  const C = i.o;
885
- let T = !1;
886
- for (let x = 0; x < X; x++) {
885
+ let k = !1;
886
+ for (let x = 0; x < H; x++) {
887
887
  const M = i.fire[x];
888
888
  if (M > 5e-3 || i.dirty[x]) {
889
889
  i.col.copy(o[x]), M > 5e-3 && i.col.lerp(i.fireC[x], Math.min(1, M)).multiplyScalar(1 + M * (1.4 + i.white[x] * 1.6)), t.setColorAt(x, i.col), Ue(x, C.position), C.position.z += i.push[x] * 0.45;
890
890
  const g = 0.55 + x * 37 % 7 * 0.035;
891
- C.scale.set(0.78, g * 0.82, 0.62), C.updateMatrix(), t.setMatrixAt(x, C.matrix), T = !0, M <= 5e-3 && (i.dirty[x] = 0);
891
+ C.scale.set(0.78, g * 0.82, 0.62), C.updateMatrix(), t.setMatrixAt(x, C.matrix), k = !0, M <= 5e-3 && (i.dirty[x] = 0);
892
892
  }
893
893
  }
894
- T && (t.instanceMatrix.needsUpdate = !0, t.instanceColor && (t.instanceColor.needsUpdate = !0));
894
+ k && (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 < Ie; x--) {
896
+ for (let x = V.flares.length - 1; x >= 0 && L < Fe; x--) {
897
897
  const M = V.flares[x];
898
898
  if (f - M.start > 2200) break;
899
899
  let g = !1;
900
- for (let _ = 0; _ < L; _++) v.current[_] === M.node && (g = !0);
900
+ for (let _ = 0; _ < L; _++) y.current[_] === M.node && (g = !0);
901
901
  if (g) continue;
902
902
  const m = a(M.node);
903
903
  Ue(m, i.p);
904
- let F = !1;
904
+ let I = !1;
905
905
  for (let _ = 0; _ < L; _++) {
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 && (F = !0);
906
+ const B = p.current[_];
907
+ B && Math.abs(B.position.y - (i.p.y + 0.55)) < 0.6 && Math.abs(B.position.x - i.p.x) < 3.4 && (I = !0);
908
908
  }
909
- if (F) continue;
910
- const W = c.current[L], G = p.current[L];
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++;
909
+ if (I) continue;
910
+ const F = c.current[L], G = p.current[L];
911
+ F && G && (G.position.set(i.p.x, i.p.y + 0.55, i.p.z + 0.5), y.current[L] !== M.node && (F.setText(`${M.op === "write" ? "wrote" : "read"} · ${M.node}`), F.setColor(M.op === "write" ? "#ffd23f" : "#ffab1a")), F.setOpacity(1)), y.current[L] = M.node, L++;
912
912
  }
913
- for (let x = L; x < Ie; x++) {
913
+ for (let x = L; x < Fe; x++) {
914
914
  const M = c.current[x];
915
- M == null || M.setOpacity(0), v.current[x] = "";
915
+ M == null || M.setOpacity(0), y.current[x] = "";
916
916
  }
917
917
  });
918
918
  const h = A(() => {
919
919
  const f = [];
920
- for (let b = 0; b <= te; b += 5) f.push(Ae - Y / 2 + Math.min(b, te) * Y);
921
- return f[f.length - 1] < Ae - Y / 2 + te * Y - 0.01 && f.push(Ae - Y / 2 + te * Y), f;
922
- }, []), y = te * Y, P = Ae - Y / 2 + y / 2, w = Pe + Be * Re + 0.1;
920
+ for (let b = 0; b <= oe; b += 5) f.push(Ce - X / 2 + Math.min(b, oe) * X);
921
+ return f[f.length - 1] < Ce - X / 2 + oe * X - 0.01 && f.push(Ce - X / 2 + oe * X), f;
922
+ }, []), v = oe * X, z = Ce - X / 2 + v / 2, w = Pe + Ve * ze + 0.1;
923
923
  return /* @__PURE__ */ R("group", { children: [
924
924
  /* @__PURE__ */ s("primitive", { object: t }),
925
925
  h.map((f) => /* @__PURE__ */ R("group", { children: [
926
- /* @__PURE__ */ s("mesh", { geometry: S, material: at, scale: [0.09, w, 0.09], position: [f, w / 2, re + 0.42] }),
927
- /* @__PURE__ */ s("mesh", { geometry: S, material: at, scale: [0.09, w, 0.09], position: [f, w / 2, re - 0.42] })
926
+ /* @__PURE__ */ s("mesh", { geometry: S, material: rt, scale: [0.09, w, 0.09], position: [f, w / 2, re + 0.42] }),
927
+ /* @__PURE__ */ s("mesh", { geometry: S, material: rt, scale: [0.09, w, 0.09], position: [f, w / 2, re - 0.42] })
928
928
  ] }, f)),
929
- Array.from({ length: Be + 1 }, (f, b) => /* @__PURE__ */ R("group", { children: [
930
- /* @__PURE__ */ s("mesh", { geometry: S, material: Ut, scale: [y, 0.05, 0.9], position: [P, Pe + b * Re - 0.03, re] }),
931
- /* @__PURE__ */ s("mesh", { geometry: S, material: at, scale: [y, 0.07, 0.06], position: [P, Pe + b * Re, re + 0.44] })
929
+ Array.from({ length: Ve + 1 }, (f, b) => /* @__PURE__ */ R("group", { children: [
930
+ /* @__PURE__ */ s("mesh", { geometry: S, material: Gt, scale: [v, 0.05, 0.9], position: [z, Pe + b * ze - 0.03, re] }),
931
+ /* @__PURE__ */ s("mesh", { geometry: S, material: rt, scale: [v, 0.07, 0.06], position: [z, Pe + b * ze, re + 0.44] })
932
932
  ] }, b)),
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] }),
933
+ /* @__PURE__ */ s("mesh", { geometry: S, material: Gt, scale: [v + 2, w + 1.4, 0.15], position: [z, (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: 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
- /* @__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] })
936
+ Array.from({ length: Fe }, (f, b) => /* @__PURE__ */ s("group", { ref: (C) => void (p.current[b] = C), children: /* @__PURE__ */ s(we, { ref: (C) => void (c.current[b] = C), text: "", plate: "box", size: 0.22, opacity: 0, fadeMs: 250, pxRange: [7.5, 11.5] }) }, b)),
937
+ /* @__PURE__ */ s(po, { position: [z, 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
  }
940
- function $o() {
941
- const e = A(() => new Mo(), []);
942
- return H((t, o) => e.update(o)), /* @__PURE__ */ s("primitive", { object: e.mesh });
943
- }
944
- const rt = new n.Vector3(), qt = 3.6;
945
- function Jo(e) {
946
- Do(e);
947
- for (const t of ie.mcp.values()) e(rt.set(t.target.x, 3.4, t.target.z), 2.4);
948
- for (const t of uo()) e(rt.copy(ie.clusterTarget[t]).setY(1.4), 3.6);
940
+ function Qo() {
941
+ const e = A(() => new So(), []);
942
+ return N((t, o) => e.update(o)), /* @__PURE__ */ s("primitive", { object: e.mesh });
943
+ }
944
+ const it = new n.Vector3(), Kt = 3.6;
945
+ function en(e) {
946
+ qo(e);
947
+ for (const t of ie.mcp.values()) e(it.set(t.target.x, 3.4, t.target.z), 2.4);
948
+ for (const t of ho()) e(it.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 / Ft), t.target.z), 1.6);
951
+ e(it.set(t.target.x, (vo + 2) * (Kt / Ft), t.target.z), 1.6);
952
952
  }
953
953
  }
954
- function Qo() {
955
- const e = Yt((t) => t.scene);
956
- return H(() => {
954
+ function tn() {
955
+ const e = Zt((t) => t.scene);
956
+ return N(() => {
957
957
  const t = e.fog;
958
958
  if (!t) return;
959
959
  const o = Ke.cam.dist || 40;
960
960
  t.near = o * 1.1, t.far = o * 2.9;
961
961
  }), null;
962
962
  }
963
- const en = /* @__PURE__ */ R(ye, { children: [
964
- /* @__PURE__ */ s(Qo, {}),
963
+ const on = /* @__PURE__ */ R(ve, { children: [
964
+ /* @__PURE__ */ s(tn, {}),
965
965
  /* @__PURE__ */ s("fog", { attach: "fog", args: ["#07050a", 70, 160] }),
966
- /* @__PURE__ */ s(To, {}),
967
- /* @__PURE__ */ s(Vo, {})
966
+ /* @__PURE__ */ s(Oo, {}),
967
+ /* @__PURE__ */ s(Eo, {})
968
968
  ] });
969
- function ln() {
969
+ function pn() {
970
970
  return /* @__PURE__ */ R(
971
- po,
971
+ mo,
972
972
  {
973
973
  title: "factory · neon floor",
974
974
  subtitle: "Agents are machines (big = parent, compact = subagent) · belts carry crates parent → child · sparks = LLM calls · robot arms = tool calls · ⬢ docks = MCP servers with their trucks & silos · the rack is graph memory",
@@ -981,30 +981,30 @@ 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: Ft, radius: qt },
984
+ graph: { natural: Ft, radius: Kt },
985
985
  peripheryGap: 5,
986
- Background: en,
987
- Agent: Xo,
988
- Edge: Co,
989
- RunMarker: _o,
990
- McpServer: zo,
991
- Backend: Po,
992
- GraphResource: Zo,
986
+ Background: on,
987
+ Agent: Zo,
988
+ Edge: zo,
989
+ RunMarker: Fo,
990
+ McpServer: Bo,
991
+ Backend: Lo,
992
+ GraphResource: Jo,
993
993
  cluster: { radius: 1.35, variant: "orb", color: "#ff8a1f" },
994
994
  clusterOffset: [0, 2.4, 0],
995
- extents: Jo,
996
- PostFX: /* @__PURE__ */ R(Zt, { multisampling: 0, children: [
997
- /* @__PURE__ */ s($t, { mipmapBlur: !0, intensity: 0.95, luminanceThreshold: 0.32, luminanceSmoothing: 0.25, radius: 0.7 }),
998
- /* @__PURE__ */ s(Jt, { eskil: !1, offset: 0.24, darkness: 0.85 })
995
+ extents: en,
996
+ PostFX: /* @__PURE__ */ R($t, { multisampling: 0, children: [
997
+ /* @__PURE__ */ s(Jt, { mipmapBlur: !0, intensity: 0.95, luminanceThreshold: 0.32, luminanceSmoothing: 0.25, radius: 0.7 }),
998
+ /* @__PURE__ */ s(Qt, { eskil: !1, offset: 0.24, darkness: 0.85 })
999
999
  ] }),
1000
1000
  children: [
1001
- /* @__PURE__ */ s(Ro, {}),
1002
- /* @__PURE__ */ s(Lo, {}),
1003
- /* @__PURE__ */ s($o, {})
1001
+ /* @__PURE__ */ s(Po, {}),
1002
+ /* @__PURE__ */ s(To, {}),
1003
+ /* @__PURE__ */ s(Qo, {})
1004
1004
  ]
1005
1005
  }
1006
1006
  );
1007
1007
  }
1008
1008
  export {
1009
- ln as default
1009
+ pn as default
1010
1010
  };