agentglow 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -16
- package/cli/agentglow.mjs +22 -3
- package/cli/lib/server.mjs +44 -13
- package/cli/lib/settings.mjs +3 -3
- package/dist/chunks/KitScene-Cug87OSc.js +3121 -0
- package/dist/chunks/index-B0urBeRS.js +48 -0
- package/dist/chunks/{index-u4rYZ1UO.js → index-BM4W1tNM.js} +135 -135
- package/dist/chunks/{index-B4Cqo621.js → index-BTFr1mn1.js} +155 -155
- package/dist/chunks/index-Cj5cs1rS.js +948 -0
- package/dist/chunks/{index-CTZbUTDY.js → index-iZBODPwI.js} +136 -136
- package/dist/chunks/{index-URn4zDHp.js → index-ueGnGU_X.js} +297 -297
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/themes.d.ts +1 -1
- package/dist/types/world.d.ts +42 -2
- package/package.json +1 -1
- package/dist/chunks/KitScene-DG_pcnWW.js +0 -3119
- package/dist/chunks/index-Agh7jdYu.js +0 -1086
- package/dist/chunks/index-B2EHxcBQ.js +0 -1010
- package/dist/chunks/index-BfQsJ0TH.js +0 -751
- package/dist/chunks/index-BmBGYhJS.js +0 -891
- package/dist/chunks/index-Bnn-x-aE.js +0 -767
- package/dist/chunks/index-CTQTtm9q.js +0 -784
- package/dist/chunks/index-CdKvybsL.js +0 -1143
- package/dist/chunks/index-CeiIEWek.js +0 -818
- package/dist/chunks/index-Ci8tSMhc.js +0 -68
- package/dist/chunks/index-Cls_VZdb.js +0 -980
- package/dist/chunks/index-DFFRhihO.js +0 -892
- package/dist/chunks/index-DMCETM4H.js +0 -605
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as b, useContext as v, useMemo as S, Suspense as w, lazy as A } from "react";
|
|
3
|
+
const m = (e) => (e ?? "").trim().replace(/\/+$/, "");
|
|
4
|
+
function C() {
|
|
5
|
+
var t;
|
|
6
|
+
const e = typeof location > "u" ? new URLSearchParams() : new URLSearchParams(location.search), n = (o) => e.has(o) && !["0", "false", "no"].includes(e.get(o).toLowerCase());
|
|
7
|
+
return {
|
|
8
|
+
source: m(e.get("source")),
|
|
9
|
+
sim: n("sim"),
|
|
10
|
+
hud: e.get("hud") === null ? !0 : n("hud"),
|
|
11
|
+
embedded: !1,
|
|
12
|
+
run: ((t = e.get("run")) == null ? void 0 : t.trim()) || void 0
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const d = b(null), E = d.Provider;
|
|
16
|
+
function F() {
|
|
17
|
+
return v(d) ?? C();
|
|
18
|
+
}
|
|
19
|
+
const M = ["neural", "constellation", "orbit", "atom", "flow"], T = {
|
|
20
|
+
orbit: { name: "Orbit", tagline: "Agents orbit a graph galaxy; runs are rings, MCP servers are satellites." },
|
|
21
|
+
neural: { name: "Neural", tagline: "A living brain: agents fire as neurons, messages pulse along synapses." },
|
|
22
|
+
flow: { name: "Flow", tagline: "A murmuration: agents condense as eddies out of the current." },
|
|
23
|
+
constellation: { name: "Constellation", tagline: "A night sky: agents are stars linked into constellations as they delegate." },
|
|
24
|
+
atom: { name: "Atom", tagline: "An atom: agents are electrons in shells, subagents jump orbits, LLM calls flash photons." }
|
|
25
|
+
}, x = {
|
|
26
|
+
orbit: () => import("./index-BM4W1tNM.js"),
|
|
27
|
+
neural: () => import("./index-iZBODPwI.js"),
|
|
28
|
+
flow: () => import("./index-Cj5cs1rS.js"),
|
|
29
|
+
constellation: () => import("./index-BTFr1mn1.js"),
|
|
30
|
+
atom: () => import("./index-ueGnGU_X.js")
|
|
31
|
+
}, g = /* @__PURE__ */ new Map();
|
|
32
|
+
function y(e) {
|
|
33
|
+
let n = g.get(e);
|
|
34
|
+
return n || g.set(e, n = A(x[e])), n;
|
|
35
|
+
}
|
|
36
|
+
function H({ theme: e = "neural", source: n = "", hud: t = !0, sim: o = !1, scope: s, run: r, token: l, style: f, className: i }) {
|
|
37
|
+
const c = M.includes(e) ? e : "neural", p = y(c), u = m(n), h = S(
|
|
38
|
+
() => ({ source: u, sim: o, hud: t, embedded: !0, scope: s || void 0, run: r || void 0, token: l || void 0 }),
|
|
39
|
+
[u, o, t, s, r, l]
|
|
40
|
+
);
|
|
41
|
+
return /* @__PURE__ */ a("div", { className: `agentglow-embed${i ? ` ${i}` : ""}`, style: f, "data-theme": c, children: /* @__PURE__ */ a(E, { value: h, children: /* @__PURE__ */ a(w, { fallback: null, children: /* @__PURE__ */ a(p, {}) }) }) });
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
H as A,
|
|
45
|
+
M as T,
|
|
46
|
+
T as a,
|
|
47
|
+
F as u
|
|
48
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as L, jsx as a, Fragment as se } from "react/jsx-runtime";
|
|
2
|
-
import { Trail as be, Sparkles as
|
|
3
|
-
import { EffectComposer as
|
|
2
|
+
import { Trail as be, Sparkles as He, Stars as je } from "@react-three/drei";
|
|
3
|
+
import { EffectComposer as Ke, Bloom as Qe, Vignette as Je, Noise as et } from "@react-three/postprocessing";
|
|
4
4
|
import { useFrame as N } from "@react-three/fiber";
|
|
5
|
-
import { useRef as A, useMemo as R, useEffect as
|
|
5
|
+
import { useRef as A, useMemo as R, useEffect as tt, useState as De } from "react";
|
|
6
6
|
import * as e from "three";
|
|
7
|
-
import { h as oe, i as
|
|
7
|
+
import { h as oe, i as nt, T as le, f as ot, a as Z, p as rt, e as st, l as at, s as ct, L as ue, w as T, K as it, G as lt, m as Fe, b as Q, c as Re, d as ut, g as Me, S as ye, R as pt, j as ft, u as dt, k as mt, n as ht } from "./KitScene-Cug87OSc.js";
|
|
8
8
|
var Ye;
|
|
9
|
-
const F = typeof window < "u" && !!((Ye = window.matchMedia) != null && Ye.call(window, "(prefers-reduced-motion: reduce)").matches), _e = Math.PI * 2, Ge = [Math.PI * 0.5, Math.PI * 0.5 + _e / 3, Math.PI * 0.5 + _e * 2 / 3],
|
|
9
|
+
const F = typeof window < "u" && !!((Ye = window.matchMedia) != null && Ye.call(window, "(prefers-reduced-motion: reduce)").matches), _e = Math.PI * 2, Ge = [Math.PI * 0.5, Math.PI * 0.5 + _e / 3, Math.PI * 0.5 + _e * 2 / 3], Ve = nt, yt = (t) => (oe(t, 11) - 0.5) * 2.4, V = {
|
|
10
10
|
/** the galaxy's inner (tilted) group; its matrixWorld includes the kit's side placement + scale */
|
|
11
11
|
group: null,
|
|
12
12
|
pos: [],
|
|
@@ -18,22 +18,22 @@ function Te(t) {
|
|
|
18
18
|
if (o === void 0) {
|
|
19
19
|
const n = Math.max(1, V.pos.length);
|
|
20
20
|
let i = 7;
|
|
21
|
-
for (let
|
|
21
|
+
for (let m = 0; m < s.length; m++) i = i * 31 + s.charCodeAt(m) >>> 0;
|
|
22
22
|
o = i % n, V.index.set(s, o);
|
|
23
23
|
}
|
|
24
24
|
return o;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function gt(t, s) {
|
|
27
27
|
const o = V.group;
|
|
28
28
|
return !o || !V.pos.length ? !1 : (s.copy(V.pos[Te(t)]).applyMatrix4(o.matrixWorld), !0);
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
function
|
|
30
|
+
const Mt = new e.Color("#ef4444"), wt = new e.Color("#f59e0b"), bt = new e.Color("#ffffff"), xt = new e.SphereGeometry(1, 32, 32), vt = new e.SphereGeometry(1, 24, 24), St = new e.SphereGeometry(0.06, 10, 10), At = new e.RingGeometry(0.85, 1, 48), Ct = new e.RingGeometry(0.92, 1, 48), Bt = new e.Vector3();
|
|
31
|
+
function Gt(t) {
|
|
32
32
|
for (const s of T.mcpPending.values()) if (s.instance === t) return !0;
|
|
33
33
|
return !1;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const n = t.inst, i = n.id,
|
|
35
|
+
function Rt({ agent: t, selected: s, onSelect: o }) {
|
|
36
|
+
const n = t.inst, i = n.id, m = n.type, c = le[m], g = Ve(m), r = g ? 0.46 : 0.35, p = A(null), f = A(null), u = A(null), w = A(null), y = A(null), d = A(null), b = A(null), h = A(null), P = A(""), q = A(1), X = R(() => new e.Color(c), [c]), B = R(() => new e.Color(), []), C = R(
|
|
37
37
|
() => ({
|
|
38
38
|
core: new e.MeshBasicMaterial({ toneMapped: !1 }),
|
|
39
39
|
halo: new e.MeshBasicMaterial({ color: c, transparent: !0, opacity: 0.1, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
|
|
@@ -51,61 +51,61 @@ function Gt({ agent: t, selected: s, onSelect: o }) {
|
|
|
51
51
|
x.last = v;
|
|
52
52
|
const S = n.status, O = S === "thinking" ? g ? 1.5 : 0.75 : S === "waiting" ? g ? 0.35 : 0.18 : g ? 0.8 : 0.4;
|
|
53
53
|
x.phase += G * O * (F ? 0.3 : 1);
|
|
54
|
-
const Y = (g ? 0.42 : 0.24) *
|
|
54
|
+
const Y = (g ? 0.42 : 0.24) * ot.spread * x.rr * (F ? 0.4 : 1), $ = t.live;
|
|
55
55
|
$.copy(t.pos), $.x += Math.cos(x.phase) * Y, $.z += Math.sin(x.phase) * Y, $.y += Math.sin(x.phase * 2 + x.seed) * Y * x.tilt + (F ? 0 : Math.sin(v * 0.9 + x.seed) * 0.12);
|
|
56
56
|
const U = Math.min(1, (l - n.bornAt) / 950);
|
|
57
57
|
if (U < 1) {
|
|
58
58
|
const _ = n.parent ? Z(n.parent) : void 0;
|
|
59
59
|
x.bornSet || (x.born.copy(_ ?? $), x.bornSet = !0), _ && x.born.copy(_);
|
|
60
60
|
const Be = 1 - Math.pow(1 - U, 3);
|
|
61
|
-
$.lerpVectors(
|
|
61
|
+
$.lerpVectors(Bt.copy(x.born), $, Be);
|
|
62
62
|
}
|
|
63
63
|
M.position.copy($);
|
|
64
|
-
const j =
|
|
65
|
-
let
|
|
66
|
-
|
|
64
|
+
const j = rt(n, l), pe = st(n, l), J = (l - n.bornAt) / 1e3, H = n.exitAt ? (l - n.exitAt) / at(n) : 0, ee = r * t.scale, fe = !n.exitAt && S === "thinking", xe = !n.exitAt && S === "waiting", Ee = !n.exitAt && Gt(i), de = F ? 0.3 : 1, ve = fe ? 0.5 + 0.5 * Math.sin(v * 7 * de) : 0, Se = xe || Ee ? 0.5 + 0.5 * Math.sin(v * 1.7 * de) : 0;
|
|
65
|
+
let me = fe ? 2.4 + ve * 1.8 : xe ? 0.35 + Se * 0.55 : 1.3;
|
|
66
|
+
me += pe * 5;
|
|
67
67
|
const Ae = J < 0.6 ? 1 - J / 0.6 : 0;
|
|
68
|
-
|
|
68
|
+
me += Ae * 3.5;
|
|
69
69
|
let Ce = j * (1 + pe * 0.35 + ve * 0.12 + Se * 0.08), ae = 0;
|
|
70
|
-
if (n.exitAt && (ae = H < 0.1 ? 1 - H / 0.1 : 0, Ce = H < 0.1 ? 1 + H * 4 : 1.4 * Math.pow(Math.max(0, 1 - (H - 0.1) / 0.75), 2),
|
|
70
|
+
if (n.exitAt && (ae = H < 0.1 ? 1 - H / 0.1 : 0, Ce = H < 0.1 ? 1 + H * 4 : 1.4 * Math.pow(Math.max(0, 1 - (H - 0.1) / 0.75), 2), me = 2 + ae * 5), f.current && (f.current.scale.setScalar(Math.max(1e-3, ee * Ce)), B.copy(X), Ee && B.lerp(wt, 0.25 + Se * 0.25), S === "failed" && B.lerp(Mt, 0.8), ae > 0 && B.lerp(bt, ae * 0.7), C.core.color.copy(B).multiplyScalar(me)), u.current && (u.current.scale.setScalar(Math.max(1e-3, ee * Ce * (1.45 + pe * 0.6 + ve * 0.2 + Ae * 1))), C.halo.opacity = (fe ? 0.09 : xe ? 0.04 : 0.06) + pe * 0.06 + Ae * 0.15 + ae * 0.25), w.current && (w.current.visible = fe, w.current.scale.setScalar(Math.max(1e-3, ee * 2.2 * j)), w.current.rotation.y += 0.07 * de, w.current.rotation.x += 0.03 * de), y.current) {
|
|
71
71
|
let _ = -1;
|
|
72
72
|
J < 0.9 ? (_ = J / 0.9, C.shock.color.copy(X).multiplyScalar(2.2 * (1 - _) * (1 - _))) : n.exitAt && H < 0.5 && (_ = H / 0.5, C.shock.color.set(S === "failed" ? "#ef4444" : "#ffffff").multiplyScalar(2.5 * (1 - _) * (1 - _))), y.current.visible = _ >= 0, _ >= 0 && (y.current.quaternion.copy(I.quaternion), y.current.scale.setScalar(ee * (1.2 + _ * 2.6)));
|
|
73
73
|
}
|
|
74
|
-
if (d.current && (d.current.visible = s, d.current.quaternion.copy(I.quaternion), d.current.scale.setScalar(ee * 2.6 * Math.max(0.2, j))), (Oe =
|
|
74
|
+
if (d.current && (d.current.visible = s, d.current.quaternion.copy(I.quaternion), d.current.scale.setScalar(ee * 2.6 * Math.max(0.2, j))), (Oe = h.current) == null || Oe.position.set(0, -ee * 1.5 - 0.35, 0), b.current) {
|
|
75
75
|
const _ = n.exitAt ? S === "failed" ? "failed" : "done" : J < 2.4 ? "born" : "name";
|
|
76
76
|
if (_ !== P.current) {
|
|
77
77
|
P.current = _;
|
|
78
|
-
const Pe = i.split(":")[2],
|
|
79
|
-
b.current.setText(_ === "born" ? `+ ${
|
|
78
|
+
const Pe = i.split(":")[2], he = `${n.name}${Pe !== void 0 ? ` ${Number(Pe) + 1}` : ""}`;
|
|
79
|
+
b.current.setText(_ === "born" ? `+ ${he}` : _ === "done" ? `${he} done` : _ === "failed" ? `× ${he}` : he);
|
|
80
80
|
}
|
|
81
81
|
const Be = _ === "born" ? 1 : _ === "name" ? 0.85 : Math.max(0, 1 - H * 1.6);
|
|
82
|
-
q.current += ((
|
|
82
|
+
q.current += ((ct(i) ? 1 : 0) - q.current) * 0.12, b.current.setOpacity(Be * q.current * Math.min(1, J / 0.4));
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
const k = (E) => (E.stopPropagation(), o(i));
|
|
86
86
|
return /* @__PURE__ */ L("group", { ref: p, position: t.pos, children: [
|
|
87
|
-
/* @__PURE__ */ a(be, { width: g ? 1.5 : 2.6, length: g ? 3 : 5, color: c, attenuation: (E) => E * E, decay: 1, children: /* @__PURE__ */ a("mesh", { ref: f, geometry:
|
|
88
|
-
/* @__PURE__ */ a("mesh", { ref: u, geometry:
|
|
89
|
-
/* @__PURE__ */ a("group", { ref: w, visible: !1, children: [0, 1, 2].map((E) => /* @__PURE__ */ a("mesh", { geometry:
|
|
90
|
-
/* @__PURE__ */ a("mesh", { ref: y, geometry:
|
|
91
|
-
/* @__PURE__ */ a("mesh", { ref: d, geometry:
|
|
92
|
-
/* @__PURE__ */ a("group", { ref:
|
|
87
|
+
/* @__PURE__ */ a(be, { width: g ? 1.5 : 2.6, length: g ? 3 : 5, color: c, attenuation: (E) => E * E, decay: 1, children: /* @__PURE__ */ a("mesh", { ref: f, geometry: xt, material: C.core, scale: 1e-3, onClick: k, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }) }),
|
|
88
|
+
/* @__PURE__ */ a("mesh", { ref: u, geometry: vt, material: C.halo, scale: 1e-3, onClick: k }),
|
|
89
|
+
/* @__PURE__ */ a("group", { ref: w, visible: !1, children: [0, 1, 2].map((E) => /* @__PURE__ */ a("mesh", { geometry: St, material: C.electron, position: [Math.cos(E * Math.PI * 2 / 3), Math.sin(E * 2.1) * 0.35, Math.sin(E * Math.PI * 2 / 3)] }, E)) }),
|
|
90
|
+
/* @__PURE__ */ a("mesh", { ref: y, geometry: At, material: C.shock, visible: !1, raycast: () => null }),
|
|
91
|
+
/* @__PURE__ */ a("mesh", { ref: d, geometry: Ct, material: C.sel, visible: !1, raycast: () => null }),
|
|
92
|
+
/* @__PURE__ */ a("group", { ref: h, children: /* @__PURE__ */ a(ue, { ref: b, text: "", color: c, size: g ? 0.24 : 0.3, opacity: 0, fit: !0, pxRange: g ? [8, 11.5] : [9, 13] }) })
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function Tt(t) {
|
|
96
96
|
const s = [];
|
|
97
97
|
for (let n = 0; n < t; n++) {
|
|
98
|
-
const i = n / t,
|
|
99
|
-
s.push(new e.Vector3(Math.cos(g) *
|
|
98
|
+
const i = n / t, m = 0.45 + 4.1 * Math.sqrt(i) + (Math.random() - 0.5) * 0.4, g = n % 3 / 3 * Math.PI * 2 + m * 1.3 + (Math.random() - 0.5) * 0.5;
|
|
99
|
+
s.push(new e.Vector3(Math.cos(g) * m, (Math.random() - 0.5) * 0.5 * (1.4 - i), Math.sin(g) * m));
|
|
100
100
|
}
|
|
101
101
|
return s;
|
|
102
102
|
}
|
|
103
|
-
const ze = 32, Le = new e.Color(5, 5, 5),
|
|
104
|
-
function
|
|
103
|
+
const ze = 32, Le = new e.Color(5, 5, 5), Et = 200, Ne = 1.35, Ue = 4.75 * Ne + 0.6, ge = 6;
|
|
104
|
+
function Ot({ galaxy: t }) {
|
|
105
105
|
const s = R(() => {
|
|
106
|
-
const B = t.nodes.slice(0,
|
|
106
|
+
const B = t.nodes.slice(0, Et), C = new Set(B.map((x) => x.id));
|
|
107
107
|
return { nodes: B, links: t.links.filter((x) => C.has(x.source) && C.has(x.target)) };
|
|
108
|
-
}, [t]), o = A([]), n = A([]), i = A([]),
|
|
108
|
+
}, [t]), o = A([]), n = A([]), i = A([]), m = A(Array(ge).fill(-1)), c = A(null), g = A(null), r = A(null), p = A(null), f = s.nodes.length, u = R(() => Tt(f), [f]), w = R(() => s.nodes.map((B) => new e.Color(it[B.kind] ?? "#94a3b8")), [s]), y = R(() => new Float32Array(Math.max(1, f)), [f]), d = R(() => new Uint8Array(Math.max(1, f)), [f]), b = R(() => new e.Object3D(), []), h = R(() => new e.Color(), []), P = R(() => new e.Vector3(), []), q = R(() => {
|
|
109
109
|
const B = new Map(s.nodes.map((M, l) => [M.id, l])), C = [], x = [], k = /* @__PURE__ */ new Set(), E = (M, l) => {
|
|
110
110
|
const v = M < l ? `${M}-${l}` : `${l}-${M}`;
|
|
111
111
|
M === l || k.has(v) || (k.add(v), C.push(u[M].x, u[M].y, u[M].z, u[l].x, u[l].y, u[l].z), x.push(w[M].r, w[M].g, w[M].b, w[l].r, w[l].g, w[l].b));
|
|
@@ -126,7 +126,7 @@ function Et({ galaxy: t }) {
|
|
|
126
126
|
const I = new e.BufferGeometry();
|
|
127
127
|
return I.setAttribute("position", new e.Float32BufferAttribute(C, 3)), I.setAttribute("color", new e.Float32BufferAttribute(x, 3)), I;
|
|
128
128
|
}, [s, u, w, f]);
|
|
129
|
-
|
|
129
|
+
tt(() => (V.pos = u, V.index = new Map(s.nodes.map((B, C) => [B.name.toLowerCase(), C])), V.group = c.current, () => void (V.group = null)), [s, u]), N(({ camera: B, clock: C }) => {
|
|
130
130
|
const x = c.current, k = g.current;
|
|
131
131
|
if (!x || !k) return;
|
|
132
132
|
x.updateMatrixWorld();
|
|
@@ -138,7 +138,7 @@ function Et({ galaxy: t }) {
|
|
|
138
138
|
if (S > y[G] && (y[G] = S), l.op === "write" && (d[G] = 1), r.current && I < ze && v < 1.6) {
|
|
139
139
|
P.copy(u[G]).applyMatrix4(x.matrix), b.position.copy(P), b.quaternion.copy(B.quaternion);
|
|
140
140
|
const O = v / 1.6;
|
|
141
|
-
b.scale.setScalar((l.op === "write" ? 0.6 + O * 3.2 : 0.3 + O * 1.4) * (1 - O * 0.2)), b.updateMatrix(), r.current.setMatrixAt(I, b.matrix), l.op === "write" ?
|
|
141
|
+
b.scale.setScalar((l.op === "write" ? 0.6 + O * 3.2 : 0.3 + O * 1.4) * (1 - O * 0.2)), b.updateMatrix(), r.current.setMatrixAt(I, b.matrix), l.op === "write" ? h.copy(Le).multiplyScalar(1 - O) : h.copy(w[G]).multiplyScalar(3 * (1 - O)), r.current.setColorAt(I, h), I++;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
r.current && (r.current.count = I, r.current.instanceMatrix.needsUpdate = !0, r.current.instanceColor && (r.current.instanceColor.needsUpdate = !0));
|
|
@@ -148,22 +148,22 @@ function Et({ galaxy: t }) {
|
|
|
148
148
|
if (G > 1.8) continue;
|
|
149
149
|
const S = Te(v.node);
|
|
150
150
|
let O = !1;
|
|
151
|
-
for (let U = 0; U < M; U++)
|
|
151
|
+
for (let U = 0; U < M; U++) m.current[U] === S && (O = !0);
|
|
152
152
|
if (O) continue;
|
|
153
153
|
const Y = o.current[M], $ = n.current[M];
|
|
154
|
-
Y && $ && (Y.position.copy(u[S]), (
|
|
154
|
+
Y && $ && (Y.position.copy(u[S]), (m.current[M] !== S || i.current[M] !== v.op) && ($.setText(`${v.op === "write" ? "wrote · " : ""}${v.node}`), i.current[M] = v.op, $.setColor(v.op === "write" ? "#ffffff" : `#${w[S].getHexString()}`)), $.setOpacity(Math.min(1, (1.8 - G) / 0.5)), Y.visible = !0), m.current[M] = S, M++;
|
|
155
155
|
}
|
|
156
156
|
for (let l = M; l < ge; l++)
|
|
157
|
-
|
|
157
|
+
m.current[l] = -1, o.current[l] && (o.current[l].visible = !1);
|
|
158
158
|
for (let l = 0; l < f; l++) {
|
|
159
159
|
const v = y[l];
|
|
160
|
-
b.position.copy(u[l]), b.quaternion.identity(), b.scale.setScalar(1 + v * (d[l] ? 4.5 : 3)), b.updateMatrix(), k.setMatrixAt(l, b.matrix),
|
|
160
|
+
b.position.copy(u[l]), b.quaternion.identity(), b.scale.setScalar(1 + v * (d[l] ? 4.5 : 3)), b.updateMatrix(), k.setMatrixAt(l, b.matrix), h.copy(w[l]).multiplyScalar(0.85 + v * 5), d[l] && h.lerp(Le, v * 0.7), k.setColorAt(l, h);
|
|
161
161
|
}
|
|
162
162
|
k.instanceMatrix.needsUpdate = !0, k.instanceColor && (k.instanceColor.needsUpdate = !0), p.current && p.current.scale.setScalar(1 + Math.sin(C.elapsedTime * 1.3) * 0.06);
|
|
163
163
|
});
|
|
164
164
|
const X = R(() => new e.Color("#c7d2fe").multiplyScalar(2.4), []);
|
|
165
165
|
return /* @__PURE__ */ L(se, { children: [
|
|
166
|
-
/* @__PURE__ */ L("group", { ref: c, rotation: [0.3, 0, 0.08], scale:
|
|
166
|
+
/* @__PURE__ */ L("group", { ref: c, rotation: [0.3, 0, 0.08], scale: Ne, children: [
|
|
167
167
|
/* @__PURE__ */ L("instancedMesh", { ref: g, args: [void 0, void 0, Math.max(1, f)], frustumCulled: !1, children: [
|
|
168
168
|
/* @__PURE__ */ a("sphereGeometry", { args: [0.065, 10, 10] }),
|
|
169
169
|
/* @__PURE__ */ a("meshBasicMaterial", { toneMapped: !1 })
|
|
@@ -178,23 +178,23 @@ function Et({ galaxy: t }) {
|
|
|
178
178
|
/* @__PURE__ */ a("meshBasicMaterial", { color: "#818cf8", transparent: !0, opacity: 0.07, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1 })
|
|
179
179
|
] }),
|
|
180
180
|
Array.from({ length: ge }, (B, C) => /* @__PURE__ */ a("group", { ref: (x) => void (o.current[C] = x), visible: !1, children: /* @__PURE__ */ a(ue, { ref: (x) => void (n.current[C] = x), position: [0, 0.32, 0], text: "", size: 0.2, opacity: 0, pxRange: [8, 11.5] }) }, C)),
|
|
181
|
-
/* @__PURE__ */ a(
|
|
181
|
+
/* @__PURE__ */ a(He, { count: F ? 30 : 110, scale: [9, 1.3, 9], size: 0.7, speed: F ? 0.05 : 0.3, color: "#a5b4fc", opacity: 0.6 })
|
|
182
182
|
] }),
|
|
183
183
|
/* @__PURE__ */ L("instancedMesh", { ref: r, args: [void 0, void 0, ze], frustumCulled: !1, children: [
|
|
184
184
|
/* @__PURE__ */ a("ringGeometry", { args: [0.2, 0.26, 40] }),
|
|
185
185
|
/* @__PURE__ */ a("meshBasicMaterial", { transparent: !0, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1, side: e.DoubleSide })
|
|
186
186
|
] }),
|
|
187
|
-
/* @__PURE__ */ a(
|
|
187
|
+
/* @__PURE__ */ a(lt, { position: [0, -0.6, Ue * 0.78], color: "#a5b4fc", size: 0.42, pxRange: [10, 15] })
|
|
188
188
|
] });
|
|
189
189
|
}
|
|
190
|
-
const W = new e.Vector3(), D = new e.Vector3(), z = new e.Color(), K = new e.Color(), ke = new e.Color("#f59e0b"),
|
|
191
|
-
function
|
|
190
|
+
const W = new e.Vector3(), D = new e.Vector3(), z = new e.Color(), K = new e.Color(), ke = new e.Color("#f59e0b"), Pt = new e.Color("#ef4444"), ce = 900, te = 22;
|
|
191
|
+
function _t() {
|
|
192
192
|
const t = R(() => {
|
|
193
193
|
const s = new e.BufferGeometry();
|
|
194
194
|
return s.setAttribute("position", new e.BufferAttribute(new Float32Array(ce * 6), 3)), s.setAttribute("color", new e.BufferAttribute(new Float32Array(ce * 6), 3)), s;
|
|
195
195
|
}, []);
|
|
196
196
|
return N(({ clock: s }) => {
|
|
197
|
-
const o = t.getAttribute("position"), n = t.getAttribute("color"), i = performance.now(),
|
|
197
|
+
const o = t.getAttribute("position"), n = t.getAttribute("color"), i = performance.now(), m = s.elapsedTime;
|
|
198
198
|
let c = 0;
|
|
199
199
|
const g = (r, p, f, u) => {
|
|
200
200
|
c >= ce || (o.setXYZ(c * 2, r.x, r.y, r.z), o.setXYZ(c * 2 + 1, p.x, p.y, p.z), n.setXYZ(c * 2, f.r, f.g, f.b), n.setXYZ(c * 2 + 1, u.r, u.g, u.b), c++);
|
|
@@ -203,7 +203,7 @@ function Pt() {
|
|
|
203
203
|
const p = (i - r.start) / 1900;
|
|
204
204
|
if (p >= 1 || !Q(r.instance)) continue;
|
|
205
205
|
const f = Z(r.instance);
|
|
206
|
-
if (!f || !
|
|
206
|
+
if (!f || !gt(r.node, D)) continue;
|
|
207
207
|
const u = T.instances.get(r.instance), w = 1 - p;
|
|
208
208
|
r.op === "write" ? (z.setRGB(3, 3, 3.4).multiplyScalar(w), K.setRGB(5, 5, 5).multiplyScalar(w)) : (z.set(u ? le[u.type] : "#c7d2fe").multiplyScalar(1.6 * w), K.copy(z).multiplyScalar(1.6)), g(f, D, z, K);
|
|
209
209
|
}
|
|
@@ -211,7 +211,7 @@ function Pt() {
|
|
|
211
211
|
if (!r.parent || !Q(r)) continue;
|
|
212
212
|
const p = T.instances.get(r.parent);
|
|
213
213
|
if (!p) continue;
|
|
214
|
-
const f = (i - r.bornAt) / 1e3, u = f < 1.4 ? 1 - f / 1.4 : 0, w =
|
|
214
|
+
const f = (i - r.bornAt) / 1e3, u = f < 1.4 ? 1 - f / 1.4 : 0, w = Ve(r.type) && !r.exitAt ? 0.35 : 0, y = Math.max(u * 3, w);
|
|
215
215
|
if (y <= 0.01) continue;
|
|
216
216
|
const d = Z(r.parent), b = Z(r.id);
|
|
217
217
|
!d || !b || (z.set(le[p.type]).multiplyScalar(y), K.set(le[r.type]).multiplyScalar(y * 1.4), g(d, b, z, K));
|
|
@@ -221,11 +221,11 @@ function Pt() {
|
|
|
221
221
|
const p = Z(r.instance), f = T.mcpServers.get(r.server), u = Re(r.server);
|
|
222
222
|
if (!p || !f || !u) continue;
|
|
223
223
|
D.copy(u), D.y += re(f.slot);
|
|
224
|
-
const w =
|
|
225
|
-
y < 0.5 ? d.lerp(ke, y * 2) : d.copy(ke).lerp(
|
|
226
|
-
const b = 0.8 + Math.min(2.5, w * 0.9),
|
|
224
|
+
const w = ut(r, i), y = Math.min(1, w / 2.2), d = K.set(f.color);
|
|
225
|
+
y < 0.5 ? d.lerp(ke, y * 2) : d.copy(ke).lerp(Pt, (y - 0.5) * 2);
|
|
226
|
+
const b = 0.8 + Math.min(2.5, w * 0.9), h = m * (F ? 0.3 : 1.4);
|
|
227
227
|
for (let P = 0; P < te; P++) {
|
|
228
|
-
const q = P / te, X = (P + 0.55) / te, B = ((q -
|
|
228
|
+
const q = P / te, X = (P + 0.55) / te, B = ((q - h) % 1 + 1) % 1, C = 0.25 + Math.pow(1 - B, 6) * 2.2 + ((q * 3 - h * 3) % 1 + 1) % 1 * 0.15;
|
|
229
229
|
z.copy(d).multiplyScalar(C * b), W.copy(p).lerp(D, q);
|
|
230
230
|
const x = W.x, k = W.y, E = W.z;
|
|
231
231
|
if (W.copy(p).lerp(D, X), c >= ce) break;
|
|
@@ -240,65 +240,65 @@ function Pt() {
|
|
|
240
240
|
D.copy(w), D.y += re(u.slot);
|
|
241
241
|
const y = 1 - p;
|
|
242
242
|
for (let d = 0; d < te; d++) {
|
|
243
|
-
const b = d / te,
|
|
243
|
+
const b = d / te, h = (d + 1) / te, P = Math.abs(b - y), q = (1 - p) * (0.15 + Math.exp(-P * 18) * 5);
|
|
244
244
|
z.set(u.color).lerp(K.setRGB(1, 1, 1), 0.6).multiplyScalar(q), W.copy(f).lerp(D, b);
|
|
245
245
|
const X = W.x, B = W.y, C = W.z;
|
|
246
|
-
if (W.copy(f).lerp(D,
|
|
246
|
+
if (W.copy(f).lerp(D, h), c >= ce) break;
|
|
247
247
|
o.setXYZ(c * 2, X, B, C), o.setXYZ(c * 2 + 1, W.x, W.y, W.z), n.setXYZ(c * 2, z.r, z.g, z.b), n.setXYZ(c * 2 + 1, z.r, z.g, z.b), c++;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
t.setDrawRange(0, c * 2), o.needsUpdate = !0, n.needsUpdate = !0;
|
|
251
251
|
}), /* @__PURE__ */ a("lineSegments", { geometry: t, frustumCulled: !1, children: /* @__PURE__ */ a("lineBasicMaterial", { vertexColors: !0, transparent: !0, opacity: 0.95, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1 }) });
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
const
|
|
255
|
-
return i.set(r * r * t.x + 2 * r * o *
|
|
253
|
+
function zt(t, s, o, n, i) {
|
|
254
|
+
const m = (t.x + s.x) / 2, c = (t.y + s.y) / 2 + n, g = (t.z + s.z) / 2, r = 1 - o;
|
|
255
|
+
return i.set(r * r * t.x + 2 * r * o * m + o * o * s.x, r * r * t.y + 2 * r * o * c + o * o * s.y, r * r * t.z + 2 * r * o * g + o * o * s.z);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Lt({ comet: t }) {
|
|
258
258
|
const s = A(null), o = T.instances.get(t.from), n = o ? le[o.type] : "#ffffff", i = R(() => new e.Color(n).multiplyScalar(4), [n]);
|
|
259
259
|
return N(() => {
|
|
260
|
-
const
|
|
261
|
-
!s.current || !r || !p || (D.copy(r),
|
|
262
|
-
}), /* @__PURE__ */ a(be, { width: 2.2, length: 7, color: n, attenuation: (
|
|
260
|
+
const m = performance.now(), c = Math.min(1, (m - t.start) / t.dur), g = c < 0.5 ? 2 * c * c : 1 - Math.pow(-2 * c + 2, 2) / 2, r = Z(t.from), p = Z(t.to);
|
|
261
|
+
!s.current || !r || !p || (D.copy(r), zt(D, p, g, 1.2 + r.distanceTo(p) * 0.15, s.current.position), s.current.scale.setScalar(c >= 1 ? 1e-3 : 1));
|
|
262
|
+
}), /* @__PURE__ */ a(be, { width: 2.2, length: 7, color: n, attenuation: (m) => m * m, decay: 1.2, children: /* @__PURE__ */ L("mesh", { ref: s, scale: 1e-3, children: [
|
|
263
263
|
/* @__PURE__ */ a("sphereGeometry", { args: [0.13, 14, 14] }),
|
|
264
264
|
/* @__PURE__ */ a("meshBasicMaterial", { color: i, toneMapped: !1 })
|
|
265
265
|
] }) });
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function kt() {
|
|
268
268
|
const [t, s] = De([]), o = A(-1);
|
|
269
269
|
return N(() => {
|
|
270
270
|
let n = T.comets.length * 7919 + Me.version * 104729;
|
|
271
271
|
for (const i of T.comets) n += i.id;
|
|
272
272
|
n !== o.current && (o.current = n, s(Me.grouped ? T.comets.filter((i) => Q(i.from) && Q(i.to)) : T.comets.slice()));
|
|
273
|
-
}), /* @__PURE__ */ a(se, { children: t.map((n) => /* @__PURE__ */ a(
|
|
273
|
+
}), /* @__PURE__ */ a(se, { children: t.map((n) => /* @__PURE__ */ a(Lt, { comet: n }, n.id)) });
|
|
274
274
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
275
|
+
const It = new e.Vector3(0, 1, 0);
|
|
276
|
+
function $t({ call: t }) {
|
|
277
277
|
var i;
|
|
278
278
|
const s = A(null), o = ((i = T.mcpServers.get(t.server)) == null ? void 0 : i.color) ?? "#e5e7eb", n = R(() => new e.Color(o).lerp(new e.Color("#ffffff"), 0.35).multiplyScalar(6), [o]);
|
|
279
279
|
return N(() => {
|
|
280
280
|
var w;
|
|
281
|
-
const
|
|
281
|
+
const m = performance.now(), c = Math.min(1, (m - t.start) / t.dur), g = c * c * (3 - 2 * c), r = Z(t.instance), p = Re(t.server);
|
|
282
282
|
if (!s.current || !r || !p) return;
|
|
283
283
|
D.copy(p), D.y += re(((w = T.mcpServers.get(t.server)) == null ? void 0 : w.slot) ?? 0);
|
|
284
284
|
const f = t.phase === "call" ? r : D, u = t.phase === "call" ? D : r;
|
|
285
|
-
s.current.position.copy(f).lerp(u, g), W.copy(u).sub(f).normalize(), s.current.quaternion.setFromUnitVectors(
|
|
286
|
-
}), /* @__PURE__ */ a(be, { width: 1.4, length: 10, color: o, attenuation: (
|
|
285
|
+
s.current.position.copy(f).lerp(u, g), W.copy(u).sub(f).normalize(), s.current.quaternion.setFromUnitVectors(It, W), s.current.scale.set(c >= 1 ? 1e-3 : 1, c >= 1 ? 1e-3 : 1, c >= 1 ? 1e-3 : 1);
|
|
286
|
+
}), /* @__PURE__ */ a(be, { width: 1.4, length: 10, color: o, attenuation: (m) => m * m * m, decay: 1.5, children: /* @__PURE__ */ L("mesh", { ref: s, scale: 1e-3, children: [
|
|
287
287
|
/* @__PURE__ */ a("capsuleGeometry", { args: [0.05, 0.7, 4, 8] }),
|
|
288
288
|
/* @__PURE__ */ a("meshBasicMaterial", { color: n, toneMapped: !1 })
|
|
289
289
|
] }) });
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Wt() {
|
|
292
292
|
const [t, s] = De([]), o = A(-1);
|
|
293
293
|
return N(() => {
|
|
294
294
|
let n = T.mcpCalls.length * 7919 + Me.version * 104729;
|
|
295
295
|
for (const i of T.mcpCalls) n += i.id;
|
|
296
296
|
n !== o.current && (o.current = n, s(Me.grouped ? T.mcpCalls.filter((i) => Q(i.instance)) : T.mcpCalls.slice()));
|
|
297
|
-
}), /* @__PURE__ */ a(se, { children: t.map((n) => /* @__PURE__ */ a(
|
|
297
|
+
}), /* @__PURE__ */ a(se, { children: t.map((n) => /* @__PURE__ */ a($t, { call: n }, n.id)) });
|
|
298
298
|
}
|
|
299
|
-
const
|
|
300
|
-
function
|
|
301
|
-
const s = t.srv, o = s.color, n = A(null), i = A(null),
|
|
299
|
+
const qt = new e.CylinderGeometry(0.22, 0.22, 0.75, 12), Xt = new e.TorusGeometry(0.5, 0.04, 8, 40), Yt = new e.BoxGeometry(0.3, 0.03, 0.03), Dt = new e.BoxGeometry(0.75, 0.02, 0.42), Ft = new e.SphereGeometry(0.55, 20, 20), re = (t) => t % 2 ? 0.9 : 1.6;
|
|
300
|
+
function Vt({ mcp: t }) {
|
|
301
|
+
const s = t.srv, o = s.color, n = A(null), i = A(null), m = A(null), c = R(() => new e.Color(o), [o]), g = R(
|
|
302
302
|
() => ({
|
|
303
303
|
body: new e.MeshBasicMaterial({ toneMapped: !1 }),
|
|
304
304
|
ring: new e.MeshBasicMaterial({ toneMapped: !1 }),
|
|
@@ -312,22 +312,22 @@ function Ft({ mcp: t }) {
|
|
|
312
312
|
if (!n.current) return;
|
|
313
313
|
const u = performance.now(), w = p.elapsedTime;
|
|
314
314
|
n.current.position.copy(t.pos), n.current.position.y += re(s.slot);
|
|
315
|
-
const y =
|
|
316
|
-
i.current && (i.current.rotation.x += f * (d ? 2.4 : 0.35) * b), g.body.color.copy(c).multiplyScalar(0.9 + (d ? 1.6 + Math.sin(w * 6) * 0.6 : 0) + y * 3), r.current && (r.current.rotation.z += f * (d ? 1.5 : 0.25) * b), g.ring.color.copy(c).multiplyScalar(0.7 + y * 3 + (d ? 1 : 0)),
|
|
315
|
+
const y = Fe(s.activeAt, u, 1.8), d = s.inflight > 0, b = F ? 0.25 : 1;
|
|
316
|
+
i.current && (i.current.rotation.x += f * (d ? 2.4 : 0.35) * b), g.body.color.copy(c).multiplyScalar(0.9 + (d ? 1.6 + Math.sin(w * 6) * 0.6 : 0) + y * 3), r.current && (r.current.rotation.z += f * (d ? 1.5 : 0.25) * b), g.ring.color.copy(c).multiplyScalar(0.7 + y * 3 + (d ? 1 : 0)), m.current && m.current.scale.setScalar(1 + y * 1.2 + (d ? 0.4 + Math.sin(w * 6) * 0.25 : 0)), g.beacon.opacity = 0.05 + y * 0.1 + (d ? 0.07 : 0);
|
|
317
317
|
}), /* @__PURE__ */ L("group", { ref: n, children: [
|
|
318
|
-
/* @__PURE__ */ a("mesh", { geometry:
|
|
319
|
-
/* @__PURE__ */ a("mesh", { ref: r, geometry:
|
|
318
|
+
/* @__PURE__ */ a("mesh", { geometry: qt, material: g.body }),
|
|
319
|
+
/* @__PURE__ */ a("mesh", { ref: r, geometry: Xt, material: g.ring, rotation: [Math.PI / 2, 0, 0] }),
|
|
320
320
|
/* @__PURE__ */ a("group", { ref: i, children: [-1, 1].map((p) => /* @__PURE__ */ L("group", { children: [
|
|
321
|
-
/* @__PURE__ */ a("mesh", { geometry:
|
|
322
|
-
/* @__PURE__ */ a("mesh", { geometry:
|
|
321
|
+
/* @__PURE__ */ a("mesh", { geometry: Yt, material: g.strut, position: [p * 0.55, 0, 0] }),
|
|
322
|
+
/* @__PURE__ */ a("mesh", { geometry: Dt, material: g.panel, position: [p * 1.05, 0, 0] })
|
|
323
323
|
] }, p)) }),
|
|
324
|
-
/* @__PURE__ */ a("mesh", { ref:
|
|
324
|
+
/* @__PURE__ */ a("mesh", { ref: m, geometry: Ft, material: g.beacon }),
|
|
325
325
|
/* @__PURE__ */ a(ue, { position: [0, -1.1, 0], text: `MCP · ${s.name}`, color: o, size: 0.3, pxRange: [9, 13] })
|
|
326
326
|
] });
|
|
327
327
|
}
|
|
328
|
-
const
|
|
329
|
-
function
|
|
330
|
-
const o = t.srv, n = s.res, i = R(() => new e.Color(o.color).lerp(new e.Color("#ffffff"), 0.3), [o.color]),
|
|
328
|
+
const Ze = new e.OctahedronGeometry(0.3, 0), Nt = new e.EdgesGeometry(Ze), ie = new e.Vector3(), ne = new e.Vector3();
|
|
329
|
+
function Ut({ mcp: t, backend: s }) {
|
|
330
|
+
const o = t.srv, n = s.res, i = R(() => new e.Color(o.color).lerp(new e.Color("#ffffff"), 0.3), [o.color]), m = A(null), c = A(null), g = A(null), r = A(""), p = R(
|
|
331
331
|
() => ({
|
|
332
332
|
fill: new e.MeshBasicMaterial({ color: i, transparent: !0, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
|
|
333
333
|
edge: new e.LineBasicMaterial({ color: i, transparent: !0, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
|
|
@@ -340,10 +340,10 @@ function Nt({ mcp: t, backend: s }) {
|
|
|
340
340
|
}, [p.tether]);
|
|
341
341
|
return N(({ clock: u }) => {
|
|
342
342
|
var X;
|
|
343
|
-
const w = performance.now(), y = n.inflight > 0, d =
|
|
344
|
-
ne.copy(s.pos), ne.y += re(o.slot) * 0.6, (X =
|
|
345
|
-
const
|
|
346
|
-
p.fill.color.copy(i).multiplyScalar(
|
|
343
|
+
const w = performance.now(), y = n.inflight > 0, d = Fe(n.activeAt, w, 1.5), b = y && !F ? 0.5 + 0.5 * Math.sin(u.elapsedTime * 5) : 0;
|
|
344
|
+
ne.copy(s.pos), ne.y += re(o.slot) * 0.6, (X = m.current) == null || X.position.copy(ne), c.current && (c.current.rotation.y = F ? 0.4 : u.elapsedTime * (y ? 1.2 : 0.25));
|
|
345
|
+
const h = y ? 1.4 + b * 0.8 : 0.18 + d * 0.9;
|
|
346
|
+
p.fill.color.copy(i).multiplyScalar(h * 0.35), p.edge.color.copy(i).multiplyScalar(h * 1.4), p.tether.color.copy(i).multiplyScalar(y ? 0.7 + b * 0.4 : 0.12 + d * 0.5), ie.copy(t.pos), ie.y += re(o.slot);
|
|
347
347
|
const P = f.geometry.getAttribute("position");
|
|
348
348
|
P.setXYZ(0, ie.x, ie.y, ie.z), P.setXYZ(1, ne.x, ne.y, ne.z), P.needsUpdate = !0;
|
|
349
349
|
let q = n.name;
|
|
@@ -355,17 +355,17 @@ function Nt({ mcp: t, backend: s }) {
|
|
|
355
355
|
g.current && (q !== r.current && g.current.setText(r.current = q), g.current.setOpacity(y ? 1 : 0.5 + d * 0.5));
|
|
356
356
|
}), /* @__PURE__ */ L(se, { children: [
|
|
357
357
|
/* @__PURE__ */ a("primitive", { object: f }),
|
|
358
|
-
/* @__PURE__ */ L("group", { ref:
|
|
358
|
+
/* @__PURE__ */ L("group", { ref: m, children: [
|
|
359
359
|
/* @__PURE__ */ L("group", { ref: c, children: [
|
|
360
|
-
/* @__PURE__ */ a("mesh", { geometry:
|
|
361
|
-
/* @__PURE__ */ a("lineSegments", { geometry:
|
|
360
|
+
/* @__PURE__ */ a("mesh", { geometry: Ze, material: p.fill }),
|
|
361
|
+
/* @__PURE__ */ a("lineSegments", { geometry: Nt, material: p.edge })
|
|
362
362
|
] }),
|
|
363
363
|
/* @__PURE__ */ a(ue, { ref: g, position: [0, -0.7, 0], text: n.name, color: o.color, size: 0.2, opacity: 0.5, pxRange: [7.5, 11] })
|
|
364
364
|
] })
|
|
365
365
|
] });
|
|
366
366
|
}
|
|
367
|
-
const we = { queued: "#64748b", running: "#fbbf24", done: "#22c55e", failed: "#ef4444" },
|
|
368
|
-
function
|
|
367
|
+
const we = { queued: "#64748b", running: "#fbbf24", done: "#22c55e", failed: "#ef4444" }, Zt = new e.TorusGeometry(1, 1, 6, 320);
|
|
368
|
+
function Ht() {
|
|
369
369
|
return new e.ShaderMaterial({
|
|
370
370
|
uniforms: { uA: { value: 4 }, uB: { value: 3 }, uTube: { value: 0.03 }, uColor: { value: new e.Color() }, uOpacity: { value: 0 } },
|
|
371
371
|
vertexShader: (
|
|
@@ -391,21 +391,21 @@ function Zt() {
|
|
|
391
391
|
blending: e.AdditiveBlending
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
function
|
|
396
|
-
|
|
394
|
+
const jt = new e.OctahedronGeometry(0.26, 0), Kt = new e.RingGeometry(0.34, 0.42, 40), Qt = new e.SphereGeometry(0.16, 12, 12), Ie = new e.Matrix4(), $e = new e.Vector3(), We = new e.Quaternion(), qe = new e.Quaternion(), Jt = new e.Vector3(1, 0, 0), Xe = (t, s, o, n) => n.set(Math.cos(o) * t, Math.sin(o) * s, 0);
|
|
395
|
+
function en({ run: t, color: s }) {
|
|
396
|
+
dt();
|
|
397
397
|
const o = t.status !== "started", n = [{ text: "hatchet ", color: s }];
|
|
398
398
|
if (t.hasSteps) {
|
|
399
|
-
const { shown: i, more:
|
|
399
|
+
const { shown: i, more: m } = mt(t);
|
|
400
400
|
for (const c of i) n.push({ text: ` ${t.steps[c] === "running" ? "›" : "·"}${c}`, color: we[t.steps[c]] });
|
|
401
|
-
|
|
401
|
+
m && n.push({ text: ` +${m}`, color: we.queued });
|
|
402
402
|
} else n.push({ text: o ? "complete" : "running…", color: "#94a3b8" });
|
|
403
403
|
return o && n.push({ text: " brief ready", color: "#4ade80" }), /* @__PURE__ */ a(ue, { text: t.topic, secondary: n, textColor: "#f1f5f9", color: s, size: 0.32, maxWidth: 9, opacity: o ? 0.65 : 1, fadeMs: 300, anchorY: "bottom", pxRange: [9.5, 14] });
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
const s = t.id, o = t.color, n = R(() =>
|
|
405
|
+
function tn({ run: t }) {
|
|
406
|
+
const s = t.id, o = t.color, n = R(() => yt(s), [s]), i = R(() => (oe(s, 16) - 0.5) * 0.24, [s]), m = A(null), c = A([]), g = A([]), r = A([]), p = A(null), f = A(null), u = R(() => new e.Color(), []), w = R(() => new e.Color(o), [o]), y = R(
|
|
407
407
|
() => ({
|
|
408
|
-
orbit:
|
|
408
|
+
orbit: Ht(),
|
|
409
409
|
beads: ye.map(() => new e.MeshBasicMaterial({ transparent: !0, toneMapped: !1 })),
|
|
410
410
|
halos: ye.map(() => new e.MeshBasicMaterial({ transparent: !0, blending: e.AdditiveBlending, depthWrite: !1, toneMapped: !1, side: e.DoubleSide })),
|
|
411
411
|
runner: new e.MeshBasicMaterial({ color: new e.Color("#fde68a").multiplyScalar(5), toneMapped: !1 })
|
|
@@ -414,24 +414,24 @@ function en({ run: t }) {
|
|
|
414
414
|
);
|
|
415
415
|
return N(({ clock: d }) => {
|
|
416
416
|
var v;
|
|
417
|
-
const b =
|
|
417
|
+
const b = m.current;
|
|
418
418
|
if (!b) return;
|
|
419
|
-
const
|
|
420
|
-
$e.crossVectors(t.side, t.axis), Ie.makeBasis(t.side, t.axis, $e), We.setFromRotationMatrix(Ie), qe.setFromAxisAngle(
|
|
421
|
-
const X = t.hu + 0.35, B = t.hv + 0.35, C =
|
|
422
|
-
I.uA.value = X, I.uB.value = B, I.uOpacity.value = k * 0.75, I.uColor.value.copy(w).multiplyScalar(1.1 + E * 3), (
|
|
419
|
+
const h = t.run ?? T.runs.get(s), P = performance.now(), q = d.elapsedTime;
|
|
420
|
+
$e.crossVectors(t.side, t.axis), Ie.makeBasis(t.side, t.axis, $e), We.setFromRotationMatrix(Ie), qe.setFromAxisAngle(Jt, i), b.quaternion.copy(We).multiply(qe), b.position.copy(t.origin);
|
|
421
|
+
const X = t.hu + 0.35, B = t.hv + 0.35, C = h ? Math.min(1, (P - h.startedAt) / 900) : 1, x = h != null && h.endedAt ? Math.max(0, 1 - (P - h.endedAt) / pt) : 1, k = C * x, E = h != null && h.endedAt ? Math.exp(-((P - h.endedAt) / 1e3) * 2.5) : 0, I = y.orbit.uniforms;
|
|
422
|
+
I.uA.value = X, I.uB.value = B, I.uOpacity.value = k * 0.75, I.uColor.value.copy(w).multiplyScalar(1.1 + E * 3), (h == null ? void 0 : h.status) === "completed" && I.uColor.value.lerp(u.set("#4ade80"), E);
|
|
423
423
|
for (let G = 0; G < ye.length; G++) {
|
|
424
|
-
const S =
|
|
424
|
+
const S = h ? ft(h, G) : "queued", O = !!(h != null && h.hasSteps), Y = g.current[G];
|
|
425
425
|
if (Y && (Y.visible = O, Xe(X, B, Ge[G] + n, Y.position)), !O) continue;
|
|
426
426
|
const $ = S === "running" ? 0.5 + 0.5 * Math.sin(q * (F ? 2 : 6)) : 0, U = c.current[G];
|
|
427
427
|
U && (u.set(we[S]).multiplyScalar(S === "queued" ? 0.7 : S === "running" ? 2 + $ * 2 : 2.4), y.beads[G].color.copy(u), y.beads[G].opacity = k, U.scale.setScalar((S === "running" ? 1.3 + $ * 0.25 : S === "done" ? 1.05 : 0.8) * Math.max(0.01, k)));
|
|
428
428
|
const j = r.current[G];
|
|
429
429
|
j && (j.visible = S !== "queued", y.halos[G].color.set(we[S]), y.halos[G].opacity = k * (S === "running" ? 0.35 + $ * 0.4 : 0.18), j.scale.setScalar(S === "running" ? 1.6 + $ * 0.9 : 1.3));
|
|
430
430
|
}
|
|
431
|
-
const M =
|
|
432
|
-
if (p.current &&
|
|
433
|
-
const G = Ge[
|
|
434
|
-
let S = Ge[
|
|
431
|
+
const M = h != null && h.handoffAt ? (P - h.handoffAt) / 1400 : 2;
|
|
432
|
+
if (p.current && h) {
|
|
433
|
+
const G = Ge[h.handoffFrom] + n;
|
|
434
|
+
let S = Ge[h.handoffTo] + n;
|
|
435
435
|
S < G && (S += Math.PI * 2);
|
|
436
436
|
const O = M >= 1 ? 1 : 1 - Math.pow(1 - Math.max(0, M), 3);
|
|
437
437
|
Xe(X, B, G + (S - G) * O, p.current.position), p.current.scale.setScalar(M < 1 ? 1 : 1e-3);
|
|
@@ -439,22 +439,22 @@ function en({ run: t }) {
|
|
|
439
439
|
const l = Math.hypot(t.side.z * X, t.axis.z * B);
|
|
440
440
|
(v = f.current) == null || v.position.set(t.origin.x, 0.4, t.origin.z - l - 0.5);
|
|
441
441
|
}), /* @__PURE__ */ L(se, { children: [
|
|
442
|
-
/* @__PURE__ */ L("group", { ref:
|
|
443
|
-
/* @__PURE__ */ a("mesh", { geometry:
|
|
442
|
+
/* @__PURE__ */ L("group", { ref: m, children: [
|
|
443
|
+
/* @__PURE__ */ a("mesh", { geometry: Zt, material: y.orbit, frustumCulled: !1 }),
|
|
444
444
|
ye.map((d) => /* @__PURE__ */ L("group", { ref: (b) => void (g.current[d] = b), visible: !1, children: [
|
|
445
|
-
/* @__PURE__ */ a("mesh", { ref: (b) => void (c.current[d] = b), geometry:
|
|
446
|
-
/* @__PURE__ */ a("mesh", { ref: (b) => void (r.current[d] = b), geometry:
|
|
445
|
+
/* @__PURE__ */ a("mesh", { ref: (b) => void (c.current[d] = b), geometry: jt, material: y.beads[d] }),
|
|
446
|
+
/* @__PURE__ */ a("mesh", { ref: (b) => void (r.current[d] = b), geometry: Kt, material: y.halos[d] })
|
|
447
447
|
] }, d)),
|
|
448
|
-
/* @__PURE__ */ a(be, { width: 3.2, length: 9, color: "#fde68a", attenuation: (d) => d * d, children: /* @__PURE__ */ a("mesh", { ref: p, geometry:
|
|
448
|
+
/* @__PURE__ */ a(be, { width: 3.2, length: 9, color: "#fde68a", attenuation: (d) => d * d, children: /* @__PURE__ */ a("mesh", { ref: p, geometry: Qt, material: y.runner, scale: 1e-3 }) })
|
|
449
449
|
] }),
|
|
450
|
-
/* @__PURE__ */ a("group", { ref: f, children: t.run && /* @__PURE__ */ a(
|
|
450
|
+
/* @__PURE__ */ a("group", { ref: f, children: t.run && /* @__PURE__ */ a(en, { run: t.run, color: o }) })
|
|
451
451
|
] });
|
|
452
452
|
}
|
|
453
|
-
const
|
|
453
|
+
const nn = /* @__PURE__ */ L(se, { children: [
|
|
454
454
|
/* @__PURE__ */ a("fog", { attach: "fog", args: ["#03050b", 70, 170] }),
|
|
455
|
-
/* @__PURE__ */ a(
|
|
455
|
+
/* @__PURE__ */ a(je, { radius: 130, depth: 50, count: F ? 1500 : 5e3, factor: 3.4, saturation: 0.4, fade: !0, speed: F ? 0 : 0.2 })
|
|
456
456
|
] });
|
|
457
|
-
function
|
|
457
|
+
function un() {
|
|
458
458
|
return /* @__PURE__ */ L(
|
|
459
459
|
ht,
|
|
460
460
|
{
|
|
@@ -467,29 +467,29 @@ function ln() {
|
|
|
467
467
|
bg: "#03050b",
|
|
468
468
|
fit: { nRef: 4, min: 0.62, max: 1.6, minRadius: 5.5 },
|
|
469
469
|
agentRadius: 0.85,
|
|
470
|
-
graph: { natural:
|
|
470
|
+
graph: { natural: Ue, radius: 2.6 },
|
|
471
471
|
peripheryGap: 3.8,
|
|
472
|
-
Background:
|
|
473
|
-
Agent:
|
|
474
|
-
RunMarker:
|
|
475
|
-
McpServer:
|
|
476
|
-
Backend:
|
|
477
|
-
GraphResource:
|
|
472
|
+
Background: nn,
|
|
473
|
+
Agent: Rt,
|
|
474
|
+
RunMarker: tn,
|
|
475
|
+
McpServer: Vt,
|
|
476
|
+
Backend: Ut,
|
|
477
|
+
GraphResource: Ot,
|
|
478
478
|
cluster: { radius: 1.35, variant: "stars" },
|
|
479
479
|
clusterOffset: [0, 1.2, 0],
|
|
480
|
-
PostFX: /* @__PURE__ */ L(
|
|
481
|
-
/* @__PURE__ */ a(
|
|
482
|
-
/* @__PURE__ */ a(
|
|
483
|
-
/* @__PURE__ */ a(
|
|
480
|
+
PostFX: /* @__PURE__ */ L(Ke, { multisampling: 0, children: [
|
|
481
|
+
/* @__PURE__ */ a(Qe, { mipmapBlur: !0, intensity: 1.3, luminanceThreshold: 0.2, luminanceSmoothing: 0.25, radius: 0.78 }),
|
|
482
|
+
/* @__PURE__ */ a(Je, { eskil: !1, offset: 0.25, darkness: 0.85 }),
|
|
483
|
+
/* @__PURE__ */ a(et, { opacity: 0.025 })
|
|
484
484
|
] }),
|
|
485
485
|
children: [
|
|
486
|
-
/* @__PURE__ */ a(
|
|
487
|
-
/* @__PURE__ */ a(
|
|
488
|
-
/* @__PURE__ */ a(
|
|
486
|
+
/* @__PURE__ */ a(_t, {}),
|
|
487
|
+
/* @__PURE__ */ a(kt, {}),
|
|
488
|
+
/* @__PURE__ */ a(Wt, {})
|
|
489
489
|
]
|
|
490
490
|
}
|
|
491
491
|
);
|
|
492
492
|
}
|
|
493
493
|
export {
|
|
494
|
-
|
|
494
|
+
un as default
|
|
495
495
|
};
|