nothumanallowed 14.1.30 → 14.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.31",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '14.1.
|
|
8
|
+
export const VERSION = '14.1.31';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/llm.mjs
CHANGED
|
@@ -45,20 +45,16 @@
|
|
|
45
45
|
//
|
|
46
46
|
// Both artifacts can co-exist: after fusion, the fused word may need split-fix.
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
'il','lo','la','
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
48
|
+
// Stopwords that act as word boundaries — these are NEVER BPE fragments, always real words
|
|
49
|
+
const BOUNDARY_WORDS = new Set([
|
|
50
|
+
'il','lo','la','gli','le','un','uno','una',
|
|
51
|
+
'del','dello','della','dei','degli','delle',
|
|
52
|
+
'al','allo','alla','ai','agli','alle',
|
|
53
|
+
'dal','dallo','dalla','dai','dagli','dalle',
|
|
54
|
+
'nel','nello','nella','nei','negli','nelle',
|
|
55
|
+
'sul','sullo','sulla','sui','sugli','sulle',
|
|
56
56
|
'con','col','per','tra','fra','che','non','ma',
|
|
57
|
-
'
|
|
58
|
-
// English
|
|
59
|
-
'the','a','an','of','to','in','is','it','as',
|
|
60
|
-
'at','be','by','do','he','hi','if','my','no',
|
|
61
|
-
'on','or','so','up','us','we',
|
|
57
|
+
'the','and','for','are','was','but','not','you','all','can','her','has','had',
|
|
62
58
|
]);
|
|
63
59
|
|
|
64
60
|
// Fusion word set: IT articles/preps that were split-fused (Artifact A)
|
|
@@ -87,74 +83,97 @@ const BPE_SPLIT_RE = new RegExp(
|
|
|
87
83
|
* fuse them. Returns the fused string if fusion is valid, or null otherwise.
|
|
88
84
|
*
|
|
89
85
|
* A run is safe to fuse when:
|
|
90
|
-
* 1.
|
|
91
|
-
* 2.
|
|
92
|
-
* 3.
|
|
86
|
+
* 1. Length >= 3 tokens (strong signal of BPE shattering)
|
|
87
|
+
* 2. Fused form contains at least one vowel (real word check)
|
|
88
|
+
* 3. Fused form does not exceed 22 chars (real words are rarely longer)
|
|
89
|
+
* 4. At least 2 tokens are non-trivial (>1 char) to avoid fusing "a e i o u"
|
|
93
90
|
*/
|
|
94
91
|
function tryFuseRun(tokens) {
|
|
95
92
|
if (tokens.length < 3) return null;
|
|
96
|
-
for (const t of tokens) {
|
|
97
|
-
if (FUNCTION_WORDS.has(t.toLowerCase())) return null;
|
|
98
|
-
}
|
|
99
93
|
const fused = tokens.join('');
|
|
100
94
|
if (fused.length > 22) return null;
|
|
101
95
|
if (!/[aeiouàèéìòùAEIOUÀÈÉÌÒÙ]/.test(fused)) return null;
|
|
96
|
+
// At least 2 tokens must be >1 char (avoid fusing pure vowel sequences like "a e i o")
|
|
97
|
+
const nonTrivial = tokens.filter(t => t.length > 1).length;
|
|
98
|
+
if (nonTrivial < 2) return null;
|
|
102
99
|
return fused;
|
|
103
100
|
}
|
|
104
101
|
|
|
105
102
|
/**
|
|
106
103
|
* Scan a line for fragment-shattered token runs and fuse them.
|
|
107
104
|
*
|
|
108
|
-
* Algorithm (O(n)
|
|
105
|
+
* Algorithm (O(n) greedy chunking):
|
|
109
106
|
* - Tokenize the line by spaces
|
|
110
|
-
* -
|
|
111
|
-
* - When
|
|
112
|
-
* -
|
|
107
|
+
* - Accumulate consecutive short lowercase tokens into a window
|
|
108
|
+
* - When window >= 8 tokens OR non-fragment encountered, split window into chunks of 3-7 tokens
|
|
109
|
+
* - Attempt to fuse each chunk; emit fused word or original tokens
|
|
113
110
|
*/
|
|
114
111
|
function repairFragmentRuns(line) {
|
|
115
112
|
const tokens = line.split(' ');
|
|
116
113
|
const out = [];
|
|
117
|
-
let window = [];
|
|
118
|
-
let wStart = 0; // index of window start in `tokens`
|
|
114
|
+
let window = [];
|
|
119
115
|
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
if (fused !== null) {
|
|
123
|
-
out.push(fused);
|
|
124
|
-
} else {
|
|
125
|
-
// Not a valid run — emit tokens verbatim
|
|
116
|
+
const processWindow = () => {
|
|
117
|
+
if (window.length < 3) {
|
|
126
118
|
for (const t of window) out.push(t);
|
|
119
|
+
window = [];
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
// Greedy chunking: consume chunks of 3-7 tokens from left, attempt fusion
|
|
123
|
+
let i = 0;
|
|
124
|
+
while (i < window.length) {
|
|
125
|
+
const remaining = window.length - i;
|
|
126
|
+
const chunkSize = remaining >= 7 ? 7 : remaining >= 3 ? remaining : 0;
|
|
127
|
+
if (chunkSize === 0) {
|
|
128
|
+
// Less than 3 left — emit verbatim
|
|
129
|
+
for (let j = i; j < window.length; j++) out.push(window[j]);
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
const chunk = window.slice(i, i + chunkSize);
|
|
133
|
+
const fused = tryFuseRun(chunk);
|
|
134
|
+
if (fused !== null) {
|
|
135
|
+
out.push(fused);
|
|
136
|
+
i += chunkSize;
|
|
137
|
+
} else {
|
|
138
|
+
// Fusion failed — try smaller chunk (chunkSize-1)
|
|
139
|
+
if (chunkSize > 3) {
|
|
140
|
+
const smallerChunk = window.slice(i, i + chunkSize - 1);
|
|
141
|
+
const fusedSmaller = tryFuseRun(smallerChunk);
|
|
142
|
+
if (fusedSmaller !== null) {
|
|
143
|
+
out.push(fusedSmaller);
|
|
144
|
+
i += chunkSize - 1;
|
|
145
|
+
} else {
|
|
146
|
+
// Even smaller chunk failed — emit first token, retry from i+1
|
|
147
|
+
out.push(window[i]);
|
|
148
|
+
i++;
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
// Chunk of 3 failed — emit verbatim
|
|
152
|
+
for (const t of chunk) out.push(t);
|
|
153
|
+
i += chunkSize;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
127
156
|
}
|
|
128
157
|
window = [];
|
|
129
158
|
};
|
|
130
159
|
|
|
131
160
|
for (let i = 0; i < tokens.length; i++) {
|
|
132
161
|
const tok = tokens[i];
|
|
133
|
-
|
|
134
|
-
const
|
|
162
|
+
const isLowerShort = tok.length >= 1 && tok.length <= 4 && /^[a-z\u00c0-\u024f]+$/.test(tok);
|
|
163
|
+
const isBoundary = BOUNDARY_WORDS.has(tok.toLowerCase());
|
|
164
|
+
const isFragment = isLowerShort && !isBoundary;
|
|
135
165
|
|
|
136
166
|
if (isFragment) {
|
|
137
167
|
window.push(tok);
|
|
168
|
+
// Force processing if window reaches 12 tokens (safety — split long runs)
|
|
169
|
+
if (window.length >= 12) processWindow();
|
|
138
170
|
} else {
|
|
139
|
-
|
|
140
|
-
if (window.length >= 3) {
|
|
141
|
-
flushWindow(i);
|
|
142
|
-
} else {
|
|
143
|
-
// Window too short — not a run, emit verbatim
|
|
144
|
-
for (const t of window) out.push(t);
|
|
145
|
-
window = [];
|
|
146
|
-
}
|
|
171
|
+
processWindow();
|
|
147
172
|
out.push(tok);
|
|
148
173
|
}
|
|
149
174
|
}
|
|
150
175
|
|
|
151
|
-
//
|
|
152
|
-
if (window.length >= 3) {
|
|
153
|
-
flushWindow(tokens.length);
|
|
154
|
-
} else {
|
|
155
|
-
for (const t of window) out.push(t);
|
|
156
|
-
}
|
|
157
|
-
|
|
176
|
+
processWindow(); // flush final window
|
|
158
177
|
return out.join(' ');
|
|
159
178
|
}
|
|
160
179
|
|
|
@@ -230,7 +230,7 @@ Provide specific, actionable levels. Use technical analysis (EMA, RSI, MACD, Fib
|
|
|
230
230
|
- Maximum drawdown and recovery expectations
|
|
231
231
|
- Strategy capacity (AUM limits before alpha decay)
|
|
232
232
|
- Implementation costs: slippage, market impact, transaction costs
|
|
233
|
-
- Key risks: overfitting, regime change, crowding`,agents:[{icon:`📊`,agent:`oracle`,label:`Oracle`,status:`waiting`,output:``},{icon:`💹`,agent:`mercury`,label:`Mercury`,status:`waiting`,output:``},{icon:`📈`,agent:`edi`,label:`Edi`,status:`waiting`,output:``},{icon:`⚠️`,agent:`cassandra`,label:`Cassandra`,status:`waiting`,output:``},{icon:`🔥`,agent:`prometheus`,label:`Prometheus`,status:`waiting`,output:``}]}],Te=`trading strategy.fundamental analysis.portfolio risk.sector deep dive.crypto analysis.quant factor.macro regime.cross-asset.hedge.derivative.yield curve.market_price.market_chart.market_indicators.macro_data.crypto_data.valuation.equity.earnings.dividend.short interest.volatility.options.futures.bitcoin.ethereum`.split(`.`),Ee=[`Analyze my unread emails and create a priority action plan`,`Search the web for AI news today and summarize it in a canvas report`,`Check my calendar for this week and suggest how to optimize my schedule`,`Review my GitHub notifications and draft responses to open issues`,`Search for information about a topic, fact-check it, and write a report`],R={bg:`#0a0d14`,wall:`#0d1117`,wallStripe:`#0f1520`,baseboard:`#1e293b`,floorA:`#111827`,floorB:`#141c2b`,floorLine:`#1e293b`,ceiling:`#0b0f18`,lampBody:`#854d0e`,lampGlow:`#fef08a`,partition:`#1a2436`,partitionH:`#253347`,partitionT:`#2d4a6e`,deskTop:`#2d4263`,deskFace:`#1e3352`,deskSide:`#192b43`,deskLeg:`#0f1e30`,monBody:`#0f172a`,monFace:`#162032`,monScrIdle:`#060b12`,monScrOn:`#001208`,monScrDone:`#001a08`,monStand:`#0d1625`,keyboard:`#162032`,chairBack:`#1a3a5c`,chairSeat:`#1e4068`,chairLeg:`#0f1e30`,plant1:`#14532d`,plant2:`#166534`,pot:`#78350f`,cup:`#7c2d12`,paper:`#e2e8f0`,paperLine:`#94a3b8`,skin:[`#f5c97a`,`#fbbf24`,`#fca5a5`,`#86efac`,`#a5f3fc`,`#c4b5fd`,`#fde68a`,`#f9a8d4`],shirt:[`#1e40af`,`#065f46`,`#312e81`,`#be123c`,`#164e63`,`#7c3aed`,`#7f1d1d`,`#0e7490`],hair:[`#7c3aed`,`#92400e`,`#1e293b`,`#6b21a8`,`#78350f`,`#292524`,`#422006`,`#0c4a6e`],pants:`#1e293b`,shoes:`#0f172a`,cSkin:`#fbbf24`,cShirt:`#4f46e5`,cHair:`#111827`,cTie:`#dc2626`,cPants:`#1e293b`,cShoes:`#0f172a`,cBag:`#78350f`,green:`#22c55e`,greenDim:`#14532d`,cyan:`#67e8f9`,purple:`#a78bfa`,red:`#ef4444`,amber:`#fbbf24`,dim:`#334155`,white:`#f1f5f9`,bubbleBg:`#0f172a`,bubbleBdr:`#334155`},z=2,De=1200,Oe=140,ke=De*z,Ae=Oe*z,je=Math.round(Oe*.78),Me=130,Ne=14,Pe=je-Ne-2,Fe=8,Ie=36;function B(e,t,n,r,i=1,a=1){e.fillStyle=t,e.fillRect(n*z,r*z,i*z,a*z)}function Le(e){B(e,R.ceiling,0,0,De,7);for(let t=0;t<De;t++)B(e,t%20<10?R.wall:R.wallStripe,t,7,1,je-7);B(e,R.baseboard,0,je-3,De,3);for(let t=0;t<De;t+=14)for(let n=je;n<Oe;n+=7)B(e,(Math.floor(t/14)+Math.floor((n-je)/7))%2==0?R.floorA:R.floorB,t,n,14,7),B(e,R.floorLine,t,n,14,1),B(e,R.floorLine,t,n,1,7);for(let t=40;t<De;t+=120){B(e,R.lampBody,t,1,40,4),B(e,R.lampGlow,t+2,2,36,2);for(let n=0;n<18;n++)e.fillStyle=`rgba(254,240,138,${(.06-n*.003).toFixed(4)})`,e.fillRect((t+20-n*1.1)*z,(5+n)*z,n*2.2*z,z)}}function Re(e,t,n,r){let i=t.x,a=t.status===`running`,o=t.status===`done`,s=t.status===`error`,c=Math.abs(n-(i+Me/2))<30;a&&(e.fillStyle=`rgba(99,102,241,0.09)`,e.fillRect(i*z,10*z,Me*z,(Oe-10)*z)),o&&(e.fillStyle=`rgba(34,197,94,0.05)`,e.fillRect(i*z,10*z,Me*z,(Oe-10)*z));let l=je-8;B(e,R.partition,i,8,3,l),B(e,R.partitionH,i+1,8,2,l),B(e,R.partition,i+Me,8,3,l),B(e,a?R.partitionT:o?`#1a3a2e`:s?`#3a1a1a`:R.partitionH,i,8,Me+3,4),B(e,`#0f172a`,i+5,14,16,10),B(e,`#162032`,i+6,15,14,3),a?(B(e,R.green,i+7,19,11,1),B(e,R.greenDim,i+7,21,12,1)):o?(B(e,R.green,i+7,18,12,1),B(e,R.green,i+7,20,9,1),B(e,R.green,i+7,22,11,1)):(B(e,R.dim,i+7,19,10,1),B(e,R.dim,i+7,21,7,1));let u=i+Me-14;B(e,R.pot,u+2,Pe+Ne-5,7,5),B(e,R.plant1,u,Pe+Ne-13,10,8),B(e,R.plant2,u+2,Pe+Ne-17,6,5),B(e,R.plant2,u-2,Pe+Ne-12,5,4),B(e,R.plant2,u+7,Pe+Ne-13,5,4),B(e,R.deskTop,i+4,Pe,Me-6,3),B(e,R.deskFace,i+4,Pe+3,Me-6,Ne-3),B(e,R.deskSide,i+4,Pe+Ne,Me-6,3);let d=je-Pe-Ne-3;B(e,R.deskLeg,i+8,Pe+Ne+3,4,d),B(e,R.deskLeg,i+Me-10,Pe+Ne+3,4,d);let f=i+14,p=Pe-18;if(B(e,R.monBody,f,p,22,14),B(e,R.monFace,f+1,p+1,20,12),B(e,a?R.monScrOn:o?R.monScrDone:R.monScrIdle,f+2,p+2,18,8),a)for(let t=0;t<3;t++){let n=3+Math.floor((r/90+t*5)%12);B(e,R.green,f+3,p+3+t*2,n,1),B(e,R.greenDim,f+3+n,p+3+t*2,12-n,1)}else o?(B(e,R.green,f+3,p+3,10,1),B(e,R.green,f+3,p+5,8,1),B(e,R.green,f+3,p+7,9,1),B(e,R.green,f+13,p+3,2,4)):s?(B(e,R.red,f+8,p+2,4,6),B(e,R.red,f+8,p+9,4,2)):(B(e,R.dim,f+3,p+3,12,1),B(e,R.dim,f+3,p+5,8,1),B(e,R.dim,f+3,p+7,10,1));B(e,R.monStand,f+8,p+14,4,3),B(e,R.monStand,f+5,p+17,10,1),B(e,R.keyboard,f-1,Pe+1,16,4);for(let t=0;t<5;t++)B(e,R.monFace,f+t*3,Pe+2,2,2);B(e,R.cup,i+7,Pe+2,5,5),B(e,`#92400e`,i+12,Pe+4,2,3),B(e,R.paper,i+52,Pe+2,12,7),B(e,R.paper,i+54,Pe+1,12,7),B(e,R.paperLine,i+56,Pe+3,7,1),B(e,R.paperLine,i+56,Pe+5,5,1),B(e,R.chairBack,i+Me/2-12,je-20,24,3),B(e,R.chairSeat,i+Me/2-13,je-14,26,8),B(e,R.chairLeg,i+Me/2-8,je-6,4,6),B(e,R.chairLeg,i+Me/2+5,je-6,4,6),ze(e,t,i+Me/2-8,je-Ie,a,c,r);let m=a?R.cyan:o?R.green:s?R.red:R.dim;e.font=`bold ${4*z}px monospace`,e.fillStyle=m,e.textBaseline=`alphabetic`;let h=t.label.length>14?t.label.slice(0,13)+`…`:t.label;e.fillText(h,(i+4)*z,8*z),B(e,m,i+Me-4,9,4,4),a&&Math.floor(r/250)%2==0&&B(e,R.white,i+Me-3,10,2,2)}function ze(e,t,n,r,i,a,o){let s=R.skin[t.skinIdx],c=R.shirt[t.shirtIdx],l=R.hair[t.hairIdx],u=i&&!a?Math.floor(o/700)%2:0;B(e,l,n+1,r+u,12,3),B(e,l,n,r+1+u,14,2),B(e,l,n,r+3+u,2,5),B(e,l,n+12,r+3+u,2,5),B(e,s,n+1,r+3+u,12,9);let d=l;B(e,d,n+2,r+4+u,3,1),B(e,d,n+9,r+4+u,3,1),B(e,`#e2e8f0`,n+2,r+5+u,3,3),B(e,`#e2e8f0`,n+9,r+5+u,3,3);let f=t.skinIdx%2==0?`#1d4ed8`:`#065f46`;if(B(e,f,n+3,r+6+u,2,2),B(e,f,n+10,r+6+u,2,2),B(e,`#0f172a`,n+3,r+7+u,1,1),B(e,`#0f172a`,n+10,r+7+u,1,1),B(e,`#c97a4a`,n+7,r+9+u,1,2),t.status===`done`)B(e,`#991b1b`,n+4,r+11+u,6,1),B(e,`#991b1b`,n+3,r+10+u,1,1),B(e,`#991b1b`,n+10,r+10+u,1,1);else if(t.status===`error`)B(e,`#991b1b`,n+4,r+10+u,6,1),B(e,`#991b1b`,n+3,r+11+u,1,1),B(e,`#991b1b`,n+10,r+11+u,1,1);else if(t.status===`running`){let t=Math.floor(o/250)%2;B(e,`#991b1b`,n+5,r+10+u,4,t?2:1)}else B(e,`#7f1d1d`,n+5,r+11+u,4,1);if(B(e,s,n+4,r+12,6,2),B(e,c,n+1,r+14,14,11),B(e,`#f1f5f9`,n+4,r+14,3,4),B(e,`#f1f5f9`,n+9,r+14,3,4),e.font=`${4*z}px serif`,e.textBaseline=`middle`,e.textAlign=`center`,e.fillText(t.icon,(n+8)*z,(r+19)*z),e.textAlign=`left`,i&&!a){let t=Math.floor(o/120)%2;B(e,c,n-2,r+14,3,9),B(e,s,n-2,r+22-t,3,3),B(e,c,n+15,r+14,3,9),B(e,s,n+15,r+22-(1-t),3,3)}else if(a&&i){let t=Math.floor(o/180)%3;B(e,c,n-2,r+14,3,8),B(e,s,n-2,r+22,3,3),B(e,c,n+15,r+8+t,3,9),B(e,s,n+15,r+5+t,3,4)}else B(e,c,n-2,r+14,3,9),B(e,s,n-2,r+23,3,2),B(e,c,n+15,r+14,3,9),B(e,s,n+15,r+23,3,2);B(e,R.pants,n+2,r+25,5,7),B(e,R.pants,n+9,r+25,5,7),B(e,`#2d3f5f`,n+3,r+29,3,1),B(e,`#2d3f5f`,n+10,r+29,3,1),B(e,R.shoes,n,r+32,7,4),B(e,R.shoes,n+9,r+32,7,4),B(e,`#1e2a3a`,n+1,r+32,5,1),B(e,`#1e2a3a`,n+10,r+32,5,1),e.fillStyle=`rgba(0,0,0,0.35)`,e.beginPath(),e.ellipse((n+8)*z,(je-1)*z,9*z,2*z,0,0,Math.PI*2),e.fill()}function Be(e){e.papers.length>=6||e.papers.push({x:e.x+20+Math.random()*(Me-40),y:Pe-4,vx:(Math.random()-.5)*1.5,vy:-1.5-Math.random()*1,rot:Math.random()*360,vrot:(Math.random()-.5)*10,life:0,maxLife:70+Math.random()*40})}function Ve(e){e.papers=e.papers.filter(e=>e.life<e.maxLife);for(let t of e.papers)t.x+=t.vx,t.y+=t.vy,t.vy+=.06,t.rot+=t.vrot,t.life++}function He(e,t){for(let n of t.papers){let t=1-n.life/n.maxLife;e.save(),e.globalAlpha=t,e.translate(n.x*z,n.y*z),e.rotate(n.rot*Math.PI/180),e.fillStyle=R.paper,e.fillRect(-7*z,-5*z,14*z,10*z),e.fillStyle=R.paperLine,e.fillRect(-5*z,-2*z,8*z,z),e.fillRect(-5*z,0,6*z,z),e.restore()}e.globalAlpha=1}var Ue=`ABCDEFGHIJKLMNOPRSTUVWXYZ0123456789!?-_.:`;function We(e,t){return t<=0?e:Ue[Math.floor(Math.random()*41)]??e}function Ge(e,t,n,r,i,a=110,o=`down`){if(t.length===0)return;e.fillStyle=R.bubbleBg,e.fillRect(r*z,i*z,a*z,36*z),e.strokeStyle=R.bubbleBdr,e.lineWidth=z,e.strokeRect(r*z,i*z,a*z,36*z),e.fillStyle=R.cyan,e.fillRect(r*z,i*z,a*z,z),e.fillStyle=R.bubbleBdr,e.fillRect(r*z,(i+13+5)*z,a*z,z);for(let o=0;o<2;o++){let s=t[(Math.floor(n)+o)%t.length];if(!s)continue;let c=i+5+o*14;e.fillStyle=o%2==0?`#0f172a`:`#111827`,e.fillRect(r*z,c*z,a*z,13*z);let l=n-Math.floor(n),u=s.text.split(``);e.font=`bold ${5*z}px monospace`,e.textBaseline=`middle`;let d=Math.floor(a/7)-1;for(let t=0;t<Math.min(u.length,d);t++){let n=l>.3&&t>u.length*(1-l)?We(u[t],3):u[t];e.globalAlpha=l>0&&t>u.length*(1-l)?.5+l*.5:1,e.fillStyle=s.color,e.fillText(n,(r+4+t*7)*z,(c+6)*z)}e.globalAlpha=1}let s=r+a/2;if(e.fillStyle=R.bubbleBdr,o===`down`){let t=i+36;e.fillRect((s-2)*z,t*z,4*z,4*z),e.fillRect((s-3)*z,(t+4)*z,6*z,3*z)}else e.fillRect((s-2)*z,(i-4)*z,4*z,4*z),e.fillRect((s-3)*z,(i-7)*z,6*z,3*z)}function Ke(e,t,n,r){let i=je-Ie-8,a=n%2,o=a===0?2:0,s=a===0?0:2;e.fillStyle=`rgba(0,0,0,0.4)`,e.beginPath(),e.ellipse(t*z,(je-1)*z,9*z,2*z,0,0,Math.PI*2),e.fill(),e.save(),e.translate(t*z,0),e.scale(r?1:-1,1),B(e,R.cHair,-4,i,9,3),B(e,R.cHair,-5,i+1,11,2),B(e,R.cHair,-5,i+3,2,3),B(e,R.cHair,5,i+3,2,3),B(e,R.cSkin,-4,i+3,8,7),B(e,`#0f172a`,-2,i+5,2,2),B(e,`#0f172a`,2,i+5,2,2),B(e,`#1d4ed8`,-1,i+6,1,1),B(e,`#1d4ed8`,3,i+6,1,1),B(e,`#7f1d1d`,-2,i+9,5,1),B(e,R.cSkin,-1,i+10,3,2),B(e,R.cShirt,-5,i+12,11,9),B(e,`#3730a3`,-5,i+12,3,5),B(e,`#3730a3`,3,i+12,3,5),B(e,R.cTie,-1,i+12,3,7),B(e,`#f1f5f9`,-2,i+12,1,3),B(e,`#f1f5f9`,2,i+12,1,3),B(e,R.cShirt,-7,i+13,3,9),B(e,R.cSkin,-7,i+21,3,3),B(e,R.cShirt,5,i+13,3,9),B(e,R.cSkin,5,i+21,3,3),B(e,R.cBag,6,i+24,6,4),B(e,`#92400e`,7,i+23,4,1),B(e,R.cPants,-3,i+21+o,5,10),B(e,R.cPants,1,i+21+s,5,10),B(e,R.cShoes,-5,i+29+o,6,3),B(e,R.cShoes,-1,i+29+s,6,3),e.restore()}var qe=[[{text:`RUNNING WORKFLOW`,color:R.cyan},{text:`DISPATCHING...`,color:R.amber}],[{text:`ORCHESTRATING`,color:R.cyan},{text:`ALL SYSTEMS GO`,color:R.green}],[{text:`AGENT PIPELINE`,color:R.purple},{text:`EXECUTING...`,color:R.cyan}],[{text:`MONITORING ALL`,color:R.amber},{text:`ON SCHEDULE`,color:R.green}]];function Je(e,t){let n=e.toUpperCase().slice(0,14);return t===`running`?[{text:n,color:R.cyan},{text:`WORKING...`,color:R.green}]:t===`done`?[{text:n,color:R.green},{text:`TASK DONE`,color:R.green}]:t===`error`?[{text:n,color:R.red},{text:`ERR`,color:R.red}]:[{text:n,color:R.dim},{text:`STANDBY`,color:R.dim}]}function Ye({nodes:e,running:t}){let n=(0,_.useRef)(null),r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(e.length===0)return;let t=Math.min(e.length,8)*(Me+Fe)-Fe,n=Math.max(6,Math.round((De-t)/2));if(!r.current)r.current={agents:e.slice(0,8).map((e,t)=>({x:n+t*(Me+Fe),icon:e.icon,label:e.label,status:e.status,skinIdx:t%R.skin.length,shirtIdx:t%R.shirt.length,hairIdx:t%R.hair.length,papers:[],bubbleLines:Je(e.label,e.status),bubbleScroll:0,bubbleTimer:0})),condX:n+Me/2,condTargetX:n+Me/2,condFacing:!0,condFrame:0,condFrameTimer:0,condIdleTimer:0,condBubble:qe[0],condBubbleScroll:0,condBubbleTimer:0,rafId:0};else{let t=r.current;for(let r=0;r<Math.min(e.length,8);r++){let i=e[r],a=t.agents[r];a?(a.status!==i.status&&(a.status=i.status,a.bubbleLines=Je(i.label,i.status),a.bubbleScroll=0),a.icon=i.icon,a.label=i.label):t.agents.push({x:n+r*(Me+Fe),icon:i.icon,label:i.label,status:i.status,skinIdx:r%R.skin.length,shirtIdx:r%R.shirt.length,hairIdx:r%R.hair.length,papers:[],bubbleLines:Je(i.label,i.status),bubbleScroll:0,bubbleTimer:0})}}},[e]),(0,_.useEffect)(()=>{let e=n.current;if(!e)return;let i=e.getContext(`2d`);if(!i||(i.imageSmoothingEnabled=!1,!r.current))return;let a=0,o=0;function s(e){let n=r.current,c=Math.min(e-a,50);a=e;let l=e,u=n.agents.find(e=>e.status===`running`);if(u){let e=u.x+Me+12,t=u.x-18;n.condTargetX=e<De-30?e:t,n.condBubbleTimer+=c,n.condBubbleTimer>2e3&&(n.condBubbleTimer=0,n.condBubble=qe[Math.floor(Math.random()*qe.length)],n.condBubbleScroll=(n.condBubbleScroll+1)%4)}else if(n.condIdleTimer-=c,n.condIdleTimer<=0){let e=n.agents[Math.floor(Math.random()*n.agents.length)];e&&(n.condTargetX=e.x+Me/2),n.condIdleTimer=2e3+Math.random()*3e3}let d=n.condTargetX-n.condX;if(Math.abs(d)>1&&(n.condX+=d*(t?.12:.04)*(c/16),n.condFacing=d>0,n.condFrameTimer+=c,n.condFrameTimer>100&&(n.condFrame++,n.condFrameTimer=0)),o+=c,o>200){o=0;for(let e of n.agents)e.status===`running`&&Be(e)}for(let e of n.agents)Ve(e);for(let e of n.agents)e.bubbleTimer+=c,e.bubbleTimer>1800&&(e.bubbleTimer=0,e.bubbleScroll=(e.bubbleScroll+1)%4);i.clearRect(0,0,ke,Ae),Le(i),Ke(i,n.condX,n.condFrame,n.condFacing);for(let e of n.agents)Re(i,e,n.condX,l),He(i,e);for(let e of n.agents){if(e.status===`waiting`)continue;let t=Math.min(e.label.length*6+16,90),n=Math.max(e.x+1,Math.min(e.x+(Me-t)/2,De-t-2)),r=je-Ie-36;Ge(i,e.bubbleLines,e.bubbleScroll,n,r,t,`down`)}let f=je-Ie-8-38,p=Math.max(4,Math.min(n.condX-50,De-106));Ge(i,n.condBubble,n.condBubbleScroll,p,f,100,`down`);for(let e=0;e<Ae;e+=z*3)i.fillStyle=`rgba(0,0,0,0.04)`,i.fillRect(0,e,ke,z);n.rafId=requestAnimationFrame(s)}return r.current.rafId=requestAnimationFrame(s),()=>{r.current&&cancelAnimationFrame(r.current.rafId)}},[t]),e.length===0?null:(0,k.jsx)(`div`,{style:{width:`100%`,lineHeight:0},children:(0,k.jsx)(`canvas`,{ref:n,width:ke,height:Ae,style:{width:`100%`,height:`auto`,imageRendering:`pixelated`,display:`block`,background:R.bg,boxShadow:`0 0 40px rgba(99,102,241,0.15), inset 0 0 80px rgba(0,0,0,0.4)`}})})}function Xe(e){let t=e.toLowerCase();return Te.some(e=>t.includes(e.toLowerCase()))}function Ze(e,t){let n=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),r=t.map(e=>e.output).join(`
|
|
233
|
+
- Key risks: overfitting, regime change, crowding`,agents:[{icon:`📊`,agent:`oracle`,label:`Oracle`,status:`waiting`,output:``},{icon:`💹`,agent:`mercury`,label:`Mercury`,status:`waiting`,output:``},{icon:`📈`,agent:`edi`,label:`Edi`,status:`waiting`,output:``},{icon:`⚠️`,agent:`cassandra`,label:`Cassandra`,status:`waiting`,output:``},{icon:`🔥`,agent:`prometheus`,label:`Prometheus`,status:`waiting`,output:``}]}],Te=`trading strategy.fundamental analysis.portfolio risk.sector deep dive.crypto analysis.quant factor.macro regime.cross-asset.hedge.derivative.yield curve.market_price.market_chart.market_indicators.macro_data.crypto_data.valuation.equity.earnings.dividend.short interest.volatility.options.futures.bitcoin.ethereum`.split(`.`),Ee=[`Analyze my unread emails and create a priority action plan`,`Search the web for AI news today and summarize it in a canvas report`,`Check my calendar for this week and suggest how to optimize my schedule`,`Review my GitHub notifications and draft responses to open issues`,`Search for information about a topic, fact-check it, and write a report`],R={bg:`#0a0d14`,wall:`#0d1117`,wallStripe:`#0f1520`,baseboard:`#1e293b`,floorA:`#111827`,floorB:`#141c2b`,floorLine:`#1e293b`,ceiling:`#0b0f18`,lampBody:`#854d0e`,lampGlow:`#fef08a`,partition:`#1a2436`,partitionH:`#253347`,partitionT:`#2d4a6e`,deskTop:`#2d4263`,deskFace:`#1e3352`,deskSide:`#192b43`,deskLeg:`#0f1e30`,monBody:`#0f172a`,monFace:`#162032`,monScrIdle:`#060b12`,monScrOn:`#001208`,monScrDone:`#001a08`,monStand:`#0d1625`,keyboard:`#162032`,chairBack:`#1a3a5c`,chairSeat:`#1e4068`,chairLeg:`#0f1e30`,plant1:`#14532d`,plant2:`#166534`,pot:`#78350f`,cup:`#7c2d12`,paper:`#e2e8f0`,paperLine:`#94a3b8`,skin:[`#f5c97a`,`#fbbf24`,`#fca5a5`,`#86efac`,`#a5f3fc`,`#c4b5fd`,`#fde68a`,`#f9a8d4`],shirt:[`#1e40af`,`#065f46`,`#312e81`,`#be123c`,`#164e63`,`#7c3aed`,`#7f1d1d`,`#0e7490`],hair:[`#7c3aed`,`#92400e`,`#1e293b`,`#6b21a8`,`#78350f`,`#292524`,`#422006`,`#0c4a6e`],pants:`#1e293b`,shoes:`#0f172a`,cSkin:`#fbbf24`,cShirt:`#4f46e5`,cHair:`#111827`,cTie:`#dc2626`,cPants:`#1e293b`,cShoes:`#0f172a`,cBag:`#78350f`,green:`#22c55e`,greenDim:`#14532d`,cyan:`#67e8f9`,purple:`#a78bfa`,red:`#ef4444`,amber:`#fbbf24`,dim:`#334155`,white:`#f1f5f9`,bubbleBg:`#0f172a`,bubbleBdr:`#334155`},z=2,De=1200,Oe=140,ke=De*z,Ae=Oe*z,je=Math.round(Oe*.78),Me=130,Ne=14,Pe=je-Ne-2,Fe=8,Ie=36;function B(e,t,n,r,i=1,a=1){e.fillStyle=t,e.fillRect(n*z,r*z,i*z,a*z)}function Le(e){B(e,R.ceiling,0,0,De,7);for(let t=0;t<De;t++)B(e,t%20<10?R.wall:R.wallStripe,t,7,1,je-7);B(e,R.baseboard,0,je-3,De,3);for(let t=0;t<De;t+=14)for(let n=je;n<Oe;n+=7)B(e,(Math.floor(t/14)+Math.floor((n-je)/7))%2==0?R.floorA:R.floorB,t,n,14,7),B(e,R.floorLine,t,n,14,1),B(e,R.floorLine,t,n,1,7);for(let t=40;t<De;t+=120){B(e,R.lampBody,t,1,40,4),B(e,R.lampGlow,t+2,2,36,2);for(let n=0;n<18;n++)e.fillStyle=`rgba(254,240,138,${(.06-n*.003).toFixed(4)})`,e.fillRect((t+20-n*1.1)*z,(5+n)*z,n*2.2*z,z)}}function Re(e,t,n,r){let i=t.x,a=t.status===`running`,o=t.status===`done`,s=t.status===`error`,c=Math.abs(n-(i+Me/2))<30;a&&(e.fillStyle=`rgba(99,102,241,0.09)`,e.fillRect(i*z,10*z,Me*z,(Oe-10)*z)),o&&(e.fillStyle=`rgba(34,197,94,0.05)`,e.fillRect(i*z,10*z,Me*z,(Oe-10)*z));let l=je-8;B(e,R.partition,i,8,3,l),B(e,R.partitionH,i+1,8,2,l),B(e,R.partition,i+Me,8,3,l),B(e,a?R.partitionT:o?`#1a3a2e`:s?`#3a1a1a`:R.partitionH,i,8,Me+3,4),B(e,`#0f172a`,i+5,14,16,10),B(e,`#162032`,i+6,15,14,3),a?(B(e,R.green,i+7,19,11,1),B(e,R.greenDim,i+7,21,12,1)):o?(B(e,R.green,i+7,18,12,1),B(e,R.green,i+7,20,9,1),B(e,R.green,i+7,22,11,1)):(B(e,R.dim,i+7,19,10,1),B(e,R.dim,i+7,21,7,1));let u=i+Me-14;B(e,R.pot,u+2,Pe+Ne-5,7,5),B(e,R.plant1,u,Pe+Ne-13,10,8),B(e,R.plant2,u+2,Pe+Ne-17,6,5),B(e,R.plant2,u-2,Pe+Ne-12,5,4),B(e,R.plant2,u+7,Pe+Ne-13,5,4),B(e,R.deskTop,i+4,Pe,Me-6,3),B(e,R.deskFace,i+4,Pe+3,Me-6,Ne-3),B(e,R.deskSide,i+4,Pe+Ne,Me-6,3);let d=je-Pe-Ne-3;B(e,R.deskLeg,i+8,Pe+Ne+3,4,d),B(e,R.deskLeg,i+Me-10,Pe+Ne+3,4,d);let f=i+14,p=Pe-18;if(B(e,R.monBody,f,p,22,14),B(e,R.monFace,f+1,p+1,20,12),B(e,a?R.monScrOn:o?R.monScrDone:R.monScrIdle,f+2,p+2,18,8),a)for(let t=0;t<3;t++){let n=3+Math.floor((r/90+t*5)%12);B(e,R.green,f+3,p+3+t*2,n,1),B(e,R.greenDim,f+3+n,p+3+t*2,12-n,1)}else o?(B(e,R.green,f+3,p+3,10,1),B(e,R.green,f+3,p+5,8,1),B(e,R.green,f+3,p+7,9,1),B(e,R.green,f+13,p+3,2,4)):s?(B(e,R.red,f+8,p+2,4,6),B(e,R.red,f+8,p+9,4,2)):(B(e,R.dim,f+3,p+3,12,1),B(e,R.dim,f+3,p+5,8,1),B(e,R.dim,f+3,p+7,10,1));B(e,R.monStand,f+8,p+14,4,3),B(e,R.monStand,f+5,p+17,10,1),B(e,R.keyboard,f-1,Pe+1,16,4);for(let t=0;t<5;t++)B(e,R.monFace,f+t*3,Pe+2,2,2);B(e,R.cup,i+7,Pe+2,5,5),B(e,`#92400e`,i+12,Pe+4,2,3),B(e,R.paper,i+52,Pe+2,12,7),B(e,R.paper,i+54,Pe+1,12,7),B(e,R.paperLine,i+56,Pe+3,7,1),B(e,R.paperLine,i+56,Pe+5,5,1),B(e,R.chairBack,i+Me/2-12,je-20,24,3),B(e,R.chairSeat,i+Me/2-13,je-14,26,8),B(e,R.chairLeg,i+Me/2-8,je-6,4,6),B(e,R.chairLeg,i+Me/2+5,je-6,4,6),ze(e,t,i+Me/2-8,je-Ie,a,c,r);let m=a?R.cyan:o?R.green:s?R.red:R.dim;e.font=`bold ${4*z}px monospace`,e.fillStyle=m,e.textBaseline=`alphabetic`;let h=t.label.length>14?t.label.slice(0,13)+`…`:t.label;e.fillText(h,(i+4)*z,8*z),B(e,m,i+Me-4,9,4,4),a&&Math.floor(r/250)%2==0&&B(e,R.white,i+Me-3,10,2,2)}function ze(e,t,n,r,i,a,o){let s=R.skin[t.skinIdx],c=R.shirt[t.shirtIdx],l=R.hair[t.hairIdx],u=i&&!a?Math.floor(o/700)%2:0;B(e,l,n+1,r+u,12,3),B(e,l,n,r+1+u,14,2),B(e,l,n,r+3+u,2,5),B(e,l,n+12,r+3+u,2,5),B(e,s,n+1,r+3+u,12,9);let d=l;B(e,d,n+2,r+4+u,3,1),B(e,d,n+9,r+4+u,3,1),B(e,`#e2e8f0`,n+2,r+5+u,3,3),B(e,`#e2e8f0`,n+9,r+5+u,3,3);let f=t.skinIdx%2==0?`#1d4ed8`:`#065f46`;if(B(e,f,n+3,r+6+u,2,2),B(e,f,n+10,r+6+u,2,2),B(e,`#0f172a`,n+3,r+7+u,1,1),B(e,`#0f172a`,n+10,r+7+u,1,1),B(e,`#c97a4a`,n+7,r+9+u,1,2),t.status===`done`)B(e,`#991b1b`,n+4,r+11+u,6,1),B(e,`#991b1b`,n+3,r+10+u,1,1),B(e,`#991b1b`,n+10,r+10+u,1,1);else if(t.status===`error`)B(e,`#991b1b`,n+4,r+10+u,6,1),B(e,`#991b1b`,n+3,r+11+u,1,1),B(e,`#991b1b`,n+10,r+11+u,1,1);else if(t.status===`running`){let t=Math.floor(o/250)%2;B(e,`#991b1b`,n+5,r+10+u,4,t?2:1)}else B(e,`#7f1d1d`,n+5,r+11+u,4,1);if(B(e,s,n+4,r+12,6,2),B(e,c,n+1,r+14,14,11),B(e,`#f1f5f9`,n+4,r+14,3,4),B(e,`#f1f5f9`,n+9,r+14,3,4),e.font=`${4*z}px serif`,e.textBaseline=`middle`,e.textAlign=`center`,e.fillText(t.icon,(n+8)*z,(r+19)*z),e.textAlign=`left`,i&&!a){let t=Math.floor(o/120)%2;B(e,c,n-2,r+14,3,9),B(e,s,n-2,r+22-t,3,3),B(e,c,n+15,r+14,3,9),B(e,s,n+15,r+22-(1-t),3,3)}else if(a&&i){let t=Math.floor(o/180)%3;B(e,c,n-2,r+14,3,8),B(e,s,n-2,r+22,3,3),B(e,c,n+15,r+8+t,3,9),B(e,s,n+15,r+5+t,3,4)}else B(e,c,n-2,r+14,3,9),B(e,s,n-2,r+23,3,2),B(e,c,n+15,r+14,3,9),B(e,s,n+15,r+23,3,2);B(e,R.pants,n+2,r+25,5,7),B(e,R.pants,n+9,r+25,5,7),B(e,`#2d3f5f`,n+3,r+29,3,1),B(e,`#2d3f5f`,n+10,r+29,3,1),B(e,R.shoes,n,r+32,7,4),B(e,R.shoes,n+9,r+32,7,4),B(e,`#1e2a3a`,n+1,r+32,5,1),B(e,`#1e2a3a`,n+10,r+32,5,1),e.fillStyle=`rgba(0,0,0,0.35)`,e.beginPath(),e.ellipse((n+8)*z,(je-1)*z,9*z,2*z,0,0,Math.PI*2),e.fill()}function Be(e){e.papers.length>=6||e.papers.push({x:e.x+20+Math.random()*(Me-40),y:Pe-4,vx:(Math.random()-.5)*1.5,vy:-1.5-Math.random()*1,rot:Math.random()*360,vrot:(Math.random()-.5)*10,life:0,maxLife:70+Math.random()*40})}function Ve(e){e.papers=e.papers.filter(e=>e.life<e.maxLife);for(let t of e.papers)t.x+=t.vx,t.y+=t.vy,t.vy+=.06,t.rot+=t.vrot,t.life++}function He(e,t){for(let n of t.papers){let t=1-n.life/n.maxLife;e.save(),e.globalAlpha=t,e.translate(n.x*z,n.y*z),e.rotate(n.rot*Math.PI/180),e.fillStyle=R.paper,e.fillRect(-7*z,-5*z,14*z,10*z),e.fillStyle=R.paperLine,e.fillRect(-5*z,-2*z,8*z,z),e.fillRect(-5*z,0,6*z,z),e.restore()}e.globalAlpha=1}var Ue=`ABCDEFGHIJKLMNOPRSTUVWXYZ0123456789!?-_.:`;function We(e,t){return t<=0?e:Ue[Math.floor(Math.random()*41)]??e}function Ge(e,t,n,r,i,a=110,o=`down`){if(t.length===0)return;e.fillStyle=R.bubbleBg,e.fillRect(r*z,i*z,a*z,36*z),e.strokeStyle=R.bubbleBdr,e.lineWidth=z,e.strokeRect(r*z,i*z,a*z,36*z),e.fillStyle=R.cyan,e.fillRect(r*z,i*z,a*z,z),e.fillStyle=R.bubbleBdr,e.fillRect(r*z,(i+13+5)*z,a*z,z);for(let o=0;o<2;o++){let s=t[(Math.floor(n)+o)%t.length];if(!s)continue;let c=i+5+o*14;e.fillStyle=o%2==0?`#0f172a`:`#111827`,e.fillRect(r*z,c*z,a*z,13*z);let l=n-Math.floor(n),u=s.text.split(``);e.font=`bold ${5*z}px monospace`,e.textBaseline=`middle`;let d=Math.floor(a/7)-1;for(let t=0;t<Math.min(u.length,d);t++){let n=l>.3&&t>u.length*(1-l)?We(u[t],3):u[t];e.globalAlpha=l>0&&t>u.length*(1-l)?.5+l*.5:1,e.fillStyle=s.color,e.fillText(n,(r+4+t*7)*z,(c+6)*z)}e.globalAlpha=1}let s=r+a/2;if(e.fillStyle=R.bubbleBdr,o===`down`){let t=i+36;e.fillRect((s-2)*z,t*z,4*z,4*z),e.fillRect((s-3)*z,(t+4)*z,6*z,3*z)}else e.fillRect((s-2)*z,(i-4)*z,4*z,4*z),e.fillRect((s-3)*z,(i-7)*z,6*z,3*z)}function Ke(e,t,n,r){let i=je-Ie-8,a=n%2,o=a===0?2:0,s=a===0?0:2;e.fillStyle=`rgba(0,0,0,0.4)`,e.beginPath(),e.ellipse(t*z,(je-1)*z,9*z,2*z,0,0,Math.PI*2),e.fill(),e.save(),e.translate(t*z,0),e.scale(r?1:-1,1),B(e,R.cHair,-4,i,9,3),B(e,R.cHair,-5,i+1,11,2),B(e,R.cHair,-5,i+3,2,3),B(e,R.cHair,5,i+3,2,3),B(e,R.cSkin,-4,i+3,8,7),B(e,`#0f172a`,-2,i+5,2,2),B(e,`#0f172a`,2,i+5,2,2),B(e,`#1d4ed8`,-1,i+6,1,1),B(e,`#1d4ed8`,3,i+6,1,1),B(e,`#7f1d1d`,-2,i+9,5,1),B(e,R.cSkin,-1,i+10,3,2),B(e,R.cShirt,-5,i+12,11,9),B(e,`#3730a3`,-5,i+12,3,5),B(e,`#3730a3`,3,i+12,3,5),B(e,R.cTie,-1,i+12,3,7),B(e,`#f1f5f9`,-2,i+12,1,3),B(e,`#f1f5f9`,2,i+12,1,3),B(e,R.cShirt,-7,i+13,3,9),B(e,R.cSkin,-7,i+21,3,3),B(e,R.cShirt,5,i+13,3,9),B(e,R.cSkin,5,i+21,3,3),B(e,R.cBag,6,i+24,6,4),B(e,`#92400e`,7,i+23,4,1),B(e,R.cPants,-3,i+21+o,5,10),B(e,R.cPants,1,i+21+s,5,10),B(e,R.cShoes,-5,i+29+o,6,3),B(e,R.cShoes,-1,i+29+s,6,3),e.restore()}var qe=[[{text:`RUNNING WORKFLOW`,color:R.cyan},{text:`DISPATCHING...`,color:R.amber}],[{text:`ORCHESTRATING`,color:R.cyan},{text:`ALL SYSTEMS GO`,color:R.green}],[{text:`AGENT PIPELINE`,color:R.purple},{text:`EXECUTING...`,color:R.cyan}],[{text:`MONITORING ALL`,color:R.amber},{text:`ON SCHEDULE`,color:R.green}]];function Je(e,t){let n=e.toUpperCase().slice(0,14);return t===`running`?[{text:n,color:R.cyan},{text:`WORKING...`,color:R.green}]:t===`done`?[{text:n,color:R.green},{text:`TASK DONE`,color:R.green}]:t===`error`?[{text:n,color:R.red},{text:`ERR`,color:R.red}]:[{text:n,color:R.dim},{text:`STANDBY`,color:R.dim}]}function Ye({nodes:e,running:t}){let n=(0,_.useRef)(null),r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(e.length===0)return;let t=Math.min(e.length,8)*(Me+Fe)-Fe,n=Math.max(6,Math.round((De-t)/2));if(!r.current)r.current={agents:e.slice(0,8).map((e,t)=>({x:n+t*(Me+Fe),icon:e.icon,label:e.label,status:e.status,skinIdx:t%R.skin.length,shirtIdx:t%R.shirt.length,hairIdx:t%R.hair.length,papers:[],bubbleLines:Je(e.label,e.status),bubbleScroll:0,bubbleTimer:0})),condX:n+Me/2,condTargetX:n+Me/2,condFacing:!0,condFrame:0,condFrameTimer:0,condIdleTimer:0,condBubble:qe[0],condBubbleScroll:0,condBubbleTimer:0,rafId:0};else{let t=r.current;for(let r=0;r<Math.min(e.length,8);r++){let i=e[r],a=t.agents[r];a?(a.status!==i.status&&(a.status=i.status,a.bubbleLines=Je(i.label,i.status),a.bubbleScroll=0),a.icon=i.icon,a.label=i.label):t.agents.push({x:n+r*(Me+Fe),icon:i.icon,label:i.label,status:i.status,skinIdx:r%R.skin.length,shirtIdx:r%R.shirt.length,hairIdx:r%R.hair.length,papers:[],bubbleLines:Je(i.label,i.status),bubbleScroll:0,bubbleTimer:0})}}},[e]),(0,_.useEffect)(()=>{let e=n.current;if(!e)return;let i=e.getContext(`2d`);if(!i||(i.imageSmoothingEnabled=!1,!r.current))return;let a=0,o=0;function s(e){let n=r.current,c=Math.min(e-a,50);a=e;let l=e,u=n.agents.find(e=>e.status===`running`);if(u){let e=u.x+Me+12,t=u.x-18;n.condTargetX=e<De-30?e:t,n.condBubbleTimer+=c,n.condBubbleTimer>2e3&&(n.condBubbleTimer=0,n.condBubble=qe[Math.floor(Math.random()*qe.length)],n.condBubbleScroll=(n.condBubbleScroll+1)%4)}else if(n.condIdleTimer-=c,n.condIdleTimer<=0){let e=n.agents[Math.floor(Math.random()*n.agents.length)];e&&(n.condTargetX=e.x+Me/2),n.condIdleTimer=2e3+Math.random()*3e3}let d=n.condTargetX-n.condX;if(Math.abs(d)>1&&(n.condX+=d*(t?.12:.04)*(c/16),n.condFacing=d>0,n.condFrameTimer+=c,n.condFrameTimer>100&&(n.condFrame++,n.condFrameTimer=0)),o+=c,o>200){o=0;for(let e of n.agents)e.status===`running`&&Be(e)}for(let e of n.agents)Ve(e);for(let e of n.agents)e.bubbleTimer+=c,e.bubbleTimer>1800&&(e.bubbleTimer=0,e.bubbleScroll=(e.bubbleScroll+1)%4);i.clearRect(0,0,ke,Ae),Le(i);for(let e of n.agents)Re(i,e,n.condX,l),He(i,e);Ke(i,n.condX,n.condFrame,n.condFacing);for(let e of n.agents){if(e.status===`waiting`)continue;let t=Math.min(e.label.length*6+16,90),n=Math.max(e.x+1,Math.min(e.x+(Me-t)/2,De-t-2)),r=je-Ie-36;Ge(i,e.bubbleLines,e.bubbleScroll,n,r,t,`down`)}let f=je-Ie-8-38,p=Math.max(4,Math.min(n.condX-50,De-106));Ge(i,n.condBubble,n.condBubbleScroll,p,f,100,`down`);for(let e=0;e<Ae;e+=z*3)i.fillStyle=`rgba(0,0,0,0.04)`,i.fillRect(0,e,ke,z);n.rafId=requestAnimationFrame(s)}return r.current.rafId=requestAnimationFrame(s),()=>{r.current&&cancelAnimationFrame(r.current.rafId)}},[t]),e.length===0?null:(0,k.jsx)(`div`,{style:{width:`100%`,lineHeight:0},children:(0,k.jsx)(`canvas`,{ref:n,width:ke,height:Ae,style:{width:`100%`,height:`auto`,imageRendering:`pixelated`,display:`block`,background:R.bg,boxShadow:`0 0 40px rgba(99,102,241,0.15), inset 0 0 80px rgba(0,0,0,0.4)`}})})}function Xe(e){let t=e.toLowerCase();return Te.some(e=>t.includes(e.toLowerCase()))}function Ze(e,t){let n=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),r=t.map(e=>e.output).join(`
|
|
234
234
|
|
|
235
235
|
`),i=/([+-]?\d+(?:\.\d+)?)\s*%/g,a=[],o;for(;(o=i.exec(r))!==null;){let e=parseFloat(o[1]);e>=-100&&e<=500&&a.push(e)}let s=t.filter(e=>e.output&&e.output!==`(no output)`).map(e=>{let t=ye(e.output);return`
|
|
236
236
|
<div class="section">
|
package/src/ui-dist/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
10
10
|
<title>NHA — NotHumanAllowed</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-5vn1tBY8.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-BRTO-LWg.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|