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/qa/acceptance.mjs
1// Owner Acceptance Center: protection, owner-only decisions, bug reports, screenshots. Fixture rows are removed afterwards.2import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import pg from "pg"; import { chromium } from "playwright";3const CFG = path.join(os.homedir(), ".config/zoo-cloud-studio"); const BASE = "https://127.0.0.1:8443"; const tok = fs.readFileSync(path.join(CFG, "admin-token"), "utf8").trim(); const out = path.resolve("../design/screenshots"); const O = { origin: BASE };4const owner = new pg.Pool({ connectionString: `postgres://studio:${encodeURIComponent(fs.readFileSync(path.join(CFG, "pg-password"), "utf8").trim())}@127.0.0.1:5432/studio`, max: 1 });5const results = []; const rec = (n, ok, d = "") => { results.push({ name: n, ok: !!ok }); console.log((ok ? "PASS " : "FAIL ") + n + (ok ? "" : " -> " + d)); };6const b = await chromium.launch();7const anon = await b.newContext({ ignoreHTTPSErrors: true, baseURL: BASE });8rec("anonymous API access to acceptance is refused", [401, 403].includes((await anon.request.get("/api/acceptance")).status()));9rec("anonymous write refused", [401, 403].includes((await anon.request.post("/api/acceptance", { data: { action: "decide", moduleKey: "D20", status: "accepted" }, headers: O })).status()));10const ap = await anon.newPage(); await ap.goto("/superadmin/acceptance", { waitUntil: "networkidle" }); rec("anonymous page shows sign-in and no acceptance data or decision controls", await (async () => { const c = await ap.content(); return /Sign in/.test(c) && !c.includes("Awaiting owner acceptance") && !c.includes("Report a bug") && !c.includes("Integration health"); })());11try {12 for (const [name, vp] of [["desktop", { width: 1440, height: 900 }], ["tablet", { width: 820, height: 1100 }], ["mobile", { width: 390, height: 844 }]]) {13 const ctx = await b.newContext({ viewport: vp, ignoreHTTPSErrors: true, baseURL: BASE }); const r = await ctx.request.post("/api/auth/login", { data: { token: tok }, headers: O }); if (!r.ok()) throw new Error("login " + r.status());14 const pg2 = await ctx.newPage(); await pg2.goto("/superadmin/acceptance", { waitUntil: "networkidle" }); await pg2.waitForSelector("text=Owner Acceptance Center");15 if (name === "desktop") {16 rec("page lists modules with automated state and awaiting-owner badges", (await pg2.locator("details").count()) >= 15 && (await pg2.content()).includes("Awaiting owner acceptance"));17 rec("nothing is Accepted before the owner decides", !(await pg2.content()).includes("Accepted by owner"));18 await pg2.locator("details", { hasText: "Zloud Brand" }).locator("summary").click(); await pg2.getByRole("button", { name: "Accept" }).first().click(); await pg2.waitForTimeout(800);19 const row = (await owner.query("SELECT status,updated_by FROM acceptance WHERE module_key='D20'")).rows[0]; rec("owner pressing Accept records the decision with their identity", row?.status === "accepted" && row.updated_by);20 const bug = await ctx.request.post("/api/acceptance", { data: { action: "bug", title: "QA fixture bug", severity: "minor" }, headers: O }); rec("bug report can be filed", bug.ok());21 rec("invalid module / status refused", (await ctx.request.post("/api/acceptance", { data: { action: "decide", moduleKey: "NOPE", status: "accepted" }, headers: O })).status() === 422 && (await ctx.request.post("/api/acceptance", { data: { action: "decide", moduleKey: "D20", status: "hacked" }, headers: O })).status() === 422);22 rec("cross-origin decision refused", (await ctx.request.post("/api/acceptance", { data: { action: "decide", moduleKey: "D20", status: "accepted" }, headers: { origin: "https://evil.example" } })).status() === 403);23 await owner.query("DELETE FROM acceptance WHERE module_key='D20'"); await owner.query("DELETE FROM acceptance_bugs WHERE title='QA fixture bug'"); await pg2.reload({ waitUntil: "networkidle" });24 }25 const ov = await pg2.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1); rec(`${name}: no horizontal overflow on the acceptance page`, !ov);26 await pg2.screenshot({ path: path.join(out, `acceptance-center-${name}.png`), fullPage: true });27 const lp = await ctx.newPage(); await lp.goto("/", { waitUntil: "networkidle" }); rec(`${name}: landing page shows Zloud brand and tagline`, (await lp.content()).includes("Deploy Everywhere") && (await lp.title()).includes("Zloud")); rec(`${name}: no horizontal overflow on landing`, !(await lp.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1)));28 await lp.screenshot({ path: path.join(out, `zloud-landing-${name}.png`), fullPage: false });29 await ctx.request.post("/api/auth/logout", { headers: O }).catch(() => {}); await ctx.close();30 }31 const lc = await b.newContext({ viewport: { width: 390, height: 844 }, ignoreHTTPSErrors: true, baseURL: BASE }); const lp = await lc.newPage(); await lp.goto("/login", { waitUntil: "networkidle" }); await lp.screenshot({ path: path.join(out, "zloud-login-mobile.png") });32 const pwb = await lp.getByRole("tab", { name: /E-mail/ }).click().then(() => true); const live = await lc.request.post("/api/auth/login", { data: { email: "belayetriadbd@gmail.com", password: "x".repeat(20) }, headers: O });33 rec("PUBLIC site: owner password sign-in is refused while TLS is untrusted", live.status() === 403, String(live.status()));34} finally { await owner.end(); await b.close(); }35const f = results.filter(r => !r.ok); console.log(`${results.length - f.length}/${results.length} acceptance checks passed`);36fs.writeFileSync("../design/verification/acceptance.json", JSON.stringify({ at: new Date().toISOString(), total: results.length, passed: results.length - f.length, results }, null, 1)); process.exit(f.length ? 1 : 0);37
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 1c27633 on master.
Approval requests
None pending.