Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

734 B
Raw Blame
import { json } from "@/lib/api/route";
import { verifyAuth } from "@/lib/agent/server";
import { apiError } from "@/lib/host/request-api";
import { processes, stats } from "@/lib/host/system-api";

export async function handleGetSysProcesses(req: Request): Promise<Response> {
  if (!(await verifyAuth(req))) {
    return json({ error: "unauthorized" }, 401);
  }
  try {
    return json(await processes());
  } catch (e) {
    return apiError("sys/processes", e);
  }
}

export async function handleGetSysStats(req: Request): Promise<Response> {
  if (!(await verifyAuth(req))) {
    return json({ error: "unauthorized" }, 401);
  }
  try {
    return json(await stats());
  } catch (e) {
    return apiError("sys/stats", e);
  }
}