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/gateway/api/jobs/[id]/route.ts
1import { db, now } from "@/lib/db";2import { jerr, nodeAuth } from "@/lib/gateway";3import { applyResult, redact, secretValues } from "@/lib/apps";4export const dynamic = "force-dynamic";5// Agent -> platform: append log text (live logs) and/or finish the job with a result. Bound to (node id, org id, status=delivered).6export async function POST(req: Request, { params }: { params: Promise<{ id: string }> }) {7 const a = await nodeAuth(req); if ("res" in a) return a.res; const { id } = await params; const b = await req.json().catch(() => ({}));8 if (typeof b.log === "string") { const jb = await db().prepare("SELECT payload FROM node_jobs WHERE id=? AND node_id=? AND org_id=?").get(id, a.node.id, a.node.org_id) as any; let txt = b.log.slice(0, 8000); try { const p = JSON.parse(jb?.payload ?? "{}"); if (p.deploymentId) txt = redact(txt, await secretValues(a.node.org_id, p.deploymentId)); } catch {} b.log = txt; const r = await db().prepare("UPDATE node_jobs SET log = RIGHT(log || ?, 60000) WHERE id=? AND node_id=? AND org_id=? AND status='delivered' RETURNING id").get(b.log.slice(0, 8000), id, a.node.id, a.node.org_id); if (!r) return jerr(404, "job not found for this node"); if (b.result === undefined) return Response.json({ ok: true }); }9 const r = await db().prepare("UPDATE node_jobs SET status='done', result=?, finished_at=? WHERE id=? AND node_id=? AND org_id=? AND status='delivered' RETURNING id,kind,payload,node_id,org_id").get(JSON.stringify(b.result ?? null).slice(0, 4000), now(), id, a.node.id, a.node.org_id) as any;10 if (!r) return jerr(404, "job not found for this node"); if (String(r.kind).startsWith("app.") || r.kind === "proxy.apply") await applyResult(r, b.result);11 return Response.json({ ok: true });12}13
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 0eebc42 on master.
Approval requests
None pending.