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- ..
- ai.ts
- apps.ts
- audit.ts
- auth.ts
- central-core.d.mts
- central-core.mjs
- central.ts
- cloud.ts
- config.ts
- crypto.ts
- db.ts
- design.ts
- engines.ts
- files.ts
- gates.ts
- gateway.ts
- marketplace-core.d.mts
- marketplace-core.mjs
- metrics.ts
- modules.ts
- motion.ts
- nexus-core.d.mts
- nexus-core.mjs
- oidc-core.d.mts
- oidc-core.mjs
- oidc.ts
- providers.ts
- proxy-core.d.mts
- proxy-core.mjs
- pwauth-core.d.mts
- pwauth-core.mjs
- requirements.ts
- rls.sql.d.mts
- rls.sql.mjs
- ssrf.ts
- status.ts
- tenant.ts
- tlsgate.ts
- workspace.ts
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 only6async 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
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.