Skip to content
  1. Home
  2. workspace
Checking…
Demo view — sanitized data only. Sign in over HTTPS to create projects and manage the workspace.

AI Engineering Workspace

Partial

Chat, 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

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

Partial
Sign in to start AI sessions.

Task checklist

  • Application shell deployed
  • Persistent projects
  • Agent runtime
  • Sandboxed terminal

Execution activity

No agent sessions. Git HEAD fb22adb on master.

Approval requests

None pending.