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
- services-content.ts
- ssrf.ts
- status.ts
- tenant.ts
- tlsgate.ts
- workspace.ts
app/src/app/gateway/api/rotate/route.ts
1import crypto from "node:crypto";2import { db, now } from "@/lib/db";3import { audit } from "@/lib/audit";4import { jerr, nodeAuth } from "@/lib/gateway";5import { sha } from "@/lib/cloud";6export const dynamic = "force-dynamic";7// Credential rotation: the authenticated node receives a new secret; the old one stops working immediately (hash replaced atomically).8export async function POST(req: Request) {9 const a = await nodeAuth(req); if ("res" in a) return a.res; const secret = crypto.randomBytes(32).toString("hex");10 const r = await db().prepare("UPDATE nodes SET secret_hash=? WHERE id=? AND org_id=? AND revoked_at IS NULL RETURNING id").get(sha(secret), a.node.id, a.node.org_id); if (!r) return jerr(403, "node revoked");11 await audit("node:" + a.node.id, "node.credential_rotated", a.node.id, { org: a.node.org_id, at: now() }); return Response.json({ credential: `${a.node.id}.${secret}` });12}13
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.