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/nexus.mjs
1// Zoo Nexus CLIENT contract tests. Nexus is not contacted (no API is documented; the endpoint is only proposed).2import crypto from "node:crypto"; import fs from "node:fs";3import * as N from "../src/lib/nexus-core.mjs";4const results = []; const rec = (n, ok, d = "") => { results.push({ name: n, ok: !!ok }); console.log((ok ? "PASS " : "FAIL ") + n + (ok ? "" : " -> " + d)); };5const throws = (fn, re) => { try { fn(); return false; } catch (e) { return re ? re.test(e.message) : true; } };6const now = 1_800_000_000_000; const kp = crypto.generateKeyPairSync("ed25519"); const other = crypto.generateKeyPairSync("ed25519");7const mk = (o = {}) => N.buildEnvelope({ operation: "task.request", appId: "zca_abc", orgRef: "zc_123", params: { taskType: "deploy-check", projectId: "prj_1" }, now, ...o });8const e = mk();9rec("envelope carries schema, scope, correlation id, idempotency key and a bounded deadline", e.schema === N.NEXUS_SCHEMA && e.scope === "nexus:task:write" && /^cor_/.test(e.correlationId) && /^idem_/.test(e.idempotencyKey) && Date.parse(e.deadline) - Date.parse(e.issuedAt) === 300000);10rec("every operation maps to exactly one scope", N.OPERATIONS.every(o => N.OP_SCOPE[o]) && new Set(Object.values(N.OP_SCOPE)).size === N.OPERATIONS.length);11rec("valid envelope validates", N.validateEnvelope(e, { now }) === true);12const sig = N.signEnvelope(e, kp.privateKey);13rec("Ed25519 signature verifies", N.verifyEnvelope(e, sig, kp.publicKey));14rec("tampered envelope fails verification", !N.verifyEnvelope({ ...e, orgRef: "zc_evil" }, sig, kp.publicKey));15rec("signature from another key fails", !N.verifyEnvelope(e, N.signEnvelope(e, other.privateKey), kp.publicKey));16rec("canonical form is key-order independent", N.canonical({ b: 1, a: { d: 1, c: 2 } }) === N.canonical({ a: { c: 2, d: 1 }, b: 1 }));17rec("expired deadline refused", throws(() => N.validateEnvelope(e, { now: now + 400000 }), /deadline/));18rec("replayed idempotency key refused", throws(() => N.validateEnvelope(e, { now, seenIdempotency: new Set([e.idempotencyKey]) }), /replayed/));19rec("deadline over 24h refused", throws(() => mk({ deadlineMs: 25 * 3600 * 1000 }), /deadline/));20rec("missing scope refused", throws(() => mk({ scopes: ["nexus:task:read"] }), /missing scope/));21rec("unknown operation refused", throws(() => mk({ operation: "shell.exec" }), /unknown operation/));22for (const k of ["apiKey", "password", "sourceCode", "terminal", "prompt", "conversation", "privateKey", "fileContent"]) rec(`params field "${k}" refused (customer secrets, files, terminal and AI conversations never leave Zloud)`, throws(() => mk({ params: { [k]: "x" } }), /forbidden/));23rec("free-text params refused", throws(() => mk({ params: { note: "please deploy my customer's secret site now" } }), /identifier/));24rec("deeply nested params refused", throws(() => mk({ params: { a: { b: { c: { d: { e: "x" } } } } } }), /nested/));25rec("tampered operation/scope pair refused", throws(() => N.validateEnvelope({ ...e, scope: "nexus:health:read" }, { now }), /mismatch/));26rec("MCP descriptors cover every operation, are identifier-only and carry no secrets", N.mcpTools().length === N.OPERATIONS.length && N.mcpTools().every(t => /^zloud\.[a-z]+_[a-z]+$/.test(t.name) && t.inputSchema.additionalProperties === false));27rec("proposed endpoint is only a constant, never contacted", N.PROPOSED_ENDPOINT === "https://nexus.zoobd.com" && !/fetch|https\.request|net\.connect/.test(fs.readFileSync("src/lib/nexus-core.mjs", "utf8").replace(/\/\/.*$/gm, "")));28rec("SSH access to the Zoo IAM server is listed as never requested", N.NEVER_SENT.some(x => /SSH.*IAM/.test(x)));29const f = results.filter(r => !r.ok); console.log(`\n${results.length - f.length}/${results.length} Nexus contract checks passed`);30fs.mkdirSync("../design/verification", { recursive: true }); fs.writeFileSync("../design/verification/nexus.json", JSON.stringify({ at: new Date().toISOString(), live_nexus: "NOT CONTACTED: no API documented; https://nexus.zoobd.com is a proposed endpoint", total: results.length, passed: results.length - f.length, results }, null, 1));31process.exit(f.length ? 1 : 0);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.