feat: integrate approved MCP tools and recovery for 1.12

This commit is contained in:
Agent Workbench Dev
2026-10-30 20:34:54 +08:00
parent 601f13c4f8
commit 3f6797b8ee
80 changed files with 5141 additions and 70 deletions
+11 -6
View File
@@ -43,14 +43,19 @@ function run(args, logName) {
const logPath = path.join(directory, logName);
const outputFile = fs.createWriteStream(logPath);
const child = spawn(process.execPath, args, { cwd: sourceRoot, env, windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'] });
let tail = '';
let tail = '', timedOut = false;
const capture = bytes => { outputFile.write(bytes); tail = (tail + bytes.toString('utf8')).slice(-12000); };
child.stdout.on('data', capture); child.stderr.on('data', capture);
const timer = setTimeout(() => child.kill(), 600000);
const timer = setTimeout(() => {
timedOut = true;
if (process.platform === 'win32' && child.pid) {
try { execFileSync('taskkill.exe', ['/PID', String(child.pid), '/T', '/F'], { windowsHide: true, timeout: 10000, stdio: 'ignore' }); } catch { child.kill(); }
} else child.kill();
}, 30 * 60 * 1000);
child.once('error', error => { clearTimeout(timer); outputFile.end(); reject(error); });
child.once('close', code => { clearTimeout(timer); outputFile.end(() => {
logs.push({ stage, path: logPath, sha256: digest(logPath), bytes: fs.statSync(logPath).size });
code === 0 ? resolve(tail) : reject(new Error(stage + ' failed (' + code + '): ' + tail));
code === 0 && !timedOut ? resolve(tail) : reject(new Error(stage + (timedOut ? ' timed out after 30 minutes' : ' failed (' + code + ')') + ': ' + tail));
}); });
});
}
@@ -74,7 +79,7 @@ try {
assert.deepEqual(actualFiles.slice().sort(), Object.keys(expected).sort());
for (const [relative, sha256] of Object.entries(expected)) assert.equal(digest(path.join(sourceRoot, relative)), sha256, relative);
let actualRea = null;
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0'].includes(evidence.version)) {
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0'].includes(evidence.version)) {
stage = 'contained REA';
const reaOutput = await run(['scripts/verify-rea.mjs', '--app-root', sourceRoot, '--contained'], 'rea.log');
actualRea = JSON.parse(reaOutput.trim().split('\n').at(-1));
@@ -82,7 +87,7 @@ try {
assert.ok(actualRea.results.every(item => item.rootExited === true));
}
let actualEngine = null;
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0'].includes(evidence.version) && process.argv.includes('--native-engines')) {
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0'].includes(evidence.version) && process.argv.includes('--native-engines')) {
stage = 'native DeepSeek SDK';
const output = await run(['scripts/verify-engines.mjs'], 'engines.log');
actualEngine = JSON.parse(output.trim().split('\n').at(-1));
@@ -90,7 +95,7 @@ try {
assert.equal(actualEngine.modelRequests, 0); assert.equal(actualEngine.rootExited, true); assert.equal(actualEngine.nativeMethods.length, 6);
}
let actualBrowser = null;
if (['1.10.0', '1.10.1', '1.11.0'].includes(evidence.version)) {
if (['1.10.0', '1.10.1', '1.11.0', '1.12.0'].includes(evidence.version)) {
stage = 'contained browser runtime';
const output = await run(['scripts/verify-browser.mjs', '--app-root', sourceRoot, '--contained'], 'browser.log');
actualBrowser = JSON.parse(output.trim().split('\n').at(-1));