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- ..
- assets
- basic-languages
- editor
- language
- nls
- abap-D-t0cyap.js
- apex-CcIm7xu6.js
- azcli-BA0tQDCg.js
- bat-C397hTD6.js
- bicep-DF5aW17k.js
- cameligo-plsz8qhj.js
- clojure-Y2auQMzK.js
- coffee-Bu45yuWE.js
- cpp-CkKPQIni.js
- csharp-CX28MZyh.js
- csp-D8uWnyxW.js
- css-CaeNmE3S.js
- css.worker-C7XcYe5x.js
- cssMode-DpEkhVlW.js
- cypher-DVThT8BS.js
- dart-CmGfCvrO.js
- dockerfile-CZqqYdch.js
- ecl-30fUercY.js
- editor-CG9c2pE-.js
- editor.js
- elixir-O3PRlgxO.js
- flow9-DqtmStfK.js
- freemarker2-DTUDMAl2.js
- fsharp-BOMdg4U1.js
- go-D_hbi-Jt.js
- graphql-CKUU4kLG.js
- handlebars-qLqoXa-4.js
- hcl-DTaboeZW.js
- html-DTxBj26n.js
- html.worker-VIR_LTyv.js
- htmlMode-DFBg6CMj.js
- index-BVflv2uG.js
- index.js
- ini--YXggpAu.js
- java-CI4ZMsH9.js
- javascript-BiL3JN6i.js
- json.worker-DzWXGkG8.js
- jsonMode-Dz4r0pwo.js
- julia-BwzEvaQw.js
- kotlin-IUYPiTV8.js
- less-C0eDYdqa.js
- lexon-iON-Kj97.js
- liquid-lXEUQRVn.js
- loader.js
- lspLanguageFeatures-IeRAvoKK.js
- lua-DtygF91M.js
- m3-CsR4AuFi.js
- markdown-C_rD0bIw.js
- mdx-Dtr248s4.js
- mips-CiYP61RB.js
- monaco.contribution-BRs4bdz5.js
- monaco.contribution-ChoOM5Gg.js
- monaco.contribution-DbKqsbmO.js
- monaco.contribution-DKFaWvum.js
- msdax-C38-sJlp.js
- mysql-CdtbpvbG.js
- nls.messages-loader.js
- objective-c-CntZFaHX.js
- pascal-r6kuqfl_.js
- pascaligo-BiXoTmXh.js
- perl-DABw_TcH.js
- pgsql-me_jFXeX.js
- php-D_kh-9LK.js
- pla-VfZjczW0.js
- postiats-BBSzz8Pk.js
- powerquery-Dt-g_2cc.js
- powershell-B-7ap1zc.js
- protobuf-BmtuEB1A.js
- pug-BRpRNeEb.js
- python-Cma5OvNe.js
- qsharp-BzsFaUU9.js
- r-f8dDdrp4.js
- razor-C8pOqqry.js
- redis-fvZQY4PI.js
- redshift-45Et0LQi.js
- restructuredtext-C7UUFKFD.js
- ruby-CZO8zYTz.js
- rust-Bfetafyc.js
- sb-3GYllVck.js
- scala-foMgrKo1.js
- scheme-CHdMtr7p.js
- scss-C1cmLt9V.js
- shell-ClXCKCEW.js
- solidity-MZ6ExpPy.js
- sophia-DWkuSsPQ.js
- sparql-AUGFYSyk.js
- sql-32GpJSV2.js
- st-CuDFIVZ_.js
- swift-t-PfMj7W.js
- systemverilog-Ch4vA8Yt.js
- tcl-D74tq1nH.js
- toggleHighContrast-CmI6H2gJ.js
- ts.worker-Dp2_QI6H.js
- tsMode-DgC3tGu_.js
- twig-C6taOxMV.js
- typescript-PjDChiYw.js
- typespec-D-PIh9Xw.js
- vb-Dyb2648j.js
- wgsl-BhLXMOR0.js
- workers-B_Zs9c54.js
- xml-BgCkTIhY.js
- yaml-D0tu26m-.js
app/src/app/api/design/ingest/route.ts
1import { requireWrite } from "@/lib/auth";2import { safeFetch } from "@/lib/ssrf";3import { saveAsset, validateUpload, ALLOWED_DIRS } from "@/lib/design";4import { audit } from "@/lib/audit";5import crypto from "node:crypto";6export const dynamic = "force-dynamic";78/** URL-based design handoff: body {manifestUrl}. The remote manifest lists {path, url, sha256?}; each file is fetched9 * through the SSRF-guarded client, validated, integrity-checked when a hash is given, then published locally.10 * Remote text is stored as data only — never executed or fed to an agent as instructions. */11export async function POST(req: Request) {12 const deny = await requireWrite(); if (deny) return deny;13 const b = await req.json().catch(() => ({})); const url = String(b.manifestUrl ?? "");14 const report: { path: string; ok: boolean; error?: string }[] = [];15 try {16 const mf = await safeFetch(url, { maxBytes: 256 * 1024 }); const man = JSON.parse(mf.bytes.toString("utf8"));17 const files = Array.isArray(man.files) ? man.files.slice(0, 50) : [];18 for (const f of files) {19 const rel = String(f.path ?? ""); const [dir, name, ...rest] = rel.split("/");20 try {21 if (rest.length || !(ALLOWED_DIRS as readonly string[]).includes(dir)) throw new Error("destination not allowed");22 const got = await safeFetch(new URL(String(f.url), mf.finalUrl).toString(), { maxBytes: 5 * 1024 * 1024 });23 if (f.sha256 && crypto.createHash("sha256").update(got.bytes).digest("hex") !== f.sha256) throw new Error("sha256 mismatch");24 const err = validateUpload(dir, name, got.bytes); if (err) throw new Error(err);25 saveAsset(dir, name, got.bytes); report.push({ path: rel, ok: true });26 } catch (e: any) { report.push({ path: rel, ok: false, error: e.message }); }27 }28 } catch (e: any) { await audit("admin", "design.ingest.failed", url, { error: e.message }); return Response.json({ error: e.message }, { status: 422 }); }29 await audit("admin", "design.ingest", url, { files: report.length, ok: report.filter(r => r.ok).length });30 return Response.json({ report });31}32
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.