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/src/lib/status.ts

1// Sanitized public status: only coarse component health and the release label. No IPs, hostnames, counts of users, or secrets.
2import { db, getSetting, asSystem } from "./db";
3import { verifyAudit } from "./audit";
4export type Comp = { name: string; state: "operational" | "degraded" | "down"; detail: string };
5export const publicStatus = () => asSystem(publicStatusInner); // aggregate, non-tenant health only
6async function publicStatusInner(): Promise<{ checkedAt: string; release: string; components: Comp[] }> {
7 const comps: Comp[] = []; const t0 = Date.now();
8 try { await db().prepare("SELECT 1 x").get(); const ms = Date.now() - t0; comps.push({ name: "Database", state: ms < 1000 ? "operational" : "degraded", detail: `query ${ms} ms` }); } catch { comps.push({ name: "Database", state: "down", detail: "unreachable" }); }
9 comps.push({ name: "Web application & API", state: "operational", detail: "serving this page" });
10 const hb = Number(await getSetting("worker.heartbeat", "0")); const age = Date.now() - hb;
11 comps.push({ name: "AI job worker", state: hb && age < 30_000 ? "operational" : hb && age < 120_000 ? "degraded" : "down", detail: hb ? `last heartbeat ${Math.round(age / 1000)} s ago` : "no heartbeat recorded" });
12 try { const a = await verifyAudit(); comps.push({ name: "Audit log integrity", state: a.ok ? "operational" : "down", detail: a.ok ? "hash chain verified" : "chain verification failed" }); } catch { comps.push({ name: "Audit log integrity", state: "down", detail: "check failed" }); }
13 let release = "unknown"; try { const d = await db().prepare("SELECT version,status,started_at FROM deployments ORDER BY started_at DESC LIMIT 1").get() as any; if (d) release = `v${d.version} (${d.status})`; } catch {}
14 return { checkedAt: new Date().toISOString(), release, components: comps };
15}
16

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.