@sleep2agi/agent-network-dashboard 0.4.6-preview.284 → 0.4.6-preview.286

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +4 -4
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  20. package/.next/server/app/admin.html +1 -1
  21. package/.next/server/app/admin.rsc +1 -1
  22. package/.next/server/app/admin.segments/_full.segment.rsc +1 -1
  23. package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
  25. package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
  26. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
  28. package/.next/server/app/index.html +2 -2
  29. package/.next/server/app/index.rsc +2 -2
  30. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  31. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  32. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  33. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  35. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/login.html +2 -2
  37. package/.next/server/app/login.rsc +2 -2
  38. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  39. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  40. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  41. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  42. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  43. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  44. package/.next/server/app/logs.html +1 -1
  45. package/.next/server/app/logs.rsc +1 -1
  46. package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
  47. package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
  48. package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
  49. package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
  50. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
  51. package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
  52. package/.next/server/app/messages.html +1 -1
  53. package/.next/server/app/messages.rsc +1 -1
  54. package/.next/server/app/messages.segments/_full.segment.rsc +1 -1
  55. package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
  56. package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
  57. package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
  58. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
  59. package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
  60. package/.next/server/app/node.html +1 -1
  61. package/.next/server/app/node.rsc +1 -1
  62. package/.next/server/app/node.segments/_full.segment.rsc +1 -1
  63. package/.next/server/app/node.segments/_head.segment.rsc +1 -1
  64. package/.next/server/app/node.segments/_index.segment.rsc +1 -1
  65. package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
  66. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
  67. package/.next/server/app/node.segments/node.segment.rsc +1 -1
  68. package/.next/server/app/nodes.html +1 -1
  69. package/.next/server/app/nodes.rsc +1 -1
  70. package/.next/server/app/nodes.segments/_full.segment.rsc +1 -1
  71. package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
  72. package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
  73. package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
  74. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
  75. package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
  76. package/.next/server/app/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/server-logs.html +1 -1
  78. package/.next/server/app/server-logs.rsc +1 -1
  79. package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
  80. package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
  81. package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
  82. package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
  83. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
  84. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
  85. package/.next/server/app/settings/networks.html +1 -1
  86. package/.next/server/app/settings/networks.rsc +1 -1
  87. package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
  88. package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
  89. package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
  90. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
  91. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
  92. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
  93. package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
  94. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  95. package/.next/server/app/settings/tokens.html +1 -1
  96. package/.next/server/app/settings/tokens.rsc +1 -1
  97. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
  98. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
  99. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
  100. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
  101. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
  102. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
  103. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
  104. package/.next/server/app/settings.html +2 -2
  105. package/.next/server/app/settings.rsc +2 -2
  106. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  107. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  108. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  109. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  110. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  111. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  112. package/.next/server/app/tasks.html +1 -1
  113. package/.next/server/app/tasks.rsc +1 -1
  114. package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
  115. package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
  116. package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
  117. package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
  118. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
  119. package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
  120. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +2 -2
  121. package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
  122. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
  123. package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
  124. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
  125. package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
  126. package/.next/server/middleware-build-manifest.js +3 -3
  127. package/.next/server/pages/404.html +1 -1
  128. package/.next/server/pages/500.html +1 -1
  129. package/.next/static/chunks/{0phlsa_t3m8sy.js → 0ds6li~5xrp~p.js} +1 -1
  130. package/.next/static/chunks/{0jnfz4p3fi5-5.js → 0t54qp~-i8qa7.js} +1 -1
  131. package/.next/static/chunks/15skg9phnatf9.js +4 -0
  132. package/.next/trace +2 -2
  133. package/.next/trace-build +1 -1
  134. package/app/components/TopoGraph.tsx +61 -17
  135. package/package.json +1 -1
  136. package/scripts/topo-edge-ping-pulse-retired-test.mjs +119 -0
  137. package/scripts/topo-working-halo-breath-retired-test.mjs +99 -0
  138. package/.next/static/chunks/0q6-4m~r5b10k.js +0 -4
  139. package/scripts/topo-arrival-ping-test.mjs +0 -87
  140. package/scripts/topo-dispatch-pulse-test.mjs +0 -83
  141. package/scripts/topo-edge-smil-sync-test.mjs +0 -148
  142. package/scripts/topo-edge-smil-theme-ease-test.mjs +0 -97
  143. package/scripts/topo-halo-breath-ease-test.mjs +0 -92
  144. package/scripts/topo-halo-breath-stagger-test.mjs +0 -89
  145. package/scripts/topo-ping-pulse-ease-test.mjs +0 -96
  146. package/scripts/topo-working-halo-breath-test.mjs +0 -86
  147. /package/.next/static/{C7LtVia_ezjH2k_JuVQvq → PuVOWYzSKlsQA5ibHgHfO}/_buildManifest.js +0 -0
  148. /package/.next/static/{C7LtVia_ezjH2k_JuVQvq → PuVOWYzSKlsQA5ibHgHfO}/_clientMiddlewareManifest.js +0 -0
  149. /package/.next/static/{C7LtVia_ezjH2k_JuVQvq → PuVOWYzSKlsQA5ibHgHfO}/_ssgManifest.js +0 -0
