Skip to content
  1. Home
  2. workspace
Checking…
Demo view — sanitized data only. Sign in over HTTPS to create projects and manage the workspace.

AI Engineering Workspace

Partial

Chat, 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

app/scripts/owner-provision.mjs

1// Provisions / rotates the Platform Owner's TEMPORARY password. Run on the server as the app's OS user: node scripts/owner-provision.mjs [--rotate]
2// The plaintext is written ONLY to ~/.config/zoo-cloud-studio/owner-temp-password (0600). It is never printed, logged, or committed; the DB gets a scrypt hash.
3import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import pg from "pg";
4import { generatePassword, hashPassword } from "../src/lib/pwauth-core.mjs";
5const CFG = path.join(os.homedir(), ".config/zoo-cloud-studio"), out = path.join(CFG, "owner-temp-password");
6if (fs.existsSync(out) && !process.argv.includes("--rotate")) { console.error("owner-temp-password already exists; pass --rotate to replace it"); process.exit(1); }
7const c = new pg.Client({ connectionString: `postgres://studio:${encodeURIComponent(fs.readFileSync(path.join(CFG, "pg-password"), "utf8").trim())}@127.0.0.1:5432/studio` }); await c.connect();
8const pw = generatePassword(32); const now = new Date().toISOString();
9await c.query("BEGIN");
10await c.query("UPDATE users SET email='belayetriadbd@gmail.com', name='Belayet Riad', platform_admin=1, status='active' WHERE id='usr_owner'");
11await c.query(`INSERT INTO user_credentials(user_id,pw_hash,must_change,failed,locked_until,changed_at) VALUES('usr_owner',$1,1,0,0,$2)
12 ON CONFLICT(user_id) DO UPDATE SET pw_hash=EXCLUDED.pw_hash, must_change=1, failed=0, locked_until=0`, [hashPassword(pw), now]);
13await c.query("DELETE FROM sessions WHERE user_id='usr_owner'"); // existing sessions are re-established after the password change
14await c.query("COMMIT"); await c.end();
15fs.mkdirSync(CFG, { recursive: true, mode: 0o700 }); fs.writeFileSync(out, pw + "\n", { mode: 0o600 });
16console.log("owner credential provisioned; temporary password stored in", out, "(0600). It is not displayed.");
17

Conversation

Partial
Sign 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.