  // Temporary evidence driver: reconnect the real app relay without replacing its guest.
  Object.assign(globalThis, {
    reconnectEvidence: async (tabId: string) => {
      const tab = [...tabs.values()].find((tab) => tab.key.tabId === tabId);
      if (!tab) throw new Error("Evidence tab not attached");
      const { key, debuggee } = tab;
      const before = { webContentsId: debuggee.webContents.id, debuggerAttached: debuggee.debugger.isAttached() };
      detach(key);
      await new Promise((resolve) => setTimeout(resolve, 1000));
      attach(key, debuggee);
      return { before, after: { webContentsId: debuggee.webContents.id, debuggerAttached: debuggee.debugger.isAttached() } };
    },
  });