@@ -1,148 +0,0 @@
1
- /* Round 231 verification: edge SMIL trio (R103 particle motion +
2
- * R76 dispatch pulse + R75 arrival ping) now share a single per-edge
3
- * stagger so all three fire phase-coherently with the particle:
4
- *
5
- * particle.animateMotion.begin = -stagger
6
- * dispatch.animate.begin = -stagger (= particle's)
7
- * arrival.animate.begin = -(stagger + 0.92*dur) mod dur
8
- *
9
- * where stagger = (edgeIndex * 0.37) % duration,
10
- * duration = max(0.9, 2.6 / sqrt(link.count)).
11
- *
12
- * Scenario: 4 working agents + 2 flows (alpha→beta count=5, gamma→
13
- * delta count=4) — both flows have count ≥ 3 so dispatch pulse
14
- * fires on both, and fresh > 0.5 so arrival ping fires on both.
15
- *
16
- * Per edge:
17
- * - probe particle's animateMotion.begin
18
- * - probe dispatch's two <animate>.begin (r + opacity, must match)
19
- * - probe arrival's two <animate>.begin (r + opacity, must match)
20
- * - verify all three follow the formula given index + duration
21
- */
22
- import { chromium } from 'playwright';
23
- import { readFileSync } from 'node:fs';
24
-
25
- const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
26
- const browser = await chromium.launch({ headless: true });
27
- const ctx = await browser.newContext({ viewport: { width: 1500, height: 1500 } });
28
- await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
29
- await ctx.addInitScript(() => {
30
- try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
31
- });
32
- const fresh = new Date(Date.now() - 60 * 1000).toISOString();
33
- await ctx.route('**/api/hub/status*', async (route) => {
34
- const r = await route.fetch();
35
- const b = await r.json();
36
- const nid = (b.sessions || [])[0]?.network_id || 'default';
37
- const mk = (alias) => ({
38
- alias, status: 'working', model: 'claude-opus-4', runtime: 'claude-code-cli',
39
- network_id: nid, project_dir: null,
40
- created_at: fresh, updated_at: fresh, last_seen_at: fresh,
41
- });
42
- await route.fulfill({ response: r, json: { ...b, sessions: [
43
- mk('alpha'), mk('beta'), mk('gamma'), mk('delta'),
44
- ] } });
45
- });
46
- const now = Date.now();
47
- const msgs = [];
48
- // flow 0: alpha→beta count=5 — sorted by recent activity, this will be
49
- // the more-recent flow; edge index depends on flowLinks.sort by last_at desc.
50
- for (let i = 0; i < 5; i++) {
51
- msgs.push({
52
- id: `ab${i}`, from_alias: 'alpha', to_alias: 'beta', content: 'hi',
53
- network_id: 'default', created_at: new Date(now - (500 + i * 50)).toISOString(),
54
- });
55
- }
56
- // flow 1: gamma→delta count=4 — older
57
- for (let i = 0; i < 4; i++) {
58
- msgs.push({
59
- id: `gd${i}`, from_alias: 'gamma', to_alias: 'delta', content: 'hi',
60
- network_id: 'default', created_at: new Date(now - (5000 + i * 50)).toISOString(),
61
- });
62
- }
63
- await ctx.route('**/api/hub/messages*', (r2) => r2.fulfill({ json: { messages: msgs } }));
64
- await ctx.route('**/api/hub/tasks*', (r2) => r2.fulfill({ json: { tasks: [] } }));
65
-
66
- const page = await ctx.newPage();
67
- await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
68
- await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
69
- await page.waitForSelector('[data-arrival-ping]', { timeout: 10000, state: 'attached' });
70
- await page.waitForSelector('[data-dispatch-pulse]', { timeout: 10000, state: 'attached' });
71
- await page.waitForTimeout(400);
72
-
73
- const probe = await page.evaluate(() => {
74
- // Edges keyed by link.key ("from→to"). We grab pairs of (arrival, dispatch)
75
- // by data attr, plus particle's animateMotion inside the edge <g>.
76
- const pings = Array.from(document.querySelectorAll('[data-arrival-ping]'));
77
- const pulses = Array.from(document.querySelectorAll('[data-dispatch-pulse]'));
78
- // Each ping/pulse lives inside an edge <g> that also contains the animateMotion
79
- // for the particle. We walk up to find the shared parent.
80
- return pings.map((ping) => {
81
- const key = ping.getAttribute('data-arrival-ping');
82
- const pulse = pulses.find(p => p.getAttribute('data-dispatch-pulse') === key);
83
- // animateMotion lives in a sibling <circle> within the same parent <g>
84
- const edgeG = ping.closest('g[data-edge-visible-parent]') || ping.parentElement;
85
- const motion = edgeG?.querySelector('animateMotion');
86
- const pingAnims = Array.from(ping.querySelectorAll('animate'));
87
- const pulseAnims = pulse ? Array.from(pulse.querySelectorAll('animate')) : [];
88
- return {
89
- key,
90
- pingBeginR: pingAnims.find(a => a.getAttribute('attributeName') === 'r')?.getAttribute('begin') || null,
91
- pingBeginOpacity: pingAnims.find(a => a.getAttribute('attributeName') === 'opacity')?.getAttribute('begin') || null,
92
- pulseBeginR: pulseAnims.find(a => a.getAttribute('attributeName') === 'r')?.getAttribute('begin') || null,
93
- pulseBeginOpacity: pulseAnims.find(a => a.getAttribute('attributeName') === 'opacity')?.getAttribute('begin') || null,
94
- motionBegin: motion?.getAttribute('begin') || null,
95
- motionDur: motion?.getAttribute('dur') || null,
96
- };
97
- });
98
- });
99
- await browser.close();
100
-
101
- const parseS = (s) => {
102
- if (!s) return null;
103
- const m = String(s).match(/^-?(\d+(?:\.\d+)?)s$/);
104
- if (!m) return null;
105
- return s.startsWith('-') ? -parseFloat(m[1]) : parseFloat(m[1]);
106
- };
107
-
108
- const close = (a, b, eps = 0.005) => Math.abs(a - b) < eps;
109
-
110
- const validate = (edge) => {
111
- const dur = parseS(edge.motionDur);
112
- const motionBegin = parseS(edge.motionBegin); // -stagger
113
- const pingR = parseS(edge.pingBeginR);
114
- const pingOp = parseS(edge.pingBeginOpacity);
115
- const pulseR = parseS(edge.pulseBeginR);
116
- const pulseOp = parseS(edge.pulseBeginOpacity);
117
- if (dur === null || motionBegin === null || motionBegin > 0) return null;
118
- const stagger = -motionBegin; // positive
119
- // Expected ping begin = -(stagger + 0.92*dur) mod dur → in [-dur, 0]
120
- const wrapped = (stagger + 0.92 * dur) % dur;
121
- const expectedPing = -wrapped;
122
- return {
123
- dur,
124
- motionBegin,
125
- stagger,
126
- expectedPing,
127
- pulseR,
128
- pulseOp,
129
- pingR,
130
- pingOp,
131
- dispatch_matches_particle: close(pulseR, motionBegin) && close(pulseOp, motionBegin),
132
- arrival_matches_formula: close(pingR, expectedPing) && close(pingOp, expectedPing),
133
- };
134
- };
135
-
136
- const edges = probe.map(validate).filter(e => e !== null);
137
-
138
- const results = {
139
- at_least_one_edge: edges.length >= 1,
140
- all_dispatch_match_particle: edges.every(e => e.dispatch_matches_particle),
141
- all_arrival_match_formula: edges.every(e => e.arrival_matches_formula),
142
- pulse_r_op_consistent: edges.every(e => Math.abs(e.pulseR - e.pulseOp) < 0.005),
143
- ping_r_op_consistent: edges.every(e => Math.abs(e.pingR - e.pingOp) < 0.005),
144
- };
145
- const ok = Object.values(results).every(Boolean);
146
- console.log(`${ok ? '✅' : '❌'} edge SMIL sync:`, JSON.stringify(results),
147
- '\n edges:', edges);
148
- process.exit(ok ? 0 : 1);
@@ -1,97 +0,0 @@
1
- /* Round 252 verification: three SMIL edge elements (particle,
2
- * arrival ping, dispatch pulse) pick up theme-toggle transitions
3
- * on their static color attributes, closing the last per-edge
4
- * theme-toggle snaps.
5
- *
6
- * Pre-R252 each element had inline style with only pointerEvents
7
- * (or no style for particle). Theme-driven fill/stroke snapped:
8
- * · particle: fill=pal.flowParticle (cyber yellow ↔ light amber)
9
- * · arrival ping: stroke=pal.flowEdge (cyber cyan ↔ light emerald)
10
- * · dispatch pulse: stroke=pal.flowEdge (same as ping)
11
- *
12
- * R252 adds 200ms transitions:
13
- * · particle: transition: fill 200ms, opacity 200ms
14
- * · arrival ping: transition: stroke 200ms
15
- * · dispatch pulse: transition: stroke 200ms
16
- *
17
- * The SMIL animateMotion (particle path) + R228 spline-eased animates
18
- * (ping/pulse r + opacity) run independently of these CSS transitions
19
- * — no conflict; CSS handles static-color theme transitions, SMIL
20
- * handles animation values.
21
- *
22
- * Scenario: 4 working agents + 5-msg alpha→beta (count≥3, fresh>0.5)
23
- * → particle + arrival ping + dispatch pulse all rendered.
24
- */
25
- import { chromium } from 'playwright';
26
- import { readFileSync } from 'node:fs';
27
-
28
- const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
29
- const browser = await chromium.launch({ headless: true });
30
- const ctx = await browser.newContext({ viewport: { width: 1500, height: 1500 } });
31
- await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
32
- await ctx.addInitScript(() => {
33
- try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
34
- });
35
- const fresh = new Date(Date.now() - 60 * 1000).toISOString();
36
- await ctx.route('**/api/hub/status*', async (route) => {
37
- const r = await route.fetch();
38
- const b = await r.json();
39
- const nid = (b.sessions || [])[0]?.network_id || 'default';
40
- const mk = (alias) => ({
41
- alias, status: 'working', model: 'claude-opus-4', runtime: 'claude-code-cli',
42
- network_id: nid, project_dir: null,
43
- created_at: fresh, updated_at: fresh, last_seen_at: fresh,
44
- });
45
- await route.fulfill({ response: r, json: { ...b, sessions: [
46
- mk('alpha'), mk('beta'), mk('gamma'), mk('delta'),
47
- ] } });
48
- });
49
- const now = Date.now();
50
- const msgs = [];
51
- for (let i = 0; i < 5; i++) {
52
- msgs.push({
53
- id: `m${i}`, from_alias: 'alpha', to_alias: 'beta', content: 'hi',
54
- network_id: 'default', created_at: new Date(now - (1000 + i * 50)).toISOString(),
55
- });
56
- }
57
- await ctx.route('**/api/hub/messages*', (r2) => r2.fulfill({ json: { messages: msgs } }));
58
- await ctx.route('**/api/hub/tasks*', (r2) => r2.fulfill({ json: { tasks: [] } }));
59
-
60
- const page = await ctx.newPage();
61
- await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
62
- await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
63
- await page.waitForSelector('[data-edge-particle]', { timeout: 10000, state: 'attached' });
64
- await page.waitForSelector('[data-arrival-ping]', { timeout: 10000, state: 'attached' });
65
- await page.waitForSelector('[data-dispatch-pulse]', { timeout: 10000, state: 'attached' });
66
- await page.waitForTimeout(300);
67
-
68
- const probe = await page.evaluate(() => {
69
- const grab = (sel) => {
70
- const el = document.querySelector(sel);
71
- return el ? { transition: el.style.transition, fill: el.getAttribute('fill'), stroke: el.getAttribute('stroke') } : null;
72
- };
73
- return {
74
- particle: grab('[data-edge-particle]'),
75
- arrivalPing: grab('[data-arrival-ping]'),
76
- dispatchPulse: grab('[data-dispatch-pulse]'),
77
- };
78
- });
79
- await browser.close();
80
-
81
- const has = (s, prop) => new RegExp(`${prop}\\s+(?:200ms|0\\.2s)`).test(s || '');
82
-
83
- const results = {
84
- particle_present: probe.particle !== null,
85
- particle_has_fill_200: has(probe.particle?.transition, 'fill'),
86
- particle_has_opacity_200: has(probe.particle?.transition, 'opacity'),
87
-
88
- arrival_ping_present: probe.arrivalPing !== null,
89
- arrival_ping_has_stroke_200: has(probe.arrivalPing?.transition, 'stroke'),
90
-
91
- dispatch_pulse_present: probe.dispatchPulse !== null,
92
- dispatch_pulse_has_stroke_200: has(probe.dispatchPulse?.transition, 'stroke'),
93
- };
94
- const ok = Object.values(results).every(Boolean);
95
- console.log(`${ok ? '✅' : '❌'} edge SMIL theme ease:`, JSON.stringify(results),
96
- '\n probe:', probe);
97
- process.exit(ok ? 0 : 1);
@@ -1,92 +0,0 @@
1
- /* Round 244 verification: hub grounding halo (R84) AND node working
2
- * halos (R112/R226) both pick up ease-in-out keySplines on their
3
- * SMIL breath animates. The three breath surfaces on canvas — hub
4
- * (R84+R244) + active-node pulse (R243) + working halos (R226+R244)
5
- * — now share the same curve shape and feel.
6
- *
7
- * Test scope:
8
- * - hub grounding halo: probe [data-hub-busyness] → child
9
- * <animate> has calcMode='spline', keyTimes='0;0.5;1',
10
- * keySplines='0.42 0 0.58 1;0.42 0 0.58 1'
11
- * - working halos: probe all [data-node-halo-breath='on'] →
12
- * each child <animate> has same calcMode/keyTimes/keySplines
13
- *
14
- * Scenario: 4 working agents (hub busy bucket > 0 → halo breath
15
- * is present; all 4 nodes are working → 4 halo breath animates).
16
- */
17
- import { chromium } from 'playwright';
18
- import { readFileSync } from 'node:fs';
19
-
20
- const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
21
- const browser = await chromium.launch({ headless: true });
22
- const ctx = await browser.newContext({ viewport: { width: 1500, height: 1500 } });
23
- await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
24
- await ctx.addInitScript(() => {
25
- try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
26
- });
27
- const fresh = new Date(Date.now() - 60 * 1000).toISOString();
28
- await ctx.route('**/api/hub/status*', async (route) => {
29
- const r = await route.fetch();
30
- const b = await r.json();
31
- const nid = (b.sessions || [])[0]?.network_id || 'default';
32
- const mk = (alias) => ({
33
- alias, status: 'working', model: 'claude-opus-4', runtime: 'claude-code-cli',
34
- network_id: nid, project_dir: null,
35
- created_at: fresh, updated_at: fresh, last_seen_at: fresh,
36
- });
37
- await route.fulfill({ response: r, json: { ...b, sessions: [
38
- mk('alpha'), mk('beta'), mk('gamma'), mk('delta'),
39
- ] } });
40
- });
41
- await ctx.route('**/api/hub/messages*', (r2) => r2.fulfill({ json: { messages: [] } }));
42
- await ctx.route('**/api/hub/tasks*', (r2) => r2.fulfill({ json: { tasks: [] } }));
43
-
44
- const page = await ctx.newPage();
45
- await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
46
- await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
47
- await page.waitForSelector('[data-hub-busyness]', { timeout: 10000, state: 'attached' });
48
- await page.waitForTimeout(300);
49
-
50
- const out = await page.evaluate(() => {
51
- const probeAnimate = (parent) => {
52
- const a = parent?.querySelector('animate');
53
- if (!a) return null;
54
- return {
55
- attr: a.getAttribute('attributeName'),
56
- calcMode: a.getAttribute('calcMode'),
57
- keyTimes: a.getAttribute('keyTimes'),
58
- keySplines: a.getAttribute('keySplines'),
59
- dur: a.getAttribute('dur'),
60
- };
61
- };
62
- const hub = document.querySelector('[data-hub-busyness]');
63
- const halos = Array.from(document.querySelectorAll('[data-node-halo-breath="on"]'));
64
- return {
65
- hub: probeAnimate(hub),
66
- halos: halos.map(h => probeAnimate(h)),
67
- };
68
- });
69
- await browser.close();
70
-
71
- const EASE_INOUT = '0.42 0 0.58 1;0.42 0 0.58 1';
72
- const KEY_TIMES = '0;0.5;1';
73
-
74
- const animateOK = (a) =>
75
- a &&
76
- a.attr === 'opacity' &&
77
- a.calcMode === 'spline' &&
78
- a.keyTimes === KEY_TIMES &&
79
- a.keySplines === EASE_INOUT;
80
-
81
- const results = {
82
- hub_animate_present: out.hub !== null,
83
- hub_ease_in_out: animateOK(out.hub),
84
- halos_count_4: out.halos.length === 4,
85
- halos_all_present: out.halos.every(h => h !== null),
86
- halos_all_ease_in_out: out.halos.every(animateOK),
87
- };
88
- const ok = Object.values(results).every(Boolean);
89
- console.log(`${ok ? '✅' : '❌'} halo breath ease:`, JSON.stringify(results),
90
- '\n hub: ', out.hub,
91
- '\n halos:', out.halos);
92
- process.exit(ok ? 0 : 1);
@@ -1,89 +0,0 @@
1
- /* Round 226 verification: working-halo breath gets per-node phase
2
- * stagger via SMIL `begin="-{nodeIdx * 0.37 % 3}s"`. Pre-R226 all
3
- * working halos pulsed in lockstep at the same instant; R226 desyncs
4
- * them organically.
5
- *
6
- * Test: 4 working agents → probe each [data-node-halo-breath='on']
7
- * circle for its `<animate>` child's `begin` attribute. Expect:
8
- * - Each animate has a `begin` matching '-N.NNNs'
9
- * - All four offsets are distinct (no two halos start at the
10
- * same phase)
11
- * - The data-node-halo-breath-offset attribute matches the
12
- * `begin` magnitude (post-strip of '-' and 's')
13
- * - The dur stays '3s' (period unchanged, only phase shifts)
14
- * - Reduced-motion test scope unchanged (gate still keeps SMIL
15
- * out for prefers-reduced-motion users)
16
- */
17
- import { chromium } from 'playwright';
18
- import { readFileSync } from 'node:fs';
19
-
20
- const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
21
- const browser = await chromium.launch({ headless: true });
22
- const ctx = await browser.newContext({ viewport: { width: 1500, height: 1500 } });
23
- await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
24
- await ctx.addInitScript(() => {
25
- try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
26
- });
27
- const fresh = new Date(Date.now() - 60 * 1000).toISOString();
28
- await ctx.route('**/api/hub/status*', async (route) => {
29
- const r = await route.fetch();
30
- const b = await r.json();
31
- const nid = (b.sessions || [])[0]?.network_id || 'default';
32
- const mk = (alias) => ({
33
- alias, status: 'working', model: 'claude-opus-4', runtime: 'claude-code-cli',
34
- network_id: nid, project_dir: null,
35
- created_at: fresh, updated_at: fresh, last_seen_at: fresh,
36
- });
37
- await route.fulfill({ response: r, json: { ...b, sessions: [
38
- mk('alpha'), mk('beta'), mk('gamma'), mk('delta'),
39
- ] } });
40
- });
41
- await ctx.route('**/api/hub/messages*', (r2) => r2.fulfill({ json: { messages: [] } }));
42
- await ctx.route('**/api/hub/tasks*', (r2) => r2.fulfill({ json: { tasks: [] } }));
43
-
44
- const page = await ctx.newPage();
45
- await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
46
- await page.waitForFunction(() => document.querySelectorAll('[data-node-halo-breath="on"]').length === 4, { timeout: 30000 });
47
- await page.waitForTimeout(400);
48
-
49
- const out = await page.evaluate(() => {
50
- const halos = Array.from(document.querySelectorAll('[data-node-halo-breath="on"]'));
51
- return halos.map((h) => {
52
- const anim = h.querySelector('animate');
53
- return {
54
- offsetAttr: h.getAttribute('data-node-halo-breath-offset'),
55
- begin: anim?.getAttribute('begin') || null,
56
- dur: anim?.getAttribute('dur') || null,
57
- attrName: anim?.getAttribute('attributeName') || null,
58
- };
59
- });
60
- });
61
- await browser.close();
62
-
63
- const beginRe = /^-(\d+\.\d{3})s$/;
64
- const parsed = out.map((h) => {
65
- const m = (h.begin || '').match(beginRe);
66
- return {
67
- ...h,
68
- beginNum: m ? parseFloat(m[1]) : NaN,
69
- };
70
- });
71
-
72
- // Expected: 4 halos, offsets (0 * 0.37) % 3, (1 * 0.37) % 3, etc.
73
- // = 0.000, 0.370, 0.740, 1.110 (each .toFixed(3))
74
- const expected = [0, 0.37, 0.74, 1.11];
75
- const close = (a, b) => Math.abs(a - b) < 0.005;
76
-
77
- const results = {
78
- four_halos: parsed.length === 4,
79
- all_have_begin: parsed.every(p => !Number.isNaN(p.beginNum)),
80
- all_have_dur_3s: parsed.every(p => p.dur === '3s'),
81
- all_attr_opacity: parsed.every(p => p.attrName === 'opacity'),
82
- all_offsets_distinct: new Set(parsed.map(p => p.beginNum)).size === 4,
83
- offsets_match_golden: parsed.every((p, i) => close(p.beginNum, expected[i])),
84
- attr_matches_begin: parsed.every((p) => p.offsetAttr === p.beginNum.toFixed(3)),
85
- };
86
- const ok = Object.values(results).every(Boolean);
87
- console.log(`${ok ? '✅' : '❌'} halo breath stagger:`, JSON.stringify(results),
88
- '\n parsed:', parsed);
89
- process.exit(ok ? 0 : 1);
@@ -1,96 +0,0 @@
1
- /* Round 228 verification: arrival-ping (R75) and dispatch-pulse
2
- * (R76) SMIL <animate>s get pulse-pop ease curves via calcMode/
3
- * keyTimes/keySplines.
4
- *
5
- * Coverage:
6
- * - [data-arrival-ping] r → ease-out across both segments
7
- * - [data-arrival-ping] opacity → ease-out rise, ease-in fall
8
- * - [data-dispatch-pulse] r → ease-out across both segments
9
- * - [data-dispatch-pulse] opacity → ease-out rise, ease-in fall
10
- *
11
- * Scenario: 4 working agents + 5 messages alpha→beta so:
12
- * - link.count = 5 ≥ 3 (dispatch pulse fires)
13
- * - fresh > 0.5 (both ping + pulse gate active)
14
- * - reducedMotion off (cyber-themed cookie default)
15
- */
16
- import { chromium } from 'playwright';
17
- import { readFileSync } from 'node:fs';
18
-
19
- const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
20
- const browser = await chromium.launch({ headless: true });
21
- const ctx = await browser.newContext({ viewport: { width: 1500, height: 1500 } });
22
- await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
23
- await ctx.addInitScript(() => {
24
- try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
25
- });
26
- const fresh = new Date(Date.now() - 60 * 1000).toISOString();
27
- await ctx.route('**/api/hub/status*', async (route) => {
28
- const r = await route.fetch();
29
- const b = await r.json();
30
- const nid = (b.sessions || [])[0]?.network_id || 'default';
31
- const mk = (alias) => ({
32
- alias, status: 'working', model: 'claude-opus-4', runtime: 'claude-code-cli',
33
- network_id: nid, project_dir: null,
34
- created_at: fresh, updated_at: fresh, last_seen_at: fresh,
35
- });
36
- await route.fulfill({ response: r, json: { ...b, sessions: [
37
- mk('alpha'), mk('beta'), mk('gamma'), mk('delta'),
38
- ] } });
39
- });
40
- const now = Date.now();
41
- const msgs = [];
42
- for (let i = 0; i < 5; i++) {
43
- msgs.push({
44
- id: `m${i}`, from_alias: 'alpha', to_alias: 'beta', content: 'hi',
45
- network_id: 'default', created_at: new Date(now - (1000 + i * 50)).toISOString(),
46
- });
47
- }
48
- await ctx.route('**/api/hub/messages*', (r2) => r2.fulfill({ json: { messages: msgs } }));
49
- await ctx.route('**/api/hub/tasks*', (r2) => r2.fulfill({ json: { tasks: [] } }));
50
-
51
- const page = await ctx.newPage();
52
- await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
53
- await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 4, { timeout: 30000 });
54
- await page.waitForSelector('[data-arrival-ping]', { timeout: 10000, state: 'attached' });
55
- await page.waitForSelector('[data-dispatch-pulse]', { timeout: 10000, state: 'attached' });
56
- await page.waitForTimeout(400);
57
-
58
- const out = await page.evaluate(() => {
59
- const probe = (parentSelector) => {
60
- const el = document.querySelector(parentSelector);
61
- if (!el) return null;
62
- const animates = Array.from(el.querySelectorAll('animate'));
63
- return animates.map((a) => ({
64
- attr: a.getAttribute('attributeName'),
65
- calcMode: a.getAttribute('calcMode'),
66
- keyTimes: a.getAttribute('keyTimes'),
67
- keySplines: a.getAttribute('keySplines'),
68
- }));
69
- };
70
- return {
71
- arrival: probe('[data-arrival-ping]'),
72
- dispatch: probe('[data-dispatch-pulse]'),
73
- };
74
- });
75
- await browser.close();
76
-
77
- const easeOutBoth = '0.25 0.1 0.25 1;0.25 0.1 0.25 1';
78
- const pulsePop = '0.25 0.1 0.25 1;0.42 0 1 1';
79
- const keyTimes = '0;0.5;1';
80
-
81
- const find = (arr, attr) => arr?.find(a => a.attr === attr);
82
- const matches = (a, splines) => a && a.calcMode === 'spline' && a.keyTimes === keyTimes && a.keySplines === splines;
83
-
84
- const results = {
85
- arrival_present: Array.isArray(out.arrival) && out.arrival.length === 2,
86
- arrival_r_easeout: matches(find(out.arrival, 'r'), easeOutBoth),
87
- arrival_op_pulse: matches(find(out.arrival, 'opacity'), pulsePop),
88
- dispatch_present: Array.isArray(out.dispatch) && out.dispatch.length === 2,
89
- dispatch_r_easeout: matches(find(out.dispatch, 'r'), easeOutBoth),
90
- dispatch_op_pulse: matches(find(out.dispatch, 'opacity'), pulsePop),
91
- };
92
- const ok = Object.values(results).every(Boolean);
93
- console.log(`${ok ? '✅' : '❌'} ping+pulse ease:`, JSON.stringify(results),
94
- '\n arrival:', out.arrival,
95
- '\n dispatch:', out.dispatch);
96
- process.exit(ok ? 0 : 1);
@@ -1,86 +0,0 @@
1
- /* Round 112 verification: working-status nodes get a halo opacity
2
- * breath (SMIL <animate>) at 3s cycle. Idle + offline halos stay
3
- * flat. reducedMotion suppresses the breath entirely.
4
- *
5
- * Fleet: 1 working + 1 idle + 1 offline.
6
- * wkr → data-node-halo-breath="on", child <animate> present
7
- * idl → data-node-halo-breath="off", no <animate> child
8
- * off → data-node-halo-breath="off", no <animate> child
9
- * Then probe reducedMotion=reduce → wkr also reads "off", no
10
- * <animate>.
11
- */
12
- import { chromium } from 'playwright';
13
- import { readFileSync } from 'node:fs';
14
-
15
- const TOKEN = JSON.parse(readFileSync('/home/vansin/.anet/config.json', 'utf8')).token;
16
- const browser = await chromium.launch({ headless: true });
17
- const fresh = new Date(Date.now() - 60 * 1000).toISOString();
18
- const stale10 = new Date(Date.now() - 10 * 60 * 1000).toISOString();
19
-
20
- const probe = async (reducedMotion) => {
21
- const ctx = await browser.newContext({
22
- viewport: { width: 1400, height: 1500 },
23
- reducedMotion: reducedMotion ? 'reduce' : 'no-preference',
24
- });
25
- await ctx.addCookies([{ name: 'anet_dashboard_session', value: `v3:${TOKEN}`, domain: '127.0.0.1', path: '/' }]);
26
- await ctx.addInitScript(() => {
27
- try { localStorage.setItem('anet-theme', 'cyber'); sessionStorage.setItem('anet_v3_auth', '1'); } catch {}
28
- });
29
- await ctx.route('**/api/hub/status*', async (route) => {
30
- const r = await route.fetch();
31
- const b = await r.json();
32
- const nid = (b.sessions || [])[0]?.network_id || 'default';
33
- const mk = (alias, status, ts) => ({
34
- alias, status, model: 'claude-opus-4', runtime: 'cli-claude-code',
35
- network_id: nid, project_dir: null,
36
- created_at: ts, updated_at: ts, last_seen_at: ts,
37
- });
38
- await route.fulfill({ response: r, json: { ...b, sessions: [
39
- mk('wkr', 'working', fresh),
40
- mk('idl', 'idle', fresh),
41
- mk('off', 'offline', stale10),
42
- ] } });
43
- });
44
- await ctx.route('**/api/hub/messages*', (route) => route.fulfill({ json: { messages: [] } }));
45
- await ctx.route('**/api/hub/tasks*', (route) => route.fulfill({ json: { tasks: [] } }));
46
- const page = await ctx.newPage();
47
- await page.goto('http://127.0.0.1:3000/', { waitUntil: 'domcontentloaded' });
48
- await page.waitForFunction(() => document.querySelectorAll('g[data-node]').length === 3, { timeout: 30000 });
49
- await page.waitForTimeout(400);
50
- const data = await page.evaluate(() => {
51
- const out = {};
52
- for (const a of ['wkr', 'idl', 'off']) {
53
- const g = document.querySelector(`g[data-node="${a}"]`);
54
- const halo = g?.querySelector('[data-node-halo-breath]');
55
- out[a] = {
56
- attr: halo?.getAttribute('data-node-halo-breath') || '',
57
- anim: !!halo?.querySelector('animate'),
58
- dur: halo?.querySelector('animate')?.getAttribute('dur') || null,
59
- };
60
- }
61
- return out;
62
- });
63
- await ctx.close();
64
- return data;
65
- };
66
-
67
- const normal = await probe(false);
68
- const reduced = await probe(true);
69
- await browser.close();
70
-
71
- const results = {
72
- normal_wkrAttrOn: normal.wkr.attr === 'on',
73
- normal_wkrHasAnimate: normal.wkr.anim === true,
74
- normal_wkrDur3s: normal.wkr.dur === '3s',
75
- normal_idlAttrOff: normal.idl.attr === 'off',
76
- normal_idlNoAnimate: normal.idl.anim === false,
77
- normal_offAttrOff: normal.off.attr === 'off',
78
- normal_offNoAnimate: normal.off.anim === false,
79
- reduced_wkrAttrOff: reduced.wkr.attr === 'off',
80
- reduced_wkrNoAnimate: reduced.wkr.anim === false,
81
- };
82
- const ok = Object.values(results).every(Boolean);
83
- console.log(`${ok ? '✅' : '❌'} working halo breath:`, JSON.stringify(results),
84
- `\n normal=`, normal,
85
- `\n reduced=`, reduced);
86
- process.exit(ok ? 0 : 1);