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

feat([codex5-onboarding-capability-map]): capability map of connected systems

Adam Eivy9ac3eca03fc6
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 8ec809d5dc..cc9a40ab02 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -64,6 +64,7 @@ const DataManager = lazyWithReload(() => import('./pages/DataManager'));
const Insights = lazyWithReload(() => import('./pages/Insights'));
const Instances = lazyWithReload(() => import('./pages/Instances'));
const SystemHealthPage = lazyWithReload(() => import('./pages/SystemHealthPage'));
+const CapabilityMap = lazyWithReload(() => import('./pages/CapabilityMap'));
const MeatSpace = lazyWithReload(() => import('./pages/MeatSpace'));
const Post = lazyWithReload(() => import('./pages/Post'));
const Review = lazyWithReload(() => import('./pages/Review'));
@@ -193,6 +194,7 @@ export default function App() {
<Route path="insights/:tab" element={<Insights />} />
<Route path="instances" element={<Instances />} />
<Route path="system-health" element={<SystemHealthPage />} />
+ <Route path="capabilities" element={<CapabilityMap />} />
<Route path="loops" element={<Loops />} />
<Route path="meatspace" element={<Navigate to="/meatspace/overview" replace />} />
<Route path="meatspace/:tab" element={<MeatSpace />} />
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 88771ef0b9..42f5a0ad74 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -297,6 +297,7 @@ const navItems = [
icon: HardDrive,
defaultTo: '/data',
children: [
+ { to: '/capabilities', label: 'Capabilities', icon: Compass },
{ to: '/data', label: 'Data', icon: HardDrive },
{ to: '/instances', label: 'Instances', icon: Network },
{ to: '/loops', label: 'Loops', icon: RefreshCw },
diff --git a/client/src/pages/CapabilityMap.jsx b/client/src/pages/CapabilityMap.jsx
new file mode 100644
index 0000000000..935d5725b0
--- /dev/null
+++ b/client/src/pages/CapabilityMap.jsx
@@ -0,0 +1,102 @@
+import { Link } from 'react-router-dom';
+import {
+ CheckCircle, AlertTriangle, XCircle, Circle, ChevronRight, LayoutGrid,
+} from 'lucide-react';
+import * as api from '../services/api';
+import BrailleSpinner from '../components/BrailleSpinner';
+import { useAutoRefetch } from '../hooks/useAutoRefetch';
+
+// Status presentation. Mirrors the server's CAPABILITY_STATUS tiers.
+const STATUS_STYLE = {
+ ok: { color: 'text-port-success', bg: 'bg-port-success/10', border: 'border-port-success/30', icon: CheckCircle, label: 'Ready' },
+ warn: { color: 'text-port-warning', bg: 'bg-port-warning/10', border: 'border-port-warning/30', icon: AlertTriangle, label: 'Degraded' },
+ error: { color: 'text-port-error', bg: 'bg-port-error/10', border: 'border-port-error/30', icon: XCircle, label: 'Error' },
+ unconfigured: { color: 'text-gray-500', bg: 'bg-port-card', border: 'border-port-border', icon: Circle, label: 'Not set up' },
+};
+
+const OVERALL_LABEL = {
+ ok: 'All systems ready',
+ warn: 'Some systems degraded',
+ error: 'Action needed',
+ unconfigured: 'Setup incomplete',
+};
+
+function CapabilityRow({ cap }) {
+ const style = STATUS_STYLE[cap.status] || STATUS_STYLE.unconfigured;
+ const Icon = style.icon;
+ return (
+ <Link
+ to={cap.settingsPath}
+ className={`flex items-center gap-3 px-4 py-3 rounded-lg border ${style.border} ${style.bg} hover:border-port-accent/60 transition-colors group`}
+ >
+ <Icon size={18} className={`${style.color} shrink-0`} />
+ <div className="min-w-0 flex-1">
+ <div className="flex items-center gap-2">
+ <span className="font-semibold text-white truncate">{cap.label}</span>
+ <span className={`text-xs px-1.5 py-0.5 rounded ${style.bg} ${style.color} border ${style.border}`}>
+ {style.label}
+ </span>
+ </div>
+ <p className="text-sm text-gray-400 truncate">{cap.summary}</p>
+ </div>
+ <ChevronRight size={16} className="text-gray-600 group-hover:text-port-accent shrink-0" />
+ </Link>
+ );
+}
+
+export default function CapabilityMap() {
+ const { data, loading } = useAutoRefetch(
+ () => api.getCapabilities({ silent: true }),
+ 20_000,
+ );
+
+ if (loading) {
+ return (
+ <div className="flex items-center justify-center h-64">
+ <BrailleSpinner text="Loading capabilities" />
+ </div>
+ );
+ }
+
+ if (!data) {
+ return <div className="p-6 text-gray-400">Capability map unavailable.</div>;
+ }
+
+ const caps = Array.isArray(data.capabilities) ? data.capabilities : [];
+ const summary = data.summary || { ok: 0, warn: 0, error: 0, unconfigured: 0, overall: 'unconfigured' };
+ const overallStyle = STATUS_STYLE[summary.overall] || STATUS_STYLE.unconfigured;
+ const OverallIcon = overallStyle.icon;
+
+ return (
+ <div className="max-w-3xl mx-auto space-y-4">
+ <div className="flex items-center justify-between gap-3 flex-wrap">
+ <h2 className="text-xl font-bold text-white flex items-center gap-2">
+ <LayoutGrid size={20} />
+ Capabilities
+ </h2>
+ <div className={`flex items-center gap-2 px-3 py-1.5 rounded-lg border ${overallStyle.border} ${overallStyle.color} ${overallStyle.bg}`}>
+ <OverallIcon size={16} />
+ <span className="font-semibold">{OVERALL_LABEL[summary.overall] || 'Status'}</span>
+ </div>
+ </div>
+
+ <p className="text-sm text-gray-500">
+ Each connected system's status at a glance — a setup checklist and a runtime health overview.
+ Select a row to configure it.
+ </p>
+
+ <div className="flex items-center gap-4 text-xs text-gray-400">
+ <span className="flex items-center gap-1"><CheckCircle size={12} className="text-port-success" /> {summary.ok} ready</span>
+ <span className="flex items-center gap-1"><AlertTriangle size={12} className="text-port-warning" /> {summary.warn} degraded</span>
+ <span className="flex items-center gap-1"><XCircle size={12} className="text-port-error" /> {summary.error} error</span>
+ <span className="flex items-center gap-1"><Circle size={12} className="text-gray-500" /> {summary.unconfigured} not set up</span>
+ </div>
+
+ <div className="space-y-2">
+ {caps.map((cap) => (
+ <CapabilityRow key={cap.id} cap={cap} />
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/client/src/services/apiSystem.js b/client/src/services/apiSystem.js
index 7759fac9a8..528cfaac68 100644
--- a/client/src/services/apiSystem.js
+++ b/client/src/services/apiSystem.js
@@ -7,6 +7,7 @@ export const getAlertsSummary = (options) => request('/alerts/summary', options)
export const checkHealth = () => request('/system/health');
export const getSystemHealth = (options) => request('/system/health/details', options);
export const getNetworkExposure = (options) => request('/network-exposure/status', options);
+export const getCapabilities = (options) => request('/capabilities', options);
export const updateHealthThresholds = (thresholds) => request('/system/health/thresholds', {
method: 'PUT',
body: JSON.stringify(thresholds)
diff --git a/server/index.js b/server/index.js
index 7c4aa5b3d4..512edbaff5 100644
--- a/server/index.js
+++ b/server/index.js
@@ -15,6 +15,7 @@ import alertsRoutes from './routes/alerts.js';
import appleHealthRoutes from './routes/appleHealth.js';
import avatarRoutes from './routes/avatar.js';
import systemHealthRoutes from './routes/systemHealth.js';
+import capabilitiesRoutes from './routes/capabilities.js';
import appsRoutes from './routes/apps.js';
import referenceReposRoutes from './routes/referenceRepos.js';
import portsRoutes from './routes/ports.js';
@@ -344,6 +345,7 @@ app.set('io', io);
app.use('/api/alerts', alertsRoutes);
app.use('/api/avatar', avatarRoutes);
app.use('/api/system', systemHealthRoutes);
+app.use('/api/capabilities', capabilitiesRoutes);
app.use('/api/apps', appsRoutes);
app.use('/api/apps/:appId/reference-repos', referenceReposRoutes);
app.use('/api/ports', portsRoutes);
diff --git a/server/lib/README.md b/server/lib/README.md
index 785b87463a..1aa502e3e5 100644
--- a/server/lib/README.md
+++ b/server/lib/README.md
@@ -141,6 +141,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub
| Module | Purpose |
|---|---|
+| `capabilityMap.js` | Pure row builders for the Capability Map (per-integration status tiers + rollup); fed by `routes/capabilities.js`. |
| `civitai.js` | Civitai URL parsing + API client. |
| `issueLength.js` | Per-issue size targets fed into text stages. |
| `mediaItemKey.js` | `<kind>:<ref>` key vocabulary for media items. |
diff --git a/server/lib/capabilityMap.js b/server/lib/capabilityMap.js
new file mode 100644
index 0000000000..4e5e9c01dc
--- /dev/null
+++ b/server/lib/capabilityMap.js
@@ -0,0 +1,258 @@
+// Pure row builders for the Capability Map (one page that shows every
+// connected system's status — doubles as a setup checklist and a runtime
+// health overview). The route (server/routes/capabilities.js) gathers each
+// integration's raw status in parallel and hands the shapes here; this module
+// owns the status-tier derivation so it is unit-testable without any I/O.
+//
+// Status tiers:
+// 'ok' — configured and healthy/reachable (green)
+// 'warn' — configured but degraded (amber)
+// 'error' — configured but broken (red)
+// 'unconfigured' — not set up yet (gray) — the setup-checklist signal
+
+export const CAPABILITY_STATUS = Object.freeze({
+ OK: 'ok',
+ WARN: 'warn',
+ ERROR: 'error',
+ UNCONFIGURED: 'unconfigured',
+});
+
+const { OK, WARN, ERROR, UNCONFIGURED } = CAPABILITY_STATUS;
+
+const row = (id, label, settingsPath, { status, configured, summary, detail }) => ({
+ id,
+ label,
+ settingsPath,
+ status,
+ configured,
+ summary,
+ detail: detail ?? null,
+});
+
+const plural = (n, one, many) => (n === 1 ? one : (many ?? `${one}s`));
+
+export function providersRow(providers = [], statuses = {}) {
+ const enabled = (Array.isArray(providers) ? providers : []).filter((p) => p && p.enabled !== false);
+ if (enabled.length === 0) {
+ return row('providers', 'AI Providers', '/ai', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'No AI providers configured',
+ });
+ }
+ // getAllProviderStatuses() returns { ...cache, providers: { [id]: status } }.
+ // A provider that was never marked unavailable has no entry — treat as available.
+ const statusMap = statuses?.providers ?? statuses ?? {};
+ let available = 0;
+ let unavailable = 0;
+ for (const p of enabled) {
+ const s = statusMap?.[p.id];
+ if (!s || s.available) available += 1;
+ else unavailable += 1;
+ }
+ let status = OK;
+ if (available === 0) status = ERROR;
+ else if (unavailable > 0) status = WARN;
+ const parts = [`${enabled.length} configured`, `${available} available`];
+ if (unavailable > 0) parts.push(`${unavailable} unavailable`);
+ return row('providers', 'AI Providers', '/ai', {
+ status,
+ configured: true,
+ summary: parts.join(' · '),
+ detail: { configured: enabled.length, available, unavailable },
+ });
+}
+
+export function calendarRow(accounts = []) {
+ const list = Array.isArray(accounts) ? accounts : [];
+ if (list.length === 0) {
+ return row('calendar', 'Calendar', '/calendar/config', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'No calendar accounts connected',
+ });
+ }
+ const enabled = list.filter((a) => a && a.enabled).length;
+ return row('calendar', 'Calendar', '/calendar/config', {
+ status: enabled > 0 ? OK : WARN,
+ configured: true,
+ summary: enabled > 0
+ ? `${enabled} of ${list.length} ${plural(list.length, 'account')} syncing`
+ : `${list.length} ${plural(list.length, 'account')}, none enabled`,
+ detail: { total: list.length, enabled },
+ });
+}
+
+export function brainRow({ memoryCount = 0, embeddingProviderConfigured = false } = {}) {
+ const count = Number(memoryCount) || 0;
+ if (count === 0 && !embeddingProviderConfigured) {
+ return row('brain', 'Brain & Memory', '/brain/config', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'No memories stored yet',
+ });
+ }
+ let status = OK;
+ if (!embeddingProviderConfigured) status = count > 0 ? WARN : UNCONFIGURED;
+ const summary = `${count} ${plural(count, 'memory', 'memories')} · `
+ + (embeddingProviderConfigured ? 'embeddings configured' : 'no embedding provider');
+ return row('brain', 'Brain & Memory', '/brain/config', {
+ status,
+ configured: count > 0 || embeddingProviderConfigured,
+ summary,
+ detail: { memoryCount: count, embeddingProviderConfigured },
+ });
+}
+
+export function voiceRow(cfg = {}) {
+ const enabled = !!cfg?.enabled;
+ if (!enabled) {
+ return row('voice', 'Voice', '/settings/voice', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'Voice disabled',
+ });
+ }
+ const tts = cfg?.tts?.engine || 'unknown';
+ const stt = cfg?.stt?.engine || 'unknown';
+ return row('voice', 'Voice', '/settings/voice', {
+ status: OK,
+ configured: true,
+ summary: `Enabled · TTS ${tts} · STT ${stt}`,
+ detail: { tts, stt },
+ });
+}
+
+export function networkRow(net = {}) {
+ const https = !!net?.httpsEnabled;
+ const tailscaleHost = net?.cert?.tailscaleHost || null;
+ const tailscale = !!tailscaleHost;
+ if (!https && !tailscale) {
+ return row('network', 'Tailscale & HTTPS', '/instances', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'HTTP only · Tailscale not detected',
+ });
+ }
+ return row('network', 'Tailscale & HTTPS', '/instances', {
+ status: https && tailscale ? OK : WARN,
+ configured: true,
+ summary: [
+ https ? 'HTTPS on' : 'HTTP only',
+ tailscale ? `Tailscale: ${tailscaleHost}` : 'Tailscale not detected',
+ ].join(' · '),
+ detail: { https, tailscaleHost },
+ });
+}
+
+export function genomeRow(genome = {}) {
+ if (!genome?.uploaded) {
+ return row('genome', 'Genome & Health', '/meatspace/genome', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'No genome uploaded',
+ });
+ }
+ const markers = Number(genome?.markerCount) || 0;
+ const counts = genome?.statusCounts || {};
+ const flagged = (Number(counts.concern) || 0) + (Number(counts.major_concern) || 0);
+ return row('genome', 'Genome & Health', '/meatspace/genome', {
+ status: OK,
+ configured: true,
+ summary: `Genome loaded · ${markers} ${plural(markers, 'marker')}`
+ + (flagged > 0 ? ` · ${flagged} flagged` : ''),
+ detail: { markerCount: markers, flagged },
+ });
+}
+
+export function telegramRow({ hasToken = false, hasChatId = false, connected = false, method = 'manual' } = {}) {
+ const configured = !!hasToken && !!hasChatId;
+ if (!configured) {
+ return row('telegram', 'Telegram', '/settings/telegram', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'Not configured',
+ });
+ }
+ return row('telegram', 'Telegram', '/settings/telegram', {
+ status: connected ? OK : WARN,
+ configured: true,
+ summary: `${method} · ${connected ? 'connected' : 'configured (not connected)'}`,
+ detail: { method, connected },
+ });
+}
+
+export function messagesRow(accounts = []) {
+ const list = Array.isArray(accounts) ? accounts : [];
+ if (list.length === 0) {
+ return row('messages', 'Messages', '/messages/config', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'No message accounts connected',
+ });
+ }
+ const enabled = list.filter((a) => a && a.enabled).length;
+ return row('messages', 'Messages', '/messages/config', {
+ status: enabled > 0 ? OK : WARN,
+ configured: true,
+ summary: enabled > 0
+ ? `${enabled} of ${list.length} ${plural(list.length, 'account')} syncing`
+ : `${list.length} ${plural(list.length, 'account')}, none enabled`,
+ detail: { total: list.length, enabled },
+ });
+}
+
+export function appsRow(summary = {}) {
+ const total = Number(summary?.total) || 0;
+ if (total === 0) {
+ return row('apps', 'Apps & Processes', '/apps', {
+ status: UNCONFIGURED,
+ configured: false,
+ summary: 'No apps registered',
+ });
+ }
+ const online = Number(summary?.online) || 0;
+ const stopped = Number(summary?.stopped) || 0;
+ return row('apps', 'Apps & Processes', '/apps', {
+ status: stopped > 0 ? WARN : OK,
+ configured: true,
+ summary: `${total} ${plural(total, 'app')} · ${online} online`
+ + (stopped > 0 ? ` · ${stopped} stopped` : ''),
+ detail: { total, online, stopped },
+ });
+}
+
+/**
+ * Build the ordered list of capability rows from already-fetched raw data.
+ * Every field is optional — a missing/failed source degrades to `unconfigured`
+ * rather than throwing, so one broken integration never blanks the whole page.
+ */
+export function buildCapabilityRows(data = {}) {
+ return [
+ providersRow(data.providers, data.providerStatuses),
+ calendarRow(data.calendarAccounts),
+ brainRow({ memoryCount: data.memoryCount, embeddingProviderConfigured: data.embeddingProviderConfigured }),
+ voiceRow(data.voiceConfig),
+ networkRow(data.network),
+ genomeRow(data.genome),
+ telegramRow(data.telegram),
+ messagesRow(data.messageAccounts),
+ appsRow(data.appSummary),
+ ];
+}
+
+/**
+ * Roll the rows up into a single posture for a header badge.
+ * `overall` is worst-wins across error → warn → unconfigured → ok.
+ */
+export function summarizeCapabilities(rows = []) {
+ const counts = { ok: 0, warn: 0, error: 0, unconfigured: 0 };
+ for (const r of (Array.isArray(rows) ? rows : [])) {
+ if (counts[r?.status] !== undefined) counts[r.status] += 1;
+ }
+ let overall = OK;
+ if (counts.error > 0) overall = ERROR;
+ else if (counts.warn > 0) overall = WARN;
+ else if (counts.unconfigured > 0) overall = UNCONFIGURED;
+ return { ...counts, total: rows.length, overall };
+}
diff --git a/server/lib/capabilityMap.test.js b/server/lib/capabilityMap.test.js
new file mode 100644
index 0000000000..361b307d6b
--- /dev/null
+++ b/server/lib/capabilityMap.test.js
@@ -0,0 +1,183 @@
+import { describe, it, expect } from 'vitest';
+import {
+ CAPABILITY_STATUS,
+ providersRow,
+ calendarRow,
+ brainRow,
+ voiceRow,
+ networkRow,
+ genomeRow,
+ telegramRow,
+ messagesRow,
+ appsRow,
+ buildCapabilityRows,
+ summarizeCapabilities,
+} from './capabilityMap.js';
+
+const { OK, WARN, ERROR, UNCONFIGURED } = CAPABILITY_STATUS;
+
+describe('providersRow', () => {
+ it('is unconfigured with no enabled providers', () => {
+ expect(providersRow([]).status).toBe(UNCONFIGURED);
+ expect(providersRow([{ id: 'a', enabled: false }]).status).toBe(UNCONFIGURED);
+ });
+
+ it('treats never-marked providers as available', () => {
+ const r = providersRow([{ id: 'a' }, { id: 'b' }], { providers: {} });
+ expect(r.status).toBe(OK);
+ expect(r.detail).toEqual({ configured: 2, available: 2, unavailable: 0 });
+ });
+
+ it('warns when some providers are unavailable but at least one is up', () => {
+ const r = providersRow(
+ [{ id: 'a' }, { id: 'b' }],
+ { providers: { b: { available: false, reason: 'rate-limit' } } },
+ );
+ expect(r.status).toBe(WARN);
+ expect(r.detail).toMatchObject({ available: 1, unavailable: 1 });
+ });
+
+ it('errors when no provider is available', () => {
+ const r = providersRow([{ id: 'a' }], { providers: { a: { available: false } } });
+ expect(r.status).toBe(ERROR);
+ });
+
+ it('accepts a bare status map (no providers wrapper)', () => {
+ const r = providersRow([{ id: 'a' }], { a: { available: false } });
+ expect(r.status).toBe(ERROR);
+ });
+});
+
+describe('calendarRow / messagesRow', () => {
+ it('unconfigured with no accounts', () => {
+ expect(calendarRow([]).status).toBe(UNCONFIGURED);
+ expect(messagesRow([]).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok when at least one account is enabled', () => {
+ expect(calendarRow([{ enabled: true }, { enabled: false }]).status).toBe(OK);
+ expect(messagesRow([{ enabled: true }]).status).toBe(OK);
+ });
+
+ it('warns when accounts exist but none enabled', () => {
+ expect(calendarRow([{ enabled: false }]).status).toBe(WARN);
+ });
+});
+
+describe('brainRow', () => {
+ it('unconfigured with no memories and no embedding provider', () => {
+ expect(brainRow({ memoryCount: 0, embeddingProviderConfigured: false }).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok with memories and a configured embedding provider', () => {
+ expect(brainRow({ memoryCount: 5, embeddingProviderConfigured: true }).status).toBe(OK);
+ });
+
+ it('warns with memories but no embedding provider', () => {
+ expect(brainRow({ memoryCount: 5, embeddingProviderConfigured: false }).status).toBe(WARN);
+ });
+
+ it('pluralizes the memory count', () => {
+ expect(brainRow({ memoryCount: 1, embeddingProviderConfigured: true }).summary).toContain('1 memory');
+ expect(brainRow({ memoryCount: 2, embeddingProviderConfigured: true }).summary).toContain('2 memories');
+ });
+});
+
+describe('voiceRow', () => {
+ it('unconfigured when disabled', () => {
+ expect(voiceRow({ enabled: false }).status).toBe(UNCONFIGURED);
+ expect(voiceRow({}).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok when enabled, reporting engines', () => {
+ const r = voiceRow({ enabled: true, tts: { engine: 'kokoro' }, stt: { engine: 'whisper' } });
+ expect(r.status).toBe(OK);
+ expect(r.summary).toContain('kokoro');
+ expect(r.summary).toContain('whisper');
+ });
+});
+
+describe('networkRow', () => {
+ it('unconfigured on plain HTTP with no tailscale', () => {
+ expect(networkRow({ httpsEnabled: false, cert: {} }).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok with HTTPS and a tailscale host', () => {
+ expect(networkRow({ httpsEnabled: true, cert: { tailscaleHost: 'host.ts.net' } }).status).toBe(OK);
+ });
+
+ it('warns when only one of the two is present', () => {
+ expect(networkRow({ httpsEnabled: true, cert: {} }).status).toBe(WARN);
+ expect(networkRow({ httpsEnabled: false, cert: { tailscaleHost: 'h' } }).status).toBe(WARN);
+ });
+});
+
+describe('genomeRow', () => {
+ it('unconfigured when not uploaded', () => {
+ expect(genomeRow({ uploaded: false }).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok when uploaded, surfacing flagged markers', () => {
+ const r = genomeRow({ uploaded: true, markerCount: 12, statusCounts: { concern: 2, major_concern: 1 } });
+ expect(r.status).toBe(OK);
+ expect(r.summary).toContain('3 flagged');
+ });
+});
+
+describe('telegramRow', () => {
+ it('unconfigured without token + chatId', () => {
+ expect(telegramRow({ hasToken: true, hasChatId: false }).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok when configured and connected', () => {
+ expect(telegramRow({ hasToken: true, hasChatId: true, connected: true }).status).toBe(OK);
+ });
+
+ it('warns when configured but not connected', () => {
+ expect(telegramRow({ hasToken: true, hasChatId: true, connected: false }).status).toBe(WARN);
+ });
+});
+
+describe('appsRow', () => {
+ it('unconfigured with no apps', () => {
+ expect(appsRow({ total: 0 }).status).toBe(UNCONFIGURED);
+ });
+
+ it('ok when all online, warns when some stopped', () => {
+ expect(appsRow({ total: 3, online: 3, stopped: 0 }).status).toBe(OK);
+ expect(appsRow({ total: 3, online: 2, stopped: 1 }).status).toBe(WARN);
+ });
+});
+
+describe('buildCapabilityRows', () => {
+ it('returns one row per integration even with empty input', () => {
+ const rows = buildCapabilityRows({});
+ expect(rows).toHaveLength(9);
+ // Every row degrades to unconfigured rather than throwing.
+ expect(rows.every((r) => r.status === UNCONFIGURED)).toBe(true);
+ expect(rows.every((r) => typeof r.settingsPath === 'string' && r.settingsPath.startsWith('/'))).toBe(true);
+ expect(new Set(rows.map((r) => r.id)).size).toBe(9);
+ });
+});
+
+describe('summarizeCapabilities', () => {
+ it('counts each tier and rolls up worst-wins', () => {
+ const rows = [
+ { status: OK }, { status: OK }, { status: WARN }, { status: UNCONFIGURED },
+ ];
+ const s = summarizeCapabilities(rows);
+ expect(s).toMatchObject({ ok: 2, warn: 1, error: 0, unconfigured: 1, total: 4, overall: WARN });
+ });
+
+ it('reports error overall when any row errors', () => {
+ expect(summarizeCapabilities([{ status: OK }, { status: ERROR }]).overall).toBe(ERROR);
+ });
+
+ it('reports ok overall only when every row is ok', () => {
+ expect(summarizeCapabilities([{ status: OK }, { status: OK }]).overall).toBe(OK);
+ });
+
+ it('reports unconfigured overall when only ok + unconfigured rows', () => {
+ expect(summarizeCapabilities([{ status: OK }, { status: UNCONFIGURED }]).overall).toBe(UNCONFIGURED);
+ });
+});
diff --git a/server/lib/index.js b/server/lib/index.js
index e736538d3a..0e28c766a4 100644
--- a/server/lib/index.js
+++ b/server/lib/index.js
@@ -111,6 +111,7 @@ export * from './taskParser.js';
export * from './curatedGenomeMarkers.js';
// === Domain utilities ===
+export * from './capabilityMap.js';
export * from './civitai.js';
export * from './issueLength.js';
export * from './mediaItemKey.js';
diff --git a/server/lib/navManifest.js b/server/lib/navManifest.js
index 7e41e2e9c7..3cb224fba3 100644
--- a/server/lib/navManifest.js
+++ b/server/lib/navManifest.js
@@ -133,6 +133,7 @@ export const NAV_COMMANDS = [
{ id: 'nav.settings.voice', path: '/settings/voice', label: 'Voice', section: 'Settings', aliases: ['settings-voice', 'voice', 'voice-settings'], keywords: ['mic', 'microphone', 'speech', 'tts', 'whisper', 'kokoro'] },
{ id: 'nav.ambient', path: '/ambient', label: 'Ambient', section: 'System', aliases: ['ambient', 'ambient-mode', 'ambient mode'], keywords: ['idle', 'background', 'display', 'screensaver', 'fullscreen'] },
+ { id: 'nav.capabilities', path: '/capabilities', label: 'Capabilities', section: 'System', aliases: ['capabilities', 'capability-map', 'integrations'], keywords: ['status', 'setup', 'checklist', 'connected systems', 'integrations', 'providers', 'health overview'] },
{ id: 'nav.data', path: '/data', label: 'Data', section: 'System', aliases: ['data'] },
{ id: 'nav.instances', path: '/instances', label: 'Instances', section: 'System', aliases: ['instances'] },
{ id: 'nav.loops', path: '/loops', label: 'Loops', section: 'System', aliases: ['loops'] },
diff --git a/server/routes/capabilities.js b/server/routes/capabilities.js
new file mode 100644
index 0000000000..48448723d5
--- /dev/null
+++ b/server/routes/capabilities.js
@@ -0,0 +1,98 @@
+import { Router } from 'express';
+import { asyncHandler } from '../lib/errorHandler.js';
+import { buildCapabilityRows, summarizeCapabilities } from '../lib/capabilityMap.js';
+import { getAllProviders, getProviderById } from '../services/providers.js';
+import { getAllProviderStatuses } from '../services/providerStatus.js';
+import { listAccounts as listCalendarAccounts } from '../services/calendarAccounts.js';
+import { listAccounts as listMessageAccounts } from '../services/messageAccounts.js';
+import { getMemories } from '../services/memory.js';
+import { getConfig as getCosConfig } from '../services/cos.js';
+import { getVoiceConfig } from '../services/voice/config.js';
+import { getNetworkExposureStatus } from '../lib/networkExposure.js';
+import { getGenomeSummary } from '../services/genome.js';
+import { getSettings } from '../services/settings.js';
+import * as telegram from '../services/telegram.js';
+import * as telegramBridge from '../services/telegramBridge.js';
+import * as apps from '../services/apps.js';
+
+const router = Router();
+
+// Resolve whether a memory-embedding provider is actually reachable-by-config
+// (mirrors memoryEmbeddings.initConfig) without firing the live LM Studio probe
+// — the probe auto-loads a model as a side effect, which a read-only status
+// page must not trigger.
+async function resolveEmbeddingProviderConfigured() {
+ const cosConfig = await getCosConfig().catch(() => ({}));
+ const providerId = cosConfig?.embeddingProviderId || 'lmstudio';
+ const provider = await getProviderById(providerId).catch(() => null);
+ return !!(provider && provider.endpoint && provider.enabled !== false);
+}
+
+async function resolveTelegram() {
+ const settings = await getSettings().catch(() => ({}));
+ const method = settings?.telegram?.method || 'manual';
+ if (method === 'mcp-bridge') {
+ const status = telegramBridge.getStatus();
+ return { method, hasToken: status.hasBotToken, hasChatId: status.hasChatId, connected: status.connected };
+ }
+ const status = telegram.getStatus();
+ return {
+ method,
+ hasToken: !!settings?.secrets?.telegram?.token,
+ hasChatId: !!settings?.telegram?.chatId,
+ connected: status.connected,
+ };
+}
+
+// GET /api/capabilities — capability map of every connected system.
+router.get('/', asyncHandler(async (req, res) => {
+ const [
+ providers,
+ providerStatuses,
+ calendarAccounts,
+ messageAccounts,
+ memories,
+ embeddingProviderConfigured,
+ voiceConfig,
+ genome,
+ telegramStatus,
+ appSummary,
+ network,
+ ] = await Promise.all([
+ getAllProviders().catch(() => []),
+ Promise.resolve().then(() => getAllProviderStatuses()).catch(() => ({})),
+ listCalendarAccounts().catch(() => []),
+ listMessageAccounts().catch(() => []),
+ getMemories({ status: 'active' }).catch(() => []),
+ resolveEmbeddingProviderConfigured().catch(() => false),
+ getVoiceConfig().catch(() => ({})),
+ getGenomeSummary().catch(() => ({ uploaded: false })),
+ resolveTelegram().catch(() => ({})),
+ apps.getAppStatusSummary().catch(() => ({ total: 0 })),
+ // Synchronous in-memory read — wrap so a cert-meta read failure degrades
+ // to {} instead of 500-ing the whole page (no try/catch in route bodies).
+ Promise.resolve().then(() => getNetworkExposureStatus()).catch(() => ({})),
+ ]);
+
+ const rows = buildCapabilityRows({
+ providers,
+ providerStatuses,
+ calendarAccounts,
+ messageAccounts,
+ memoryCount: Array.isArray(memories) ? memories.length : 0,
+ embeddingProviderConfigured,
+ voiceConfig,
+ network,
+ genome,
+ telegram: telegramStatus,
+ appSummary,
+ });
+
+ res.json({
+ timestamp: new Date().toISOString(),
+ summary: summarizeCapabilities(rows),
+ capabilities: rows,
+ });
+}));
+
+export default router;