client: Windows 客户端(WinUI3 壳 + agent-core;调试用 Electron 壳存档);localserver token 改为常数时间比较

This commit is contained in:
Qiufeng
2026-08-20 20:38:21 +08:00
parent 33b7d57498
commit 9abf7f8213
60 changed files with 10025 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('api', {
status: () => ipcRenderer.invoke('core:status'),
pair: (code, name) => ipcRenderer.invoke('core:pair', code, name),
challenges: () => ipcRenderer.invoke('core:challenges'),
solve: (id, value) => ipcRenderer.invoke('core:solve', id, value),
getConfig: () => ipcRenderer.invoke('core:get-config'),
saveConfig: (cfg) => ipcRenderer.invoke('core:save-config', cfg),
restart: () => ipcRenderer.invoke('core:restart'),
openDataDir: () => ipcRenderer.invoke('app:open-data-dir'),
openWeb: (url) => ipcRenderer.invoke('app:open-web', url),
setAutoStart: (on) => ipcRenderer.invoke('app:set-autostart', on),
getAutoStart: () => ipcRenderer.invoke('app:get-autostart'),
quit: () => ipcRenderer.invoke('app:quit'),
onCoreReady: (cb) => ipcRenderer.on('core-ready', cb),
onCoreError: (cb) => ipcRenderer.on('core-error', cb),
onCoreExit: (cb) => ipcRenderer.on('core-exit', cb),
});