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/config/route.ts

1import { requireWrite } from "@/lib/auth";
2import { platform } from "@/lib/tenant";
3import { setSetting } from "@/lib/db";
4import { audit } from "@/lib/audit";
5import { CONFIG_KEYS, resolveConfig, validate, type ConfigKey } from "@/lib/config";
6export const dynamic = "force-dynamic";
7export async function GET() { const g = await platform(); if (g.res) return g.res; return Response.json(await resolveConfig()); }
8// POST {values:{KEY:"value"|""}} — empty clears the override (falls back to derived). Env vars always win and cannot be edited here.
9export async function POST(req: Request) {
10 const deny = await requireWrite(); if (deny) return deny; const b = await req.json().catch(() => ({})); const vals = (b.values ?? {}) as Record<string, unknown>; const errors: Record<string, string> = {};
11 for (const [k, v] of Object.entries(vals)) { if (!(CONFIG_KEYS as readonly string[]).includes(k)) { errors[k] = "unknown key"; continue; } if (process.env[k]) { errors[k] = "set by environment; cannot be overridden here"; continue; } const e = validate(k as ConfigKey, String(v ?? "").trim()); if (e) errors[k] = e; }
12 if (Object.keys(errors).length) return Response.json({ error: "validation failed", errors }, { status: 422 });
13 for (const [k, v] of Object.entries(vals)) await setSetting(`config.${k}`, String(v ?? "").trim());
14 await audit("admin", "config.update", "endpoints", { keys: Object.keys(vals) }); return Response.json({ ok: true, config: await resolveConfig() });
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 1c27633 on master.

Approval requests

None pending.