Download, verify, and install the browser engine

Each host build pins one engine version in src-tauri/browser-engine.json.
The new engine manager downloads that ZIP over HTTPS, makes sure that its
size and SHA-256 match the pin, extracts it safely to the local app data
folder, and marks the installation last. It can also install a local
ZIP, cancel, report progress, and remove the engine. The host refuses an
engine that sends another protocol with its ready event.
This commit is contained in:
Knotty Wyvern
2026-10-29 00:57:51 -07:00
parent 48b8249ba6
commit 6004e126f7
16 changed files with 815 additions and 33 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ const server = net.createServer(client => {
const line = buffer.slice(0, end); buffer = buffer.slice(end + 1);
const message = JSON.parse(line);
if (message.token) { assert.equal(message.token, token); console.log('PASS runtime authentication'); }
if (message.event === 'ready') client.write(JSON.stringify({ id: 1, command: 'state', args: {} }) + '\n');
if (message.event === 'ready') { assert.equal(message.protocol, 1); assert.match(message.version, /^\d+\.\d+\.\d+/); console.log('PASS runtime protocol'); client.write(JSON.stringify({ id: 1, command: 'state', args: {} }) + '\n'); }
if (message.id === 1) { assert.deepEqual(message.result.profiles, [{ id: 'user', name: 'User' }]); client.write(JSON.stringify({ id: 2, command: 'newTab', args: {} }) + '\n'); }
if (message.id === 2) { assert.ok(message.result.tabId); console.log('PASS packaged runtime commands'); client.write(JSON.stringify({ id: 3, command: 'shutdown', args: {} }) + '\n'); }
if (message.id === 3) console.log('PASS clean shutdown response');