refactor(agent): replace OMP with Claude Code kernel
This commit is contained in:
1 parent
0fb2226f8c
commit
9a1f182397
232 files changed
+2561
-25564
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/** Isolated real Electron backend QA; no user registry, OMP or original application. */
|
||||
/** Isolated real Electron backend QA; no user registry or original application. */
|
||||
import fs from 'node:fs/promises'
|
||||
import path from 'node:path'
|
||||
import assert from 'node:assert/strict'
|
||||
@@ -14,7 +14,7 @@ if(!process.versions.electron){
|
||||
const sourceSha256=createHash('sha256').update(await fs.readFile('src/main/capabilities/experts.ts')).digest('hex'),moduleSha256=createHash('sha256').update(await fs.readFile(path.join(directory,'experts-under-test.mjs'))).digest('hex')
|
||||
const bootstrap=path.join(directory,'bootstrap.cjs')
|
||||
await fs.writeFile(bootstrap,`const {app}=require('electron');app.setPath('userData',${JSON.stringify(path.join(directory,'data'))});app.setPath('sessionData',${JSON.stringify(path.join(directory,'sessions'))});app.disableHardwareAcceleration();app.whenReady().then(()=>import(${JSON.stringify(import.meta.url)}).catch(e=>{console.error(String(e));app.exit(1)}))`)
|
||||
const env={...process.env,YCODE_EXPERTS_QA_DIRECTORY:directory,YCODE_OMP_HOME:path.join(directory,'omp')};delete env.ELECTRON_RUN_AS_NODE
|
||||
const env={...process.env,YCODE_EXPERTS_QA_DIRECTORY:directory};delete env.ELECTRON_RUN_AS_NODE
|
||||
const reports=[]
|
||||
for(const phase of phases){
|
||||
const code=await new Promise(resolve=>{const child=spawn(createRequire(import.meta.url)('electron'),['--no-sandbox','--disable-gpu-sandbox',bootstrap,phase],{env,windowsHide:true,stdio:['ignore','pipe','pipe']});let output='';child.stdout.on('data',c=>output+=c);child.stderr.on('data',c=>output+=c);const timer=setTimeout(()=>child.kill(),45000);child.on('exit',async code=>{clearTimeout(timer);await fs.writeFile(path.join(directory,phase+'.log'),output);resolve(code??1)})})
|
||||
|
||||
Reference in new issue
Block a user