agentglow 0.3.2 → 0.4.1
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 +89 -11
- package/cli/agentglow.mjs +7 -6
- package/dist/chunks/KitScene-qkWr95H9.js +5933 -0
- package/dist/chunks/ResourceWire-BWQJV3bx.js +36 -0
- package/dist/chunks/index-2zvNrAfW.js +921 -0
- package/dist/chunks/{index-D-egBmZU.js → index-BP5CK-0G.js} +194 -194
- package/dist/chunks/{index-CHJsMIrM.js → index-B__6Mr7M.js} +195 -194
- package/dist/chunks/{index-CpXj5lT0.js → index-Bfpwwg62.js} +151 -150
- package/dist/chunks/index-BkOdY6y8.js +678 -0
- package/dist/chunks/index-Bxr6tpps.js +1015 -0
- package/dist/chunks/index-DjDzoHSk.js +52 -0
- package/dist/chunks/index-vbo-4RNb.js +990 -0
- package/dist/index.js +1 -1
- package/dist/node.js +193 -0
- package/dist/pulse.js +20 -0
- package/dist/style.css +1 -1
- package/dist/types/node.d.ts +45 -0
- package/dist/types/pulse.d.ts +37 -0
- package/dist/types/themes.d.ts +1 -1
- package/dist/types/world.d.ts +192 -8
- package/package.json +55 -6
- package/dist/chunks/KitScene-DbBTTc3H.js +0 -4605
- package/dist/chunks/index-B2VQ34Za.js +0 -948
- package/dist/chunks/index-DZvO9oiI.js +0 -677
- package/dist/chunks/index-OgLlwjoE.js +0 -48
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import { useFrame as W } from "@react-three/fiber";
|
|
3
|
+
import { useMemo as M } from "react";
|
|
4
|
+
import * as t from "three";
|
|
5
|
+
import { x as F, w as H, m as I } from "./KitScene-qkWr95H9.js";
|
|
6
|
+
const b = 32, y = new t.Vector3(), v = new t.Vector3(), l = new t.Vector3(), u = new t.Color(), P = new t.Color(1, 1, 1);
|
|
7
|
+
function U(r, f, p, m, s) {
|
|
8
|
+
let e = null;
|
|
9
|
+
for (const o of H.mcpCalls) o.server === r && o.resource === f && (!e || o.start > e.start) && (e = o);
|
|
10
|
+
const d = e && e.phase === "result" ? (s - e.start) / e.dur : 9;
|
|
11
|
+
return { busy: p > 0, act: I(m, s, 1.5), head: d < 1 ? 1 - d : -1 };
|
|
12
|
+
}
|
|
13
|
+
function z({ mcp: r, backend: f, color: p, gain: m = 1, y: s, yFrom: e, lift: d = 0, wave: o = 0 }) {
|
|
14
|
+
const g = M(() => {
|
|
15
|
+
const a = new t.BufferGeometry();
|
|
16
|
+
return a.setAttribute("position", new t.BufferAttribute(new Float32Array(b * 2 * 3), 3)), a.setAttribute("color", new t.BufferAttribute(new Float32Array(b * 2 * 3), 3)), a;
|
|
17
|
+
}, []), _ = M(() => new t.Color(p ?? r.srv.color), [p, r.srv.color]), G = M(() => new t.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: t.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), []);
|
|
18
|
+
return W(({ clock: a }) => {
|
|
19
|
+
const x = g.getAttribute("position"), C = g.getAttribute("color"), R = performance.now(), B = F ? 0 : a.elapsedTime, A = f.res, n = U(r.name, A.name, A.inflight, A.activeAt, R);
|
|
20
|
+
y.copy(r.pos), v.copy(f.pos), s !== void 0 && (y.y = s, v.y = s), e !== void 0 && (y.y = e);
|
|
21
|
+
const S = (0.18 + n.act * 0.55 + (n.busy ? 0.35 : 0)) * m;
|
|
22
|
+
for (let w = 0; w < b; w++)
|
|
23
|
+
for (let h = 0; h < 2; h++) {
|
|
24
|
+
const i = (w + h) / b, E = Math.sin(i * Math.PI);
|
|
25
|
+
l.lerpVectors(y, v, i), l.y += d * E + (o ? Math.sin(i * 9 - B * 2.4) * o * E : 0);
|
|
26
|
+
let c = S;
|
|
27
|
+
n.busy && (c *= 0.45 + Math.pow(Math.max(0, Math.sin(i * 18 - B * 6)), 6) * 2.4), n.head >= 0 && (c += Math.exp(-(((i - n.head) / 0.08) ** 2)) * 2.6 * m), u.copy(_), n.head >= 0 && u.lerp(P, 0.3);
|
|
28
|
+
const V = w * 2 + h;
|
|
29
|
+
x.setXYZ(V, l.x, l.y, l.z), C.setXYZ(V, u.r * c, u.g * c, u.b * c);
|
|
30
|
+
}
|
|
31
|
+
x.needsUpdate = !0, C.needsUpdate = !0;
|
|
32
|
+
}), /* @__PURE__ */ T("lineSegments", { geometry: g, material: G, frustumCulled: !1 });
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
z as R
|
|
36
|
+
};
|