2026-02-07 20:58:25 -08:00
2026-02-07 20:58:25 -08:00
2026-02-07 20:58:25 -08:00
ugh
2026-02-07 19:24:16 -08:00
ugh
2026-02-07 19:24:16 -08:00
ugh
2026-02-07 19:24:16 -08:00
2026-02-07 19:27:26 -08:00
2026-02-07 20:07:11 -08:00
2026-02-07 20:58:25 -08:00
2026-02-07 17:28:14 -08:00
2026-02-07 19:27:26 -08:00
ugh
2026-02-07 19:24:16 -08:00

CodeThing (Electron + Vite + Bun)

CodeThing is a desktop shell for coding agents. This first implementation is:

  1. Codex-first: connects to codex app-server and streams turn/item events.
  2. Provider-ready: renderer speaks a provider abstraction so Claude Code can plug in later.
  3. Typed end-to-end: contracts validate payloads at preload/main boundaries.

Workspace layout

  • /apps/desktop: Electron main + preload process, includes provider and Codex session managers.
  • /apps/renderer: React + Vite UI for session control, conversation, and protocol event stream.
  • /packages/contracts: shared Zod schemas + TypeScript types for IPC and provider events.

Codex prerequisites

  • Install Codex CLI so codex is on your PATH.
  • Authenticate Codex before running CodeThing (for example via API key or ChatGPT auth supported by Codex).
  • CodeThing starts the server via codex app-server per session.

Security and boundary model

  • nodeIntegration: false
  • contextIsolation: true
  • sandbox: true
  • Renderer talks only to window.nativeApi exposed by preload.
  • Preload and main both validate inputs using shared Zod schemas.

Scripts

  • bun run dev: starts contract build/watch, renderer dev server, and Electron process.
  • bun run build: builds contracts, renderer, and desktop bundles through Turbo.
  • bun run typecheck: strict TypeScript checks for all packages.
  • bun run test: runs workspace tests.

Optional:

  • ELECTRON_RENDERER_PORT=5180 bun run dev if 5173 is already in use.

Provider architecture

The renderer now depends on nativeApi.providers.*:

  1. startSession
  2. sendTurn
  3. interruptTurn
  4. stopSession
  5. listSessions
  6. onEvent

Codex is the only implemented provider right now. claudeCode is reserved in contracts/UI but returns a not-implemented error in main-process dispatch.

S
Description
T3 Code fork for Android and server fixes
Readme MIT
902 MiB
0 Stars 1 Watchers 0 Forks
2026-09-20 14:36:07 +02:00
Languages
TypeScript 95.5%
MDX 2.1%
JavaScript 0.7%
Astro 0.3%
CSS 0.3%
Other 0.9%