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- ..
- apple-touch-icon.png
- brand-guidelines-v2.md
- brand-manifest-v2.json
- favicon-16.png
- favicon-32.png
- favicon-48.png
- favicon.ico
- icon-192.png
- icon-512.png
- maskable-192.png
- maskable-512.png
- source-brand-board.png
- source-crop-icon-fullcolor.png
- source-crop-lockup-dark.png
- source-crop-wordmark-light.png
- zloud-app-icon-1024.png
- zloud-app-icon.svg
- zloud-favicon.svg
- zloud-mark-1024.png
- zloud-mark-512.png
- zloud-mark-mono-512.png
- zloud-mark-mono.svg
- zloud-mark-reversed.svg
- zloud-mark-white-512.png
- zloud-mark-white.svg
- zloud-mark.svg
- zloud-maskable.svg
- zloud-wordmark-dark.svg
- zloud-wordmark-light.svg
- zloud-wordmark-mono.svg
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
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.