draper
A local-first Mac app that puts Codex and Claude Code behind one runtime layer, one event feed and one set of MCP tools.
- Year
- 2026
- Status
- In progress, internal
- Built with
- Electron, Next.js, TypeScript, Codex app server, Claude Agent SDK, MCP
type RuntimeId = "codex" | "claude"
type RuntimeEvent =
| { type: "text.delta"; text: string }
| { type: "reasoning.delta"; text: string }
| { type: "tool.start"; id: string; name: string; args: JsonValue }
| { type: "tool.progress"; id: string; note: string }
| { type: "tool.end"; id: string; ok: boolean; output?: JsonValue }
| { type: "file.changed"; path: string }
| { type: "approval.request"; request: RuntimeApproval }Draper runs ad production entirely on your own Mac. Both agents are local command-line backends billed to subscriptions you already pay for: Codex through its app server over JSON-RPC on stdio, and Claude Code through the Claude Agent SDK. There are no inference API keys, no gateway and no server the product depends on.
Electron's main process owns the application state, and each runtime adapter owns its provider's protocol. The renderer never talks to an agent directly. It sends commands through a fixed preload bridge and reads one ordered event feed back.
One bridge, one event feed
A command acknowledges a durable intent, and the changes arrive afterwards as events with a cursor, so the window can reload in the middle of a turn and pick up where it left off. App thread IDs are kept apart from each runtime's own session IDs through an opaque binding, so nothing in the interface depends on which agent is underneath.
const page = await window.ads.jobs.open(jobId)
const stop = await window.ads.events.follow(
{ scope: { type: "job", jobId }, after: page.cursor },
(batch) => {
store.apply(batch.events)
void window.ads.events.ack(batch.subscriptionId, batch.through)
},
)
await window.ads.turns.start({
requestId: crypto.randomUUID(),
threadId: page.thread.id,
input: [{ type: "text", text }],
})Pinned backends and shared tools
Codex is pinned to one version and installed into the app's own data folder rather than picked up from Homebrew. Its protocol types are generated from that installed binary as a build step, 94 root types and 608 v2 types, so the app can't drift when Codex upgrades.
The media providers, video understanding and generation among them, become one local MCP server that the agents load, so the same tools are there whichever agent runs the job.