agentglow 0.1.0 → 0.2.0

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 (41) hide show
  1. package/README.md +38 -3
  2. package/dist/chunks/KitScene-BuFtYuhc.js +2737 -0
  3. package/dist/chunks/index-BPyTLdiF.js +792 -0
  4. package/dist/chunks/index-Bo5HRf-O.js +784 -0
  5. package/dist/chunks/index-C42Ihyo1.js +605 -0
  6. package/dist/chunks/index-C5YqtHnC.js +677 -0
  7. package/dist/chunks/index-Cyv7bII1.js +818 -0
  8. package/dist/chunks/index-D0UvupqM.js +1143 -0
  9. package/dist/chunks/index-D733n3Hf.js +1086 -0
  10. package/dist/chunks/index-DCmhxN8v.js +1010 -0
  11. package/dist/chunks/index-DO9SAG-u.js +753 -0
  12. package/dist/chunks/index-Dn6oRasS.js +887 -0
  13. package/dist/chunks/index-HyfZ0ePz.js +838 -0
  14. package/dist/chunks/index-XMOz-HBf.js +492 -0
  15. package/dist/chunks/index-ZT88hgW-.js +763 -0
  16. package/dist/chunks/index-e6egU2Q6.js +889 -0
  17. package/dist/chunks/index-jLXx_Wgk.js +68 -0
  18. package/dist/chunks/index-tonipLb2.js +980 -0
  19. package/dist/index.js +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/AgentScene.d.ts +14 -1
  22. package/dist/types/world.d.ts +59 -0
  23. package/package.json +1 -1
  24. package/dist/chunks/ClusterBall-CPsd6JvJ.js +0 -1489
  25. package/dist/chunks/index-0Bqa57T_.js +0 -786
  26. package/dist/chunks/index-4JCQqMml.js +0 -831
  27. package/dist/chunks/index-55W5crSg.js +0 -63
  28. package/dist/chunks/index-78lWZCrQ.js +0 -984
  29. package/dist/chunks/index-Bv6_kdaq.js +0 -768
  30. package/dist/chunks/index-Cgb5ir1r.js +0 -688
  31. package/dist/chunks/index-CqVCWpP7.js +0 -796
  32. package/dist/chunks/index-D1O5v601.js +0 -1065
  33. package/dist/chunks/index-DOoA9htC.js +0 -1181
  34. package/dist/chunks/index-K__sPGRy.js +0 -1134
  35. package/dist/chunks/index-N0zWN8NS.js +0 -857
  36. package/dist/chunks/index-NiYqQci9.js +0 -936
  37. package/dist/chunks/index-PQRnbPiJ.js +0 -565
  38. package/dist/chunks/index-VOXn1m-Q.js +0 -848
  39. package/dist/chunks/index-o4vs5msj.js +0 -837
  40. package/dist/chunks/index-yos7IepY.js +0 -890
  41. package/dist/chunks/spread-CWdeDFd9.js +0 -35
