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/workspace/[project]/files/route.ts

1import { auditT, tenant } from "@/lib/tenant";
2import { list, readText, remove, root, writeText, WsError } from "@/lib/workspace";
3export const dynamic = "force-dynamic";
4const fail = (e: unknown) => e instanceof WsError ? Response.json({ error: e.message }, { status: e.status }) : Response.json({ error: "internal error" }, { status: 500 });
5type P = { params: Promise<{ project: string }> };
6export async function GET(req: Request, { params }: P) {
7 const g = await tenant("viewer"); if (g.res) return g.res; const ctx = g.ctx;
8 try { const r = await root((await params).project, ctx.orgId); const u = new URL(req.url); const f = u.searchParams.get("file");
9 return Response.json(f ? readText(r, f) : { entries: list(r, u.searchParams.get("dir") ?? "") }); } catch (e) { return fail(e); }
10}
11export async function PUT(req: Request, { params }: P) {
12 const g = await tenant("developer", { write: true }); if (g.res) return g.res; const ctx = g.ctx;
13 try { const { project } = await params; const r = await root(project, ctx.orgId); const b = await req.json().catch(() => ({}));
14 if (typeof b.path !== "string" || typeof b.content !== "string") throw new WsError("path and content required"); writeText(r, b.path, b.content);
15 await auditT(ctx, "workspace.write", `${project}/${b.path}`, { bytes: Buffer.byteLength(b.content) }); return Response.json({ ok: true }); } catch (e) { return fail(e); }
16}
17export async function DELETE(req: Request, { params }: P) {
18 const g = await tenant("developer", { write: true }); if (g.res) return g.res; const ctx = g.ctx;
19 try { const { project } = await params; const r = await root(project, ctx.orgId); const p = new URL(req.url).searchParams.get("path") ?? ""; remove(r, p);
20 await auditT(ctx, "workspace.delete", `${project}/${p}`); return Response.json({ ok: true }); } catch (e) { return fail(e); }
21}
22

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 1c27633 on master.

Approval requests

None pending.