agentglow 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,14 +7,14 @@ import { EffectComposer as st, Bloom as it, Vignette as ct } from "@react-three/
7
7
  import { useFrame as re, useThree as lt } from "@react-three/fiber";
8
8
  import { useRef as z, useMemo as V, useEffect as ut, useState as $e } from "react";
9
9
  import * as o from "three";
10
- import { T as Xe, w as L, a as ge, p as pt, e as ft, s as dt, r as fe, f as Ue, L as be, l as mt, g as ht, b as We, K as gt, o as vt, q as wt, G as yt, t as bt, R as Mt, u as St, v as Ct, m as De, c as Ye, d as At, n as xt } from "./KitScene-DC6xid52.js";
11
- const ee = (e) => e < 0 ? 0 : e > 1 ? 1 : e, ke = (e) => 1 - Math.pow(1 - ee(e), 3), Me = (e) => (e = ee(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), Rt = (e) => {
10
+ import { T as Xe, w as L, a as ge, p as pt, e as ft, s as dt, r as fe, f as Ue, L as be, l as mt, g as ht, b as We, K as gt, o as vt, q as wt, G as yt, t as bt, R as Mt, u as St, v as Ct, x as At, m as De, c as Ye, d as xt, n as Rt } from "./KitScene-DbBTTc3H.js";
11
+ const ee = (e) => e < 0 ? 0 : e > 1 ? 1 : e, ke = (e) => 1 - Math.pow(1 - ee(e), 3), Me = (e) => (e = ee(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), Tt = (e) => {
12
12
  e = ee(e);
13
13
  const r = 2.2;
14
14
  return 1 + (r + 1) * Math.pow(e - 1, 3) + r * Math.pow(e - 1, 2);
15
15
  }, Ve = Object.fromEntries(Object.entries(Xe).map(([e, r]) => [e, new o.Color(r)])), Ee = (e) => e === "graph_scout" || e === "records_scout" || e === "data_scout";
16
16
  let Ae = null;
17
- function Tt() {
17
+ function Pt() {
18
18
  if (Ae) return Ae;
19
19
  const e = document.createElement("canvas");
20
20
  e.width = e.height = 128;
@@ -22,12 +22,12 @@ function Tt() {
22
22
  return t.addColorStop(0, "rgba(255,255,255,1)"), t.addColorStop(0.15, "rgba(255,255,255,0.6)"), t.addColorStop(0.45, "rgba(255,255,255,0.14)"), t.addColorStop(1, "rgba(255,255,255,0)"), r.fillStyle = t, r.fillRect(0, 0, 128, 128), Ae = new o.CanvasTexture(e), Ae;
23
23
  }
24
24
  function le(e = "#fff") {
25
- return new o.SpriteMaterial({ map: Tt(), color: e, blending: o.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
25
+ return new o.SpriteMaterial({ map: Pt(), color: e, blending: o.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
26
26
  }
27
27
  function se(e = "#fff") {
28
28
  return new o.MeshBasicMaterial({ color: e, blending: o.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
29
29
  }
30
- function Pt(e = 64, r = 7) {
30
+ function Vt(e = 64, r = 7) {
31
31
  const t = [], n = [];
32
32
  for (let a = 0; a <= e; a++) {
33
33
  const i = a / e;
@@ -44,10 +44,10 @@ function Pt(e = 64, r = 7) {
44
44
  const s = new o.BufferGeometry();
45
45
  return s.setAttribute("position", new o.Float32BufferAttribute(t, 3)), s.setIndex(n), s.boundingSphere = new o.Sphere(new o.Vector3(), 1e4), s;
46
46
  }
47
- const Ze = Pt(), Ge = new o.SphereGeometry(1, 32, 24);
47
+ const Ze = Vt(), Ge = new o.SphereGeometry(1, 32, 24);
48
48
  new o.SphereGeometry(1, 40, 28);
49
49
  new o.IcosahedronGeometry(1, 1);
50
- const Ie = new o.ConeGeometry(1, 1, 14).translate(0, 0.5, 0), Vt = new o.ConeGeometry(1, 1, 6, 1, !0).translate(0, 0.5, 0), Gt = (
50
+ const Ie = new o.ConeGeometry(1, 1, 14).translate(0, 0.5, 0), Gt = new o.ConeGeometry(1, 1, 6, 1, !0).translate(0, 0.5, 0), zt = (
51
51
  /* glsl */
52
52
  `
53
53
  uniform vec3 uP0; uniform vec3 uP1; uniform vec3 uP2; uniform float uRadius; uniform float uTaper;
@@ -66,7 +66,7 @@ void main(){
66
66
  vT = t;
67
67
  gl_Position = projectionMatrix * mv;
68
68
  }`
69
- ), zt = (
69
+ ), Bt = (
70
70
  /* glsl */
71
71
  `
72
72
  uniform vec3 uColor; uniform float uOpacity; uniform float uGrow; uniform float uTime; uniform float uSpark; uniform float uFlow;
@@ -106,8 +106,8 @@ function Qe(e = "#fff", r = 0.06, t = 0.4) {
106
106
  uTail: { value: 0.12 },
107
107
  uHeadColor: { value: new o.Color(4, 4, 4) }
108
108
  },
109
- vertexShader: Gt,
110
- fragmentShader: zt,
109
+ vertexShader: zt,
110
+ fragmentShader: Bt,
111
111
  transparent: !0,
112
112
  depthWrite: !1,
113
113
  blending: o.AdditiveBlending
@@ -150,12 +150,12 @@ const Be = class Be {
150
150
  };
151
151
  te(Be, "UP", new o.Vector3(0, 1, 0));
152
152
  let ze = Be;
153
- const Fe = new o.Vector3(), xe = new o.Vector3(), Bt = new o.Vector3(0, 1, 0);
153
+ const Fe = new o.Vector3(), xe = new o.Vector3(), Ot = new o.Vector3(0, 1, 0);
154
154
  function He(e, r, t, n, s, a, i) {
155
- ne(r, t, n, s, Fe), ne(r, t, n, Math.min(1, Math.max(0, s + 0.02 * a)), xe), e.position.copy(Fe), xe.sub(Fe), xe.lengthSq() > 1e-8 && e.quaternion.setFromUnitVectors(Bt, xe.normalize()), e.scale.set(i * 0.4, i, i * 0.4);
155
+ ne(r, t, n, s, Fe), ne(r, t, n, Math.min(1, Math.max(0, s + 0.02 * a)), xe), e.position.copy(Fe), xe.sub(Fe), xe.lengthSq() > 1e-8 && e.quaternion.setFromUnitVectors(Ot, xe.normalize()), e.scale.set(i * 0.4, i, i * 0.4);
156
156
  }
157
- const Ot = new o.Color("#4b4a63"), Le = new o.Color("#fbbf24"), ye = /* @__PURE__ */ new Map();
158
- function Et(e) {
157
+ const Et = new o.Color("#4b4a63"), Le = new o.Color("#fbbf24"), ye = /* @__PURE__ */ new Map();
158
+ function Ft(e) {
159
159
  const r = [], t = new o.Vector3(0, 1, 0), n = 10;
160
160
  for (let s = 0; s < n; s++) {
161
161
  const a = 1 - 2 * (s + 0.5) / n, i = Math.sqrt(1 - a * a), p = s * 2.39996 + e * 6.28;
@@ -163,9 +163,9 @@ function Et(e) {
163
163
  }
164
164
  return r;
165
165
  }
166
- const Ft = new o.TorusGeometry(1.25, 0.05, 8, 64);
167
- function _t({ agent: e, onSelect: r }) {
168
- const t = e.inst, n = z(null), s = z(null), a = z(null), i = z(null), p = z(null), h = z(null), m = z(null), M = z(null), S = V(() => [...t.id].reduce((B, x) => (B * 31 + x.charCodeAt(0)) % 9973, 7) / 9973, [t.id]), F = V(() => Et(S), [S]), C = Ve[t.type], g = V(
166
+ const _t = new o.TorusGeometry(1.25, 0.05, 8, 64);
167
+ function kt({ agent: e, onSelect: r }) {
168
+ const t = e.inst, n = z(null), s = z(null), a = z(null), i = z(null), p = z(null), h = z(null), m = z(null), M = z(null), S = V(() => [...t.id].reduce((B, x) => (B * 31 + x.charCodeAt(0)) % 9973, 7) / 9973, [t.id]), F = V(() => Ft(S), [S]), C = Ve[t.type], g = V(
169
169
  () => ({
170
170
  core: se(C),
171
171
  hot: se("#ffffff"),
@@ -185,7 +185,7 @@ function _t({ agent: e, onSelect: r }) {
185
185
  e.live.set(e.pos.x + Math.sin(_ * 0.35 + S * 20) * k, e.pos.y + Math.cos(_ * 0.3 + S * 13) * k, e.pos.z);
186
186
  const G = e.live, f = t.parent ? L.instances.get(t.parent) : void 0, T = t.parent ? ge(t.parent) : void 0;
187
187
  T ? (c.p0.copy(T), c.p0set = !0) : c.p0set || (c.p0.copy(G), c.p0set = !0), Oe(c.p0, G, Ee(t.type) || t.subagent ? 0.25 : 0.6, c.p1);
188
- const W = (x - t.bornAt) / 1e3, I = t.parent ? ke(W / 0.9) : 1, P = Rt((W - (t.parent ? 0.85 : 0.1)) / 0.7), j = t.exitAt ? (x - t.exitAt) / 1e3 : -1, N = mt(t) / 1e3, w = j >= 0 ? ee(j / (N * 0.92)) : 0, $ = pt(t, x);
188
+ const W = (x - t.bornAt) / 1e3, I = t.parent ? ke(W / 0.9) : 1, P = Tt((W - (t.parent ? 0.85 : 0.1)) / 0.7), j = t.exitAt ? (x - t.exitAt) / 1e3 : -1, N = mt(t) / 1e3, w = j >= 0 ? ee(j / (N * 0.92)) : 0, $ = pt(t, x);
189
189
  let X = !1;
190
190
  for (const H of L.mcpPending.values()) H.instance === t.id && (X = !0);
191
191
  const d = j < 0 && (t.status === "thinking" || t.status === "spawning"), b = ft(t, x), O = fe ? 0 : 1, K = 0.5 + 0.5 * Math.sin(_ * 2 + S * 9) * O, Z = 0.5 + 0.5 * Math.sin(_ * 1 + S * 5) * O;
@@ -193,7 +193,7 @@ function _t({ agent: e, onSelect: r }) {
193
193
  const U = I < 1 ? 0.18 : 0, l = Math.max(U, 0.18 + 0.82 * P) * (1 - w * w * 0.95) * e.scale;
194
194
  (D = s.current) == null || D.scale.setScalar(Math.max(1e-4, l * (0.55 + b * 0.06 + (d ? K * 0.05 : Z * 0.04)))), (ie = a.current) == null || ie.scale.setScalar(Math.max(1e-4, c.spik * (0.85 + K * 0.15)));
195
195
  const v = d ? 0.75 + K * 0.35 : 0.3 + Z * 0.15;
196
- if (c.c.copy(C).multiplyScalar(v + b * 0.35), j >= 0 && c.c.lerp(Ot, w).multiplyScalar(1 - w * 0.75), g.core.color.copy(c.c), g.spike.color.copy(c.c).multiplyScalar(0.9), g.hot.color.setScalar((d ? 0.35 + K * 0.25 : 0.08) * (1 - w) + b * 0.2), i.current && (i.current.visible = c.ringK > 0.02, i.current.rotation.z = _ * 0.9, i.current.rotation.x = 1.1 + Math.sin(_ * 0.5) * 0.2, i.current.scale.setScalar(Math.max(1e-4, l * 0.55 * c.ringK)), g.ring.color.copy(Le).multiplyScalar(0.9 * c.ringK * (0.75 + Z * 0.25))), h.current && (h.current.scale.setScalar(Math.max(1e-4, l * (d ? 2.3 + K * 0.3 : 1.6) + b * 0.35)), g.halo.color.copy(C).multiplyScalar((d ? 0.22 : 0.09) * (1 - w) + b * 0.06)), (Q = M.current) == null || Q.position.set(0, -0.78 * e.scale - 0.25, 0), m.current) {
196
+ if (c.c.copy(C).multiplyScalar(v + b * 0.35), j >= 0 && c.c.lerp(Et, w).multiplyScalar(1 - w * 0.75), g.core.color.copy(c.c), g.spike.color.copy(c.c).multiplyScalar(0.9), g.hot.color.setScalar((d ? 0.35 + K * 0.25 : 0.08) * (1 - w) + b * 0.2), i.current && (i.current.visible = c.ringK > 0.02, i.current.rotation.z = _ * 0.9, i.current.rotation.x = 1.1 + Math.sin(_ * 0.5) * 0.2, i.current.scale.setScalar(Math.max(1e-4, l * 0.55 * c.ringK)), g.ring.color.copy(Le).multiplyScalar(0.9 * c.ringK * (0.75 + Z * 0.25))), h.current && (h.current.scale.setScalar(Math.max(1e-4, l * (d ? 2.3 + K * 0.3 : 1.6) + b * 0.35)), g.halo.color.copy(C).multiplyScalar((d ? 0.22 : 0.09) * (1 - w) + b * 0.06)), (Q = M.current) == null || Q.position.set(0, -0.78 * e.scale - 0.25, 0), m.current) {
197
197
  const H = dt(t.id);
198
198
  c.labelK += ((H ? 1 : 0) - c.labelK) * 0.12, m.current.setOpacity(ee(P) * (1 - w) * 0.95 * c.labelK);
199
199
  }
@@ -205,7 +205,7 @@ function _t({ agent: e, onSelect: r }) {
205
205
  if (R.uGrow.value = t.parent ? I * (1 - q) : 0, R.uSpark.value = 0, R.uHead.value = I < 1 ? I : -1, R.uTail.value = 0.1, R.uHeadColor.value.copy(C).multiplyScalar(1.5), R.uOpacity.value = (d ? 1.1 : 0.75) * Math.max(0, Math.min(c.parentK, $ > 0 ? 1 : 0)) + (I < 1 ? 0.4 : 0), R.uTime.value = fe ? 0 : _, R.uFlow.value = I >= 1 ? c.parentK : 0, p.current) {
206
206
  const H = t.parent && I >= 1 && c.parentK > 0.05 && R.uGrow.value > 0.9;
207
207
  if (p.current.visible = !!H, H) {
208
- ne(c.p0, c.p1, G, 0.8, _e), ne(c.p0, c.p1, G, 0.86, qe), p.current.position.copy(_e), Ne.subVectors(qe, _e).normalize(), p.current.quaternion.setFromUnitVectors(kt, Ne);
208
+ ne(c.p0, c.p1, G, 0.8, _e), ne(c.p0, c.p1, G, 0.86, qe), p.current.position.copy(_e), Ne.subVectors(qe, _e).normalize(), p.current.quaternion.setFromUnitVectors(It, Ne);
209
209
  const ue = (Ee(t.type) ? 0.75 : 1) * Math.min(1.3, Ue.scale);
210
210
  p.current.scale.set(0.16 * ue, 0.42 * ue, 0.16 * ue), g.arrow.color.copy(C).multiplyScalar(1.6 * c.parentK);
211
211
  }
@@ -221,9 +221,9 @@ function _t({ agent: e, onSelect: r }) {
221
221
  /* @__PURE__ */ Y("group", { ref: s, scale: 1e-4, children: [
222
222
  /* @__PURE__ */ u("mesh", { geometry: Ge, material: g.core, onClick: A, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }),
223
223
  /* @__PURE__ */ u("mesh", { geometry: Ge, material: g.hot, scale: 0.5 }),
224
- /* @__PURE__ */ u("group", { ref: a, scale: 1e-4, children: F.map((B, x) => /* @__PURE__ */ u("mesh", { geometry: Vt, material: g.spike, quaternion: B, scale: [0.2, 1.9, 0.2] }, x)) })
224
+ /* @__PURE__ */ u("group", { ref: a, scale: 1e-4, children: F.map((B, x) => /* @__PURE__ */ u("mesh", { geometry: Gt, material: g.spike, quaternion: B, scale: [0.2, 1.9, 0.2] }, x)) })
225
225
  ] }),
226
- /* @__PURE__ */ u("mesh", { ref: i, geometry: Ft, material: g.ring, visible: !1 }),
226
+ /* @__PURE__ */ u("mesh", { ref: i, geometry: _t, material: g.ring, visible: !1 }),
227
227
  /* @__PURE__ */ u("sprite", { ref: h, material: g.halo }),
228
228
  /* @__PURE__ */ u("group", { ref: M, children: /* @__PURE__ */ u(
229
229
  be,
@@ -240,8 +240,8 @@ function _t({ agent: e, onSelect: r }) {
240
240
  ] })
241
241
  ] });
242
242
  }
243
- const _e = new o.Vector3(), qe = new o.Vector3(), Ne = new o.Vector3(), kt = new o.Vector3(0, 1, 0);
244
- function It({ comet: e }) {
243
+ const _e = new o.Vector3(), qe = new o.Vector3(), Ne = new o.Vector3(), It = new o.Vector3(0, 1, 0);
244
+ function Kt({ comet: e }) {
245
245
  const r = z(null), t = L.instances.get(e.from), n = t ? Ve[t.type] : Ve.planner, s = V(() => le(new o.Color(n).multiplyScalar(1.8).addScalar(0.3)), [n]), a = V(() => ({ a: new o.Vector3(), b: new o.Vector3(), c: new o.Vector3(), h: new o.Vector3() }), []);
246
246
  return re(() => {
247
247
  const i = ge(e.from), p = ge(e.to);
@@ -255,19 +255,19 @@ function It({ comet: e }) {
255
255
  ne(a.a, a.c, a.b, Me(M), a.h), r.current.visible = M < 1, r.current.position.copy(a.h), r.current.scale.setScalar(1.1);
256
256
  }), /* @__PURE__ */ u("sprite", { ref: r, material: s, visible: !1 });
257
257
  }
258
- function Kt() {
258
+ function Ut() {
259
259
  const [e, r] = $e([]), t = z({ n: -1, last: -1, first: -1 });
260
260
  return re(() => {
261
261
  const n = L.comets, s = t.current, a = n.length ? n[0].id : -1, i = n.length ? n[n.length - 1].id : -1;
262
262
  (n.length !== s.n || a !== s.first || i !== s.last) && (s.n = n.length, s.first = a, s.last = i, r(ht.grouped ? n.filter((p) => We(p.from) && We(p.to)) : n.slice()));
263
- }), /* @__PURE__ */ u(de, { children: e.map((n) => /* @__PURE__ */ u(It, { comet: n }, n.id)) });
263
+ }), /* @__PURE__ */ u(de, { children: e.map((n) => /* @__PURE__ */ u(Kt, { comet: n }, n.id)) });
264
264
  }
265
- const oe = 3.3, Ut = 200, ce = 14, Re = 48, me = 16, pe = 8, Te = 4, ve = new o.Color(1, 1, 1), Wt = new o.Color("#a78bfa");
266
- function jt(e, r = Ut) {
265
+ const oe = 3.3, Wt = 200, ce = 14, Re = 48, me = 16, pe = 8, Te = 4, ve = new o.Color(1, 1, 1), jt = new o.Color("#a78bfa");
266
+ function Ht(e, r = Wt) {
267
267
  const t = e.nodes.slice(0, r), n = new Set(t.map((s) => s.id));
268
268
  return { nodes: t, links: e.links.filter((s) => n.has(s.source) && n.has(s.target)) };
269
269
  }
270
- const Ht = (
270
+ const Lt = (
271
271
  /* glsl */
272
272
  `
273
273
  attribute float aSize; attribute vec3 aColor; varying vec3 vC; varying float vFacing; uniform float uScale;
@@ -276,20 +276,20 @@ void main(){
276
276
  vec3 n = normalize(normalMatrix * normalize(position));
277
277
  vFacing = 0.35 + 0.65 * smoothstep(-0.4, 0.5, dot(n, normalize(-mv.xyz))); // back side dimmer → depth
278
278
  gl_PointSize = aSize * uScale / -mv.z; vC = aColor; gl_Position = projectionMatrix * mv; }`
279
- ), Lt = (
279
+ ), qt = (
280
280
  /* glsl */
281
281
  `
282
282
  varying vec3 vC; varying float vFacing;
283
283
  void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
284
284
  float core = smoothstep(0.45, 0.0, r); float halo = pow(1.0 - r, 2.2);
285
285
  gl_FragColor = vec4(vC * vFacing * (core * 1.2 + halo * 0.45), 1.0); }`
286
- ), qt = (
286
+ ), Nt = (
287
287
  /* glsl */
288
288
  `
289
289
  varying vec3 vN; varying vec3 vV; varying vec3 vObj;
290
290
  void main(){ vec4 mv = modelViewMatrix * vec4(position, 1.0); vN = normalize(normalMatrix * normal); vV = normalize(-mv.xyz); vObj = normalize(position);
291
291
  gl_Position = projectionMatrix * mv; }`
292
- ), Nt = (
292
+ ), $t = (
293
293
  /* glsl */
294
294
  `
295
295
  uniform vec3 uRim; uniform vec3 uInner; uniform float uTime;
@@ -313,14 +313,14 @@ void main(){
313
313
  gl_FragColor = vec4(col, 1.0);
314
314
  }`
315
315
  );
316
- function $t({ galaxy: e }) {
317
- const r = V(() => jt(e), [e]), t = r.nodes.length, { size: n, gl: s, camera: a } = lt(), i = z([]), p = z([]), h = z(Array(Te).fill("")), m = V(() => {
316
+ function Xt({ galaxy: e }) {
317
+ const r = V(() => Ht(e), [e]), t = r.nodes.length, { size: n, gl: s, camera: a } = lt(), i = z([]), p = z([]), h = z(Array(Te).fill("")), m = V(() => {
318
318
  const c = new Float32Array(t * 3), A = [], y = Math.PI * (3 - Math.sqrt(5));
319
319
  for (let d = 0; d < t; d++) {
320
320
  const b = 1 - 2 * (d + 0.5) / t, O = Math.sqrt(1 - b * b), K = new o.Vector3(Math.cos(d * y) * O, b, Math.sin(d * y) * O);
321
321
  A.push(K), c.set([K.x * oe, K.y * oe, K.z * oe], d * 3);
322
322
  }
323
- const B = r.nodes.map((d) => new o.Color(gt[d.kind] ?? "#94a3b8").lerp(Wt, 0.2).multiplyScalar(0.62)), x = new Float32Array(t), _ = new Float32Array(t * 3), k = new o.BufferGeometry();
323
+ const B = r.nodes.map((d) => new o.Color(gt[d.kind] ?? "#94a3b8").lerp(jt, 0.2).multiplyScalar(0.62)), x = new Float32Array(t), _ = new Float32Array(t * 3), k = new o.BufferGeometry();
324
324
  k.setAttribute("position", new o.BufferAttribute(c, 3)), k.setAttribute("aSize", new o.BufferAttribute(x, 1)), k.setAttribute("aColor", new o.BufferAttribute(_, 3));
325
325
  const G = new Map(r.nodes.map((d, b) => [d.id, b])), f = [], T = [];
326
326
  for (const d of r.links) {
@@ -354,7 +354,7 @@ function $t({ galaxy: e }) {
354
354
  return X.setAttribute("position", new o.BufferAttribute(new Float32Array(Re * me * 2 * 3), 3)), X.setAttribute("color", new o.BufferAttribute(new Float32Array(Re * me * 2 * 3), 3)), X.boundingSphere = new o.Sphere(new o.Vector3(), 1e4), { pos: c, unit: A, base: B, ngeo: k, ageo: $, owner: P, kindOf: j, nArcV: f.length * ce * 2, bgeo: X, fire: new Float32Array(t), white: new Float32Array(t), fireC: Array.from({ length: t }, () => new o.Color()) };
355
355
  }, [r, t]), M = V(
356
356
  () => ({
357
- nodes: new o.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader: Ht, fragmentShader: Lt, transparent: !0, depthWrite: !1, blending: o.AdditiveBlending }),
357
+ nodes: new o.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader: Lt, fragmentShader: qt, transparent: !0, depthWrite: !1, blending: o.AdditiveBlending }),
358
358
  arcs: new o.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: o.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
359
359
  beam: new o.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: o.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
360
360
  orb: new o.ShaderMaterial({
@@ -365,8 +365,8 @@ function $t({ galaxy: e }) {
365
365
  uRipC: { value: Array.from({ length: pe }, () => new o.Vector3(0, 1, 0)) },
366
366
  uRipA: { value: new Array(pe).fill(-1) }
367
367
  },
368
- vertexShader: qt,
369
- fragmentShader: Nt,
368
+ vertexShader: Nt,
369
+ fragmentShader: $t,
370
370
  transparent: !0,
371
371
  depthWrite: !1,
372
372
  blending: o.AdditiveBlending
@@ -454,7 +454,7 @@ function $t({ galaxy: e }) {
454
454
  /* @__PURE__ */ u(yt, { position: [0, -oe - 0.9, 0], color: "#a78bfa", size: 0.28, opacity: 0.7, pxRange: [8, 12] })
455
455
  ] });
456
456
  }
457
- function Xt({ run: e }) {
457
+ function Dt({ run: e }) {
458
458
  const r = V(() => new o.Color(e.color), [e.color]), t = V(() => le("#000"), []), n = z(null), s = z(null);
459
459
  return re(({ clock: a }) => {
460
460
  var C;
@@ -464,17 +464,17 @@ function Xt({ run: e }) {
464
464
  n.current && (n.current.position.set(e.origin.x, e.origin.y, -1.5), n.current.scale.set(S * 2.6 + 3, F * 2.6 + 3, 1)), (C = s.current) == null || C.position.set(e.origin.x, e.origin.y + F + 0.6, 0.5);
465
465
  }), /* @__PURE__ */ Y(de, { children: [
466
466
  /* @__PURE__ */ u("sprite", { ref: n, material: t }),
467
- /* @__PURE__ */ u("group", { ref: s, children: e.run && /* @__PURE__ */ u(Dt, { run: e.run }) })
467
+ /* @__PURE__ */ u("group", { ref: s, children: e.run && /* @__PURE__ */ u(Yt, { run: e.run }) })
468
468
  ] });
469
469
  }
470
- function Dt({ run: e }) {
470
+ function Yt({ run: e }) {
471
471
  St();
472
- const r = e.status !== "started";
472
+ const r = e.status !== "started" || Ct(e);
473
473
  return /* @__PURE__ */ u(
474
474
  be,
475
475
  {
476
476
  text: e.topic,
477
- secondary: Ct(e, { base: "#94a3b8", current: "#fde68a", done: "#cbd5e1" }, ["running…", "run complete"]),
477
+ secondary: At(e, { base: "#94a3b8", current: "#fde68a", done: "#cbd5e1" }, ["running…", "run complete"]),
478
478
  color: e.color,
479
479
  size: 0.34,
480
480
  maxWidth: 10,
@@ -485,8 +485,8 @@ function Dt({ run: e }) {
485
485
  }
486
486
  );
487
487
  }
488
- const Yt = new o.Color("#fbbf24"), Zt = new o.Color("#ff2d3d"), Je = new o.Color(1, 1, 1), et = new o.OctahedronGeometry(0.8, 0), Qt = new o.EdgesGeometry(et);
489
- function Jt(e) {
488
+ const Zt = new o.Color("#fbbf24"), Qt = new o.Color("#ff2d3d"), Je = new o.Color(1, 1, 1), et = new o.OctahedronGeometry(0.8, 0), Jt = new o.EdgesGeometry(et);
489
+ function eo(e) {
490
490
  const r = (t, n, s) => ({ geo: t, edges: new o.EdgesGeometry(t, 25), pos: n, rot: s });
491
491
  switch (e) {
492
492
  case "db":
@@ -509,8 +509,8 @@ function Jt(e) {
509
509
  return [r(new o.CapsuleGeometry(0.2, 0.75, 6, 16), void 0, [0, 0, Math.PI / 2])];
510
510
  }
511
511
  }
512
- function eo({ mcp: e, backend: r }) {
513
- const t = e.srv, n = r.res, s = V(() => Jt(n.kind), [n.kind]), a = V(() => new o.Color(t.color).lerp(Je, 0.35), [t.color]), i = V(
512
+ function to({ mcp: e, backend: r }) {
513
+ const t = e.srv, n = r.res, s = V(() => eo(n.kind), [n.kind]), a = V(() => new o.Color(t.color).lerp(Je, 0.35), [t.color]), i = V(
514
514
  () => ({ edge: Qe(t.color, 0.035, 1), arrow: se(a), fill: se(a), line: new o.LineBasicMaterial({ color: a, transparent: !0, blending: o.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), halo: le(a) }),
515
515
  [t.color, a]
516
516
  ), p = z(null), h = z(null), m = z(null), M = z(null), S = V(() => new o.Color(t.color), [t.color]), F = z(null), C = z("");
@@ -550,7 +550,7 @@ function eo({ mcp: e, backend: r }) {
550
550
  ] })
551
551
  ] });
552
552
  }
553
- function to({ mcp: e }) {
553
+ function oo({ mcp: e }) {
554
554
  const r = e.srv, t = V(() => new o.Color(r.color), [r.color]), n = V(
555
555
  () => ({ fill: se(t), line: new o.LineBasicMaterial({ color: t, transparent: !0, blending: o.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), halo: le(t), core: se("#fff") }),
556
556
  [t]
@@ -564,13 +564,13 @@ function to({ mcp: e }) {
564
564
  /* @__PURE__ */ u("sprite", { ref: i, material: n.halo }),
565
565
  /* @__PURE__ */ Y("group", { ref: a, children: [
566
566
  /* @__PURE__ */ u("mesh", { geometry: et, material: n.fill }),
567
- /* @__PURE__ */ u("lineSegments", { geometry: Qt, material: n.line }),
567
+ /* @__PURE__ */ u("lineSegments", { geometry: Jt, material: n.line }),
568
568
  /* @__PURE__ */ u("mesh", { geometry: Ge, material: n.core, scale: 0.18 })
569
569
  ] }),
570
570
  /* @__PURE__ */ u(be, { position: [0, 1.35, 0], text: `MCP · ${r.name}`, color: r.color, size: 0.28, pxRange: [9, 13] })
571
571
  ] });
572
572
  }
573
- function oo({ call: e }) {
573
+ function no({ call: e }) {
574
574
  const r = L.mcpServers.get(e.server), t = V(() => new o.Color((r == null ? void 0 : r.color) ?? "#fff"), [r]), n = V(() => le(t.clone().multiplyScalar(1.8).addScalar(0.3)), [t]), s = z(null), a = V(() => ({ a: new o.Vector3(), b: new o.Vector3(), c: new o.Vector3(), h: new o.Vector3() }), []);
575
575
  return re(() => {
576
576
  const i = ge(e.instance), p = Ye(e.server);
@@ -585,7 +585,7 @@ function oo({ call: e }) {
585
585
  }), /* @__PURE__ */ u("sprite", { ref: s, material: n, visible: !1 });
586
586
  }
587
587
  const Pe = 24, he = 40, we = 3;
588
- function no() {
588
+ function ro() {
589
589
  const e = V(() => {
590
590
  const s = new o.BufferGeometry();
591
591
  return s.setAttribute("position", new o.BufferAttribute(new Float32Array(Pe * we * he * 2 * 3), 3)), s.setAttribute("color", new o.BufferAttribute(new Float32Array(Pe * we * he * 2 * 3), 3)), s.boundingSphere = new o.Sphere(new o.Vector3(), 1e4), s;
@@ -601,7 +601,7 @@ function no() {
601
601
  const { a: B, b: x, c: _, p: k, col: G, k: f } = n;
602
602
  B.copy(c), x.copy(y), Oe(B, x, 1, _), G.set(A.color);
603
603
  let T;
604
- C === 0 ? (G.lerp(Yt, ee(g / 1.2)), g > 1.2 && G.lerp(Zt, ee((g - 1.2) / 1)), T = (0.22 + Math.min(0.6, g * 0.25)) * ke(g / 0.3)) : (f.copy(G).lerp(Je, 0.35), T = 1.3 * (g < 0.75 ? 1 : 1 - (g - 0.75) / 0.25));
604
+ C === 0 ? (G.lerp(Zt, ee(g / 1.2)), g > 1.2 && G.lerp(Qt, ee((g - 1.2) / 1)), T = (0.22 + Math.min(0.6, g * 0.25)) * ke(g / 0.3)) : (f.copy(G).lerp(Je, 0.35), T = 1.3 * (g < 0.75 ? 1 : 1 - (g - 0.75) / 0.25));
605
605
  const W = 1 - Me(g / 0.75), I = C === 0 ? 0.025 : 0.07;
606
606
  for (let P = 0; P < we; P++) {
607
607
  const j = (P - 1) * I;
@@ -623,7 +623,7 @@ function no() {
623
623
  }
624
624
  C === 0 ? t.add(B, _, x, 0.92, 1, 0.48, G, 0.4 + T * 1.4) : t.add(B, _, x, 0.08, -1, 0.66, f, T * 1.6), m++;
625
625
  };
626
- for (const S of L.mcpPending.values()) M(S.instance, S.server, 0, At(S, a));
626
+ for (const S of L.mcpPending.values()) M(S.instance, S.server, 0, xt(S, a));
627
627
  for (const S of L.mcpCalls) S.phase === "result" && M(S.instance, S.server, 1, ee((a - S.start) / S.dur));
628
628
  e.setDrawRange(0, m * we * he * 2), p.needsUpdate = !0, h.needsUpdate = !0, t.end();
629
629
  }), /* @__PURE__ */ Y(de, { children: [
@@ -631,19 +631,19 @@ function no() {
631
631
  /* @__PURE__ */ u("primitive", { object: t.mesh })
632
632
  ] });
633
633
  }
634
- function ro() {
634
+ function ao() {
635
635
  const [e, r] = $e([]), t = z({ n: -1, first: -1, last: -1 });
636
636
  return re(() => {
637
637
  const n = t.current, s = L.mcpCalls, a = s.length ? s[0].id : -1, i = s.length ? s[s.length - 1].id : -1;
638
638
  (s.length !== n.n || a !== n.first || i !== n.last) && (n.n = s.length, n.first = a, n.last = i, r(s.slice()));
639
639
  }), /* @__PURE__ */ Y(de, { children: [
640
- e.map((n) => /* @__PURE__ */ u(oo, { call: n }, n.id)),
641
- /* @__PURE__ */ u(no, {})
640
+ e.map((n) => /* @__PURE__ */ u(no, { call: n }, n.id)),
641
+ /* @__PURE__ */ u(ro, {})
642
642
  ] });
643
643
  }
644
- function fo() {
644
+ function mo() {
645
645
  return /* @__PURE__ */ Y(
646
- xt,
646
+ Rt,
647
647
  {
648
648
  title: "neural · living brain",
649
649
  subtitle: "Agents are neurons (spiky = thinking, smooth = waiting, amber ring = waiting on MCP) · ⬢ MCP servers wire to their backends · graph memory lights up on reads/writes",
@@ -655,23 +655,23 @@ function fo() {
655
655
  agentRadius: 1.25,
656
656
  graph: { natural: oe * 1.08, radius: 2.1 },
657
657
  Background: /* @__PURE__ */ u(at, { radius: 80, depth: 40, count: fe ? 1200 : 3500, factor: 2.6, saturation: 0.6, fade: !0, speed: 0.4 }),
658
- Agent: _t,
659
- RunMarker: Xt,
660
- McpServer: to,
661
- Backend: eo,
662
- GraphResource: $t,
658
+ Agent: kt,
659
+ RunMarker: Dt,
660
+ McpServer: oo,
661
+ Backend: to,
662
+ GraphResource: Xt,
663
663
  cluster: { radius: 1.45, variant: "orb" },
664
664
  PostFX: /* @__PURE__ */ Y(st, { multisampling: 0, children: [
665
665
  /* @__PURE__ */ u(it, { mipmapBlur: !0, intensity: 1.1, luminanceThreshold: 0.2, luminanceSmoothing: 0.3, radius: 0.75 }),
666
666
  /* @__PURE__ */ u(ct, { eskil: !1, offset: 0.22, darkness: 0.9 })
667
667
  ] }),
668
668
  children: [
669
- /* @__PURE__ */ u(Kt, {}),
670
- /* @__PURE__ */ u(ro, {})
669
+ /* @__PURE__ */ u(Ut, {}),
670
+ /* @__PURE__ */ u(ao, {})
671
671
  ]
672
672
  }
673
673
  );
674
674
  }
675
675
  export {
676
- fo as default
676
+ mo as default
677
677
  };
@@ -23,11 +23,11 @@ const L = ["neural", "constellation", "orbit", "atom", "flow"], T = {
23
23
  constellation: { name: "Constellation", tagline: "A night sky: agents are stars linked into constellations as they delegate." },
24
24
  atom: { name: "Atom", tagline: "An atom: agents are electrons in shells, subagents jump orbits, LLM calls flash photons." }
25
25
  }, M = {
26
- orbit: () => import("./index-BxCQhz1w.js"),
27
- neural: () => import("./index-tr3L_z5e.js"),
28
- flow: () => import("./index-Ddw88ax_.js"),
29
- constellation: () => import("./index-oEkhKSlb.js"),
30
- atom: () => import("./index-BDKoRpg-.js")
26
+ orbit: () => import("./index-D-egBmZU.js"),
27
+ neural: () => import("./index-DZvO9oiI.js"),
28
+ flow: () => import("./index-B2VQ34Za.js"),
29
+ constellation: () => import("./index-CpXj5lT0.js"),
30
+ atom: () => import("./index-CHJsMIrM.js")
31
31
  }, g = /* @__PURE__ */ new Map();
32
32
  function x(e) {
33
33
  let n = g.get(e);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "./style.css";
3
- import { A as E, T as s, a as T } from "./chunks/index-D_pLQJb9.js";
3
+ import { A as E, T as s, a as T } from "./chunks/index-OgLlwjoE.js";
4
4
  export {
5
5
  E as AgentScene,
6
6
  s as THEMES,
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .scene-root{position:fixed;top:0;right:0;bottom:0;left:0;background:#03050b;color:#e8edf5;font-family:Public Sans,system-ui,sans-serif;overflow:hidden}.scene-root canvas{display:block}.hud{position:absolute;z-index:10;background:#0a0e1a8c;border:1px solid rgba(148,163,255,.16);border-radius:14px;backdrop-filter:blur(14px) saturate(1.3);-webkit-backdrop-filter:blur(14px) saturate(1.3);box-shadow:0 8px 32px #00000059,inset 0 1px #ffffff0a}.hud-topwrap{position:absolute;z-index:10;top:12px;left:12px;max-width:calc(100% - var(--hud-side, 320px) - 36px);display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;pointer-events:none}.hud-topwrap.is-rail{--hud-side: 40px}.hud-topwrap>*{pointer-events:auto}.hud-top{position:relative;padding:6px 8px 6px 12px;min-width:0}.hud-bar{display:flex;align-items:center;gap:4px 8px;flex-wrap:wrap}.hud-bar .hud-run{margin-top:0}.hud-info{all:unset;cursor:pointer;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font:italic 600 11px/1 Georgia,serif;color:#94a3b8;border:1px solid rgba(148,163,184,.35)}.hud-info:hover,.hud-info.on{color:#e2e8f0;border-color:#818cf8}.hud-theme{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#03050b8c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 9px center;color:#cbd5e1;border:1px solid rgba(148,163,255,.22);border-radius:999px;font:inherit;font-size:11px;text-transform:uppercase;letter-spacing:.08em;padding:4px 24px 4px 10px;cursor:pointer;outline:none}.hud-theme:hover{border-color:#818cf8}.hud-title{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;letter-spacing:-.01em;white-space:nowrap}.hud-sub{margin:6px 0 2px;max-width:460px;font-size:12px;line-height:1.45;color:#94a3b8}.hud-dot{width:9px;height:9px;border-radius:50%;background:#22c55e;box-shadow:0 0 10px #22c55e;animation:hud-ping 1.6s ease-out infinite}@keyframes hud-ping{0%{box-shadow:0 0 #22c55eb3}to{box-shadow:0 0 0 10px #22c55e00}}.hud-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;padding:2px 7px;border-radius:999px;background:#94a3b829;color:#cbd5e1}.hud-stats{display:flex;flex-wrap:wrap;align-items:center;gap:4px}.hud-stat{font-size:11px;color:#94a3b8;padding:2px 8px;border-radius:999px;background:#03050b66;white-space:nowrap}.hud-stat b{color:#f1f5f9;font-weight:700;font-variant-numeric:tabular-nums}.hud-dec{--dc: 94, 234, 212;animation:hud-dec-pulse .7s ease-out}.hud-dec.is-deny{--dc: 251, 59, 92}@keyframes hud-dec-pulse{0%{background:rgba(var(--dc),.5);box-shadow:0 0 rgba(var(--dc),.7);color:#fff}35%{background:rgba(var(--dc),.28);box-shadow:0 0 0 5px rgba(var(--dc),0)}to{background:#03050b66;box-shadow:0 0 rgba(var(--dc),0)}}@media(prefers-reduced-motion:reduce){.hud-dec{animation:none}}.hud-dec-hv{display:inline-flex;align-items:center;gap:4px;color:#a7f3d0;background:#5eead41a}.hud-dec-hv.is-deny{color:#fecdd3;background:#fb3b5c24}.hud-spark{color:#5eead4;margin-left:2px}.hud-dec-hv.is-deny .hud-spark{color:#fb7185}.hud-halt{color:#fecdd3;background:#fb3b5c38;box-shadow:inset 0 0 0 1px #fb3b5c8c;animation:hud-halt 1.6s ease-in-out infinite}.hud-halt b{color:#fb3b5c;letter-spacing:.04em}@keyframes hud-halt{50%{background:#fb3b5c57}}@media(prefers-reduced-motion:reduce){.hud-halt{animation:none}}.scene-root :focus-visible{outline:2px solid #818cf8;outline-offset:2px}.hud-side{top:12px;right:12px;bottom:12px;width:320px;display:flex;flex-direction:column;padding:8px 10px 10px;font-size:13px;box-sizing:border-box;animation:hs-in .18s ease-out}.hud-side.is-rail{width:40px;padding:6px 0;align-items:center}@keyframes hs-in{0%{opacity:.4}}.hs-head{display:flex;align-items:center;gap:2px;padding-bottom:8px;margin:0 -2px 2px;border-bottom:1px solid rgba(148,163,255,.12)}.hs-head button{all:unset;cursor:pointer;display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;padding:5px 9px;border-radius:999px}.hs-head button:hover{color:#e2e8f0}.hs-head button.on{color:#f1f5f9;background:#818cf838}.hs-head em,.hs-icon em{font-style:normal;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums;color:#c7d2fe;letter-spacing:0}.hs-head .hs-collapse{margin-left:auto;font-size:14px;padding:2px 8px;letter-spacing:0}.hs-rail{display:flex;flex-direction:column;align-items:center;gap:6px}.hs-rail button{all:unset;cursor:pointer;position:relative;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:#94a3b8}.hs-rail button:hover{color:#e2e8f0;background:#94a3ff1a}.hs-rail .hs-collapse{font-size:14px;margin-bottom:4px}.hs-icon em{position:absolute;top:-3px;right:-5px;min-width:14px;height:14px;padding:0 3px;box-sizing:border-box;border-radius:999px;display:grid;place-items:center;font-size:9px;background:#4f46e5;color:#eef2ff}.hs-icon em:empty{min-width:8px;width:8px;height:8px;padding:0;top:1px;right:1px;background:#22d3ee;box-shadow:0 0 8px #22d3ee}.hs-body{flex:1;min-height:0;display:flex;flex-direction:column}.hs-body[hidden]{display:none}.hs-empty{margin:14px 4px;font-size:12px;line-height:1.5;color:#64748b}.hs-events{list-style:none;margin:6px -4px 0;padding:0;overflow-y:auto;min-height:0;flex:1;font-size:11.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.hs-events li>*{all:unset;box-sizing:border-box;width:100%;display:flex;gap:8px;align-items:baseline;padding:4px 6px;border-radius:7px;color:#cbd5e1;line-height:1.4}.hs-events li>button{cursor:pointer}.hs-events li>button:hover{background:#94a3ff1a;color:#f1f5f9}.hs-events i{flex:0 0 7px;height:7px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c);transform:translateY(-1px)}.hs-events span{min-width:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.ap-head{display:flex;align-items:center;gap:8px;margin-top:6px}.ap-count{flex:none;color:#64748b;font-size:11px;font-variant-numeric:tabular-nums}.ap-link{all:unset;cursor:pointer;font-size:12px;color:#93c5fd}.ap-link:hover{color:#bfdbfe}.ap-searchrow{display:flex;align-items:center;gap:8px;margin-top:8px}.ap-search{flex:1;min-width:0;width:100%;box-sizing:border-box;background:#03050b99;border:1px solid rgba(148,163,255,.2);border-radius:8px;color:inherit;font:inherit;font-size:12px;padding:6px 9px;outline:none}.ap-search:focus{border-color:#818cf8}.ap-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}.ap-chips button{all:unset;cursor:pointer;display:flex;align-items:center;gap:5px;font-size:11px;padding:3px 7px;border-radius:999px;border:1px solid rgba(148,163,255,.15);color:#cbd5e1}.ap-chips button.on{border-color:var(--c);background:color-mix(in srgb,var(--c) 18%,transparent);color:#f8fafc}.ap-chips i{width:8px;height:8px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c)}.ap-chips em{font-style:normal;color:var(--c);font-weight:700;font-variant-numeric:tabular-nums}.ap-row-filters{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;align-items:center}.ap-seg{display:flex;border:1px solid rgba(148,163,255,.15);border-radius:8px;overflow:hidden}.ap-seg{flex:none}.ap-seg button{all:unset;cursor:pointer;font-size:11px;padding:3px 6px;color:#94a3b8;text-transform:capitalize}.ap-seg button.on{background:#818cf840;color:#f1f5f9}.ap-row-filters select{flex:1;min-width:64px;background:#03050b99;color:#cbd5e1;border:1px solid rgba(148,163,255,.15);border-radius:8px;font:inherit;font-size:11px;padding:3px 6px}.ap-list{list-style:none;margin:8px -4px 0;padding:0;overflow-y:auto;min-height:0;flex:1}.ap-list li button{all:unset;box-sizing:border-box;width:100%;cursor:pointer;display:flex;align-items:center;gap:8px;padding:6px;border-radius:8px}.ap-list li button:hover{background:#94a3ff1a}.ap-list li button.is-done{opacity:.55}.ap-list i{flex:0 0 9px;height:9px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c)}.ap-list i[data-status=thinking]{animation:ap-pulse .9s ease-in-out infinite}.ap-list i[data-status=waiting]{opacity:.5}.ap-list i[data-status=done]{background:transparent;border:1.5px solid var(--c);box-shadow:none}@keyframes ap-pulse{50%{transform:scale(1.5)}}.ap-name{flex:1;min-width:0;display:flex;flex-direction:column;font-size:12px;color:#e2e8f0}.ap-name small{color:#64748b;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-meta{text-align:right;font-size:11px;color:#94a3b8;font-variant-numeric:tabular-nums;display:flex;flex-direction:column}.ap-meta b{color:var(--c);font-weight:600;text-transform:lowercase}.hs-events li.is-skill>*{background:#f5b83d12}.hs-skill{flex:0 0 auto;font-size:9.5px;font-weight:600;line-height:1.5;text-transform:uppercase;letter-spacing:.06em;color:#fcd581;padding:0 6px;border-radius:999px;border:1px solid rgba(245,184,61,.55);background:#f5b83d1f}.ap-title{display:flex;align-items:center;gap:6px;min-width:0}.ap-skill{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-size:9.5px;font-weight:600;color:#fcd581;padding:0 6px;border-radius:999px;border:1px solid rgba(245,184,61,.55);background:#f5b83d1f}.ap-skill:before{content:"skill:";color:#b8893a;font-weight:500}.hs-skill:before{content:"";display:inline-block;width:6px;height:6px;margin:0 4px 0 -1px;border:1px solid currentColor;border-radius:50%;vertical-align:0;box-shadow:0 0 4px #f5b83d99}.hs-events li.is-dec>*{background:#5eead40d}.hs-events li.is-deny>*{background:#fb3b5c1f}.hs-dec{flex:0 0 auto;font-size:9.5px;font-weight:600;line-height:1.5;text-transform:uppercase;letter-spacing:.06em;color:var(--c);padding:0 6px;border-radius:3px;border:1px solid var(--c);background:#ffffff0a}.ap-decisions{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px}.ap-decisions li{display:flex;gap:6px;align-items:baseline;font-size:11px;color:#e2e8f0;padding:2px 6px;border-left:2px solid var(--c);background:#ffffff08}.ap-decisions li.is-deny{background:#fb3b5c1f}.ap-decisions li.is-strike span{text-decoration:line-through;color:#94a3b8}.ap-hv{font-size:11.5px;color:#e2e8f0;margin:0 0 4px;font-variant-numeric:tabular-nums}.ap-hv-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;gap:1px;background:#ffffff0d}.ap-hv-bar span{flex-basis:0;min-width:2px}.ap-decisions b{flex:0 0 auto;font-size:9.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--c)}.ap-decisions span{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-decisions em{flex:0 0 auto;font-style:normal;font-size:10px;color:#94a3b8;font-variant-numeric:tabular-nums}.ap-skills{display:flex;flex-wrap:wrap;gap:4px}.ap-skills span{font-size:11px;color:#e2e8f0;padding:2px 8px;border-radius:999px;border:1px solid rgba(245,184,61,.35);background:#f5b83d0f;display:inline-flex;gap:5px;align-items:baseline}.ap-skills span.on{border-color:#f5b83d;background:#f5b83d2e;color:#fde7b0;box-shadow:0 0 10px #f5b83d40}.ap-skills em{font-style:normal;font-size:10px;color:#b8893a;font-variant-numeric:tabular-nums}.ap-more{padding:6px;color:#64748b;font-size:11px}.ap-detail{overflow-y:auto;min-height:0;margin-top:8px;flex:1}.ap-detail h3{margin:0;display:flex;align-items:center;gap:8px;font-size:15px;color:var(--c)}.ap-detail h3 i{width:11px;height:11px;border-radius:50%;background:var(--c);box-shadow:0 0 10px var(--c)}.ap-detail h3 small{color:#64748b;font-size:11px;font-weight:500}.ap-status{margin-top:3px;font-size:12px;color:#cbd5e1}.ap-status[data-status=thinking]{color:#fde68a}.ap-status[data-status=waiting]{color:#fcd34d}.ap-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(46px,1fr));gap:4px;margin:10px 0 4px}.ap-stats div{background:#03050b73;border-radius:8px;padding:6px;text-align:center}.ap-stats dt{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#64748b}.ap-stats dd{margin:2px 0 0;font-size:15px;font-weight:700;color:#f1f5f9;font-variant-numeric:tabular-nums}.ap-detail section{margin-top:10px}.ap-detail h4{margin:0 0 4px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#64748b}.ap-detail p{margin:0;font-size:12px;color:#cbd5e1}.ap-steps{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.ap-steps span{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;text-transform:uppercase;letter-spacing:.06em;padding:2px 7px;border-radius:999px;border:1px solid #334155;color:#64748b}.ap-steps span[data-status=running]{border-color:#fbbf24;color:#fde68a}.ap-steps span[data-status=waiting]{border-color:#f59e0b;color:#fcd34d;background:#f59e0b24;animation:ap-wait-pulse 1.8s ease-in-out infinite}.ap-steps span[data-status=done]{border-color:#22c55e;color:#86efac}.ap-steps span[data-status=failed]{border-color:#ef4444;color:#fca5a5}.ap-chip-link{all:unset;cursor:pointer;display:block;font-size:12px;color:#e2e8f0;padding:3px 6px;border-left:2px solid var(--c);margin:2px 0;border-radius:0 6px 6px 0}.ap-chip-link:hover{background:#94a3ff1a}.ap-wait{color:#fbbf24!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.ap-nodes{line-height:1.5}.ap-chat{margin:0;padding:0;list-style:none;display:grid;gap:6px;font-size:12px;color:#e2e8f0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow-y:auto}.ap-chat li[data-role=user]{color:#c7d2fe}.ap-chat li[data-role=agent]{padding-bottom:6px;border-bottom:1px solid rgba(148,163,255,.12)}.ap-chat b{font-weight:650}.ap-events{margin:0;padding-left:14px;display:grid;gap:3px;font-size:11px;color:#cbd5e1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.hud-badge--live{background:#22c55e2e;color:#86efac}.hud-badge--denied{background:#f871712e;color:#fca5a5;text-transform:none;letter-spacing:.02em}.hud-chip{text-transform:none;letter-spacing:.02em;font-weight:500;background:#818cf829;color:#c7d2fe;white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis}.hud-chip b{font-weight:650;color:#e0e7ff}.hud-run{display:flex;gap:6px;margin-top:8px;align-items:center;flex-wrap:wrap}.hud-run input{flex:1;min-width:160px;background:#03050b99;border:1px solid rgba(148,163,255,.2);border-radius:999px;color:inherit;font:inherit;font-size:12px;padding:6px 11px;outline:none}.hud-run button{border:0;border-radius:999px;padding:6px 13px;font:inherit;font-size:12px;font-weight:600;background:linear-gradient(135deg,#818cf8,#22d3ee);color:#03050b;cursor:pointer}.hud-run button:disabled{opacity:.5}.hud-run select{max-width:160px;min-width:0;background:#03050b99;color:#cbd5e1;border:1px solid rgba(148,163,255,.2);border-radius:999px;font:inherit;font-size:12px;padding:5px 9px;cursor:pointer}.hud-run span{font-size:11px;color:#86efac}.agentglow-embed{position:relative;overflow:hidden;width:100%;height:100%;min-height:320px;isolation:isolate}.agentglow-embed .scene-root{position:absolute;top:0;right:0;bottom:0;left:0}.lod-cluster-label{all:unset;box-sizing:border-box;display:grid;gap:1px;text-align:center;cursor:pointer;pointer-events:auto;font-size:12px;font-weight:600;color:#f8fafc;padding:4px 11px 5px;border-radius:12px;white-space:nowrap;background:#03050b9e;border:1px solid color-mix(in srgb,var(--c, #818cf8) 60%,transparent);text-shadow:0 0 10px var(--c, #818cf8);box-shadow:0 0 18px color-mix(in srgb,var(--c, #818cf8) 22%,transparent);transition:border-color .2s,background .2s}.lod-cluster-label:hover{background:color-mix(in srgb,var(--c, #818cf8) 22%,rgba(3,5,11,.7));border-color:var(--c, #818cf8)}.lod-cluster-label b{font-weight:700;letter-spacing:-.01em}.lod-cluster-label small{font-size:10px;font-weight:500;color:#94a3b8;text-shadow:none;font-variant-numeric:tabular-nums}.hud-dock{display:flex;align-items:center;gap:8px}.hud-dock:empty{display:none}.hud-dock>.hud{position:static}.hud-lod{padding:6px 8px 6px 12px;display:flex;align-items:center;gap:8px;font-size:12px;color:#cbd5e1;white-space:nowrap}.hud-lod span b{margin:0 1px}.hud-lod b{color:#f1f5f9;font-variant-numeric:tabular-nums}.hud-lod i{width:7px;height:7px;border-radius:50%;background:#a5b4fc;box-shadow:0 0 8px #a5b4fc}.hud-lod button{all:unset;cursor:pointer;font-size:11px;padding:3px 9px;border-radius:999px;border:1px solid rgba(148,163,255,.25);color:#c7d2fe}.hud-lod button:hover{background:#818cf833;color:#f8fafc}.scene-root{container:agscene / size}@container agscene (max-width: 719px){.scene-root .hud-top{padding:5px 7px 5px 10px}.scene-root .hud-title{font-size:13px}.scene-root .hud-theme{padding:3px 20px 3px 8px;font-size:10px;background-position:right 7px center}.scene-root .hud-stat:nth-child(n+3){display:none}.scene-root .hud-side:not(.is-rail){width:min(290px,calc(100% - 64px));padding:6px 8px 8px}.scene-root .hs-head button{padding:4px 6px;letter-spacing:.04em;font-size:10.5px}.scene-root .hs-head .hs-collapse{padding:2px 4px}.scene-root .ap-list li button{padding:4px 6px}.scene-root .hud-topwrap:not(.is-rail){--hud-side: min(290px, calc(100% - 64px) )}}@container agscene (max-height: 520px){.scene-root .hud-sub{max-height:4.5em;overflow:auto}}@keyframes ap-wait-pulse{50%{box-shadow:0 0 10px #f59e0b8c;border-color:#fbbf24}}@media(prefers-reduced-motion:reduce){.ap-steps span[data-status=waiting]{animation:none}}.hud-approve{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:8px}.hud-approve button{border:1px solid transparent;border-radius:999px;padding:5px 13px;font:inherit;font-size:12px;font-weight:650;cursor:pointer}.hud-approve .ha-yes{background:linear-gradient(135deg,#34d399,#22d3ee);color:#03050b}.hud-approve .ha-no{background:#fb3b5c24;border-color:#fb718599;color:#fecdd3}.hud-approve .ha-yes:hover{filter:brightness(1.1)}.hud-approve .ha-no:hover{background:#fb3b5c47}.hud-approve span{font-size:11px;color:#94a3b8}.hud-approve[data-verdict=approved] span,.hud-approve[data-verdict=approving] span{color:#86efac}.hud-approve[data-verdict=rejected] span,.hud-approve[data-verdict=rejecting] span,.hud-approve[data-verdict=error] span{color:#fda4af}.hud-approve.is-compact{margin-top:0;flex:none;gap:4px}.hud-approve.is-compact button{padding:3px 9px;font-size:11px}.hud-approvals{left:12px;bottom:12px;z-index:9;width:max-content;max-width:min(460px,calc(100% - 356px));padding:8px 10px;font-size:12px;box-sizing:border-box;border-color:#f59e0b73;box-shadow:0 8px 32px #00000059,0 0 18px #f59e0b1f}.hud-approvals.is-rail{max-width:min(460px,calc(100% - 76px))}.hud-approvals h4{margin:0 0 6px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#fcd34d;display:flex;gap:6px;align-items:baseline}.hud-approvals h4 em{font-style:normal;font-variant-numeric:tabular-nums;color:#fde68a}.hud-approvals ul{list-style:none;margin:0;padding:0;display:grid;gap:4px}.hud-approvals li{display:flex;align-items:center;gap:8px;min-width:0}.hud-approvals .ha-who{all:unset;cursor:pointer;flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;padding:2px 4px;border-radius:6px}.hud-approvals .ha-who:hover{background:#94a3ff1a}.hud-approvals .ha-who i{flex:0 0 8px;height:8px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c);align-self:center}.hud-approvals .ha-who b{color:#e2e8f0;font-weight:650;white-space:nowrap}.hud-approvals .ha-who span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fbbf24;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.hud-approvals p{margin:6px 0 0;font-size:11px;color:#64748b}@container agscene (max-width: 719px){.scene-root .hud-approvals{max-width:calc(100% - 76px);padding:6px 8px}.scene-root .hud-approvals .ha-who span{display:none}}.flow-run{display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none}.flow-run .scene-label{font-size:11px;max-width:220px;overflow:hidden;text-overflow:ellipsis}.flow-steps{display:flex;gap:3px;font:600 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;text-transform:uppercase;letter-spacing:.06em}.flow-steps span{padding:2px 5px;border-radius:999px;color:#64748b;background:#03050b8c;border:1px solid rgba(100,116,139,.35)}.flow-steps span[data-s=running]{color:#03050b;background:var(--c);border-color:var(--c);box-shadow:0 0 12px var(--c)}.flow-steps span[data-s=done]{color:var(--c);border-color:color-mix(in srgb,var(--c) 60%,transparent)}.flow-steps span[data-s=failed]{color:#fecaca;background:#7f1d1d}.flow-step{font:600 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;text-transform:uppercase;letter-spacing:.08em;color:color-mix(in srgb,var(--c) 70%,white);text-shadow:0 0 8px var(--c);opacity:.55;pointer-events:none;white-space:nowrap;transition:opacity .3s}.flow-step[data-s=running]{opacity:1}.flow-hint{font-size:10px;padding:1px 7px;opacity:.9}.flow-label-core{font-size:11px;letter-spacing:.04em}
1
+ .scene-root{position:fixed;top:0;right:0;bottom:0;left:0;background:#03050b;color:#e8edf5;font-family:Public Sans,system-ui,sans-serif;overflow:hidden}.scene-root canvas{display:block}.hud{position:absolute;z-index:10;background:#0a0e1a8c;border:1px solid rgba(148,163,255,.16);border-radius:14px;backdrop-filter:blur(14px) saturate(1.3);-webkit-backdrop-filter:blur(14px) saturate(1.3);box-shadow:0 8px 32px #00000059,inset 0 1px #ffffff0a}.hud-topwrap{position:absolute;z-index:10;top:12px;left:12px;max-width:calc(100% - var(--hud-side, 320px) - 36px);display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;pointer-events:none}.hud-topwrap.is-rail{--hud-side: 40px}.hud-topwrap>*{pointer-events:auto}.hud-top{position:relative;padding:6px 8px 6px 12px;min-width:0}.hud-bar{display:flex;align-items:center;gap:4px 8px;flex-wrap:wrap}.hud-bar .hud-run{margin-top:0}.hud-info{all:unset;cursor:pointer;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font:italic 600 11px/1 Georgia,serif;color:#94a3b8;border:1px solid rgba(148,163,184,.35)}.hud-info:hover,.hud-info.on{color:#e2e8f0;border-color:#818cf8}.hud-theme{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#03050b8c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 9px center;color:#cbd5e1;border:1px solid rgba(148,163,255,.22);border-radius:999px;font:inherit;font-size:11px;text-transform:uppercase;letter-spacing:.08em;padding:4px 24px 4px 10px;cursor:pointer;outline:none}.hud-theme:hover{border-color:#818cf8}.hud-title{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;letter-spacing:-.01em;white-space:nowrap}.hud-sub{margin:6px 0 2px;max-width:460px;font-size:12px;line-height:1.45;color:#94a3b8}.hud-dot{width:9px;height:9px;border-radius:50%;background:#22c55e;box-shadow:0 0 10px #22c55e;animation:hud-ping 1.6s ease-out infinite}@keyframes hud-ping{0%{box-shadow:0 0 #22c55eb3}to{box-shadow:0 0 0 10px #22c55e00}}.hud-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;padding:2px 7px;border-radius:999px;background:#94a3b829;color:#cbd5e1}.hud-stats{display:flex;flex-wrap:wrap;align-items:center;gap:4px}.hud-stat{font-size:11px;color:#94a3b8;padding:2px 8px;border-radius:999px;background:#03050b66;white-space:nowrap}.hud-stat b{color:#f1f5f9;font-weight:700;font-variant-numeric:tabular-nums}.hud-dec{--dc: 94, 234, 212;animation:hud-dec-pulse .7s ease-out}.hud-dec.is-deny{--dc: 251, 59, 92}@keyframes hud-dec-pulse{0%{background:rgba(var(--dc),.5);box-shadow:0 0 rgba(var(--dc),.7);color:#fff}35%{background:rgba(var(--dc),.28);box-shadow:0 0 0 5px rgba(var(--dc),0)}to{background:#03050b66;box-shadow:0 0 rgba(var(--dc),0)}}@media(prefers-reduced-motion:reduce){.hud-dec{animation:none}}.hud-dec-hv{display:inline-flex;align-items:center;gap:4px;color:#a7f3d0;background:#5eead41a}.hud-dec-hv.is-deny{color:#fecdd3;background:#fb3b5c24}.hud-spark{color:#5eead4;margin-left:2px}.hud-dec-hv.is-deny .hud-spark{color:#fb7185}.hud-halt{color:#fecdd3;background:#fb3b5c38;box-shadow:inset 0 0 0 1px #fb3b5c8c;animation:hud-halt 1.6s ease-in-out infinite}.hud-halt b{color:#fb3b5c;letter-spacing:.04em}@keyframes hud-halt{50%{background:#fb3b5c57}}@media(prefers-reduced-motion:reduce){.hud-halt{animation:none}}.scene-root :focus-visible{outline:2px solid #818cf8;outline-offset:2px}.hud-side{top:12px;right:12px;bottom:12px;width:320px;display:flex;flex-direction:column;padding:8px 10px 10px;font-size:13px;box-sizing:border-box;animation:hs-in .18s ease-out}.hud-side.is-rail{width:40px;padding:6px 0;align-items:center}@keyframes hs-in{0%{opacity:.4}}.hs-head{display:flex;align-items:center;gap:2px;padding-bottom:8px;margin:0 -2px 2px;border-bottom:1px solid rgba(148,163,255,.12)}.hs-head button{all:unset;cursor:pointer;display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;padding:5px 9px;border-radius:999px}.hs-head button:hover{color:#e2e8f0}.hs-head button.on{color:#f1f5f9;background:#818cf838}.hs-head em,.hs-icon em{font-style:normal;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums;color:#c7d2fe;letter-spacing:0}.hs-head .hs-collapse{margin-left:auto;font-size:14px;padding:2px 8px;letter-spacing:0}.hs-rail{display:flex;flex-direction:column;align-items:center;gap:6px}.hs-rail button{all:unset;cursor:pointer;position:relative;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:#94a3b8}.hs-rail button:hover{color:#e2e8f0;background:#94a3ff1a}.hs-rail .hs-collapse{font-size:14px;margin-bottom:4px}.hs-icon em{position:absolute;top:-3px;right:-5px;min-width:14px;height:14px;padding:0 3px;box-sizing:border-box;border-radius:999px;display:grid;place-items:center;font-size:9px;background:#4f46e5;color:#eef2ff}.hs-icon em:empty{min-width:8px;width:8px;height:8px;padding:0;top:1px;right:1px;background:#22d3ee;box-shadow:0 0 8px #22d3ee}.hs-body{flex:1;min-height:0;display:flex;flex-direction:column}.hs-body[hidden]{display:none}.hs-empty{margin:14px 4px;font-size:12px;line-height:1.5;color:#64748b}.hs-events{list-style:none;margin:6px -4px 0;padding:0;overflow-y:auto;min-height:0;flex:1;font-size:11.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.hs-events li>*{all:unset;box-sizing:border-box;width:100%;display:flex;gap:8px;align-items:baseline;padding:4px 6px;border-radius:7px;color:#cbd5e1;line-height:1.4}.hs-events li>button{cursor:pointer}.hs-events li>button:hover{background:#94a3ff1a;color:#f1f5f9}.hs-events i{flex:0 0 7px;height:7px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c);transform:translateY(-1px)}.hs-events span{min-width:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.ap-head{display:flex;align-items:center;gap:8px;margin-top:6px}.ap-count{flex:none;color:#64748b;font-size:11px;font-variant-numeric:tabular-nums}.ap-link{all:unset;cursor:pointer;font-size:12px;color:#93c5fd}.ap-link:hover{color:#bfdbfe}.ap-searchrow{display:flex;align-items:center;gap:8px;margin-top:8px}.ap-search{flex:1;min-width:0;width:100%;box-sizing:border-box;background:#03050b99;border:1px solid rgba(148,163,255,.2);border-radius:8px;color:inherit;font:inherit;font-size:12px;padding:6px 9px;outline:none}.ap-search:focus{border-color:#818cf8}.ap-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}.ap-chips button{all:unset;cursor:pointer;display:flex;align-items:center;gap:5px;font-size:11px;padding:3px 7px;border-radius:999px;border:1px solid rgba(148,163,255,.15);color:#cbd5e1}.ap-chips button.on{border-color:var(--c);background:color-mix(in srgb,var(--c) 18%,transparent);color:#f8fafc}.ap-chips i{width:8px;height:8px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c)}.ap-chips em{font-style:normal;color:var(--c);font-weight:700;font-variant-numeric:tabular-nums}.ap-row-filters{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;align-items:center}.ap-seg{display:flex;border:1px solid rgba(148,163,255,.15);border-radius:8px;overflow:hidden}.ap-seg{flex:none}.ap-seg button{all:unset;cursor:pointer;font-size:11px;padding:3px 6px;color:#94a3b8;text-transform:capitalize}.ap-seg button.on{background:#818cf840;color:#f1f5f9}.ap-row-filters select{flex:1;min-width:64px;background:#03050b99;color:#cbd5e1;border:1px solid rgba(148,163,255,.15);border-radius:8px;font:inherit;font-size:11px;padding:3px 6px}.ap-list{list-style:none;margin:8px -4px 0;padding:0;overflow-y:auto;min-height:0;flex:1}.ap-list li button{all:unset;box-sizing:border-box;width:100%;cursor:pointer;display:flex;align-items:center;gap:8px;padding:6px;border-radius:8px}.ap-list li button:hover{background:#94a3ff1a}.ap-list li button.is-done{opacity:.55}.ap-list i{flex:0 0 9px;height:9px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c)}.ap-list i[data-status=thinking]{animation:ap-pulse .9s ease-in-out infinite}.ap-list i[data-status=waiting]{opacity:.5}.ap-list i[data-status=done]{background:transparent;border:1.5px solid var(--c);box-shadow:none}@keyframes ap-pulse{50%{transform:scale(1.5)}}.ap-name{flex:1;min-width:0;display:flex;flex-direction:column;font-size:12px;color:#e2e8f0}.ap-name small{color:#64748b;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-meta{text-align:right;font-size:11px;color:#94a3b8;font-variant-numeric:tabular-nums;display:flex;flex-direction:column}.ap-meta b{color:var(--c);font-weight:600;text-transform:lowercase}.hs-events li.is-skill>*{background:#f5b83d12}.hs-skill{flex:0 0 auto;font-size:9.5px;font-weight:600;line-height:1.5;text-transform:uppercase;letter-spacing:.06em;color:#fcd581;padding:0 6px;border-radius:999px;border:1px solid rgba(245,184,61,.55);background:#f5b83d1f}.ap-title{display:flex;align-items:center;gap:6px;min-width:0}.ap-skill{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-size:9.5px;font-weight:600;color:#fcd581;padding:0 6px;border-radius:999px;border:1px solid rgba(245,184,61,.55);background:#f5b83d1f}.ap-skill:before{content:"skill:";color:#b8893a;font-weight:500}.hs-skill:before{content:"";display:inline-block;width:6px;height:6px;margin:0 4px 0 -1px;border:1px solid currentColor;border-radius:50%;vertical-align:0;box-shadow:0 0 4px #f5b83d99}.hs-events li.is-dec>*{background:#5eead40d}.hs-events li.is-deny>*{background:#fb3b5c1f}.hs-dec{flex:0 0 auto;font-size:9.5px;font-weight:600;line-height:1.5;text-transform:uppercase;letter-spacing:.06em;color:var(--c);padding:0 6px;border-radius:3px;border:1px solid var(--c);background:#ffffff0a}.ap-decisions{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px}.ap-decisions li{display:flex;gap:6px;align-items:baseline;font-size:11px;color:#e2e8f0;padding:2px 6px;border-left:2px solid var(--c);background:#ffffff08}.ap-decisions li.is-deny{background:#fb3b5c1f}.ap-decisions li.is-strike span{text-decoration:line-through;color:#94a3b8}.ap-hv{font-size:11.5px;color:#e2e8f0;margin:0 0 4px;font-variant-numeric:tabular-nums}.ap-hv-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;gap:1px;background:#ffffff0d}.ap-hv-bar span{flex-basis:0;min-width:2px}.ap-decisions b{flex:0 0 auto;font-size:9.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--c)}.ap-decisions span{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-decisions em{flex:0 0 auto;font-style:normal;font-size:10px;color:#94a3b8;font-variant-numeric:tabular-nums}.ap-skills{display:flex;flex-wrap:wrap;gap:4px}.ap-skills span{font-size:11px;color:#e2e8f0;padding:2px 8px;border-radius:999px;border:1px solid rgba(245,184,61,.35);background:#f5b83d0f;display:inline-flex;gap:5px;align-items:baseline}.ap-skills span.on{border-color:#f5b83d;background:#f5b83d2e;color:#fde7b0;box-shadow:0 0 10px #f5b83d40}.ap-skills em{font-style:normal;font-size:10px;color:#b8893a;font-variant-numeric:tabular-nums}.ap-more{padding:6px;color:#64748b;font-size:11px}.ap-detail{overflow-y:auto;min-height:0;margin-top:8px;flex:1}.ap-detail h3{margin:0;display:flex;align-items:center;gap:8px;font-size:15px;color:var(--c)}.ap-detail h3 i{width:11px;height:11px;border-radius:50%;background:var(--c);box-shadow:0 0 10px var(--c)}.ap-detail h3 small{color:#64748b;font-size:11px;font-weight:500}.ap-status{margin-top:3px;font-size:12px;color:#cbd5e1}.ap-status[data-status=thinking]{color:#fde68a}.ap-status[data-status=waiting]{color:#fcd34d}.ap-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(46px,1fr));gap:4px;margin:10px 0 4px}.ap-stats div{background:#03050b73;border-radius:8px;padding:6px;text-align:center}.ap-stats dt{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#64748b}.ap-stats dd{margin:2px 0 0;font-size:15px;font-weight:700;color:#f1f5f9;font-variant-numeric:tabular-nums}.ap-detail section{margin-top:10px}.ap-detail h4{margin:0 0 4px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#64748b}.ap-detail p{margin:0;font-size:12px;color:#cbd5e1}.ap-steps{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.ap-steps span{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;text-transform:uppercase;letter-spacing:.06em;padding:2px 7px;border-radius:999px;border:1px solid #334155;color:#64748b}.ap-steps span[data-status=running]{border-color:#fbbf24;color:#fde68a}.ap-steps span[data-status=waiting]{border-color:#f59e0b;color:#fcd34d;background:#f59e0b24;animation:ap-wait-pulse 1.8s ease-in-out infinite}.ap-steps span[data-status=done]{border-color:#22c55e;color:#86efac}.ap-steps span[data-status=failed]{border-color:#ef4444;color:#fca5a5}.ap-chip-link{all:unset;cursor:pointer;display:block;font-size:12px;color:#e2e8f0;padding:3px 6px;border-left:2px solid var(--c);margin:2px 0;border-radius:0 6px 6px 0}.ap-chip-link:hover{background:#94a3ff1a}.ap-wait{color:#fbbf24!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.ap-nodes{line-height:1.5}.ap-chat{margin:0;padding:0;list-style:none;display:grid;gap:6px;font-size:12px;color:#e2e8f0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow-y:auto}.ap-chat li[data-role=user]{color:#c7d2fe}.ap-chat li[data-role=agent]{padding-bottom:6px;border-bottom:1px solid rgba(148,163,255,.12)}.ap-chat b{font-weight:650}.ap-events{margin:0;padding-left:14px;display:grid;gap:3px;font-size:11px;color:#cbd5e1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.hud-badge--live{background:#22c55e2e;color:#86efac}.hud-badge--denied{background:#f871712e;color:#fca5a5;text-transform:none;letter-spacing:.02em}.hud-chip{text-transform:none;letter-spacing:.02em;font-weight:500;background:#818cf829;color:#c7d2fe;white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis}.hud-chip b{font-weight:650;color:#e0e7ff}.hud-run{display:flex;gap:6px;margin-top:8px;align-items:center;flex-wrap:wrap}.hud-run input{flex:1;min-width:160px;background:#03050b99;border:1px solid rgba(148,163,255,.2);border-radius:999px;color:inherit;font:inherit;font-size:12px;padding:6px 11px;outline:none}.hud-run button{border:0;border-radius:999px;padding:6px 13px;font:inherit;font-size:12px;font-weight:600;background:linear-gradient(135deg,#818cf8,#22d3ee);color:#03050b;cursor:pointer}.hud-run button:disabled{opacity:.5}.hud-run select{max-width:160px;min-width:0;background:#03050b99;color:#cbd5e1;border:1px solid rgba(148,163,255,.2);border-radius:999px;font:inherit;font-size:12px;padding:5px 9px;cursor:pointer}.hud-run span{font-size:11px;color:#86efac}.agentglow-embed{position:relative;overflow:hidden;width:100%;height:100%;min-height:320px;isolation:isolate}.agentglow-embed .scene-root{position:absolute;top:0;right:0;bottom:0;left:0}.lod-cluster-label{all:unset;box-sizing:border-box;display:grid;gap:1px;text-align:center;cursor:pointer;pointer-events:auto;font-size:12px;font-weight:600;color:#f8fafc;padding:4px 11px 5px;border-radius:12px;white-space:nowrap;background:#03050b9e;border:1px solid color-mix(in srgb,var(--c, #818cf8) 60%,transparent);text-shadow:0 0 10px var(--c, #818cf8);box-shadow:0 0 18px color-mix(in srgb,var(--c, #818cf8) 22%,transparent);transition:border-color .2s,background .2s}.lod-cluster-label:hover{background:color-mix(in srgb,var(--c, #818cf8) 22%,rgba(3,5,11,.7));border-color:var(--c, #818cf8)}.lod-cluster-label b{font-weight:700;letter-spacing:-.01em}.lod-cluster-label small{font-size:10px;font-weight:500;color:#94a3b8;text-shadow:none;font-variant-numeric:tabular-nums}.hud-dock{display:flex;align-items:center;gap:8px}.hud-dock:empty{display:none}.hud-dock>.hud{position:static}.hud-lod{padding:6px 8px 6px 12px;display:flex;align-items:center;gap:8px;font-size:12px;color:#cbd5e1;white-space:nowrap}.hud-lod span b{margin:0 1px}.hud-lod b{color:#f1f5f9;font-variant-numeric:tabular-nums}.hud-lod i{width:7px;height:7px;border-radius:50%;background:#a5b4fc;box-shadow:0 0 8px #a5b4fc}.hud-lod button{all:unset;cursor:pointer;font-size:11px;padding:3px 9px;border-radius:999px;border:1px solid rgba(148,163,255,.25);color:#c7d2fe}.hud-lod button:hover{background:#818cf833;color:#f8fafc}.scene-root{container:agscene / size}@container agscene (max-width: 719px){.scene-root .hud-top{padding:5px 7px 5px 10px}.scene-root .hud-title{font-size:13px}.scene-root .hud-theme{padding:3px 20px 3px 8px;font-size:10px;background-position:right 7px center}.scene-root .hud-stat:nth-child(n+3){display:none}.scene-root .hud-side:not(.is-rail){width:min(290px,calc(100% - 64px));padding:6px 8px 8px}.scene-root .hs-head button{padding:4px 6px;letter-spacing:.04em;font-size:10.5px}.scene-root .hs-head .hs-collapse{padding:2px 4px}.scene-root .ap-list li button{padding:4px 6px}.scene-root .hud-topwrap:not(.is-rail){--hud-side: min(290px, calc(100% - 64px) )}}@container agscene (max-height: 520px){.scene-root .hud-sub{max-height:4.5em;overflow:auto}}@keyframes ap-wait-pulse{50%{box-shadow:0 0 10px #f59e0b8c;border-color:#fbbf24}}@media(prefers-reduced-motion:reduce){.ap-steps span[data-status=waiting]{animation:none}}.hud-approve{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:8px}.hud-approve button{border:1px solid transparent;border-radius:999px;padding:5px 13px;font:inherit;font-size:12px;font-weight:650;cursor:pointer}.hud-approve .ha-yes{background:linear-gradient(135deg,#34d399,#22d3ee);color:#03050b}.hud-approve .ha-no{background:#fb3b5c24;border-color:#fb718599;color:#fecdd3}.hud-approve .ha-yes:hover{filter:brightness(1.1)}.hud-approve .ha-no:hover{background:#fb3b5c47}.hud-approve span{font-size:11px;color:#94a3b8}.hud-approve[data-verdict=approved] span,.hud-approve[data-verdict=approving] span{color:#86efac}.hud-approve[data-verdict=rejected] span,.hud-approve[data-verdict=rejecting] span,.hud-approve[data-verdict=error] span{color:#fda4af}.hud-approve.is-compact{margin-top:0;flex:none;gap:4px}.hud-approve.is-compact button{padding:3px 9px;font-size:11px}.hud-approvals{left:12px;bottom:12px;z-index:9;width:max-content;max-width:min(460px,calc(100% - 356px));padding:8px 10px;font-size:12px;box-sizing:border-box;border-color:#f59e0b73;box-shadow:0 8px 32px #00000059,0 0 18px #f59e0b1f}.hud-approvals.is-rail{max-width:min(460px,calc(100% - 76px))}.hud-approvals h4{margin:0 0 6px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#fcd34d;display:flex;gap:6px;align-items:baseline}.hud-approvals h4 em{font-style:normal;font-variant-numeric:tabular-nums;color:#fde68a}.hud-approvals ul{list-style:none;margin:0;padding:0;display:grid;gap:4px}.hud-approvals .ha-late{font-style:normal}.hud-approvals .ha-late.is-due{color:#86efac}.hud-approvals .ha-late.is-overdue{color:#f59e0b;font-weight:600}.hud-approvals li{display:flex;align-items:center;gap:8px;min-width:0}.hud-approvals .ha-who{all:unset;cursor:pointer;flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;padding:2px 4px;border-radius:6px}.hud-approvals .ha-who:hover{background:#94a3ff1a}.hud-approvals .ha-who i{flex:0 0 8px;height:8px;border-radius:50%;background:var(--c);box-shadow:0 0 8px var(--c);align-self:center}.hud-approvals .ha-who b{color:#e2e8f0;font-weight:650;white-space:nowrap}.hud-approvals .ha-who span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fbbf24;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.hud-approvals p{margin:6px 0 0;font-size:11px;color:#64748b}@container agscene (max-width: 719px){.scene-root .hud-approvals{max-width:calc(100% - 76px);padding:6px 8px}.scene-root .hud-approvals .ha-who span{display:none}}.flow-run{display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none}.flow-run .scene-label{font-size:11px;max-width:220px;overflow:hidden;text-overflow:ellipsis}.flow-steps{display:flex;gap:3px;font:600 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;text-transform:uppercase;letter-spacing:.06em}.flow-steps span{padding:2px 5px;border-radius:999px;color:#64748b;background:#03050b8c;border:1px solid rgba(100,116,139,.35)}.flow-steps span[data-s=running]{color:#03050b;background:var(--c);border-color:var(--c);box-shadow:0 0 12px var(--c)}.flow-steps span[data-s=done]{color:var(--c);border-color:color-mix(in srgb,var(--c) 60%,transparent)}.flow-steps span[data-s=failed]{color:#fecaca;background:#7f1d1d}.flow-step{font:600 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;text-transform:uppercase;letter-spacing:.08em;color:color-mix(in srgb,var(--c) 70%,white);text-shadow:0 0 8px var(--c);opacity:.55;pointer-events:none;white-space:nowrap;transition:opacity .3s}.flow-step[data-s=running]{opacity:1}.flow-hint{font-size:10px;padding:1px 7px;opacity:.9}.flow-label-core{font-size:11px;letter-spacing:.04em}
@@ -387,6 +387,8 @@ export type Run = {
387
387
  /** the step that finished most recently (handoff source) */
388
388
  lastDone: StepName;
389
389
  final: string;
390
+ /** performance.now() of the run's latest event (stale detection) */
391
+ lastEventAt: number;
390
392
  };
391
393
  /** Which of the 3 scene slots a step is drawn in (see STEP_SLOTS). */
392
394
  export declare function stepSlot(r: Run, step: StepName): number;
@@ -400,6 +402,12 @@ export declare function runWait(r: Run): (Wait & {
400
402
  step: StepName;
401
403
  }) | null;
402
404
  /** "sleeping until 14:05" / "waiting on approval" / "waiting on approval (until Oct 3, 09:00)" */
405
+ /** A live run is stale when nothing arrived from it for STALE_QUIET_MS while a wait of it is past its deadline by
406
+ * STALE_GRACE_MS (e.g. its worker restarted mid-run: nobody will resolve the wait or end the run). */
407
+ export declare const STALE_QUIET_MS = 20000;
408
+ export declare const STALE_GRACE_MS = 15000;
409
+ export declare function isStale(r: Run | undefined, now?: number, wall?: number): boolean;
410
+ export declare const STALE_TEXT = "stale: no worker activity";
403
411
  export declare function waitLabel(w: Wait, now?: number): string;
404
412
  export declare function stepChips(r: Run, max?: number): {
405
413
  shown: StepName[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentglow",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Live 3D views of agent systems (LangGraph, deepagents, any OpenTelemetry-instrumented agents) as a React component.",
5
5
  "keywords": [
6
6
  "claude-code",