@@ -1,1181 +0,0 @@
1
- var It = Object.defineProperty;
2
- var Nt = (e, t, o) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var ne = (e, t, o) => Nt(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { jsx as u, Fragment as te, jsxs as X } from "react/jsx-runtime";
5
- import { Stars as Wt, OrbitControls as jt } from "@react-three/drei";
6
- import { useFrame as $, useThree as nt, Canvas as qt } from "@react-three/fiber";
7
- import { EffectComposer as Ht, Bloom as Kt, Vignette as Xt } from "@react-three/postprocessing";
8
- import { useState as Ce, useRef as V, useMemo as S, useEffect as $t } from "react";
9
- import { h as ee, w as E, l as Se, m as Yt, j as Zt, C as Jt, T as Rt, d as Qt, S as ut, R as eo, u as to, L as Le, k as oo, c as ro, K as no, G as ao, n as so, i as dt, p as io, e as lo, s as co, b as uo, f as fo, H as po, t as mo, g as ho } from "./ClusterBall-CPsd6JvJ.js";
10
- import * as n from "three";
11
- import { s as go, a as vo, r as wo } from "./spread-CWdeDFd9.js";
12
- const Oe = 4.4, et = Oe + 1.35, yo = (e) => (e.subagent ? 2.1 : 4.6) * (0.92 + 0.16 * ee(e.id, 11)), Mo = (e) => e.subagent ? 0.72 : 1.45, de = [-1.05, 1.05, 0, -1.8, 1.8, -0.42], kt = [0, 0, 0, 0, 0, 7.5], _e = /* @__PURE__ */ new Map();
13
- function bo(e, t) {
14
- return Se.grouped ? Yt(t) + de.length * Zt(t) : e ? e.slot : Math.floor(ee(t, 3) * 6);
15
- }
16
- function Ft(e, t) {
17
- const o = bo(e, t);
18
- let r = _e.get(t);
19
- if (r && r.slot === o) return r;
20
- const i = Math.floor(o / de.length), a = de[o % de.length] + (ee(t, 1) - 0.5) * 0.32 + i * 0.5, s = 11.6 + ee(t, 2) * 1.4 + i * 6 + kt[o % de.length], c = new n.Vector3(Math.sin(a), 0, -Math.cos(a)), p = new n.Vector3(Math.cos(a), 0, Math.sin(a));
21
- if (r = { c: c.clone().multiplyScalar(s), rad: c, tan: p, phi: a, slot: o }, _e.set(t, r), _e.size > 64)
22
- for (const h of _e.keys()) E.runs.has(h) || _e.delete(h);
23
- return r;
24
- }
25
- const ft = [-0.8, 0.8, -1.6, 1.6, 0], Ge = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map(), So = new n.Vector3();
26
- function mt(e) {
27
- const t = Ft(E.runs.get(e.run), e.run);
28
- let o = Ge.get(e.id);
29
- if (o && qe.get(e.id) === t) {
30
- if (!e.subagent || !e.parent) return o;
31
- const a = E.instances.get(e.parent);
32
- if (!a || qe.get(a.id) === t) return o;
33
- }
34
- o = o ?? new n.Vector3();
35
- const r = e.parent ? E.instances.get(e.parent) : void 0;
36
- if (e.subagent) {
37
- const a = r ? mt(r) : So.copy(t.c).addScaledVector(t.rad, 1.5), s = go(e, "forest-sub"), c = s < ft.length ? ft[s] : (s % 2 ? 1 : -1) * (2.35 + 0.25 * Math.floor((s - ft.length) / 2)), p = Math.atan2(t.rad.z - 0.9, t.rad.x) + c + (ee(e.id, 4) - 0.5) * 0.25, h = 3.3 + Math.abs(c) * 0.35 + ee(e.id, 5) * 0.6;
38
- o.set(a.x + Math.cos(p) * h, 0, a.z + Math.sin(p) * h);
39
- } else {
40
- o.copy(t.c), e.type === "planner" ? o.addScaledVector(t.tan, -3.6).addScaledVector(t.rad, -0.6) : e.type === "writer" ? o.addScaledVector(t.tan, 3.6).addScaledVector(t.rad, -0.6) : o.addScaledVector(t.rad, 0.5);
41
- const a = vo(wo(e));
42
- a && o.addScaledVector(t.tan, a * 2.4).addScaledVector(t.rad, Math.abs(a) * 1.3), o.x += (ee(e.id, 6) - 0.5) * 0.9, o.z += (ee(e.id, 7) - 0.5) * 0.9;
43
- }
44
- const i = Math.hypot(o.x, o.z);
45
- if (i < et + 2 && o.multiplyScalar((et + 2) / Math.max(i, 0.01)), Ge.set(e.id, o), qe.set(e.id, t), Ge.size > 400)
46
- for (const a of Ge.keys()) E.instances.has(a) || (Ge.delete(a), qe.delete(a));
47
- return o;
48
- }
49
- const ke = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map(), He = [-0.78, 0.78, -1.42, 1.42, -1.1, 1.1, 0.22, -0.12], Ao = [20, 20, 20, 20, 26.5, 26.5, 27, 31];
50
- function at(e, t) {
51
- const o = Math.floor(e / He.length), r = He[e % He.length] + o * 0.26, i = Ao[e % He.length] + o * 6;
52
- return t.set(Math.sin(r) * i, 0, -Math.cos(r) * i);
53
- }
54
- function xo(e, t, o, r) {
55
- at(e, r);
56
- const a = Math.atan2(r.x, -r.z) + (t - (o - 1) / 2) * 0.85 * (4 / Math.max(4, o)), s = 3.6 + t % 2 * 0.9;
57
- return r.x += Math.sin(a) * s, r.z += -Math.cos(a) * s, r;
58
- }
59
- function Co(e, t, o) {
60
- const r = Oe * 0.9 * Math.sqrt((e + 0.6) / t), i = e * 2.39996323;
61
- return o.set(Math.cos(i) * r, 0.08, Math.sin(i) * r);
62
- }
63
- function Po(e, t, o) {
64
- const r = de[e % de.length], i = Math.abs(r) > 1.5, a = r + (t && !i ? r >= 0 ? 0.32 : -0.32 : 0), s = 12.3 + kt[e % de.length] + (t ? i ? -4.6 : 6 : 0);
65
- return o.set(Math.sin(a) * s, t ? i ? 2.6 : 4.2 : 3.2, -Math.cos(a) * s);
66
- }
67
- function zo(e, t) {
68
- return Po(e, Se.laneExpanded[e] > 0, t);
69
- }
70
- function To() {
71
- return /* @__PURE__ */ u(Jt, { place: zo, radius: 1.35, variant: "swarm", color: "#b6f36a", pointSize: 0.85 });
72
- }
73
- var Tt;
74
- const q = typeof window < "u" && !!((Tt = window.matchMedia) != null && Tt.call(window, "(prefers-reduced-motion: reduce)").matches), fe = {
75
- bg: "#02080b",
76
- fog: "#071c20",
77
- ground: "#041214",
78
- moon: "#dff7ef",
79
- teal: "#5eead4",
80
- mint: "#86efac",
81
- amber: "#fbbf24",
82
- red: "#ff3d4a"
83
- }, J = new n.Color(fe.teal);
84
- new n.Color(fe.mint);
85
- const tt = new n.Color(fe.amber), Vt = new n.Color(fe.red), se = new n.Color(1, 1, 1), Ro = new n.Color("#3b4d52"), vt = Object.fromEntries(Object.entries(Rt).map(([e, t]) => [e, new n.Color(t).lerp(J, 0.12)])), ie = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ue = (e) => 1 - Math.pow(1 - ie(e), 3), st = (e) => (e = ie(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), ko = (e) => {
86
- e = ie(e);
87
- const t = 1.9;
88
- return 1 + (t + 1) * Math.pow(e - 1, 3) + t * Math.pow(e - 1, 2);
89
- };
90
- let Ke = null;
91
- function wt() {
92
- if (Ke) return Ke;
93
- const e = document.createElement("canvas");
94
- e.width = e.height = 128;
95
- const t = e.getContext("2d"), o = t.createRadialGradient(64, 64, 0, 64, 64, 64);
96
- return o.addColorStop(0, "rgba(255,255,255,1)"), o.addColorStop(0.15, "rgba(255,255,255,0.6)"), o.addColorStop(0.45, "rgba(255,255,255,0.14)"), o.addColorStop(1, "rgba(255,255,255,0)"), t.fillStyle = o, t.fillRect(0, 0, 128, 128), Ke = new n.CanvasTexture(e), Ke;
97
- }
98
- let Xe = null;
99
- function Fo() {
100
- if (Xe) return Xe;
101
- const e = document.createElement("canvas");
102
- e.width = 256, e.height = 128;
103
- const t = e.getContext("2d");
104
- let o = 7;
105
- const r = () => (o = o * 16807 % 2147483647) / 2147483647;
106
- for (let i = 0; i < 14; i++) {
107
- const a = 50 + r() * 156, s = 50 + r() * 28, c = 26 + r() * 30, p = t.createRadialGradient(a, s, 0, a, s, c);
108
- p.addColorStop(0, "rgba(255,255,255,0.22)"), p.addColorStop(1, "rgba(255,255,255,0)"), t.fillStyle = p, t.fillRect(0, 0, 256, 128);
109
- }
110
- return Xe = new n.CanvasTexture(e), Xe;
111
- }
112
- function Ae(e = "#fff") {
113
- return new n.SpriteMaterial({ map: wt(), color: e, blending: n.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1, fog: !1 });
114
- }
115
- function ue(e = "#fff", t = n.FrontSide) {
116
- return new n.MeshBasicMaterial({ color: e, blending: n.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1, side: t, fog: !1 });
117
- }
118
- function Vo(e = "#fff") {
119
- return new n.LineBasicMaterial({ color: e, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1, toneMapped: !1, fog: !1 });
120
- }
121
- function it(e = "#fff") {
122
- return new n.MeshBasicMaterial({ map: wt(), color: e, blending: n.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1, fog: !1 });
123
- }
124
- new n.SphereGeometry(1, 24, 16);
125
- const lt = new n.PlaneGeometry(1, 1).rotateX(-Math.PI / 2), yt = new n.ConeGeometry(1, 1, 12).translate(0, 0.5, 0);
126
- function Bo(e = 48, t = 6) {
127
- const o = [], r = [];
128
- for (let a = 0; a <= e; a++) {
129
- const s = a / e;
130
- for (let c = 0; c < t; c++) {
131
- const p = c / t * Math.PI * 2;
132
- o.push(s, Math.cos(p), Math.sin(p));
133
- }
134
- }
135
- for (let a = 0; a < e; a++)
136
- for (let s = 0; s < t; s++) {
137
- const c = a * t + s, p = a * t + (s + 1) % t, h = (a + 1) * t + s, l = (a + 1) * t + (s + 1) % t;
138
- r.push(c, h, p, p, h, l);
139
- }
140
- const i = new n.BufferGeometry();
141
- return i.setAttribute("position", new n.Float32BufferAttribute(o, 3)), i.setIndex(r), i.boundingSphere = new n.Sphere(new n.Vector3(), 1e4), i;
142
- }
143
- const Bt = Bo(), _o = (
144
- /* glsl */
145
- `
146
- uniform vec3 uP0; uniform vec3 uP1; uniform vec3 uP2; uniform float uRadius; uniform float uTaper;
147
- varying float vT; varying float vRim;
148
- void main(){
149
- float t = position.x; float a = 1.0 - t;
150
- vec3 p = a*a*uP0 + 2.0*a*t*uP1 + t*t*uP2;
151
- vec3 tg = 2.0*a*(uP1-uP0) + 2.0*t*(uP2-uP1);
152
- tg = length(tg) > 1e-5 ? normalize(tg) : vec3(1.0,0.0,0.0);
153
- vec3 up = abs(tg.y) > 0.92 ? vec3(1.0,0.0,0.0) : vec3(0.0,1.0,0.0);
154
- vec3 n = normalize(cross(tg, up)); vec3 b = cross(tg, n);
155
- vec3 off = n*position.y + b*position.z;
156
- vec4 mv = modelViewMatrix * vec4(p + off * uRadius * mix(1.0, uTaper, t), 1.0);
157
- vRim = abs(dot(normalize(normalMatrix * off), normalize(-mv.xyz)));
158
- vT = t;
159
- gl_Position = projectionMatrix * mv;
160
- }`
161
- ), Go = (
162
- /* glsl */
163
- `
164
- uniform vec3 uColor; uniform float uOpacity; uniform float uGrow; uniform float uTime; uniform float uFlow; uniform float uFlowDir;
165
- uniform float uHead; uniform float uTail; uniform vec3 uHeadColor;
166
- varying float vT; varying float vRim;
167
- void main(){
168
- if (vT > uGrow) discard;
169
- float core = 0.3 + 0.7 * vRim * vRim;
170
- float tip = smoothstep(uGrow - 0.08, uGrow, vT) * step(uGrow, 0.995);
171
- float head = 0.0;
172
- if (uHead >= 0.0) { float d = vT - uHead; head = d > 0.0 ? exp(-d * d / 0.0008) : exp(d / max(uTail, 0.001)); }
173
- // directional flow: soft beads travelling start (t=0) → end (t=1) (or reversed with uFlowDir = -1)
174
- float flow = uFlow * pow(max(0.0, sin((vT * 9.0 - uTime * 0.9 * uFlowDir) * 3.14159)), 6.0);
175
- vec3 col = uColor * uOpacity * (core + tip * 3.0 + flow * 2.4) + uHeadColor * head * (0.6 + vRim);
176
- gl_FragColor = vec4(col, 1.0);
177
- }`
178
- );
179
- function _t(e = "#fff", t = 0.06, o = 0.4) {
180
- return new n.ShaderMaterial({
181
- uniforms: {
182
- uP0: { value: new n.Vector3() },
183
- uP1: { value: new n.Vector3() },
184
- uP2: { value: new n.Vector3() },
185
- uRadius: { value: t },
186
- uTaper: { value: o },
187
- uColor: { value: new n.Color(e) },
188
- uOpacity: { value: 1 },
189
- uGrow: { value: 1 },
190
- uTime: { value: 0 },
191
- uFlow: { value: 0 },
192
- uFlowDir: { value: 1 },
193
- uHead: { value: -1 },
194
- uTail: { value: 0.12 },
195
- uHeadColor: { value: new n.Color(4, 4, 4) }
196
- },
197
- vertexShader: _o,
198
- fragmentShader: Go,
199
- transparent: !0,
200
- depthWrite: !1,
201
- blending: n.AdditiveBlending
202
- });
203
- }
204
- function xe(e, t, o, r, i) {
205
- const a = 1 - r;
206
- return i.set(a * a * e.x + 2 * a * r * t.x + r * r * o.x, a * a * e.y + 2 * a * r * t.y + r * r * o.y, a * a * e.z + 2 * a * r * t.z + r * r * o.z);
207
- }
208
- function Mt(e, t, o, r, i) {
209
- i.copy(e).add(t).multiplyScalar(0.5);
210
- const a = t.x - e.x, s = t.z - e.z, c = Math.hypot(a, s) || 1;
211
- return i.x += -s / c * o * c, i.z += a / c * o * c, i.y = r, i;
212
- }
213
- function Gt(e, t, o, r) {
214
- return r.copy(e).add(t).multiplyScalar(0.5), r.y = Math.max(e.y, t.y) + o, r;
215
- }
216
- function xt(e, t, o) {
217
- return e.r += t.r * o, e.g += t.g * o, e.b += t.b * o, e;
218
- }
219
- const rt = class rt {
220
- constructor(t) {
221
- ne(this, "mesh");
222
- ne(this, "colors");
223
- ne(this, "n", 0);
224
- ne(this, "max");
225
- ne(this, "o", new n.Object3D());
226
- ne(this, "a", new n.Vector3());
227
- ne(this, "b", new n.Vector3());
228
- ne(this, "d", new n.Vector3());
229
- this.max = t, this.colors = new Float32Array(t * 3), this.mesh = new n.InstancedMesh(yt, new n.MeshBasicMaterial({ blending: n.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1, fog: !1 }), t), this.mesh.instanceColor = new n.InstancedBufferAttribute(this.colors, 3), this.mesh.frustumCulled = !1, this.mesh.count = 0;
230
- }
231
- begin() {
232
- this.n = 0;
233
- }
234
- add(t, o, r, i, a, s, c, p = 1) {
235
- this.n >= this.max || (xe(t, o, r, i, this.a), xe(t, o, r, Math.min(1, Math.max(0, i + 0.02 * a)), this.b), this.d.subVectors(this.b, this.a), !(this.d.lengthSq() < 1e-8) && (this.o.position.copy(this.a), this.o.quaternion.setFromUnitVectors(rt.UP, this.d.normalize()), this.o.scale.set(s * 0.42, s, s * 0.42), this.o.updateMatrix(), this.mesh.setMatrixAt(this.n, this.o.matrix), this.colors[this.n * 3] = c.r * p, this.colors[this.n * 3 + 1] = c.g * p, this.colors[this.n * 3 + 2] = c.b * p, this.n++));
236
- }
237
- end() {
238
- this.mesh.count = this.n, this.mesh.instanceMatrix.needsUpdate = !0, this.mesh.instanceColor && (this.mesh.instanceColor.needsUpdate = !0);
239
- }
240
- };
241
- ne(rt, "UP", new n.Vector3(0, 1, 0));
242
- let ot = rt;
243
- const pt = new n.Vector3(), $e = new n.Vector3(), Do = new n.Vector3(0, 1, 0);
244
- function ht(e, t, o, r, i, a, s) {
245
- xe(t, o, r, i, pt), xe(t, o, r, Math.min(1, Math.max(0, i + 0.02 * a)), $e), e.position.copy(pt), $e.sub(pt), $e.lengthSq() > 1e-8 && e.quaternion.setFromUnitVectors(Do, $e.normalize()), e.scale.set(s * 0.42, s, s * 0.42);
246
- }
247
- const Eo = new n.DodecahedronGeometry(0.32, 0), Oo = new n.MeshStandardMaterial({ color: "#1b2e2d", roughness: 0.9, flatShading: !0 });
248
- function Uo({ run: e }) {
249
- const t = Ft(e, e.id), o = S(() => new n.Color(e.color).lerp(J, 0.35), [e.color]), r = S(() => it("#000"), []), i = S(() => ut.map(() => Ae("#000")), []), a = S(
250
- () => ut.map((l, d) => t.c.clone().addScaledVector(t.rad, -3.4).addScaledVector(t.tan, (d - 1) * 1.7).setY(0)),
251
- [t]
252
- ), s = S(() => new n.Vector3(t.c.x, 7.4, t.c.z).addScaledVector(t.rad, 1.2), [t]), c = V([]), [p, h] = Ce(e.hasSteps);
253
- return $(({ clock: l }) => {
254
- const d = performance.now(), m = Ue((d - e.startedAt) / 1200), T = e.endedAt ? ie(1 - (d - e.endedAt - (eo - 2500)) / 2500) : 1, b = q ? 1 : 0.9 + 0.1 * Math.sin(l.elapsedTime * 0.6 + e.slot);
255
- r.color.copy(o).multiplyScalar(0.085 * m * T * b), e.hasSteps !== p && h(e.hasSteps), e.hasSteps && ut.forEach((v, f) => {
256
- var y;
257
- const k = e.steps[v], H = q ? 1 : 0.8 + 0.2 * Math.sin(l.elapsedTime * 7 + f * 2) * Math.sin(l.elapsedTime * 3.1 + f), I = i[f];
258
- k === "running" ? I.color.copy(tt).multiplyScalar(0.9 * H) : k === "done" ? I.color.copy(J).multiplyScalar(0.35) : k === "failed" ? I.color.copy(Vt).multiplyScalar(0.6) : I.color.setScalar(0.04), I.color.multiplyScalar(T), (y = c.current[f]) == null || y.scale.setScalar(k === "running" ? 1.9 : 1.2);
259
- });
260
- }), /* @__PURE__ */ X(te, { children: [
261
- /* @__PURE__ */ u("mesh", { geometry: lt, material: r, position: [t.c.x, 0.015, t.c.z], scale: 14 }),
262
- p && a.map((l, d) => /* @__PURE__ */ X("group", { position: l, children: [
263
- /* @__PURE__ */ u("mesh", { geometry: Eo, material: Oo, position: [0, 0.22, 0], scale: [1, 0.8, 1] }),
264
- /* @__PURE__ */ u("sprite", { ref: (m) => void (c.current[d] = m), material: i[d], position: [0, 0.62, 0] })
265
- ] }, d)),
266
- /* @__PURE__ */ u(Lo, { run: e, pos: s })
267
- ] });
268
- }
269
- function Lo({ run: e, pos: t }) {
270
- to();
271
- const o = e.status !== "started";
272
- return /* @__PURE__ */ u(
273
- Le,
274
- {
275
- position: t,
276
- text: e.topic,
277
- secondary: oo(e, { base: "#94a3b8", current: "#fde68a", done: "#cbd5e1" }, ["growing…", "grove at rest"]),
278
- color: e.color,
279
- size: 0.36,
280
- maxWidth: 10,
281
- opacity: o ? 0.5 : 1,
282
- fadeMs: 400,
283
- pxRange: [10, 15]
284
- }
285
- );
286
- }
287
- function Io() {
288
- const [e, t] = Ce([]), o = V(/* @__PURE__ */ new Set()), r = V(-1);
289
- return $(() => {
290
- const i = E.runs;
291
- let a = i.size !== o.current.size || r.current !== Se.version;
292
- if (!a)
293
- for (const s of i.keys()) o.current.has(s) || (a = !0);
294
- a && (o.current = new Set(i.keys()), r.current = Se.version, t([...i.values()].filter((s) => Qt(s.id))));
295
- }), /* @__PURE__ */ u(te, { children: e.map((i) => /* @__PURE__ */ u(Uo, { run: i }, i.id)) });
296
- }
297
- const Q = 1400, g = {
298
- pos: new Float32Array(Q * 3),
299
- vel: new Float32Array(Q * 3),
300
- col: new Float32Array(Q * 3),
301
- size: new Float32Array(Q),
302
- life: new Float32Array(Q),
303
- // seconds left (≤0 = dead)
304
- max: new Float32Array(Q),
305
- seed: new Float32Array(Q),
306
- kind: new Uint8Array(Q),
307
- // 0 = firefly (wanders), 1 = trail (still, quick fade)
308
- next: 0
309
- };
310
- function Dt() {
311
- for (let t = 0; t < 24; t++) {
312
- const o = (g.next + t) % Q;
313
- if (g.life[o] <= 0)
314
- return g.next = (o + 1) % Q, o;
315
- }
316
- const e = g.next;
317
- return g.next = (g.next + 1) % Q, e;
318
- }
319
- function No(e, t, o, r, i) {
320
- q && (t = Math.ceil(t * 0.4));
321
- for (let a = 0; a < t; a++) {
322
- const s = Dt(), c = Math.random() * Math.PI * 2, p = i * Math.sqrt(Math.random());
323
- g.pos[s * 3] = e.x + Math.cos(c) * p, g.pos[s * 3 + 1] = e.y + (Math.random() - 0.3) * i * 0.9, g.pos[s * 3 + 2] = e.z + Math.sin(c) * p;
324
- const h = 0.9 + Math.random() * 1.6;
325
- g.vel[s * 3] = Math.cos(c) * h, g.vel[s * 3 + 1] = 0.9 + Math.random() * 1.8, g.vel[s * 3 + 2] = Math.sin(c) * h;
326
- const l = Math.random() * 0.35;
327
- g.col[s * 3] = o.r * (1 - l) + l * 1, g.col[s * 3 + 1] = o.g * (1 - l) + l * 1, g.col[s * 3 + 2] = o.b * (1 - l) + l * 0.6, g.size[s] = r * (0.6 + Math.random() * 0.8), g.max[s] = g.life[s] = 1.8 + Math.random() * 2.2, g.seed[s] = Math.random() * 100, g.kind[s] = 0;
328
- }
329
- }
330
- function Et(e, t, o, r = 0.55) {
331
- const i = Dt();
332
- g.pos[i * 3] = e.x, g.pos[i * 3 + 1] = e.y, g.pos[i * 3 + 2] = e.z, g.vel[i * 3] = g.vel[i * 3 + 1] = g.vel[i * 3 + 2] = 0, g.col[i * 3] = t.r, g.col[i * 3 + 1] = t.g, g.col[i * 3 + 2] = t.b, g.size[i] = o, g.max[i] = g.life[i] = r, g.seed[i] = Math.random() * 100, g.kind[i] = 1;
333
- }
334
- const Wo = (
335
- /* glsl */
336
- `
337
- attribute float aSize; attribute vec3 aColor; attribute float aAlpha; attribute float aSeed;
338
- uniform float uScale; uniform float uTime; varying vec3 vC;
339
- void main(){
340
- vec4 mv = modelViewMatrix * vec4(position, 1.0);
341
- float flick = 0.65 + 0.35 * sin(uTime * (5.0 + fract(aSeed) * 6.0) + aSeed * 7.0);
342
- vC = aColor * aAlpha * flick;
343
- gl_PointSize = aSize * uScale / -mv.z;
344
- gl_Position = projectionMatrix * mv;
345
- }`
346
- ), jo = (
347
- /* glsl */
348
- `
349
- varying vec3 vC;
350
- void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
351
- float core = smoothstep(0.35, 0.0, r); float halo = pow(1.0 - r, 2.6);
352
- gl_FragColor = vec4(vC * (core * 1.6 + halo * 0.55), 1.0); }`
353
- );
354
- function bt(e, t, o) {
355
- return e.height * t.getPixelRatio() / (2 * Math.tan((o.fov ?? 50) * Math.PI / 360));
356
- }
357
- function qo() {
358
- const { size: e, gl: t, camera: o } = nt(), { geo: r, mat: i } = S(() => {
359
- const a = new n.BufferGeometry();
360
- a.setAttribute("position", new n.BufferAttribute(g.pos, 3).setUsage(n.DynamicDrawUsage)), a.setAttribute("aColor", new n.BufferAttribute(g.col, 3).setUsage(n.DynamicDrawUsage)), a.setAttribute("aSize", new n.BufferAttribute(g.size, 1).setUsage(n.DynamicDrawUsage)), a.setAttribute("aSeed", new n.BufferAttribute(g.seed, 1).setUsage(n.DynamicDrawUsage)), a.setAttribute("aAlpha", new n.BufferAttribute(new Float32Array(Q), 1).setUsage(n.DynamicDrawUsage)), a.boundingSphere = new n.Sphere(new n.Vector3(), 1e4);
361
- const s = new n.ShaderMaterial({ uniforms: { uScale: { value: 400 }, uTime: { value: 0 } }, vertexShader: Wo, fragmentShader: jo, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending });
362
- return { geo: a, mat: s };
363
- }, []);
364
- return $(({ clock: a }, s) => {
365
- s = Math.min(s, 0.05);
366
- const c = a.elapsedTime;
367
- i.uniforms.uScale.value = bt(e, t, o), i.uniforms.uTime.value = q ? 0 : c;
368
- const p = r.getAttribute("aAlpha"), h = p.array, l = Math.exp(-s * 1.6);
369
- for (let d = 0; d < Q; d++) {
370
- if (g.life[d] <= 0) {
371
- h[d] = 0;
372
- continue;
373
- }
374
- g.life[d] -= s;
375
- const m = 1 - g.life[d] / g.max[d];
376
- if (g.kind[d] === 0) {
377
- const T = g.seed[d];
378
- g.vel[d * 3] = g.vel[d * 3] * l + Math.sin(c * 1.7 + T) * 0.9 * s, g.vel[d * 3 + 1] = g.vel[d * 3 + 1] * l + (0.25 + Math.sin(c * 2.3 + T * 1.3) * 0.5) * s, g.vel[d * 3 + 2] = g.vel[d * 3 + 2] * l + Math.cos(c * 1.5 + T * 0.7) * 0.9 * s, g.pos[d * 3] += g.vel[d * 3] * s, g.pos[d * 3 + 1] += g.vel[d * 3 + 1] * s, g.pos[d * 3 + 2] += g.vel[d * 3 + 2] * s, h[d] = Math.min(1, m * 8) * (1 - m) * (1 - m) * 1.3;
379
- } else h[d] = (1 - m) * (1 - m);
380
- }
381
- r.getAttribute("position").needsUpdate = !0, r.getAttribute("aColor").needsUpdate = !0, r.getAttribute("aSize").needsUpdate = !0, r.getAttribute("aSeed").needsUpdate = !0, p.needsUpdate = !0;
382
- }), /* @__PURE__ */ u("points", { geometry: r, material: i, frustumCulled: !1 });
383
- }
384
- const ae = 700, C = {
385
- pos: new Float32Array(ae * 3),
386
- vel: new Float32Array(ae * 3),
387
- col: new Float32Array(ae * 3),
388
- size: new Float32Array(ae),
389
- life: new Float32Array(ae),
390
- max: new Float32Array(ae),
391
- seed: new Float32Array(ae),
392
- next: 0
393
- };
394
- function Ho(e, t, o, r, i) {
395
- q && (t = Math.ceil(t * 0.5));
396
- for (let a = 0; a < t; a++) {
397
- const s = C.next;
398
- C.next = (C.next + 1) % ae;
399
- const c = Math.random() * Math.PI * 2, p = r * Math.sqrt(Math.random());
400
- C.pos[s * 3] = e.x + Math.cos(c) * p, C.pos[s * 3 + 1] = e.y + (Math.random() - 0.5) * r * 1.4, C.pos[s * 3 + 2] = e.z + Math.sin(c) * p, C.vel[s * 3] = Math.cos(c) * 0.4, C.vel[s * 3 + 1] = -0.2 - Math.random() * 0.4, C.vel[s * 3 + 2] = Math.sin(c) * 0.4;
401
- const h = 0.55 + Math.random() * 0.45;
402
- C.col[s * 3] = o.r * h, C.col[s * 3 + 1] = o.g * h, C.col[s * 3 + 2] = o.b * h, C.size[s] = i * (0.7 + Math.random() * 0.6), C.max[s] = C.life[s] = 3 + Math.random() * 1.2, C.seed[s] = Math.random() * 100;
403
- }
404
- }
405
- const Ko = (
406
- /* glsl */
407
- `
408
- attribute float aSize; attribute vec3 aColor; attribute float aAlpha; attribute float aSeed;
409
- uniform float uScale; uniform float uTime; varying vec3 vC; varying float vRot;
410
- void main(){
411
- vec4 mv = modelViewMatrix * vec4(position, 1.0);
412
- vC = aColor * aAlpha;
413
- vRot = aSeed * 3.0 + uTime * (1.2 + fract(aSeed) * 2.0);
414
- gl_PointSize = aSize * uScale / -mv.z;
415
- gl_Position = projectionMatrix * mv;
416
- }`
417
- ), Xo = (
418
- /* glsl */
419
- `
420
- varying vec3 vC; varying float vRot;
421
- void main(){
422
- vec2 p = gl_PointCoord - 0.5;
423
- float c = cos(vRot), s = sin(vRot);
424
- p = vec2(c * p.x - s * p.y, s * p.x + c * p.y);
425
- // almond leaf with a slightly flipped (tumbling) width
426
- float w = 0.18 + 0.1 * abs(sin(vRot * 0.7));
427
- float d = (p.x * p.x) / (w * w) + (p.y * p.y) / 0.2;
428
- if (d > 1.0) discard;
429
- float vein = 1.0 - smoothstep(0.0, 0.03, abs(p.x));
430
- gl_FragColor = vec4(vC * (0.8 + vein * 0.6) * (1.0 - d * 0.5), 1.0);
431
- }`
432
- );
433
- function $o() {
434
- const { size: e, gl: t, camera: o } = nt(), { geo: r, mat: i } = S(() => {
435
- const a = new n.BufferGeometry();
436
- a.setAttribute("position", new n.BufferAttribute(C.pos, 3).setUsage(n.DynamicDrawUsage)), a.setAttribute("aColor", new n.BufferAttribute(C.col, 3).setUsage(n.DynamicDrawUsage)), a.setAttribute("aSize", new n.BufferAttribute(C.size, 1).setUsage(n.DynamicDrawUsage)), a.setAttribute("aSeed", new n.BufferAttribute(C.seed, 1).setUsage(n.DynamicDrawUsage)), a.setAttribute("aAlpha", new n.BufferAttribute(new Float32Array(ae), 1).setUsage(n.DynamicDrawUsage)), a.boundingSphere = new n.Sphere(new n.Vector3(), 1e4);
437
- const s = new n.ShaderMaterial({ uniforms: { uScale: { value: 400 }, uTime: { value: 0 } }, vertexShader: Ko, fragmentShader: Xo, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending });
438
- return { geo: a, mat: s };
439
- }, []);
440
- return $(({ clock: a }, s) => {
441
- s = Math.min(s, 0.05);
442
- const c = a.elapsedTime;
443
- i.uniforms.uScale.value = bt(e, t, o), i.uniforms.uTime.value = q ? 0 : c;
444
- const p = r.getAttribute("aAlpha"), h = p.array;
445
- for (let l = 0; l < ae; l++) {
446
- if (C.life[l] <= 0) {
447
- h[l] = 0;
448
- continue;
449
- }
450
- C.life[l] -= s;
451
- const d = 1 - C.life[l] / C.max[l], m = C.seed[l], T = C.pos[l * 3 + 1];
452
- T > 0.04 && (C.vel[l * 3] += Math.sin(c * 2.2 + m) * 1.6 * s - C.vel[l * 3] * 0.8 * s, C.vel[l * 3 + 2] += Math.cos(c * 1.9 + m * 1.7) * 1.6 * s - C.vel[l * 3 + 2] * 0.8 * s, C.vel[l * 3 + 1] += (-0.9 - C.vel[l * 3 + 1]) * 1.5 * s, C.pos[l * 3] += C.vel[l * 3] * s, C.pos[l * 3 + 1] = Math.max(0.04, T + C.vel[l * 3 + 1] * s), C.pos[l * 3 + 2] += C.vel[l * 3 + 2] * s), h[l] = Math.min(1, d * 10) * (1 - d * d) * 0.9;
453
- }
454
- r.getAttribute("position").needsUpdate = !0, r.getAttribute("aColor").needsUpdate = !0, r.getAttribute("aSize").needsUpdate = !0, r.getAttribute("aSeed").needsUpdate = !0, p.needsUpdate = !0;
455
- }), /* @__PURE__ */ u("points", { geometry: r, material: i, frustumCulled: !1 });
456
- }
457
- const Yo = (
458
- /* glsl */
459
- `
460
- attribute float aSeed; uniform float uScale; uniform float uTime; varying float vA;
461
- void main(){
462
- float s = aSeed;
463
- vec3 p = position + vec3(sin(uTime * 0.21 + s) * 1.6, sin(uTime * 0.33 + s * 2.1) * 0.5, cos(uTime * 0.17 + s * 1.3) * 1.6);
464
- vec4 mv = modelViewMatrix * vec4(p, 1.0);
465
- float blink = pow(max(0.0, sin(uTime * (0.5 + fract(s) * 0.7) + s * 9.0)), 6.0);
466
- vA = 0.08 + blink * 0.9;
467
- gl_PointSize = (0.22 + blink * 0.18) * uScale / -mv.z;
468
- gl_Position = projectionMatrix * mv;
469
- }`
470
- ), Zo = (
471
- /* glsl */
472
- `
473
- uniform vec3 uColor; varying float vA;
474
- void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
475
- gl_FragColor = vec4(uColor * vA * (smoothstep(0.4, 0.0, r) * 1.4 + pow(1.0 - r, 2.5) * 0.5), 1.0); }`
476
- );
477
- function Jo({ count: e = 170 }) {
478
- const { size: t, gl: o, camera: r } = nt(), { geo: i, mat: a } = S(() => {
479
- const s = new Float32Array(e * 3), c = new Float32Array(e);
480
- let p = 11;
481
- const h = () => (p = p * 16807 % 2147483647) / 2147483647;
482
- for (let m = 0; m < e; m++) {
483
- const T = h() * Math.PI * 2, b = 6 + Math.sqrt(h()) * 22;
484
- s.set([Math.cos(T) * b, 0.6 + h() * 5.5, Math.sin(T) * b], m * 3), c[m] = h() * 100;
485
- }
486
- const l = new n.BufferGeometry();
487
- l.setAttribute("position", new n.BufferAttribute(s, 3)), l.setAttribute("aSeed", new n.BufferAttribute(c, 1)), l.boundingSphere = new n.Sphere(new n.Vector3(), 1e4);
488
- const d = new n.ShaderMaterial({
489
- uniforms: { uScale: { value: 400 }, uTime: { value: 0 }, uColor: { value: new n.Color("#c8ff9e") } },
490
- vertexShader: Yo,
491
- fragmentShader: Zo,
492
- transparent: !0,
493
- depthWrite: !1,
494
- blending: n.AdditiveBlending
495
- });
496
- return { geo: l, mat: d };
497
- }, [e]);
498
- return $(({ clock: s }) => {
499
- a.uniforms.uScale.value = bt(t, o, r), a.uniforms.uTime.value = q ? 20 : s.elapsedTime;
500
- }), /* @__PURE__ */ u("points", { geometry: i, material: a, frustumCulled: !1 });
501
- }
502
- const gt = new n.CylinderGeometry(0.15, 0.24, 1, 10).translate(0, 0.5, 0), Qo = new n.SphereGeometry(1, 22, 10, 0, Math.PI * 2, 0, Math.PI / 2), er = new n.CircleGeometry(1, 22).rotateX(Math.PI / 2), tr = new n.ConeGeometry(1, 1, 18, 1, !0).translate(0, 0.5, 0), or = new n.CylinderGeometry(1, 1, 0.12, 20, 1, !1, 0, Math.PI), Ct = new n.SphereGeometry(1, 20, 14);
503
- function Me(e, t, o, r, i) {
504
- i.push({ geo: gt, cap: !1, pos: [e, 0, t], scale: [r * 0.75, o, r * 0.75] }), i.push({ geo: Qo, cap: !0, pos: [e, o, t], scale: [r, r * 0.62, r] }), i.push({ geo: er, cap: !0, pos: [e, o + 0.01, t], scale: [r * 0.96, 1, r * 0.96] });
505
- }
506
- function rr(e) {
507
- const t = [];
508
- switch (e) {
509
- case "db":
510
- t.push({ geo: gt, cap: !1, pos: [0, 0, 0], scale: [0.5, 1, 0.5] }), t.push({ geo: tr, cap: !0, pos: [0, 0.72, 0], scale: [0.44, 0.95, 0.44] });
511
- break;
512
- case "warehouse":
513
- t.push({ geo: gt, cap: !1, pos: [0, 0, 0], scale: [1.6, 1.3, 1.6] });
514
- for (let o = 0; o < 3; o++) t.push({ geo: or, cap: !0, pos: [0, 0.35 + o * 0.38, 0.12], scale: [0.85 - o * 0.15, 1, 0.65 - o * 0.1] });
515
- break;
516
- case "spark":
517
- for (let o = 0; o < 6; o++) {
518
- const r = o / 6 * Math.PI * 2;
519
- Me(Math.cos(r) * 0.45, Math.sin(r) * 0.45, 0.35 + o % 3 * 0.18, 0.2 + o % 2 * 0.06, t);
520
- }
521
- Me(0, 0, 0.75, 0.32, t);
522
- break;
523
- case "api":
524
- for (let o = 0; o < 7; o++) {
525
- const r = o / 7 * Math.PI * 2;
526
- Me(Math.cos(r) * 0.7, Math.sin(r) * 0.7, 0.3 + o % 2 * 0.12, 0.17, t);
527
- }
528
- break;
529
- case "storage":
530
- t.push({ geo: Ct, cap: !0, pos: [0, 0.42, 0], scale: [0.5, 0.42, 0.5] }), t.push({ geo: Ct, cap: !0, pos: [0.55, 0.24, 0.2], scale: [0.28, 0.24, 0.28] });
531
- break;
532
- case "queue":
533
- for (let o = 0; o < 3; o++) Me((o - 1) * 0.55, 0, 0.35 + o * 0.2, 0.22 + o * 0.05, t);
534
- break;
535
- }
536
- return t;
537
- }
538
- const nr = (() => {
539
- const e = [];
540
- return Me(0, 0, 1.7, 1.2, e), Me(0.95, 0.55, 0.7, 0.42, e), Me(-0.8, 0.7, 0.5, 0.3, e), e;
541
- })();
542
- function Ot({ parts: e, cap: t, stem: o }) {
543
- return /* @__PURE__ */ u(te, { children: e.map((r, i) => /* @__PURE__ */ u("mesh", { geometry: r.geo, material: r.cap ? t : o, position: r.pos, scale: r.scale, rotation: r.rot }, i)) });
544
- }
545
- function ar({ srv: e, res: t, k: o, n: r }) {
546
- const i = S(() => xo(e.slot, o, r, new n.Vector3()), [e.slot, o, r]), a = S(() => at(e.slot, new n.Vector3()), [e.slot]), s = S(() => rr(t.kind), [t.kind]), c = S(() => new n.Color(e.color).lerp(J, 0.25).lerp(se, 0.15), [e.color]), p = S(() => {
547
- const b = _t(c, 0.04, 1);
548
- return b.uniforms.uP0.value.set(a.x, 0.05, a.z), b.uniforms.uP2.value.set(i.x, 0.05, i.z), Mt(b.uniforms.uP0.value, b.uniforms.uP2.value, 0.18 * (o % 2 ? 1 : -1), 0.05, b.uniforms.uP1.value), { edge: b, arrow: ue(c), cap: ue(c), stem: ue(c), halo: Ae(c), pool: it(c) };
549
- }, [a, i, c, o]), h = V(null), l = V(null), d = V(null), m = V(null), T = V("");
550
- return $(({ clock: b }) => {
551
- var N;
552
- const v = performance.now(), f = t.inflight > 0, k = Math.exp(-((v - t.activeAt) / 1e3) * 1.5), H = f && !q ? 0.5 + 0.5 * Math.sin(b.elapsedTime * 5) : f ? 0.5 : 0, I = f ? 1.5 + H * 0.9 : 0.16 + k * 0.9;
553
- p.cap.color.copy(c).multiplyScalar(I * 0.5), p.stem.color.copy(c).multiplyScalar(I * 0.16), p.halo.color.copy(c).multiplyScalar(f ? 0.35 + H * 0.2 : 0.03 + k * 0.2), p.pool.color.copy(c).multiplyScalar(f ? 0.32 : 0.06 + k * 0.2), (N = l.current) == null || N.scale.setScalar(f ? 3.6 + H * 0.6 : 2.2 + k), h.current && h.current.scale.setScalar(f ? 1.12 + H * 0.06 : 1 + k * 0.08);
554
- let y = t.name, M = null;
555
- for (const _ of E.mcpCalls) _.server === e.name && _.resource === t.name && (!M || _.start > M.start) && (M = _);
556
- if (f) {
557
- let _ = "";
558
- for (const U of E.mcpPending.values()) U.server === e.name && U.resource === t.name && (_ = U.tool);
559
- y = `${t.name} ▶ ${_ || "query"}()`;
560
- } else M && M.phase === "result" && v - M.start < 1800 && (y = `${t.name} ✓ returned`);
561
- m.current && (y !== T.current && (m.current.setText(y), T.current = y), m.current.setOpacity(f ? 1 : 0.55 + k * 0.45), m.current.setEmphasis(f));
562
- const w = p.edge.uniforms;
563
- w.uTime.value = q ? 0 : b.elapsedTime;
564
- const R = M && M.phase === "result" ? (v - M.start) / M.dur : 9, F = d.current;
565
- R < 1 ? (w.uRadius.value = 0.07, w.uOpacity.value = 0.9 * (1 - R * 0.6), w.uFlow.value = 0, w.uHead.value = 1 - st(R), w.uTail.value = 0.2, w.uHeadColor.value.copy(c).multiplyScalar(3), F && (F.visible = !0, ht(F, w.uP0.value, w.uP1.value, w.uP2.value, 0.14, -1, 0.5), p.arrow.color.copy(c).multiplyScalar(2 * (1 - R * 0.7)))) : f ? (w.uRadius.value = 0.04, w.uOpacity.value = 0.55, w.uFlow.value = 1, w.uHead.value = -1, F && (F.visible = !0, ht(F, w.uP0.value, w.uP1.value, w.uP2.value, 0.82, 1, 0.42), p.arrow.color.copy(c).multiplyScalar(1.2))) : (w.uRadius.value = 0.035, w.uOpacity.value = 0.14 + k * 0.4, w.uFlow.value = 0, w.uHead.value = -1, F && (F.visible = !1));
566
- }), /* @__PURE__ */ X(te, { children: [
567
- /* @__PURE__ */ u("mesh", { geometry: Bt, material: p.edge, frustumCulled: !1 }),
568
- /* @__PURE__ */ u("mesh", { ref: d, geometry: yt, material: p.arrow, visible: !1 }),
569
- /* @__PURE__ */ X("group", { position: i, children: [
570
- /* @__PURE__ */ u("mesh", { geometry: lt, material: p.pool, position: [0, 0.02, 0], scale: 3.2 }),
571
- /* @__PURE__ */ u("sprite", { ref: l, material: p.halo, position: [0, 0.8, 0] }),
572
- /* @__PURE__ */ u("group", { ref: h, children: /* @__PURE__ */ u(Ot, { parts: s, cap: p.cap, stem: p.stem }) }),
573
- /* @__PURE__ */ u(Le, { ref: m, position: [0, -0.35, 0], offset: [0, -0.32], text: t.name, color: e.color, size: 0.22, opacity: 0.55, pxRange: [7.5, 11.5] })
574
- ] })
575
- ] });
576
- }
577
- function sr({ srv: e }) {
578
- const t = S(() => at(e.slot, new n.Vector3()), [e.slot]), o = S(() => new n.Color(e.color).lerp(J, 0.2), [e.color]), r = S(() => ({ cap: ue(o), stem: ue(o), halo: Ae(o), pool: it(o) }), [o]), i = V(null), a = V(null), [s, c] = Ce([]), p = V(0);
579
- return $(({ clock: h }) => {
580
- var v;
581
- e.resources.size !== p.current && (p.current = e.resources.size, c([...e.resources.values()]));
582
- const l = performance.now(), d = e.inflight > 0, m = Math.exp(-((l - e.activeAt) / 1e3) * 1.5), T = d && !q ? 0.5 + 0.5 * Math.sin(h.elapsedTime * 3) : 0, b = (d ? 0.8 + T * 0.3 : 0.3) + m * 0.45;
583
- r.cap.color.copy(o).multiplyScalar(b * 0.55), r.stem.color.copy(o).multiplyScalar(b * 0.18), r.halo.color.copy(o).multiplyScalar(d ? 0.3 : 0.1 + m * 0.15), r.pool.color.copy(o).multiplyScalar(d ? 0.3 : 0.1 + m * 0.15), (v = i.current) == null || v.scale.setScalar(5.5 + (d ? T * 0.8 : 0)), a.current && a.current.scale.setScalar(1 + m * 0.05 + T * 0.03);
584
- }), /* @__PURE__ */ X(te, { children: [
585
- /* @__PURE__ */ X("group", { position: t, children: [
586
- /* @__PURE__ */ u("mesh", { geometry: lt, material: r.pool, position: [0, 0.02, 0], scale: 6 }),
587
- /* @__PURE__ */ u("sprite", { ref: i, material: r.halo, position: [0, 1.6, 0] }),
588
- /* @__PURE__ */ u("group", { ref: a, children: /* @__PURE__ */ u(Ot, { parts: nr, cap: r.cap, stem: r.stem }) }),
589
- /* @__PURE__ */ u(Le, { position: [0, 2.95, 0], text: `MCP · ${e.name}`, color: e.color, size: 0.3, pxRange: [9, 13] })
590
- ] }),
591
- s.map((h, l) => /* @__PURE__ */ u(ar, { srv: e, res: h, k: l, n: s.length }, h.name))
592
- ] });
593
- }
594
- const Ye = 28, Te = 44, De = 3;
595
- function ir() {
596
- const e = S(() => {
597
- const i = new n.BufferGeometry();
598
- return i.setAttribute("position", new n.BufferAttribute(new Float32Array(Ye * De * Te * 2 * 3), 3)), i.setAttribute("color", new n.BufferAttribute(new Float32Array(Ye * De * Te * 2 * 3), 3)), i.boundingSphere = new n.Sphere(new n.Vector3(), 1e4), i;
599
- }, []), t = S(() => new n.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), []), o = S(() => new ot(Ye), []), r = S(() => ({ a: new n.Vector3(), b: new n.Vector3(), c: new n.Vector3(), p: new n.Vector3(), col: new n.Color(), k: new n.Color() }), []);
600
- return $(({ clock: i }) => {
601
- const a = performance.now(), s = q ? 0 : i.elapsedTime, c = e.getAttribute("position"), p = e.getAttribute("color");
602
- let h = 0;
603
- o.begin();
604
- const l = (m, T, b, v, f) => {
605
- if (h >= Ye) return;
606
- const k = Ee.get(m), H = E.mcpServers.get(T);
607
- if (!k || !H) return;
608
- const { a: I, b: y, c: M, p: w, col: R, k: F } = r;
609
- I.set(k.x, 0.07, k.z), at(H.slot, y), y.y = 0.07, Mt(I, y, 0.16 * (f % 2 ? 1 : -1), 0.07, M), R.set(H.color).lerp(J, 0.3);
610
- let N;
611
- b === 0 ? (R.lerp(tt, ie(v / 1.2)), v > 1.2 && R.lerp(Vt, ie((v - 1.2) / 1)), N = (0.3 + Math.min(0.6, v * 0.25)) * Ue(v / 0.3)) : (F.copy(R).lerp(se, 0.35), N = 1.3 * (v < 0.75 ? 1 : 1 - (v - 0.75) / 0.25));
612
- const _ = 1 - st(v / 0.75), U = b === 0 ? Ue(v / 0.45) : 1;
613
- for (let O = 0; O < De; O++)
614
- for (let K = 0; K < Te; K++)
615
- for (let L = 0; L < 2; L++) {
616
- const G = (K + L) / Te;
617
- xe(I, M, y, G, w);
618
- const x = Math.sin(G * Math.PI) * (0.1 + O * 0.06) * Math.sin(G * (17 + O * 6) + O * 2.1 + f), z = ((h * De + O) * Te + K) * 2 + L;
619
- c.setXYZ(z, w.x + x, w.y + Math.abs(x) * 0.3, w.z - x);
620
- let D;
621
- if (b === 0) {
622
- const pe = Math.pow(Math.max(0, Math.sin(G * 22 - s * 2.4)), 8);
623
- D = G > U ? 0 : N * (0.3 + pe * 1.5) * (O === 0 ? 1 : 0.35);
624
- } else D = N * (0.25 + Math.exp(-(((G - _) / 0.07) ** 2)) * 3 * (v < 0.8 ? 1 : 0)) * (O === 0 ? 1 : 0.6);
625
- const Y = b === 0 ? R : F;
626
- p.setXYZ(z, Y.r * D, Y.g * D, Y.b * D);
627
- }
628
- b === 0 ? U > 0.9 && o.add(I, M, y, 0.9, 1, 0.5, R, 0.4 + N * 1.4) : (o.add(I, M, y, 0.08, -1, 0.66, F, N * 1.6), v < 0.75 && (xe(I, M, y, _, w), w.y += 0.12, Et(w, F, 0.45, 0.4))), h++;
629
- };
630
- let d = 0;
631
- for (const m of E.mcpPending.values()) l(m.instance, m.server, 0, ro(m, a), d++);
632
- for (const m of E.mcpCalls) m.phase === "result" && l(m.instance, m.server, 1, ie((a - m.start) / m.dur), m.id);
633
- e.setDrawRange(0, h * De * Te * 2), c.needsUpdate = !0, p.needsUpdate = !0, o.end();
634
- }), /* @__PURE__ */ X(te, { children: [
635
- /* @__PURE__ */ u("lineSegments", { geometry: e, material: t, frustumCulled: !1 }),
636
- /* @__PURE__ */ u("primitive", { object: o.mesh })
637
- ] });
638
- }
639
- const lr = (
640
- /* glsl */
641
- `
642
- attribute float aPhase; uniform float uTime; varying float vK; varying float vD;
643
- void main(){
644
- vec4 mv = modelViewMatrix * vec4(position, 1.0);
645
- vK = pow(max(0.0, sin(aPhase * 0.9 - uTime * 0.8)), 12.0);
646
- vD = -mv.z;
647
- gl_Position = projectionMatrix * mv;
648
- }`
649
- ), cr = (
650
- /* glsl */
651
- `
652
- uniform vec3 uColor; varying float vK; varying float vD;
653
- void main(){ float fade = 1.0 - smoothstep(30.0, 60.0, vD); gl_FragColor = vec4(uColor * (0.07 + vK * 0.7) * fade, 1.0); }`
654
- );
655
- function ur() {
656
- const { geo: e, mat: t } = S(() => {
657
- let o = 3;
658
- const r = () => (o = o * 16807 % 2147483647) / 2147483647, i = [], a = [], s = (h, l, d, m, T, b) => {
659
- let v = T;
660
- for (let f = 0; f < m; f++) {
661
- d += (r() - 0.5) * 0.7;
662
- const k = h + Math.cos(d) * 0.55, H = l + Math.sin(d) * 0.55;
663
- if (Math.hypot(k, H) < 6.2) break;
664
- i.push(h, 0.035, l, k, 0.035, H), a.push(v, v + 0.55), v += 0.55, h = k, l = H, b < 3 && r() < 0.09 && s(h, l, d + (r() < 0.5 ? 0.9 : -0.9), Math.floor(m * 0.5), v, b + 1);
665
- }
666
- };
667
- for (let h = 0; h < 30; h++) {
668
- const l = r() * Math.PI * 2, d = 7 + r() * 16;
669
- s(Math.cos(l) * d, Math.sin(l) * d, r() * Math.PI * 2, 18 + Math.floor(r() * 22), r() * 20, 0);
670
- }
671
- const c = new n.BufferGeometry();
672
- c.setAttribute("position", new n.Float32BufferAttribute(i, 3)), c.setAttribute("aPhase", new n.Float32BufferAttribute(a, 1));
673
- const p = new n.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uColor: { value: J.clone().multiplyScalar(0.5) } }, vertexShader: lr, fragmentShader: cr, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending });
674
- return { geo: c, mat: p };
675
- }, []);
676
- return $(({ clock: o }) => {
677
- t.uniforms.uTime.value = q ? 0 : o.elapsedTime;
678
- }), /* @__PURE__ */ u("lineSegments", { geometry: e, material: t });
679
- }
680
- function fr() {
681
- const [e, t] = Ce([]), o = V(-1);
682
- return $(() => {
683
- E.mcpServers.size !== o.current && (o.current = E.mcpServers.size, t([...E.mcpServers.values()]));
684
- }), /* @__PURE__ */ X(te, { children: [
685
- /* @__PURE__ */ u(ur, {}),
686
- e.map((r) => /* @__PURE__ */ u(sr, { srv: r }, r.name)),
687
- /* @__PURE__ */ u(ir, {})
688
- ] });
689
- }
690
- const pr = 64, dr = 180, Ze = 40, Re = 18, be = 12, Je = 4, ye = 11, mr = (
691
- /* glsl */
692
- `
693
- varying vec2 vP;
694
- void main(){ vec4 w = modelMatrix * vec4(position, 1.0); vP = w.xz; gl_Position = projectionMatrix * viewMatrix * w; }`
695
- ), hr = (
696
- /* glsl */
697
- `
698
- uniform float uTime; uniform float uR;
699
- uniform vec4 uRip[${be}]; uniform vec3 uRipC[${be}];
700
- varying vec2 vP;
701
- void main(){
702
- float r = length(vP) / uR;
703
- vec3 deep = vec3(0.004, 0.026, 0.032);
704
- vec3 shallow = vec3(0.01, 0.055, 0.062);
705
- vec3 col = mix(deep, shallow, smoothstep(0.35, 1.0, r));
706
- // gentle swell bands
707
- float sw = sin(vP.x * 1.7 + uTime * 0.5) * sin(vP.y * 1.3 - uTime * 0.4);
708
- col += vec3(0.015, 0.045, 0.045) * sw * 0.4;
709
- // broken moon path on the water (toward the camera)
710
- float lane = exp(-pow((vP.x + 1.1 + sin(vP.y * 3.0 + uTime) * 0.12) / 0.55, 2.0));
711
- float glint = pow(max(0.0, sin(vP.y * 9.0 + uTime * 1.3 + sin(vP.x * 4.0) * 1.5)), 6.0);
712
- col += vec3(0.55, 0.85, 0.8) * lane * (0.05 + glint * 0.32) * smoothstep(-0.2, 1.0, vP.y / uR + 0.4);
713
- // luminous shore
714
- col += vec3(0.25, 0.85, 0.75) * smoothstep(0.88, 1.0, r) * 0.22;
715
- // ripples
716
- for (int i = 0; i < ${be}; i++) {
717
- vec4 q = uRip[i];
718
- if (q.z < 0.0 || q.z > 1.0) continue;
719
- float d = length(vP - q.xy);
720
- float ring = q.z * (1.2 + q.w * 2.2);
721
- float k = exp(-pow((d - ring) / (0.07 + q.z * 0.08), 2.0)) * (1.0 - q.z) * (1.0 - q.z);
722
- col += uRipC[i] * k * (1.0 + q.w * 1.2);
723
- }
724
- float edge = 1.0 - smoothstep(0.985, 1.0, r);
725
- gl_FragColor = vec4(col, edge);
726
- }`
727
- ), gr = (
728
- /* glsl */
729
- `
730
- attribute float aSize; attribute vec3 aColor; uniform float uScale; uniform float uTime; varying vec3 vC;
731
- void main(){
732
- vec3 p = position; p.y += sin(uTime * 0.9 + position.x * 2.1 + position.z * 1.7) * 0.03;
733
- vec4 mv = modelViewMatrix * vec4(p, 1.0);
734
- gl_PointSize = aSize * uScale / -mv.z; vC = aColor; gl_Position = projectionMatrix * mv; }`
735
- ), vr = (
736
- /* glsl */
737
- `
738
- varying vec3 vC;
739
- void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
740
- float core = smoothstep(0.45, 0.0, r); float halo = pow(1.0 - r, 2.2);
741
- gl_FragColor = vec4(vC * (core * 1.25 + halo * 0.45), 1.0); }`
742
- );
743
- function wr({ galaxy: e }) {
744
- const t = S(() => ({ nodes: e.nodes.slice(0, dr), links: e.links }), [e]), o = t.nodes.length, { size: r, gl: i, camera: a } = nt(), s = V([]), c = V([]), p = V(Array(Je).fill("")), h = V([]), l = S(() => {
745
- const y = new Float32Array(o * 3), M = new n.Vector3();
746
- for (let x = 0; x < o; x++) y.set(Co(x, o, M).toArray(), x * 3);
747
- const w = t.nodes.map((x) => new n.Color(no[x.kind] ?? "#94a3b8").lerp(J, 0.45).multiplyScalar(0.5)), R = new n.BufferGeometry();
748
- R.setAttribute("position", new n.BufferAttribute(y, 3)), R.setAttribute("aSize", new n.BufferAttribute(new Float32Array(o), 1)), R.setAttribute("aColor", new n.BufferAttribute(new Float32Array(o * 3), 3)), R.boundingSphere = new n.Sphere(new n.Vector3(), 1e4);
749
- const F = new Map(t.nodes.map((x, z) => [x.id, z])), N = [], _ = [], U = (x, z) => (y[x * 3] - y[z * 3]) ** 2 + (y[x * 3 + 2] - y[z * 3 + 2]) ** 2;
750
- for (const x of t.links) {
751
- const z = F.get(x.source), D = F.get(x.target);
752
- z !== void 0 && D !== void 0 && z !== D && U(z, D) < 4.5 && (N.push(z, D), _.push(1));
753
- }
754
- for (let x = 0; x < o; x++) {
755
- let z = -1, D = 1e9;
756
- for (let Y = 0; Y < o; Y++) Y !== x && U(x, Y) < D && (D = U(x, Y), z = Y);
757
- z > x && (N.push(x, z), _.push(0));
758
- }
759
- const O = _.length, K = new Float32Array(O * 2 * 3);
760
- for (let x = 0; x < O; x++)
761
- for (let z = 0; z < 2; z++) {
762
- const D = N[x * 2 + z];
763
- K.set([y[D * 3], 0.05, y[D * 3 + 2]], (x * 2 + z) * 3);
764
- }
765
- const L = new n.BufferGeometry();
766
- L.setAttribute("position", new n.BufferAttribute(K, 3)), L.setAttribute("color", new n.BufferAttribute(new Float32Array(O * 2 * 3), 3));
767
- const G = new n.BufferGeometry();
768
- return G.setAttribute("position", new n.BufferAttribute(new Float32Array(Ze * Re * 2 * 3), 3)), G.setAttribute("color", new n.BufferAttribute(new Float32Array(Ze * Re * 2 * 3), 3)), G.boundingSphere = new n.Sphere(new n.Vector3(), 1e4), { pos: y, base: w, ngeo: R, lgeo: L, pairs: N, strong: _, np: O, bgeo: G, fire: new Float32Array(o), white: new Float32Array(o), fireC: Array.from({ length: o }, () => new n.Color()) };
769
- }, [t, o]), d = S(() => {
770
- const y = [];
771
- for (let M = 0; M < ye; M++) {
772
- const w = M / ye * Math.PI * 2 + 0.2;
773
- y.push({ a: w, x: Math.cos(w) * et, z: Math.sin(w) * et, h: 0.7 + ee(`stone${M}`, 1) * 0.6, rot: ee(`stone${M}`, 2) * 3, tilt: (ee(`stone${M}`, 3) - 0.5) * 0.18 });
774
- }
775
- return y;
776
- }, []), m = S(() => new Float32Array(ye), []), T = S(() => new n.DodecahedronGeometry(1, 0), []), b = S(
777
- () => ({
778
- water: new n.ShaderMaterial({
779
- uniforms: {
780
- uTime: { value: 0 },
781
- uR: { value: Oe },
782
- uRip: { value: Array.from({ length: be }, () => new n.Vector4(0, 0, -1, 0)) },
783
- uRipC: { value: Array.from({ length: be }, () => new n.Color()) }
784
- },
785
- vertexShader: mr,
786
- fragmentShader: hr,
787
- transparent: !0,
788
- depthWrite: !1
789
- }),
790
- nodes: new n.ShaderMaterial({ uniforms: { uScale: { value: 400 }, uTime: { value: 0 } }, vertexShader: gr, fragmentShader: vr, transparent: !0, depthWrite: !1, blending: n.AdditiveBlending }),
791
- threads: new n.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
792
- beam: new n.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: n.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
793
- stone: new n.MeshStandardMaterial({ color: "#1a2c2c", roughness: 0.92, metalness: 0, flatShading: !0 }),
794
- rune: Ae(J)
795
- }),
796
- []
797
- ), v = S(() => d.map(() => Ae(J)), [d]), f = S(() => /* @__PURE__ */ new Map(), []), k = S(() => new ot(Ze), []), H = S(() => ({ v: new n.Vector3(), v2: new n.Vector3(), mid: new n.Vector3(), c: new n.Color(), c2: new n.Color() }), []), I = (y) => {
798
- let M = f.get(y);
799
- return M === void 0 && f.set(y, M = so(t, y)), M;
800
- };
801
- return $(({ clock: y }, M) => {
802
- const w = performance.now(), R = q ? 0 : y.elapsedTime, { pos: F, base: N, fire: _, white: U, fireC: O } = l;
803
- b.nodes.uniforms.uScale.value = r.height * i.getPixelRatio() / (2 * Math.tan(a.fov * Math.PI / 360)), b.nodes.uniforms.uTime.value = R, b.water.uniforms.uTime.value = R, _.fill(0), U.fill(0);
804
- for (let A = 0; A < ye; A++) m[A] *= Math.exp(-M * 1.4);
805
- const { v: K, v2: L, mid: G, c: x, c2: z } = H, D = l.bgeo.getAttribute("position"), Y = l.bgeo.getAttribute("color"), pe = b.water.uniforms.uRip.value, Ie = b.water.uniforms.uRipC.value;
806
- let me = 0, he = 0;
807
- k.begin();
808
- const Pe = E.flares;
809
- for (let A = Math.max(0, Pe.length - pr); A < Pe.length; A++) {
810
- const P = Pe[A], B = I(P.node), j = (w - P.start) / 1e3, Be = E.instances.get(P.instance), le = Be ? vt[Be.type] : J, Z = P.op === "write", re = j < 0.35 ? j / 0.35 : Math.exp(-(j - 0.35) * 1.2);
811
- re > _[B] && (_[B] = re, O[B].copy(Z ? se : le), U[B] = Z ? 1 : 0);
812
- const ge = F[B * 3], ct = F[B * 3 + 2], St = j / (Z ? 2.2 : 1.4);
813
- if (St < 1 && he < be && (pe[he].set(ge, ct, St, Z ? 1 : 0), Ie[he].copy(Z ? se : le).multiplyScalar(Z ? 0.7 : 0.5), he++), j < 0.05) {
814
- let we = Math.atan2(ct, ge) - 0.2;
815
- we < 0 && (we += Math.PI * 2);
816
- const Ne = Math.round(we / (Math.PI * 2) * ye) % ye;
817
- m[Ne] = Math.min(1.6, m[Ne] + (Z ? 0.9 : 0.5));
818
- }
819
- const ve = ke.get(P.instance);
820
- if (ve && j < 2.2 && me < Ze) {
821
- K.set(ge, 0.1, ct), Gt(ve, K, 1.6, G);
822
- const we = Math.min(1, j / 0.3) * (1 - j / 2.2) ** 1.5, Ne = Z ? Math.min(1, j * 0.85) : 1 - Math.min(1, j * 0.85);
823
- for (let We = 0; We < Re; We++)
824
- for (let je = 0; je < 2; je++) {
825
- const oe = (We + je) / Re, ce = 1 - oe;
826
- L.set(ce * ce * ve.x + 2 * ce * oe * G.x + oe * oe * K.x, ce * ce * ve.y + 2 * ce * oe * G.y + oe * oe * K.y, ce * ce * ve.z + 2 * ce * oe * G.z + oe * oe * K.z);
827
- const At = (me * Re + We) * 2 + je;
828
- D.setXYZ(At, L.x, L.y, L.z);
829
- const Lt = Math.exp(-(((oe - Ne) / 0.09) ** 2)) * 1.4;
830
- z.copy(Z ? se : le).multiplyScalar(we * ((Z ? 0.4 : 0.16) + Lt) * 0.8), Y.setXYZ(At, z.r, z.g, z.b);
831
- }
832
- Z ? k.add(ve, G, K, 0.9, 1, 0.4, se, we * 1.1) : k.add(ve, G, K, 0.1, -1, 0.4, le, we * 1.3), me++;
833
- }
834
- }
835
- for (let A = he; A < be; A++) pe[A].z = -1;
836
- l.bgeo.setDrawRange(0, me * Re * 2), D.needsUpdate = !0, Y.needsUpdate = !0, k.end();
837
- const Fe = l.ngeo.getAttribute("aSize"), ze = l.ngeo.getAttribute("aColor");
838
- for (let A = 0; A < o; A++) {
839
- const P = _[A];
840
- Fe.setX(A, 0.2 + P * (0.5 + U[A] * 0.25)), x.copy(N[A]), P > 0.01 && xt(xt(x, O[A], P * 1.6), se, P * (0.3 + U[A] * 1.1)), ze.setXYZ(A, x.r, x.g, x.b);
841
- }
842
- Fe.needsUpdate = !0, ze.needsUpdate = !0;
843
- const Ve = l.lgeo.getAttribute("color");
844
- for (let A = 0; A < l.np; A++) {
845
- const P = Math.max(_[l.pairs[A * 2]], _[l.pairs[A * 2 + 1]]), B = l.strong[A] ? 0.13 : 0.06;
846
- for (let j = 0; j < 2; j++) Ve.setXYZ(A * 2 + j, 0.3 * B + P * 0.25, 0.85 * B + P * 0.4, 0.75 * B + P * 0.38);
847
- }
848
- Ve.needsUpdate = !0;
849
- for (let A = 0; A < ye; A++) {
850
- const P = h.current[A], B = m[A];
851
- v[A].color.copy(J).multiplyScalar(0.05 + Math.min(1, B) * 0.6), P && P.scale.setScalar(0.5 + Math.min(1, B) * 0.5);
852
- }
853
- let W = 0;
854
- for (let A = E.flares.length - 1; A >= 0 && W < Je; A--) {
855
- const P = E.flares[A];
856
- if (w - P.start > 2200) break;
857
- let B = !1;
858
- for (let re = 0; re < W; re++) p.current[re] === P.node && (B = !0);
859
- if (B) continue;
860
- const j = I(P.node);
861
- let Be = !1;
862
- for (let re = 0; re < W; re++) {
863
- const ge = c.current[re];
864
- ge && Math.abs(ge.position.z - F[j * 3 + 2]) < 0.9 && Math.abs(ge.position.x - F[j * 3]) < 3 && (Be = !0);
865
- }
866
- if (Be) continue;
867
- const le = s.current[W], Z = c.current[W];
868
- le && Z && (Z.position.set(F[j * 3], 0.5, F[j * 3 + 2]), p.current[W] !== P.node && (le.setText(`${P.op === "write" ? "wrote" : "read"} · ${P.node}`), le.setColor(P.op === "write" ? "#ffffff" : "#5eead4")), le.setOpacity(1)), p.current[W] = P.node, W++;
869
- }
870
- for (let A = W; A < Je; A++) {
871
- const P = s.current[A];
872
- P == null || P.setOpacity(0), p.current[A] = "";
873
- }
874
- }), /* @__PURE__ */ X(te, { children: [
875
- /* @__PURE__ */ u("mesh", { rotation: [-Math.PI / 2, 0, 0], position: [0, 0.03, 0], material: b.water, renderOrder: -1, children: /* @__PURE__ */ u("circleGeometry", { args: [Oe, 96] }) }),
876
- /* @__PURE__ */ u("lineSegments", { geometry: l.lgeo, material: b.threads, frustumCulled: !1 }),
877
- /* @__PURE__ */ u("points", { geometry: l.ngeo, material: b.nodes, frustumCulled: !1 }),
878
- d.map((y, M) => /* @__PURE__ */ X("group", { position: [y.x, 0, y.z], rotation: [y.tilt, y.rot, y.tilt * 0.6], children: [
879
- /* @__PURE__ */ u("mesh", { geometry: T, material: b.stone, position: [0, y.h * 0.5, 0], scale: [0.34, y.h * 0.6, 0.24] }),
880
- /* @__PURE__ */ u("sprite", { ref: (w) => void (h.current[M] = w), material: v[M], position: [0, y.h * 0.62, 0], scale: 0.5 })
881
- ] }, M)),
882
- /* @__PURE__ */ u("lineSegments", { geometry: l.bgeo, material: b.beam, frustumCulled: !1 }),
883
- /* @__PURE__ */ u("primitive", { object: k.mesh }),
884
- Array.from({ length: Je }, (y, M) => /* @__PURE__ */ u("group", { ref: (w) => void (c.current[M] = w), children: /* @__PURE__ */ u(Le, { ref: (w) => void (s.current[M] = w), text: "", offset: [0, 0.36], size: 0.24, opacity: 0, fadeMs: 250, pxRange: [8, 12] }) }, M)),
885
- /* @__PURE__ */ u(ao, { position: [0, 0.2, Oe + 2.2], suffix: " · pond", color: "#5eead4", size: 0.28, opacity: 0.75, pxRange: [8, 12] })
886
- ] });
887
- }
888
- const yr = (
889
- /* glsl */
890
- `
891
- varying vec3 vDir;
892
- void main(){ vDir = normalize(position); vec4 p = projectionMatrix * modelViewMatrix * vec4(position, 1.0); gl_Position = p.xyww; }`
893
- ), Mr = (
894
- /* glsl */
895
- `
896
- uniform vec3 uMoonDir; varying vec3 vDir;
897
- void main(){
898
- float h = clamp(vDir.y, -0.2, 1.0);
899
- vec3 horizon = vec3(0.035, 0.11, 0.115);
900
- vec3 mid = vec3(0.012, 0.045, 0.055);
901
- vec3 zenith = vec3(0.004, 0.012, 0.02);
902
- vec3 col = mix(horizon, mid, smoothstep(0.0, 0.18, h));
903
- col = mix(col, zenith, smoothstep(0.18, 0.75, h));
904
- float m = max(0.0, dot(normalize(vDir), uMoonDir));
905
- col += vec3(0.35, 0.6, 0.58) * pow(m, 40.0) * 0.35 + vec3(0.1, 0.25, 0.24) * pow(m, 6.0) * 0.12;
906
- gl_FragColor = vec4(col, 1.0);
907
- }`
908
- ), Pt = new n.Vector3(-0.42, 0.42, -0.8).normalize();
909
- let Qe = null;
910
- function br() {
911
- if (Qe) return Qe;
912
- const e = document.createElement("canvas");
913
- e.width = e.height = 256;
914
- const t = e.getContext("2d"), o = t.createRadialGradient(118, 116, 10, 128, 128, 96);
915
- o.addColorStop(0, "rgba(250,255,250,1)"), o.addColorStop(0.85, "rgba(214,240,232,1)"), o.addColorStop(1, "rgba(190,225,216,1)"), t.fillStyle = o, t.beginPath(), t.arc(128, 128, 96, 0, Math.PI * 2), t.fill(), t.fillStyle = "rgba(150,190,182,0.22)";
916
- for (const [r, i, a] of [[100, 105, 26], [150, 140, 20], [120, 160, 14], [160, 100, 11]])
917
- t.beginPath(), t.arc(r, i, a, 0, Math.PI * 2), t.fill();
918
- return Qe = new n.CanvasTexture(e), Qe;
919
- }
920
- function Sr() {
921
- const e = S(() => {
922
- const t = new n.ConeGeometry(1, 1.6, 7).translate(0, 0.8, 0), o = 340, r = new n.InstancedMesh(t, new n.MeshStandardMaterial({ color: "#04110f", roughness: 1, flatShading: !0 }), o * 3), i = new n.Object3D();
923
- let a = 5;
924
- const s = () => (a = a * 16807 % 2147483647) / 2147483647;
925
- let c = 0;
926
- for (let p = 0; p < o; p++) {
927
- const h = s() * Math.PI * 2, l = 30 + Math.pow(s(), 0.7) * 34, d = Math.cos(h) * l, m = Math.sin(h) * l;
928
- if (m > 18 && Math.abs(d) < 26) continue;
929
- const T = 5 + s() * 7, b = T * (0.22 + s() * 0.06);
930
- for (let v = 0; v < 3; v++)
931
- i.position.set(d, T * (0.12 + v * 0.26), m), i.rotation.set(0, s() * 6, 0), i.scale.set(b * (1 - v * 0.25), T / 1.6 * 0.42, b * (1 - v * 0.25)), i.updateMatrix(), r.setMatrixAt(c++, i.matrix);
932
- }
933
- return r.count = c, r.instanceMatrix.needsUpdate = !0, r;
934
- }, []);
935
- return /* @__PURE__ */ u("primitive", { object: e });
936
- }
937
- function Ar() {
938
- const e = S(() => {
939
- let r = 17;
940
- const i = () => (r = r * 16807 % 2147483647) / 2147483647;
941
- return Array.from({ length: 16 }, () => {
942
- const a = i() * Math.PI * 2, s = 6 + i() * 22;
943
- return { x: Math.cos(a) * s, z: Math.sin(a) * s, y: 0.5 + i() * 1.4, w: 12 + i() * 12, sp: 0.1 + i() * 0.15, ph: i() * 6 };
944
- });
945
- }, []), t = S(
946
- () => new n.SpriteMaterial({ map: Fo(), color: new n.Color("#7fd6c6").multiplyScalar(0.55), transparent: !0, opacity: 0.1, depthWrite: !1, fog: !1 }),
947
- []
948
- ), o = V([]);
949
- return $(({ clock: r }) => {
950
- if (q) return;
951
- const i = r.elapsedTime;
952
- e.forEach((a, s) => {
953
- const c = o.current[s];
954
- c && c.position.set(a.x + Math.sin(i * 0.05 * a.sp * 6 + a.ph) * 3, a.y, a.z + Math.cos(i * 0.04 + a.ph) * 1.5);
955
- });
956
- }), /* @__PURE__ */ u(te, { children: e.map((r, i) => /* @__PURE__ */ u("sprite", { ref: (a) => void (o.current[i] = a), material: t, position: [r.x, r.y, r.z], scale: [r.w, r.w * 0.32, 1] }, i)) });
957
- }
958
- function xr() {
959
- const e = S(
960
- () => new n.ShaderMaterial({ uniforms: { uMoonDir: { value: Pt } }, vertexShader: yr, fragmentShader: Mr, side: n.BackSide, depthWrite: !1, fog: !1 }),
961
- []
962
- ), t = S(() => new n.SpriteMaterial({ map: br(), color: new n.Color(1.1, 1.15, 1.12), fog: !1, depthWrite: !1, transparent: !0, toneMapped: !1 }), []), o = S(() => new n.SpriteMaterial({ map: wt(), color: new n.Color(fe.moon).multiplyScalar(0.22), fog: !1, blending: n.AdditiveBlending, depthWrite: !1, transparent: !0 }), []), r = S(() => Pt.clone().multiplyScalar(140), []);
963
- return /* @__PURE__ */ X(te, { children: [
964
- /* @__PURE__ */ u("mesh", { material: e, renderOrder: -10, frustumCulled: !1, children: /* @__PURE__ */ u("sphereGeometry", { args: [180, 32, 16] }) }),
965
- /* @__PURE__ */ u(Wt, { radius: 150, depth: 20, count: q ? 700 : 1400, factor: 3.2, saturation: 0.1, fade: !0, speed: q ? 0 : 0.3 }),
966
- /* @__PURE__ */ u("sprite", { material: o, position: r, scale: 70 }),
967
- /* @__PURE__ */ u("sprite", { material: t, position: r, scale: 11 }),
968
- /* @__PURE__ */ u("hemisphereLight", { args: ["#2a6b66", "#020807", 0.55] }),
969
- /* @__PURE__ */ u("directionalLight", { position: [-30, 40, -60], intensity: 0.9, color: "#a8f0e2" }),
970
- /* @__PURE__ */ u("ambientLight", { intensity: 0.08, color: "#5eead4" }),
971
- /* @__PURE__ */ X("mesh", { rotation: [-Math.PI / 2, 0, 0], receiveShadow: !0, children: [
972
- /* @__PURE__ */ u("circleGeometry", { args: [110, 64] }),
973
- /* @__PURE__ */ u("meshStandardMaterial", { color: fe.ground, roughness: 1, metalness: 0 })
974
- ] }),
975
- /* @__PURE__ */ u(Sr, {}),
976
- /* @__PURE__ */ u(Ar, {})
977
- ] });
978
- }
979
- const Ut = new n.ConeGeometry(1, 1, 7, 1, !1).translate(0, 0.5, 0), Cr = new n.EdgesGeometry(Ut, 1), Pr = new n.CylinderGeometry(0.05, 0.13, 1, 7).translate(0, 0.5, 0), zt = new n.TorusGeometry(1, 0.035, 6, 72).rotateX(Math.PI / 2), zr = new n.Color("#07130f");
980
- function Tr(e, t, o) {
981
- const r = e.subagent ? 2 : 3, i = [];
982
- for (let a = 0; a < r; a++) {
983
- const s = r === 2 ? a * 1.4 : a;
984
- i.push({ y: t * (0.3 + s * 0.19), r: o * (1 - s * 0.27), h: t * (0.46 - s * 0.04), rot: ee(e.id, 20 + a) * 6.28 });
985
- }
986
- return i;
987
- }
988
- function Rr({ inst: e, onSelect: t }) {
989
- const o = V(null), r = V(null), i = V(null), a = V(null), s = V(null), c = V(null), p = V(null), h = V(null), l = vt[e.type], d = S(() => yo(e), [e]), m = Mo(e), T = S(() => Tr(e, d, m), [e, d, m]), b = S(() => ee(e.id, 9), [e.id]), v = S(
990
- () => ({
991
- fill: ue(l),
992
- line: Vo(l),
993
- trunk: new n.MeshBasicMaterial({ color: zr }),
994
- halo: Ae(l),
995
- pool: it(l),
996
- ring: ue(tt),
997
- sel: ue(se),
998
- root: _t(l.clone().lerp(J, 0.3), e.subagent ? 0.055 : 0.08, 0.55),
999
- arrow: ue(l)
1000
- }),
1001
- [l, e.subagent]
1002
- ), f = S(
1003
- () => ({
1004
- base: new n.Vector3(),
1005
- crown: new n.Vector3(),
1006
- top: new n.Vector3(),
1007
- p0: new n.Vector3(),
1008
- p1: new n.Vector3(),
1009
- p2: new n.Vector3(),
1010
- p0set: !1,
1011
- parentK: 0,
1012
- ringK: 0,
1013
- llm: e.llmCalls,
1014
- tok: e.tokens,
1015
- shed: !1,
1016
- placed: !1,
1017
- c: new n.Color(),
1018
- c2: new n.Color()
1019
- }),
1020
- // eslint-disable-next-line react-hooks/exhaustive-deps
1021
- []
1022
- );
1023
- $t(() => (Ee.set(e.id, f.base), ke.set(e.id, f.crown), () => {
1024
- Ee.get(e.id) === f.base && Ee.delete(e.id), ke.get(e.id) === f.crown && ke.delete(e.id);
1025
- }), [e.id, f]), $(({ clock: M }) => {
1026
- var P;
1027
- const w = performance.now(), R = M.elapsedTime;
1028
- f.placed ? f.base.lerp(mt(e), 0.08) : (f.base.copy(mt(e)), f.placed = !0);
1029
- const F = uo(), N = q ? 0 : 0.05;
1030
- f.crown.set(f.base.x + Math.sin(R * 0.6 + b * 20) * N * d * F, d * 0.62 * F, f.base.z + Math.cos(R * 0.5 + b * 13) * N * d * 0.6 * F), f.top.set(f.crown.x, d * F, f.crown.z);
1031
- const _ = (w - e.bornAt) / 1e3, U = !!e.parent, O = U ? Ue(_ / 0.9) : 1, K = ko((_ - (U ? 0.7 : 0.05)) / 0.95), L = e.exitAt ? (w - e.exitAt) / 1e3 : -1, G = L >= 0 ? ie(L / 2.3) : 0, x = io(e, w), z = L < 0 && (e.status === "thinking" || e.status === "spawning"), D = lo(e, w), Y = q ? 0 : 1, pe = 0.5 + 0.5 * Math.sin(R * 2 + b * 9) * Y, Ie = 0.5 + 0.5 * Math.sin(R * 0.9 + b * 5) * Y;
1032
- let me = !1;
1033
- for (const B of E.mcpPending.values()) B.instance === e.id && (me = !0);
1034
- if (f.ringK += ((me && L < 0 ? 1 : 0) - f.ringK) * 0.08, e.llmCalls > f.llm) {
1035
- const B = Math.max(0, e.tokens - f.tok), j = Math.round(Math.min(46, 7 + B / 160));
1036
- f.c2.copy(l).lerp(se, 0.35).multiplyScalar(1.4), No(f.top, j, f.c2, 0.3 + Math.min(0.55, B / 4500), m * 0.9);
1037
- }
1038
- if (f.llm = e.llmCalls, f.tok = e.tokens, L >= 0 && !f.shed && (f.shed = !0, f.c2.copy(l).multiplyScalar(0.6), Ho(f.crown, e.subagent ? 16 : 34, f.c2, m * 1.1, e.subagent ? 0.2 : 0.27)), o.current && (o.current.position.copy(f.base), o.current.scale.setScalar(F)), r.current) {
1039
- const B = Math.max(1e-4, K * (1 - G * 0.2));
1040
- r.current.scale.set(B, Math.max(1e-4, Ue((_ - (U ? 0.7 : 0.05)) / 0.8) * (1 - G * 0.12)), B), r.current.rotation.z = Math.sin(R * 0.6 + b * 20) * N * 0.5, r.current.rotation.x = Math.cos(R * 0.5 + b * 13) * N * 0.3;
1041
- }
1042
- const he = z ? 0.7 + pe * 0.3 : 0.32 + Ie * 0.12;
1043
- f.c.copy(l).multiplyScalar(he + D * 0.45), L >= 0 && f.c.lerp(Ro, G).multiplyScalar(1 - G * 0.8), v.fill.color.copy(f.c).multiplyScalar(0.2), v.line.color.copy(f.c).multiplyScalar(1.15), i.current && (i.current.position.set(0, d * 0.55, 0), i.current.scale.setScalar(Math.max(1e-4, m * (z ? 3.4 + pe * 0.4 : 2.6) + D * 0.6)), v.halo.color.copy(l).multiplyScalar(((z ? 0.2 : 0.08) + D * 0.12) * (1 - G)));
1044
- const Pe = E.selected === e.id;
1045
- a.current && (a.current.scale.setScalar(Math.max(1e-4, m * 4.2 * K)), v.pool.color.copy(l).multiplyScalar((0.12 + (z ? 0.08 : 0) + D * 0.08 + (Pe ? 0.18 : 0)) * x)), s.current && (s.current.visible = f.ringK > 0.02, s.current.scale.setScalar(m * 0.95 * (1 + 0.04 * Math.sin(R * 3))), s.current.rotation.y = R * 0.4, v.ring.color.copy(tt).multiplyScalar(1.4 * f.ringK * (0.6 + Ie * 0.4))), c.current && (c.current.visible = Pe, c.current.scale.setScalar(m * 1.3), v.sel.color.setScalar(0.5 + 0.2 * pe)), (P = h.current) == null || P.setOpacity(co(e.id) ? ie(K) * (1 - G) * (e.subagent ? 0.85 : 0.95) : 0);
1046
- const Fe = e.parent ? E.instances.get(e.parent) : void 0, ze = e.parent ? Ee.get(e.parent) : void 0;
1047
- ze ? (f.p0.set(ze.x, 0.06, ze.z), f.p0set = !0) : f.p0set || f.p0.set(f.base.x, 0.06, f.base.z), f.p2.set(f.base.x, 0.06, f.base.z), Mt(f.p0, f.p2, (b - 0.5) * 0.5, 0.06, f.p1);
1048
- const Ve = !!Fe && !Fe.exitAt;
1049
- f.parentK += ((U && !e.exitAt && Ve ? 1 : 0) - f.parentK) * (Ve ? 0.05 : 0.035);
1050
- const W = v.root.uniforms;
1051
- W.uP0.value.copy(f.p0), W.uP1.value.copy(f.p1), W.uP2.value.copy(f.p2);
1052
- const A = L >= 0 ? st(L / 1.6) : 0;
1053
- if (W.uGrow.value = U ? O * (1 - A) : 0, W.uHead.value = O < 1 ? O : -1, W.uTail.value = 0.12, W.uHeadColor.value.copy(l).multiplyScalar(1.6), W.uOpacity.value = (z ? 0.9 : 0.6) * Math.min(f.parentK, x > 0 ? 1 : 0) + (O < 1 ? 0.4 : 0), W.uTime.value = q ? 0 : R, W.uFlow.value = O >= 1 ? f.parentK : 0, p.current) {
1054
- const B = U && O >= 1 && f.parentK > 0.05 && W.uGrow.value > 0.9;
1055
- p.current.visible = B, B && (ht(p.current, f.p0, f.p1, f.p2, 0.78, 1, e.subagent ? 0.42 : 0.55), v.arrow.color.copy(l).multiplyScalar(1.5 * f.parentK));
1056
- }
1057
- });
1058
- const k = (M) => {
1059
- M.stopPropagation(), t(e.id);
1060
- }, H = () => document.body.style.cursor = "pointer", I = () => document.body.style.cursor = "", y = e.id.split(":")[2];
1061
- return /* @__PURE__ */ X(te, { children: [
1062
- /* @__PURE__ */ u("mesh", { geometry: Bt, material: v.root, frustumCulled: !1 }),
1063
- /* @__PURE__ */ u("mesh", { ref: p, geometry: yt, material: v.arrow, visible: !1 }),
1064
- /* @__PURE__ */ X("group", { ref: o, children: [
1065
- /* @__PURE__ */ u("mesh", { ref: a, geometry: lt, material: v.pool, position: [0, 0.02, 0], scale: 1e-4 }),
1066
- /* @__PURE__ */ u("mesh", { ref: s, geometry: zt, material: v.ring, position: [0, 0.06, 0], visible: !1 }),
1067
- /* @__PURE__ */ u("mesh", { ref: c, geometry: zt, material: v.sel, position: [0, 0.05, 0], visible: !1 }),
1068
- /* @__PURE__ */ X("group", { ref: r, scale: 1e-4, children: [
1069
- /* @__PURE__ */ u("mesh", { geometry: Pr, material: v.trunk, scale: [e.subagent ? 0.7 : 1.2, d * 0.75, e.subagent ? 0.7 : 1.2], onClick: k, onPointerOver: H, onPointerOut: I }),
1070
- T.map((M, w) => /* @__PURE__ */ X("group", { position: [0, M.y, 0], rotation: [0, M.rot, 0], scale: [M.r, M.h, M.r], children: [
1071
- /* @__PURE__ */ u("mesh", { geometry: Ut, material: v.fill, onClick: k, onPointerOver: H, onPointerOut: I }),
1072
- /* @__PURE__ */ u("lineSegments", { geometry: Cr, material: v.line })
1073
- ] }, w)),
1074
- /* @__PURE__ */ u("sprite", { ref: i, material: v.halo })
1075
- ] }),
1076
- /* @__PURE__ */ u(
1077
- Le,
1078
- {
1079
- ref: h,
1080
- position: [0, d * 1.12 + 0.45, 0],
1081
- text: `${e.name}${y !== void 0 && !Number.isNaN(Number(y)) ? ` ${Number(y) + 1}` : ""}`,
1082
- color: Rt[e.type],
1083
- size: e.subagent ? 0.24 : 0.3,
1084
- opacity: 0,
1085
- pxRange: e.subagent ? [8, 11.5] : [9, 13.5]
1086
- }
1087
- )
1088
- ] })
1089
- ] });
1090
- }
1091
- function kr({ onSelect: e }) {
1092
- const [t, o] = Ce([]), r = V(/* @__PURE__ */ new Set()), i = V(-1);
1093
- return $(() => {
1094
- const a = E.instances;
1095
- let s = a.size !== r.current.size || i.current !== Se.version;
1096
- if (!s)
1097
- for (const c of a.keys()) r.current.has(c) || (s = !0);
1098
- s && (r.current = new Set(a.keys()), i.current = Se.version, o([...a.values()].filter(dt)));
1099
- }), /* @__PURE__ */ u(te, { children: t.map((a) => /* @__PURE__ */ u(Rr, { inst: a, onSelect: e }, a.id)) });
1100
- }
1101
- function Fr({ comet: e }) {
1102
- const t = V(null), o = E.instances.get(e.from), r = S(() => (o ? vt[o.type] : J).clone().lerp(se, 0.3), [o]), i = S(() => Ae(r.clone().multiplyScalar(1.6)), [r]), a = S(() => ({ c: new n.Vector3(), h: new n.Vector3(), tc: r.clone().multiplyScalar(0.9) }), [r]);
1103
- return $(() => {
1104
- const s = ke.get(e.from), c = ke.get(e.to);
1105
- if (!t.current) return;
1106
- if (!s || !c) {
1107
- t.current.visible = !1;
1108
- return;
1109
- }
1110
- Gt(s, c, 2.6, a.c);
1111
- const p = ie((performance.now() - e.start) / e.dur);
1112
- xe(s, a.c, c, st(p), a.h), t.current.visible = p < 1, t.current.position.copy(a.h), t.current.scale.setScalar(1.3), p < 1 && p > 0.02 && Et(a.h, a.tc, 0.32, 0.6);
1113
- }), /* @__PURE__ */ u("sprite", { ref: t, material: i, visible: !1 });
1114
- }
1115
- function Vr() {
1116
- const [e, t] = Ce([]), o = V({ n: -1, last: -1, first: -1 });
1117
- return $(() => {
1118
- const r = E.comets, i = o.current, a = r.length ? r[0].id : -1, s = r.length ? r[r.length - 1].id : -1;
1119
- (r.length !== i.n || a !== i.first || s !== i.last) && (i.n = r.length, i.first = a, i.last = s, t(_r(r)));
1120
- }), /* @__PURE__ */ u(te, { children: e.map((r) => /* @__PURE__ */ u(Fr, { comet: r }, r.id)) });
1121
- }
1122
- const Br = 40;
1123
- function _r(e) {
1124
- const t = [];
1125
- for (let o = e.length - 1; o >= 0 && t.length < Br; o--) {
1126
- const r = e[o];
1127
- (!Se.grouped || dt(r.from) && dt(r.to)) && t.push(r);
1128
- }
1129
- return t.reverse();
1130
- }
1131
- function Gr() {
1132
- return $(() => {
1133
- mo(), ho();
1134
- }), null;
1135
- }
1136
- function jr() {
1137
- const e = fo(), [t, o] = Ce(null);
1138
- return /* @__PURE__ */ X("div", { className: "scene-root", style: { background: fe.bg }, children: [
1139
- /* @__PURE__ */ X(
1140
- qt,
1141
- {
1142
- camera: { position: [2.2, 17.5, 28.5], fov: 46, near: 0.1, far: 600 },
1143
- dpr: [1, 2],
1144
- gl: { antialias: !1, powerPreference: "high-performance" },
1145
- onPointerMissed: () => o(null),
1146
- children: [
1147
- /* @__PURE__ */ u("color", { attach: "background", args: [fe.bg] }),
1148
- /* @__PURE__ */ u("fogExp2", { attach: "fog", args: [fe.fog, 0.016] }),
1149
- /* @__PURE__ */ u(Gr, {}),
1150
- /* @__PURE__ */ u(xr, {}),
1151
- /* @__PURE__ */ u(wr, { galaxy: e }),
1152
- /* @__PURE__ */ u(Io, {}),
1153
- /* @__PURE__ */ u(fr, {}),
1154
- /* @__PURE__ */ u(kr, { onSelect: o }),
1155
- /* @__PURE__ */ u(Vr, {}),
1156
- /* @__PURE__ */ u(To, {}),
1157
- /* @__PURE__ */ u(Jo, { count: q ? 70 : 170 }),
1158
- /* @__PURE__ */ u(qo, {}),
1159
- /* @__PURE__ */ u($o, {}),
1160
- /* @__PURE__ */ u(jt, { makeDefault: !0, target: [2.2, 0.2, -2.6], enablePan: !1, enableDamping: !0, dampingFactor: 0.06, minDistance: 12, maxDistance: 58, maxPolarAngle: 1.42 }),
1161
- /* @__PURE__ */ X(Ht, { multisampling: 0, children: [
1162
- /* @__PURE__ */ u(Kt, { mipmapBlur: !0, intensity: 1, luminanceThreshold: 0.22, luminanceSmoothing: 0.3, radius: 0.72 }),
1163
- /* @__PURE__ */ u(Xt, { eskil: !1, offset: 0.24, darkness: 0.85 })
1164
- ] })
1165
- ]
1166
- }
1167
- ),
1168
- /* @__PURE__ */ u(
1169
- po,
1170
- {
1171
- title: "forest · night grove",
1172
- subtitle: "Agents grow as glowing trees (saplings = subagents, roots point parent → child) · fireflies = LLM calls sized by tokens · mushrooms = MCP servers & backends on the mycelium · the pond is graph memory · exits shed their leaves",
1173
- selected: t,
1174
- onClose: () => o(null)
1175
- }
1176
- )
1177
- ] });
1178
- }
1179
- export {
1180
- jr as default
1181
- };