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- ..
- ai.ts
- apps.ts
- audit.ts
- auth.ts
- central-core.d.mts
- central-core.mjs
- central.ts
- cloud.ts
- config.ts
- crypto.ts
- db.ts
- design.ts
- engines.ts
- files.ts
- gates.ts
- gateway.ts
- marketplace-core.d.mts
- marketplace-core.mjs
- metrics.ts
- modules.ts
- motion.ts
- nexus-core.d.mts
- nexus-core.mjs
- oidc-core.d.mts
- oidc-core.mjs
- oidc.ts
- providers.ts
- proxy-core.d.mts
- proxy-core.mjs
- pwauth-core.d.mts
- pwauth-core.mjs
- requirements.ts
- rls.sql.d.mts
- rls.sql.mjs
- services-content.ts
- ssrf.ts
- status.ts
- tenant.ts
- tlsgate.ts
- workspace.ts
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.