const puppeteer=require('puppeteer-core'),fs=require('fs'),path=require('path'); const DIR='/tmp/l99-ss';if(!fs.existsSync(DIR))fs.mkdirSync(DIR,{recursive:true}); const R=[];let tp=0,tc=0; function L(n,c,p,d=''){tc++;if(p)tp++;R.push({name:n,check:c,pass:p,detail:d});console.log(`${p?'V':'X'} ${n}|${c} ${d}`);} (async()=>{ const b=await puppeteer.launch({executablePath:'/usr/bin/google-chrome',headless:'new',args:['--no-sandbox','--disable-gpu','--ignore-certificate-errors','--disable-dev-shm-usage']}); // LOGIN console.log('=== LOGIN ==='); let p=await b.newPage();await p.goto('https://weval-consulting.com/login',{waitUntil:'networkidle2',timeout:15000}); let h=await p.content(); L('Login','page_loads',h.length>500);L('Login','email_input',h.includes('input')&&h.includes('password'));L('Login','submit_btn',h.includes('button')); await p.screenshot({path:DIR+'/login.png'});await p.close(); // WEVADS console.log('=== WEVADS ==='); p=await b.newPage();await p.goto('https://weval-consulting.com/wevads-ia/',{waitUntil:'networkidle2',timeout:15000}); h=await p.content();let hl=h.toLowerCase(); L('WEVADS','spa_loads',h.length>50000,h.length+'b');L('WEVADS','sidebar_nav',hl.includes('campagne')||hl.includes('contact')); L('WEVADS','chat_input',h.includes('input')||h.includes('textarea'));L('WEVADS','templates',hl.includes('template')); L('WEVADS','analytics',hl.includes('analytics')||hl.includes('statistiq'));L('WEVADS','brain_ai',hl.includes('brain')||hl.includes('assistant')); L('WEVADS','logout',hl.includes('logout')||hl.includes('connexion')); L('WEVADS','interactive',(h.match(/onclick/gi)||[]).length>=3,(h.match(/onclick/gi)||[]).length+' onclick'); await p.screenshot({path:DIR+'/wevads.png'});await p.close(); // ADMIN console.log('=== ADMIN ==='); p=await b.newPage();await p.goto('https://weval-consulting.com/admin-saas.html',{waitUntil:'networkidle2',timeout:15000}); h=await p.content();hl=h.toLowerCase(); L('Admin','loads',h.length>10000);L('Admin','agents',hl.includes('agent'));L('Admin','docker',hl.includes('docker')); L('Admin','nonreg',hl.includes('nonreg'));L('Admin','health',hl.includes('health'));L('Admin','oss',hl.includes('oss')); L('Admin','tabs',(h.match(/onclick|click|tab/gi)||[]).length>=3);L('Admin','api_calls',h.includes('fetch(')); await p.screenshot({path:DIR+'/admin.png'});await p.close(); // ARCHI 3D console.log('=== ARCHI3D ==='); p=await b.newPage();await p.goto('https://weval-consulting.com/agents-archi.html',{waitUntil:'networkidle2',timeout:15000}); h=await p.content(); L('Archi3D','threejs',h.includes('THREE'));L('Archi3D','canvas',h.includes('canvas'));L('Archi3D','bloom',h.toLowerCase().includes('bloom')); L('Archi3D','orbit',h.includes('OrbitControls'));L('Archi3D','agents',h.toLowerCase().includes('agent')); await p.screenshot({path:DIR+'/archi3d.png'});await p.close(); // PAPERCLIP LOGIN console.log('=== PAPERCLIP ==='); p=await b.newPage();await p.goto('https://paperclip.weval-consulting.com/auth/sign-in',{waitUntil:'networkidle2',timeout:15000}); h=await p.content();hl=h.toLowerCase(); L('Paperclip','login_page',hl.includes('sign in')||hl.includes('email'));L('Paperclip','inputs',h.includes('input')); L('Paperclip','password',hl.includes('password')); try{ const inputs=await p.$$('input');L('Paperclip','input_count',inputs.length>=2,inputs.length+' inputs'); if(inputs.length>=2){await inputs[0].type('ymahboub@weval-consulting.com');await inputs[1].type('Weval2026!');} const btns=await p.$$('button');if(btns.length>0)await btns[btns.length-1].click(); await p.waitForNavigation({timeout:8000}).catch(()=>{}); h=await p.content();hl=h.toLowerCase(); L('Paperclip','login_ok',hl.includes('dashboard')||hl.includes('weval')||hl.includes('issue')); L('Paperclip','agents_visible',hl.includes('agent')); L('Paperclip','skills',hl.includes('skill')); L('Paperclip','org',hl.includes('org')); }catch(e){L('Paperclip','login_flow',false,e.message?.substring(0,50));} await p.screenshot({path:DIR+'/paperclip.png'});await p.close(); // SUBDOMAINS for(const[n,u,ck]of[ ['CRM','https://crm.weval-consulting.com',['input','twenty']], ['DeerFlow','https://deerflow.weval-consulting.com',['chat','new']], ['Langfuse','https://langfuse.weval-consulting.com',['langfuse','sign']], ['Plausible','https://analytics.weval-consulting.com',['plausible','dashboard']], ['Mattermost','https://mm.weval-consulting.com',['mattermost']], ['Kuma','https://monitor.weval-consulting.com',['uptime','monitor']], ['n8n','https://n8n.weval-consulting.com',['n8n','workflow']], ]){ console.log(`=== ${n} ===`);p=await b.newPage(); await p.goto(u,{waitUntil:'networkidle2',timeout:15000});h=await p.content();hl=h.toLowerCase(); L(n,'loads',h.length>1000);for(const c of ck)L(n,c,hl.includes(c)); await p.screenshot({path:DIR+'/'+n.toLowerCase()+'.png'});await p.close(); } // WEVAL PAGES for(const[n,pg,ck]of[ ['Enterprise','enterprise-model.html',['agent','canvas','dept']], ['Fleet','agents-fleet.html',['fleet','agent','active']], ['L99Brain','l99-brain.html',['layer','test','%']], ['Director','director-center.html',['director','center','fetch']], ['Meetings','wevia-meeting-rooms.html',['room','meeting']], ['Architecture','architecture.html',['scan','gap','topology']], ['OpenClaw','openclaw.html',['provider','model','input']], ['Console','wevia-console.html',['console','wevia']], ['DirChat','director-chat.html',['chat','input']], ['ValueStream','value-streaming.html',['href','body']], ['Register','register.html',['href','body']], ]){ p=await b.newPage();await p.goto('https://weval-consulting.com/'+pg,{waitUntil:'domcontentloaded',timeout:10000}); h=await p.content();hl=h.toLowerCase(); L(n,'loads',h.length>1000);for(const c of ck)L(n,c,hl.includes(c));await p.close(); } // API INTEGRATION console.log('=== API ==='); p=await b.newPage(); await p.goto('https://weval-consulting.com/api/ecosystem-health.php',{timeout:10000}); let t=await p.evaluate(()=>document.body.innerText); try{const d=JSON.parse(t);L('API','ecosystem_json',true);L('API','l99_data',!!d.l99);L('API','docker',!!d.infra);L('API','oss>700',d.ecosystem?.oss>700,d.ecosystem?.oss);L('API','skills>600',d.ecosystem?.skills>600,d.ecosystem?.skills);L('API','qdrant>10K',d.providers?.qdrant>10000,d.providers?.qdrant);}catch(e){L('API','ecosystem',false);} await p.goto('https://weval-consulting.com/api/agents-full-count.php',{timeout:10000}); t=await p.evaluate(()=>document.body.innerText); try{const d=JSON.parse(t);L('API','agents>1000',d.total>1000,d.total);}catch(e){L('API','agents',false);} await p.goto('https://weval-consulting.com/api/execution-map.json',{timeout:10000}); t=await p.evaluate(()=>document.body.innerText); try{const d=JSON.parse(t);L('API','exec_map>7',Object.keys(d).length>=7,Object.keys(d).length+' providers');}catch(e){L('API','execmap',false);} // CHAT GROQ const cr=await p.evaluate(async()=>{const r=await fetch('/api/weval-ia',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({message:'2+2?',provider:'groq'})});return await r.text();}); try{const d=JSON.parse(cr);L('API','chat_groq',!!(d.result||d.response),(d.result||d.response||'').substring(0,30));}catch(e){L('API','chat',false);} await p.close(); await b.close(); console.log(`\n${'='.repeat(55)}`); console.log(`L99 FULL: ${tp}/${tc} = ${Math.round(100*tp/tc)}%`); console.log(`${'='.repeat(55)}`); const fails=R.filter(r=>!r.pass);if(fails.length){console.log(`FAILS(${fails.length}):`);fails.forEach(f=>console.log(` X ${f.name}|${f.check}|${f.detail}`));} try{fs.writeFileSync('/tmp/l99-full-results.json',JSON.stringify({ts:new Date().toISOString(),total:tc,pass:tp,fail:tc-tp,pct:Math.round(100*tp/tc),results:R},null,2));}catch(e){} })();