AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-only- ..
- _clean.mjs
- acceptance.mjs
- ai-adapters.mjs
- ai-enqueue.mjs
- central.mjs
- deploy-flow.mjs
- external-vps.mjs
- fake-opencode.mjs
- gates.mjs
- immersive.mjs
- lower.mjs
- nexus.mjs
- oidc-core.mjs
- oidc-flow.mjs
- opencode-engine.mjs
- owner-auth.mjs
- proxy.mjs
- retake-landing.mjs
- rls.mjs
- run.mjs
- services.mjs
- shot-central.mjs
- tenant-isolation.mjs
- trusted-https.mjs
- web-shots.mjs
- with-derived.mjs
app/src/app/api/contact/route.ts
1import { asSystem, db, now } from "@/lib/db";2import { isSecure, sameOrigin } from "@/lib/auth";3// Public contact form. HTTPS only (it carries an email address), same-origin, validated, globally rate-limited. Stored; no email is sent.4export const POST = (req: Request) => asSystem(() => handle(req)); // anonymous public form: explicit system scope, input validated + rate limited below5async function handle(req: Request) {6 if (!(await isSecure())) return Response.json({ error: "HTTPS required" }, { status: 403 });7 if (!(await sameOrigin())) return Response.json({ error: "cross-origin rejected" }, { status: 403 });8 const b = await req.json().catch(() => ({})); const name = String(b.name ?? "").trim(), email = String(b.email ?? "").trim(), message = String(b.message ?? "").trim();9 if (name.length < 2 || name.length > 80 || !/^[^\s@]{1,64}@[^\s@]{1,190}\.[^\s@]{2,}$/.test(email) || message.length < 10 || message.length > 2000) return Response.json({ error: "Please provide a name, a valid email and a message of 10–2000 characters." }, { status: 422 });10 const recent = await db().prepare("SELECT COUNT(*) n FROM contact_requests WHERE created_at > ?").get(new Date(Date.now() - 3_600_000).toISOString()) as any;11 if (recent.n >= 20) return Response.json({ error: "Too many requests right now; try again later." }, { status: 429 });12 await db().prepare("INSERT INTO contact_requests(name,email,message,created_at) VALUES(?,?,?,?)").run(name, email, message, now()); return Response.json({ ok: true });13}14
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 692573d on master.
Approval requests
None pending.