Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

850 B
Raw Blame
import { Router } from 'express';
import { asyncHandler } from '../lib/errorHandler.js';
import { getGpuTelemetry, getSystemActivity } from '../services/activeProcessing.js';

const router = Router();

// Bounded activity snapshot: agents, media, 3D, LLM runs, mind, app operations,
// backup, and update state. No GPU shell-out. Clients read it once on subscribe
// and again when `system:activity` invalidates, including after a reconnect.
router.get('/activity', asyncHandler(async (_req, res) => {
  res.json(await getSystemActivity({ includeOllama: true }));
}));

// nvidia-smi samples. No event source — the live-activity inspector polls this
// only while it is visible. Do not call it from the global shell.
router.get('/gpu-telemetry', asyncHandler(async (_req, res) => {
  res.json(await getGpuTelemetry());
}));

export default router;