Initial Coworker app scaffold
Some checks failed
Codex Template Compliance / compliance (push) Successful in 7s
Release Dry Run / release-dry-run (push) Failing after 44s
Build / build (push) Failing after 45s

This commit is contained in:
2026-06-19 01:07:16 +02:00
commit 2ec18964b7
46 changed files with 2582 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { contextBridge, ipcRenderer } from "electron";
const api = {
state: () => ipcRenderer.invoke("state:get"),
providers: {
save: (provider: unknown) => ipcRenderer.invoke("providers:save", provider),
remove: (id: string) => ipcRenderer.invoke("providers:remove", id),
probe: (id: string) => ipcRenderer.invoke("providers:probe", id)
},
brain: {
add: (input: unknown) => ipcRenderer.invoke("brain:add", input),
update: (id: string, patch: unknown) => ipcRenderer.invoke("brain:update", id, patch),
remove: (id: string) => ipcRenderer.invoke("brain:remove", id)
},
workspace: {
open: () => ipcRenderer.invoke("workspace:open"),
list: (id: string) => ipcRenderer.invoke("workspace:list", id),
read: (id: string, relativePath: string) => ipcRenderer.invoke("workspace:read", id, relativePath)
},
agent: {
run: (request: unknown) => ipcRenderer.invoke("agent:run", request)
},
web: {
saveSettings: (settings: unknown) => ipcRenderer.invoke("web:settings", settings),
createPairing: () => ipcRenderer.invoke("web:pairing:create")
}
};
contextBridge.exposeInMainWorld("coworker", api);
export type CoworkerApi = typeof api;