// panes/about.js — runtime metadata, shortcut grid, public links, credits.
import { registerPane } from '../app.js';
import { MCP_BASE, jget, escapeHtml } from '../lib/api.js';
import { fmtJSON, copyToClipboard, ok } from '../lib/ui.js';
const SHORTCUTS = [
['⌘K / Ctrl-K', 'Open command palette'],
['Esc', 'Close palette / modal'],
['↑ ↓ Enter', 'Navigate palette results'],
['1 … 9', 'Quick-jump to a sidebar tab (when palette open)'],
];
const PLATFORM = [
{ tab: 'dashboard', label: 'Dashboard', sub: 'KPIs, service health, activity' },
{ tab: 'agent', label: 'Agent', sub: 'MCP status + live events + search' },
{ tab: 'inbox', label: 'Inbox', sub: 'Sweep & route artifacts' },
{ tab: 'tools', label: 'Tools', sub: 'Browse and invoke MCP tools' },
{ tab: 'items', label: 'Items', sub: 'CRUD against /api/items' },
];
const SERVICES = [
{ tab: 'diffusion', label: 'Diffusion', sub: 'Stable Diffusion sidecar' },
{ tab: 'demand', label: 'Demand', sub: 'Trend-driven design jobs' },
{ tab: 'lang', label: 'Lang', sub: 'Language pipelines' },
{ tab: 'slack', label: 'Slack', sub: 'Slack sidecar' },
{ tab: 'mac', label: 'macOS', sub: 'Native app distribution' },
{ tab: 'files', label: 'Files', sub: 'Platform Studio mirror' },
];
const DEVELOP = [
{ tab: 'api', label: 'API Explorer', sub: 'Hit any backend route' },
{ tab: 'websocket', label: 'WebSocket', sub: 'Live frame console' },
{ tab: 'system', label: 'System', sub: 'Runtime & host facts' },
];
const PUBLIC_LINKS = [
{ url: 'https://webapp.cxllm.io/', label: 'webapp.cxllm.io', sub: 'production' },
{ url: 'https://auth.cxllm.io/if/user/#/library', label: 'App library', sub: 'all CxAI tiles' },
{ url: 'https://api.cxllm.io/', label: 'api.cxllm.io', sub: 'public API gateway' },
{ url: 'https://mcp.cxllm.io/', label: 'mcp.cxllm.io', sub: 'MCP control plane' },
{ url: 'https://files.cxllm.io/', label: 'files.cxllm.io', sub: 'Files Platform Studio' },
{ url: 'https://code.cxllm.io/', label: 'code.cxllm.io', sub: 'code-server' },
{ url: 'https://monitor.cxllm.io/', label: 'monitor.cxllm.io', sub: 'Grafana' },
{ url: 'https://registry.cxllm.io/v2/_catalog', label: 'Container registry', sub: 'cxai/* images' },
];
function linkCardInternal(t) {
return `
| ${escapeHtml(k)} | ${escapeHtml(d)} |
Crow (HTTP/WebSocket) + cpp-httplib (reverse proxy) compiled into a single C++ binary. Static UI is plain ES modules (no build step). All sidecars are reached through /api/<service>/* reverse-proxy routes registered from src/routes/proxy.cpp.
src/routes/api.cpp — items CRUDsrc/routes/system.cpp — /api/version, /api/system, /ws/echosrc/routes/proxy.cpp — diffusion / demand / lang / slack / filessrc/routes/mac.cpp — /api/mac/* native app distributionsrc/routes/pages.cpp — static SPA serving| variable | purpose |
|---|---|
CXWEBAPP_VERSION | Version string returned by /api/version. |
CXWEBAPP_GIT_SHA | Build SHA. |
CXWEBAPP_BUILD_TIME | RFC3339 build timestamp. |
CXWEBAPP_STATIC_DIR | Override static asset directory. |
CXAI_DIFFUSION_UPSTREAM | Diffusion sidecar URL. |
CXAI_DEMAND_UPSTREAM | Demand sidecar URL. |
CXAI_LANG_UPSTREAM | Lang sidecar URL. |
CXAI_SLACK_UPSTREAM | Slack sidecar URL. |
CXAI_FILES_UPSTREAM | Files PostgREST URL. |
FILES_ANON_KEY | PostgREST anon key (injected by proxy). |