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/design/upload/route.ts
1import { requireWrite } from "@/lib/auth";2import { saveAsset, validateUpload, MAX_BYTES } from "@/lib/design";3import { audit } from "@/lib/audit";4export const dynamic = "force-dynamic";5// Authenticated multipart upload: fields dir, file. Files are validated then published only via the manifest.6export async function POST(req: Request) {7 const deny = await requireWrite(); if (deny) return deny;8 if (Number(req.headers.get("content-length") || 0) > MAX_BYTES + 4096) return Response.json({ error: "too large" }, { status: 413 });9 const form = await req.formData().catch(() => null); const f = form?.get("file"); const dir = String(form?.get("dir") ?? "");10 if (!(f instanceof File)) return Response.json({ error: "file required" }, { status: 400 });11 const buf = Buffer.from(await f.arrayBuffer()); const err = validateUpload(dir, f.name, buf);12 if (err) return Response.json({ error: err }, { status: 422 });13 const m = saveAsset(dir, f.name, buf); await audit("admin", "design.upload", `${dir}/${f.name}`, { bytes: buf.length });14 return Response.json({ ok: true, path: `${dir}/${f.name}`, manifestVersion: m.version }, { status: 201 });15}16
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.