Skip to content
  1. Home
  2. workspace
Checking…
Public 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/app/(app)/console/servers/page.tsx

1import fs from "node:fs";
2import path from "node:path";
3import { Card, MaturityBadge, Notice, PageHeader } from "@/components/ui";
4import { ServersPanel } from "@/components/console-client";
5import { SignInCard } from "@/components/console-ui";
6import { httpsBase } from "@/lib/auth";
7import { DATA_DIR, db } from "@/lib/db";
8import { getCtx, ROLE_LEVEL } from "@/lib/tenant";
9import { nodeState } from "@/lib/cloud";
10export const dynamic = "force-dynamic"; export const metadata = { title: "External VPS" };
11export default async function Servers() {
12 const ctx = await getCtx(); if (!ctx) return <SignInCard what="your servers" />;
13 const instances = (await db().prepare("SELECT id,name FROM instances WHERE org_id=? AND target='external' AND status NOT IN ('terminated','suspended') ORDER BY created_at DESC").all(ctx.orgId) as any[]).map(i => ({ id: String(i.id), name: String(i.name) }));
14 const nodes = (await db().prepare("SELECT id,instance_id,label,hostname,os,agent_version,metrics,last_seen,revoked_at,enroll_used_at FROM nodes WHERE org_id=? ORDER BY created_at DESC").all(ctx.orgId) as any[]).map(n => ({ id: String(n.id), instance_id: String(n.instance_id), label: String(n.label), state: nodeState(n), hostname: n.hostname ?? undefined, os: n.os ?? undefined, agent_version: n.agent_version ?? undefined, metrics: n.metrics ? JSON.parse(n.metrics) : null }));
15 const jobs = (await db().prepare("SELECT id,node_id,kind,status,result FROM node_jobs WHERE org_id=? ORDER BY created_at DESC LIMIT 10").all(ctx.orgId) as any[]).map(j => ({ id: String(j.id), node_id: String(j.node_id), kind: String(j.kind), status: String(j.status), result: j.result ? String(j.result) : null }));
16 let pkg: { file: string; version: string } | null = null; try { const m = JSON.parse(fs.readFileSync(path.join(DATA_DIR, "packages", "manifest.json"), "utf8")); pkg = { file: m.packages[0].file, version: m.packages[0].version }; } catch {}
17 return <><PageHeader title="External VPS" desc="Connect a server you own. The agent connects outbound; you open no inbound ports." badge={<MaturityBadge state="partial" />} />
18 <div className="mb-4"><Notice tone="warn" title="Verified locally only">The enrollment flow, token rules, revocation and job routing are tested against this host. It has not been verified on a separate, independent server.</Notice></div>
19 <Card><ServersPanel instances={instances} nodes={nodes} jobs={jobs} canManage={ROLE_LEVEL[ctx.role] >= ROLE_LEVEL.admin} canJob={ROLE_LEVEL[ctx.role] >= ROLE_LEVEL.developer} origin={await httpsBase()} pkg={pkg} /></Card></>;
20}
21

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 0eebc42 on master.

Approval requests

None pending.