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.

5.7 KB
Raw Blame
// MSO's shell manifest — the mso-specific config that drives the generic
// AppShell. This is the ONE place brand + the built-in app set + shell features
// are declared; appshell core imports none of it. Runtime-installed apps are
// merged on top in os-root (they come from a hook, not static config).
import { createElement } from "react";
import type { AppDescriptor, Brand, FeatureDescriptor } from "@/features/appshell";
import { DEFAULT_FEATURES } from "@/features/appshell";
import { filesManagerApp } from "@/features/files-manager";
import { camoufoxBrowserApp } from "@/features/camoufox-browser";
import { codeEditorApp } from "@/features/code-editor";
import { osTerminalApp, claudeCodeApp } from "@/features/os-terminal";
import { mediaStudioApp } from "@/features/media-studio";
import { reelEditorApp } from "@/features/reel-editor";
import { mediaViewerApp } from "@/features/media-viewer";
import { appStoreApp } from "@/features/app-store";
import { createAppApp } from "@/features/create-app";
import { systemMonitorApp } from "@/features/system-monitor";
import { assistantApp } from "@/features/assistant";
import { hermesApp, nineRouterApp, openclawApp, orcaApp } from "@/features/managed-apps";
import { osSettingsApp } from "@/features/os-settings";
import { quicklinksApp } from "@/features/quicklinks";
import { docsApp } from "@/features/docs";
import { integrationsApp } from "@/features/integrations";
import { channelsApp } from "@/features/channels";
import { agentGroupApp } from "@/features/agent-group";
import { workflowsApp } from "@/features/workflows";
import { n8nApp } from "@/features/n8n";
import { organizationApp } from "@/features/organization";
import { memoryGraphApp } from "@/features/memory-graph";
import { agentVaultApp } from "@/features/agent-vault";
import { cloudflareApp, dokployApp } from "@/features/infrastructure";
import { themeQuickPickerFeature } from "./theme-quick-picker";
import { serverConnectionStatusFeature } from "./server-connection-status";
import { APP_MARKS } from "./brand-marks";

export const TOPSIDE_BRAND: Brand = {
  name: "MSO",
  logo: createElement("img", { src: "/icon.svg", alt: "", width: 16, height: 16 }),
  idleAppName: "Finder",
};

// Preserve the historical localStorage namespace so existing saved layouts
// aren't orphaned (the generic appshell default is "appshell:layout").
export const TOPSIDE_PERSIST_KEY = "mso:layout";

// Short URL slug per app for deep-linking (`/files`), assigned here so the app
// slices stay URL-agnostic. Falls back to the app id when unmapped.
const withSlug = (app: AppDescriptor, slug: string): AppDescriptor => ({ ...app, slug });
// Pinned = the mobile dock / quick-shortcut set (appshell stays id-agnostic).
const pin = (app: AppDescriptor): AppDescriptor => ({ ...app, pinned: true });
// App artwork is a consumer concern. Built-ins get tiny generated WebP artwork
// here while each feature slice keeps a lightweight Lucide fallback for reuse
// outside MSO. `iconFill` tells AppIcon the WebP already owns its tile treatment.
const withArtwork = (app: AppDescriptor): AppDescriptor => {
  const icon = APP_MARKS[app.id];
  return icon ? { ...app, icon, iconFill: true } : app;
};

// Built-in apps (dock order; media-viewer is noDock). Runtime apps append.
export const BUILTIN_APPS: AppDescriptor[] = [
  pin(withSlug(withArtwork(filesManagerApp), "files")),
  pin(withSlug(withArtwork(camoufoxBrowserApp), "browser")),
  withSlug(withArtwork(codeEditorApp), "code"),
  pin(withSlug(withArtwork(osTerminalApp), "terminal")),
  pin(withSlug(withArtwork(claudeCodeApp), "claude")),
  withSlug(withArtwork(mediaStudioApp), "studio"),
  withSlug(withArtwork(reelEditorApp), "reel"),
  withSlug(withArtwork(mediaViewerApp), "viewer"),
  withSlug(withArtwork(appStoreApp), "store"),
  pin(withSlug(withArtwork(systemMonitorApp), "monitor")),
  withSlug(withArtwork(assistantApp), "assistant"),
  withSlug(withArtwork(hermesApp), "hermes"),
  withSlug(withArtwork(openclawApp), "openclaw"),
  withSlug(withArtwork(nineRouterApp), "9router"),
  pin(withSlug(integrationsApp, "connections")),
  pin(withSlug(channelsApp, "channels")),
  pin(withSlug(withArtwork(workflowsApp), "workflows")),
  pin(withSlug(withArtwork(n8nApp), "n8n")),
  pin(withSlug(memoryGraphApp, "memory")),
  withSlug(withArtwork(organizationApp), "organization"),
  withSlug(withArtwork(dokployApp), "dokploy"),
  withSlug(withArtwork(cloudflareApp), "cloudflare"),
  // Keep Docs + Settings on the first 24-icon mobile home page. Quicklinks is
  // non-pinned and may begin page 2 as the built-in catalog grows.
  // Docs is deliberately dockable, not noDock: for a signed-out visitor it is the
  // only app that explains what they are looking at and how to get their own.
  withSlug(withArtwork(docsApp), "docs"),
  pin(withSlug(withArtwork(osSettingsApp), "settings")),
  withSlug(agentVaultApp, "agent-vault"),
  withSlug(withArtwork(agentGroupApp), "agent-groups"),
  withSlug(withArtwork(quicklinksApp), "links"),
  withSlug(withArtwork(createAppApp), "create"),
  withSlug(withArtwork(orcaApp), "orca"),
];

// Shell features — the generic brand-free set now lives INSIDE the appshell
// slice (appshell/features/*) and ships as one bundle, DEFAULT_FEATURES. mso
// uses them verbatim; trim/extend by spreading ([...DEFAULT_FEATURES, …]). Each
// mounts into a named slot (overlay/rightPanel/notifications/topPill/
// controlCenter/today), so a feature absent from the array just doesn't render.
// Settings stays the `os-settings` app (its own slice). mso adds one consumer
// feature: the theme-preset switcher in the menu-bar status cluster. Update
// notices are not a shell feature; they live only in Settings.
export const TOPSIDE_FEATURES: FeatureDescriptor[] = [...DEFAULT_FEATURES, serverConnectionStatusFeature, themeQuickPickerFeature];