| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Control plane for a hosted coding-agent SDK. Authenticate a user, spin up a per-session Cloudflare Durable Object, spawn a sandboxed dev box on Modal running OpenCode, and stream the agent’s work back over WebSocket — multi-tenant, bring-your-own-key, with durable run history.
Live demo — Chat UI · https://app.omoios.dev API · https://agents.omoios.dev (/health → {"status":"ok"})
The full pipeline is proven end-to-end against the deployed stack:
chat → control plane → Modal sandbox → opencode → model → streamed reply
The sandbox is a real dev box, not a file editor — it clones a repo, installs dependencies, and runs code. In one end-to-end run it cloned expressjs/express, ran npm install, and executed the project’s full 1249-test suite inside the spawned sandbox, streaming the result back to the UI.
Verified live (2026-06-14) — npm run e2e:prod:journey drives one real session against the deployed control plane + a Modal sandbox on GLM-5.2 (1M-context), fully headless — 6/6 checks pass:
flowchart LR
U["Chat SPA\napp.omoios.dev"] -- "HTTPS + WS" --> W["Cloudflare Worker\nHono router\nagents.omoios.dev"]
W -- "requireAuth / resolveContext" --> A[("Better Auth + app data\nPostgres via Hyperdrive / Neon")]
W -- "DO id = org:session" --> DO["SessionDO\nprivate SQLite · WS hub\nFIFO queue · alarm watchdog"]
DO -- "HMAC-signed spawn" --> M["Modal sandbox\nOpenCode + bridge"]
M -- "WSS dial-back (token-hash auth)" --> DO
M -- "model calls (BYOK / gateway)" --> L["LLM provider"]
DO -- "durable flush on every terminal transition" --> R[("agent_runs / agent_run_events\nPostgres")]
Cloudflare Workers · Durable Objects · Hono · Better Auth · Postgres (Hyperdrive / Neon) · Drizzle · Modal · OpenCode · TypeScript · Vitest · Vite + Void (chat SPA).
npm run setup # one-time: install deps, verify .dev.vars, start local Postgres, run migrations
npm run dev:local # control plane (:8789) + chat UI (:5174) together
npm test # full suite — Workers pool + Postgres
npm run doctor # read-only health check (Node, ports, migration drift, stale procs)Secrets go in .dev.vars for local dev (wrangler secret put … in prod). See AGENTS.md for the full operator guide and CODEBASE_MAP.md for the layout map.
This project was built to exercise a clean hexagonal cutover off a Modal-hardwired prototype toward swappable ports & adapters. The reasoning is documented, not just the code:
src/ control-plane worker: index.ts (Hono entry), do/ (SessionDO, OrgEventsDO),
lib/ (15 ports + adapters + fakes), routes/, db/pg/ (Drizzle schema)
routes/ additive Void file-route handlers mounted into the Hono app
packages/ chat/ (Void SSR SPA), modal-infra/ + sandbox-runtime/ (vendored Python data plane)
test/ 1,424 tests: integration, ports (conformance + fault), node, transport, e2e scripts
docs/ decisions/ (ADRs), design/ (target pack), references/, runbooks/
Honest scope boundaries — the core pipeline works; these are deliberate v1 cuts:
Single-author project by Kevin Hill. Built as a deep exploration of agent-orchestrated development on Cloudflare’s edge platform.
| Back | FazBrowse Home | New Git URL |