feat(companion): add HTTPS pairing and scoped device authority

This commit is contained in:
Agent Workbench Dev
2026-10-31 17:38:57 +08:00
parent 06c9fac87e
commit dfe2e40387
24 changed files with 2572 additions and 5 deletions
+2
View File
@@ -48,6 +48,8 @@ server.on('request', createRequestHandler({ appDirectory, server, store, provide
async function shutdown() {
if (closing) return; closing = true;
clearInterval(modelImportSync);
try { await server.workbenchCompanion?.close(); }
catch { closing = false; console.error('Workbench shutdown rejected while companion gateway is starting.'); return; }
try { await Promise.all([provider.abortRequests(), runtime.stopAll()]); }
catch (cause) { closing = false; provider.resumeRequests(); console.error('Workbench shutdown remains unverified: ' + provider.redact(cause.message)); return; }
for (const response of clients) response.end();